From 19c29cb0b420cbd7f49dd295a74583e5923dd15c Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 18 Aug 2020 16:30:08 +1000 Subject: [PATCH 001/335] add cosmos code --- chain/cosmos/address.go | 23 ++++ chain/cosmos/address_test.go | 25 ++++ chain/cosmos/client.go | 140 +++++++++++++++++++++ chain/cosmos/cosmos.go | 148 ++++++++++++++++++++++ chain/cosmos/cosmos_suite_test.go | 13 ++ chain/cosmos/cosmos_test.go | 140 +++++++++++++++++++++ chain/cosmos/gas.go | 38 ++++++ chain/cosmos/tx.go | 198 ++++++++++++++++++++++++++++++ 8 files changed, 725 insertions(+) create mode 100644 chain/cosmos/address.go create mode 100644 chain/cosmos/address_test.go create mode 100644 chain/cosmos/client.go create mode 100644 chain/cosmos/cosmos.go create mode 100644 chain/cosmos/cosmos_suite_test.go create mode 100644 chain/cosmos/cosmos_test.go create mode 100644 chain/cosmos/gas.go create mode 100644 chain/cosmos/tx.go diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go new file mode 100644 index 00000000..ce3eb94a --- /dev/null +++ b/chain/cosmos/address.go @@ -0,0 +1,23 @@ +package cosmos + +import ( + "github.com/cosmos/cosmos-sdk/types" + "github.com/renproject/multichain/api/address" +) + +type AddressDecoder struct { + hrp string +} + +func NewAddressDecoder(hrp string) AddressDecoder { + return AddressDecoder{hrp: hrp} +} + +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + types.GetConfig().SetBech32PrefixForAccount(decoder.hrp, decoder.hrp+"pub") + rawAddr, err := types.AccAddressFromBech32(string(addr)) + if err != nil { + return nil, err + } + return address.RawAddress(rawAddr), nil +} diff --git a/chain/cosmos/address_test.go b/chain/cosmos/address_test.go new file mode 100644 index 00000000..e1932969 --- /dev/null +++ b/chain/cosmos/address_test.go @@ -0,0 +1,25 @@ +package cosmos_test + +// import ( +// "github.com/renproject/multichain/chain/cosmos" +// "github.com/renproject/pack" + +// . "github.com/onsi/ginkgo" +// . "github.com/onsi/gomega" +// ) + +// var _ = Describe("Cosmos", func() { +// Context("when decoding address", func() { +// Context("when decoding terra address", func() { +// It("should work", func() { +// decoder := cosmos.NewAddressDecoder("terra") + +// addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" +// addr, err := decoder.DecodeAddress(pack.NewString(addrStr)) + +// Expect(err).ToNot(HaveOccurred()) +// Expect(addr.AccAddress().String()).Should(Equal(addrStr)) +// }) +// }) +// }) +// }) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go new file mode 100644 index 00000000..c5e6e80a --- /dev/null +++ b/chain/cosmos/client.go @@ -0,0 +1,140 @@ +package cosmos + +import ( + "fmt" + "time" + + "github.com/renproject/multichain/api/account" + "github.com/renproject/pack" + + "github.com/cosmos/cosmos-sdk/client/context" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/client/utils" + rpchttp "github.com/tendermint/tendermint/rpc/client/http" +) + +const ( + // DefaultClientTimeout used by the Client. + DefaultClientTimeout = time.Minute + // DefaultClientTimeoutRetry used by the Client. + DefaultClientTimeoutRetry = time.Second + // DefaultClientHost used by the Client. This should only be used for local + // deployments of the multichain. + DefaultClientHost = "http://0.0.0.0:26657" +) + +// ClientOptions are used to parameterise the behaviour of the Client. +type ClientOptions struct { + Timeout time.Duration + TimeoutRetry time.Duration + Host string +} + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. +func DefaultClientOptions() ClientOptions { + return ClientOptions{ + Timeout: DefaultClientTimeout, + TimeoutRetry: DefaultClientTimeoutRetry, + Host: DefaultClientHost, + } +} + +// WithHost sets the URL of the Bitcoin node. +func (opts ClientOptions) WithHost(host string) ClientOptions { + opts.Host = host + return opts +} + +// A Client interacts with an instance of the Cosmos based network using the REST +// interface exposed by a lightclient node. +type Client interface { + // Account query account with address + Account(address Address) (Account, error) + // Tx query transaction with txHash + Tx(txHash pack.String) (StdTx, error) + // SubmitTx to the Cosmos based network. + SubmitTx(tx Tx, broadcastMode pack.String) (pack.String, error) +} + +type client struct { + opts ClientOptions + cliCtx context.CLIContext + broadcastMode pack.String +} + +// NewClient returns a new Client. +func NewClient(opts ClientOptions, cdc *codec.Codec, broadcastMode pack.String) Client { + httpClient, err := rpchttp.NewWithTimeout(opts.Host, "websocket", uint(opts.Timeout/time.Second)) + if err != nil { + panic(err) + } + + cliCtx := context.NewCLIContext().WithCodec(cdc).WithClient(httpClient).WithTrustNode(true) + + return &client{ + opts: opts, + cliCtx: cliCtx, + broadcastMode: broadcastMode, + } +} + +// Account contains necessary info for sdk.Account +type Account struct { + Address Address `json:"address"` + AccountNumber pack.U64 `json:"account_number"` + SequenceNumber pack.U64 `json:"sequence_number"` + Coins Coins `json:"coins"` +} + +// Account query account with address +func (client *client) Account(addr Address) (Account, error) { + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(addr.AccAddress()) + if err != nil { + return Account{}, err + } + + return Account{ + Address: addr, + AccountNumber: pack.U64(acc.GetAccountNumber()), + SequenceNumber: pack.U64(acc.GetSequence()), + Coins: parseCoins(acc.GetCoins()), + }, nil +} + +// Tx query transaction with txHash +func (client *client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) { + res, err := utils.QueryTx(client.cliCtx, txHash.String()) + if err != nil { + return StdTx{}, 0, err + } + + stdTx := res.Tx.(auth.StdTx) + if res.Code != 0 { + return StdTx{}, 0, fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + } + + return parseStdTx(stdTx), 1 +} + +// SubmitTx to the Cosmos based network. +func (client *client) SubmitTx(ctx context.Context, tx account.Tx) (pack.String, error) { + txBytes, err := tx.Serialize() + if err != nil { + return pack.String(""), fmt.Errorf("bad \"submittx\": %v", err) + } + + res, err := client.cliCtx.WithBroadcastMode(client.broadcastMode.String()).BroadcastTx(txBytes) + if err != nil { + return pack.String(""), err + } + + if res.Code != 0 { + return pack.String(""), fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + } + + return pack.NewString(res.TxHash), nil +} diff --git a/chain/cosmos/cosmos.go b/chain/cosmos/cosmos.go new file mode 100644 index 00000000..3a18dd4c --- /dev/null +++ b/chain/cosmos/cosmos.go @@ -0,0 +1,148 @@ +package cosmos + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/client/utils" + + "github.com/renproject/multichain/compat/cosmoscompat" + "github.com/renproject/pack" + + "github.com/tendermint/tendermint/crypto/secp256k1" + "github.com/tendermint/tendermint/crypto/tmhash" +) + +// NewClient returns returns a new Client with default codec +func NewClient(opts cosmoscompat.ClientOptions) cosmoscompat.Client { + return cosmoscompat.NewClient(opts, simapp.MakeCodec()) +} + +type txBuilder struct { + auth.TxBuilder + cdc *codec.Codec +} + +// NewTxBuilder returns an implementation of the transaction builder interface +// from the Cosmos Compat API, and exposes the functionality to build simple +// Cosmos based transactions. +func NewTxBuilder(options cosmoscompat.TxOptions) cosmoscompat.TxBuilder { + cdc := simapp.MakeCodec() + + return txBuilder{ + TxBuilder: auth.NewTxBuilder( + utils.GetTxEncoder(cdc), + options.AccountNumber.Uint64(), + options.SequenceNumber.Uint64(), + options.Gas.Uint64(), + 0, + false, + options.ChainID.String(), + options.Memo.String(), + options.Fees.Coins(), sdk.DecCoins{}, + ), + cdc: simapp.MakeCodec(), + } +} + +// WithCodec replace codec with custom one +func (builder txBuilder) WithCodec(cdc *codec.Codec) cosmoscompat.TxBuilder { + builder.WithTxEncoder(utils.GetTxEncoder(cdc)) + builder.cdc = cdc + return builder +} + +func (builder txBuilder) BuildTx(sendMsgs []cosmoscompat.MsgSend) (cosmoscompat.Tx, error) { + sdkMsgs := []sdk.Msg{} + for _, sendMsg := range sendMsgs { + sdkMsgs = append(sdkMsgs, sendMsg.Msg()) + } + + signMsg, err := builder.BuildSignMsg(sdkMsgs) + if err != nil { + return nil, err + } + + return &Tx{cdc: builder.cdc, signMsg: signMsg}, nil +} + +// Tx represents a simple Terra transaction that implements the Cosmos Compat +// API. +type Tx struct { + cdc *codec.Codec + signMsg auth.StdSignMsg + signatures []auth.StdSignature +} + +// Hash return txhash bytes +func (tx *Tx) Hash() (pack.Bytes32, error) { + if len(tx.signatures) == 0 { + return pack.Bytes32{}, fmt.Errorf("please do tx.Sign() first to get a hash") + } + + txBytes, err := tx.Serialize() + if err != nil { + return pack.Bytes32{}, err + } + + hashBytes := pack.Bytes32{} + hashBytes.Unmarshal(tmhash.Sum(txBytes), 32) + return hashBytes, nil +} + +// SigBytes that need to be signed before this transaction can be +// submitted. +func (tx *Tx) SigBytes() pack.Bytes { + return tx.signMsg.Bytes() +} + +// Sign the transaction by injecting signatures and the serialized pubkey of +// the signer. +func (tx *Tx) Sign(signatures []cosmoscompat.StdSignature) error { + var stdSignatures []auth.StdSignature + for _, sig := range signatures { + var pubKey secp256k1.PubKeySecp256k1 + copy(pubKey[:], sig.PubKey[:secp256k1.PubKeySecp256k1Size]) + + stdSignatures = append(stdSignatures, auth.StdSignature{ + Signature: sig.Signature, + PubKey: pubKey, + }) + } + + signers := make(map[string]bool) + for _, msg := range tx.signMsg.Msgs { + for _, signer := range msg.GetSigners() { + fmt.Println("SIBONG", signer.String()) + signers[signer.String()] = true + } + } + + for _, sig := range stdSignatures { + signer := sdk.AccAddress(sig.Address()).String() + if _, ok := signers[signer]; !ok { + return fmt.Errorf("wrong signer: %s", signer) + } + } + + if len(signers) != len(stdSignatures) { + return fmt.Errorf("insufficient signers") + } + + fmt.Println("SIBONG", stdSignatures) + tx.signatures = stdSignatures + return nil +} + +// Serialize the transaction. +func (tx *Tx) Serialize() (pack.Bytes, error) { + txBytes, err := tx.cdc.MarshalBinaryLengthPrefixed(auth.NewStdTx(tx.signMsg.Msgs, tx.signMsg.Fee, tx.signatures, tx.signMsg.Memo)) + if err != nil { + return pack.Bytes{}, err + } + + return txBytes, nil +} diff --git a/chain/cosmos/cosmos_suite_test.go b/chain/cosmos/cosmos_suite_test.go new file mode 100644 index 00000000..b1f67bf2 --- /dev/null +++ b/chain/cosmos/cosmos_suite_test.go @@ -0,0 +1,13 @@ +package cosmos_test + +// import ( +// "testing" + +// . "github.com/onsi/ginkgo" +// . "github.com/onsi/gomega" +// ) + +// func TestCosmos(t *testing.T) { +// RegisterFailHandler(Fail) +// RunSpecs(t, "Cosmos Suite") +// } diff --git a/chain/cosmos/cosmos_test.go b/chain/cosmos/cosmos_test.go new file mode 100644 index 00000000..963ac226 --- /dev/null +++ b/chain/cosmos/cosmos_test.go @@ -0,0 +1,140 @@ +package cosmos_test + +// import ( +// "encoding/hex" +// "os" +// "strings" +// "time" + +// "github.com/tendermint/tendermint/crypto/secp256k1" + +// sdk "github.com/cosmos/cosmos-sdk/types" +// "github.com/terra-project/core/app" + +// "github.com/renproject/multichain/chain/cosmos" +// "github.com/renproject/multichain/compat/cosmoscompat" +// "github.com/renproject/pack" + +// . "github.com/onsi/ginkgo" +// . "github.com/onsi/gomega" +// ) + +// var _ = Describe("Cosmos", func() { +// Context("when submitting transactions", func() { +// Context("when sending LUNA to multiple addresses", func() { +// It("should work", func() { +// // Load private key, and assume that the associated address has +// // funds to spend. You can do this by setting TERRA_PK to the +// // value specified in the `./multichaindeploy/.env` file. +// pkEnv := os.Getenv("TERRA_PK") +// if pkEnv == "" { +// panic("TERRA_PK is undefined") +// } + +// addrEnv := os.Getenv("TERRA_ADDRESS") +// if addrEnv == "" { +// panic("TERRA_ADDRESS is undefined") +// } + +// // pkEnv := "a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330" +// // addrEnv := "terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u" + +// pkBz, err := hex.DecodeString(pkEnv) +// Expect(err).ToNot(HaveOccurred()) + +// var pk secp256k1.PrivKeySecp256k1 +// copy(pk[:], pkBz) + +// addr := cosmoscompat.Address(pk.PubKey().Address()) + +// decoder := cosmos.NewAddressDecoder("terra") +// expectedAddr, err := decoder.DecodeAddress(pack.NewString(addrEnv)) +// Expect(err).ToNot(HaveOccurred()) +// Expect(addr).Should(Equal(expectedAddr)) + +// pk1 := secp256k1.GenPrivKey() +// pk2 := secp256k1.GenPrivKey() + +// recipient1 := sdk.AccAddress(pk1.PubKey().Address()) +// recipient2 := sdk.AccAddress(pk2.PubKey().Address()) + +// msgs := []cosmoscompat.MsgSend{ +// { +// FromAddress: cosmoscompat.Address(addr), +// ToAddress: cosmoscompat.Address(recipient1), +// Amount: cosmoscompat.Coins{ +// { +// Denom: "uluna", +// Amount: pack.U64(1000000), +// }, +// }, +// }, +// { +// FromAddress: cosmoscompat.Address(addr), +// ToAddress: cosmoscompat.Address(recipient2), +// Amount: cosmoscompat.Coins{ +// { +// Denom: "uluna", +// Amount: pack.U64(2000000), +// }, +// }, +// }, +// } + +// client := cosmoscompat.NewClient(cosmoscompat.DefaultClientOptions(), app.MakeCodec()) +// account, err := client.Account(addr) +// Expect(err).NotTo(HaveOccurred()) + +// txBuilder := cosmos.NewTxBuilder(cosmoscompat.TxOptions{ +// AccountNumber: account.AccountNumber, +// SequenceNumber: account.SequenceNumber, +// Gas: 200000, +// ChainID: "testnet", +// Memo: "multichain", +// Fees: cosmoscompat.Coins{ +// { +// Denom: "uluna", +// Amount: pack.U64(3000), +// }, +// }, +// }).WithCodec(app.MakeCodec()) + +// tx, err := txBuilder.BuildTx(msgs) +// Expect(err).NotTo(HaveOccurred()) + +// sigBytes, err := pk.Sign(tx.SigBytes()) +// Expect(err).NotTo(HaveOccurred()) + +// pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) +// err = tx.Sign([]cosmoscompat.StdSignature{ +// { +// Signature: pack.NewBytes(sigBytes), +// PubKey: pack.NewBytes(pubKey[:]), +// }, +// }) +// Expect(err).NotTo(HaveOccurred()) + +// txHash, err := client.SubmitTx(tx, pack.NewString("sync")) +// Expect(err).NotTo(HaveOccurred()) + +// for { +// // Loop until the transaction has at least a few +// // confirmations. This implies that the transaction is +// // definitely valid, and the test has passed. We were +// // successfully able to use the multichain to construct and +// // submit a Bitcoin transaction! +// _, err := client.Tx(txHash) +// if err == nil { +// break +// } + +// if !strings.Contains(err.Error(), "not found") { +// Expect(err).NotTo(HaveOccurred()) +// } + +// time.Sleep(10 * time.Second) +// } +// }) +// }) +// }) +// }) diff --git a/chain/cosmos/gas.go b/chain/cosmos/gas.go new file mode 100644 index 00000000..f6eb82dd --- /dev/null +++ b/chain/cosmos/gas.go @@ -0,0 +1,38 @@ +package cosmos + +import ( + "context" + + "github.com/renproject/pack" +) + +// A GasEstimator returns the gas-per-byte that is needed in order to confirm +// transactions with relatively high speed. In distributed networks that work to +// collectively build transactions, it is important that all nodes return the +// same values from this interface. +type GasEstimator interface { + GasPerByte(ctx context.Context) (pack.U64, error) + GasPerSignature(ctx context.Context) (pack.U64, error) +} + +type gasEstimator struct { + gasPerByte pack.U64 + gasPerSignature pack.U64 +} + +// NewGasEstimator returns a simple gas estimator that always returns the same +// amount of gas-per-byte. +func NewGasEstimator(gasPerByte, gasPerSignature pack.U64) GasEstimator { + return &gasEstimator{ + gasPerByte: gasPerByte, + gasPerSignature: gasPerSignature, + } +} + +func (gasEstimator *gasEstimator) GasPerByte(ctx context.Context) (pack.U64, error) { + return gasEstimator.gasPerByte, nil +} + +func (gasEstimator *gasEstimator) GasPerSignature(ctx context.Context) (pack.U64, error) { + return gasEstimator.gasPerSignature, nil +} diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go new file mode 100644 index 00000000..314eac6b --- /dev/null +++ b/chain/cosmos/tx.go @@ -0,0 +1,198 @@ +package cosmos + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/bank" + + "github.com/renproject/pack" +) + +// TxBuilder defines an interface that can be used to build simple Bitcoin +// transactions. +type TxBuilder interface { + // BuildTx returns a simple Bitcoin transaction that consumes a set of + // Bitcoin outputs and uses the funds to make payments to a set of Bitcoin + // recipients. The sum value of the inputs must be greater than the sum + // value of the outputs, and the difference is paid as a fee to the Bitcoin + // network. + BuildTx(msgs []MsgSend) (Tx, error) + WithCodec(cdc *codec.Codec) TxBuilder +} + +// Tx defines an interface that must be implemented by all types of Bitcoin +// transactions. +type Tx interface { + // Hash of the transaction. + Hash() (pack.Bytes32, error) + + // SigBytes that need to be signed before this transaction can be + // submitted. + SigBytes() pack.Bytes + + // Sign the transaction by injecting signatures and the serialized pubkey of + // the signer. + Sign([]StdSignature) error + + // Serialize the transaction. + Serialize() (pack.Bytes, error) +} + +// An Address is a public address that can be encoded/decoded to/from strings. +// Addresses are usually formatted different between different network +// configurations. +type Address sdk.AccAddress + +// AccAddress convert Address to sdk.AccAddress +func (addr Address) AccAddress() sdk.AccAddress { + return sdk.AccAddress(addr) +} + +// TxBuilderOptions only contains necessary options to build tx from tx builder +type TxBuilderOptions struct { + AccountNumber pack.U64 `json:"account_number"` + SequenceNumber pack.U64 `json:"sequence_number"` + Gas pack.U64 `json:"gas"` + ChainID pack.String `json:"chain_id"` + Memo pack.String `json:"memo"` + Fees Coins `json:"fees"` +} + +// Coin copy type from sdk.coin +type Coin struct { + Denom pack.String `json:"denom"` + Amount pack.U64 `json:"amount"` +} + +// parseCoin parse sdk.Coin to Coin +func parseCoin(sdkCoin sdk.Coin) Coin { + return Coin{ + Denom: pack.NewString(sdkCoin.Denom), + Amount: pack.U64(uint64(sdkCoin.Amount.Int64())), + } +} + +// Coins array of Coin +type Coins []Coin + +// parseCoins parse sdk.Coins to Coins +func parseCoins(sdkCoins sdk.Coins) Coins { + var coins Coins + for _, sdkCoin := range sdkCoins { + coins = append(coins, parseCoin(sdkCoin)) + } + return coins +} + +// Coins parse pack coins to sdk coins +func (coins Coins) Coins() sdk.Coins { + sdkCoins := sdk.Coins{} + for _, coin := range coins { + sdkCoin := sdk.Coin{ + Denom: coin.Denom.String(), + Amount: sdk.NewInt(int64(coin.Amount.Uint64())), + } + + sdkCoins = append(sdkCoins, sdkCoin) + } + + sdkCoins.Sort() + return sdkCoins +} + +// MsgSend - high level transaction of the coin module +type MsgSend struct { + FromAddress Address `json:"from_address" yaml:"from_address"` + ToAddress Address `json:"to_address" yaml:"to_address"` + Amount Coins `json:"amount" yaml:"amount"` +} + +// Msg convert MsgSend to sdk.Msg +func (msg MsgSend) Msg() sdk.Msg { + return bank.NewMsgSend( + msg.FromAddress.AccAddress(), + msg.ToAddress.AccAddress(), + msg.Amount.Coins(), + ) +} + +// NOTE: we only support MsgSend +// parseMsg parse sdk.Msg to MsgSend +func parseMsg(msg sdk.Msg) (MsgSend, error) { + if msg, ok := msg.(bank.MsgSend); ok { + return MsgSend{ + FromAddress: Address(msg.FromAddress), + ToAddress: Address(msg.ToAddress), + Amount: parseCoins(msg.Amount), + }, nil + } else { + return MsgSend{}, fmt.Errorf("Failed to parse %v to MsgSend", msg) + } +} + +// StdFee auth.StdFee wrapper +type StdFee struct { + Amount Coins `json:"amount" yaml:"amount"` + Gas pack.U64 `json:"gas" yaml:"gas"` +} + +// parseStdFee parse auth.StdFee to StdFee +func parseStdFee(stdFee auth.StdFee) StdFee { + return StdFee{ + Amount: parseCoins(stdFee.Amount), + Gas: pack.U64(stdFee.Gas), + } +} + +// StdSignature auth.StdStdSignature wrapper +type StdSignature struct { + PubKey pack.Bytes `json:"pub_key" yaml:"pub_key"` + Signature pack.Bytes `json:"signature" yaml:"signature"` +} + +// parseStdSignature parse auth.StdSignature to StdSignature +func parseStdSignature(stdSig auth.StdSignature) StdSignature { + return StdSignature{ + PubKey: pack.NewBytes(stdSig.PubKey.Bytes()), + Signature: pack.NewBytes(stdSig.Signature), + } +} + +// StdTx auth.StStdTx wrapper +type StdTx struct { + Msgs []MsgSend `json:"msgs" yaml:"msgs"` + Fee StdFee `json:"fee" yaml:"fee"` + Signatures []StdSignature `json:"signatures" yaml:"signatures"` + Memo pack.String `json:"memo" yaml:"memo"` +} + +// parseStdTx parse auth.StdTx to StdTx +func parseStdTx(stdTx auth.StdTx) (StdTx, error) { + var msgs []MsgSend + for _, msg := range stdTx.Msgs { + msg, err := parseMsg(msg) + if err != nil { + return StdTx{}, err + } + + msgs = append(msgs, msg) + } + + var sigs []StdSignature + for _, sig := range stdTx.Signatures { + sigs = append(sigs, parseStdSignature(sig)) + } + + fee := parseStdFee(stdTx.Fee) + memo := pack.NewString(stdTx.Memo) + + return StdTx{ + Msgs: msgs, + Fee: fee, + Memo: memo, + Signatures: sigs, + }, nil +} From 5cf260efae775f3cb0f6bb1de26e3c2848e03b0e Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 18 Aug 2020 16:30:49 +1000 Subject: [PATCH 002/335] add filecoin code --- chain/filecoin/account.go | 223 +++++++++++++++++++++++++ chain/filecoin/account_test.go | 1 + chain/filecoin/address.go | 34 ++++ chain/filecoin/address_test.go | 1 + chain/filecoin/filecoin.go | 1 + chain/filecoin/filecoin_test.go | 1 + chain/filecoin/filecoint_suite_test.go | 1 + 7 files changed, 262 insertions(+) create mode 100644 chain/filecoin/account.go create mode 100644 chain/filecoin/account_test.go create mode 100644 chain/filecoin/address.go create mode 100644 chain/filecoin/address_test.go create mode 100644 chain/filecoin/filecoin.go create mode 100644 chain/filecoin/filecoin_test.go create mode 100644 chain/filecoin/filecoint_suite_test.go diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go new file mode 100644 index 00000000..2e1fa804 --- /dev/null +++ b/chain/filecoin/account.go @@ -0,0 +1,223 @@ +package filecoin + +import ( + "bytes" + "context" + "fmt" + + // filclient "github.com/filecoin-project/lotus/api/client" + filaddress "github.com/filecoin-project/go-address" + // "github.com/filecoin-project/go-jsonrpc" + // "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/types" + // "github.com/filecoin-project/lotus/cli" + "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/minio/blake2b-simd" + "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" + "github.com/renproject/pack" +) + +const ( + DefaultClientMultiAddress = "" + DefaultClientAuthToken = "" +) + +type Tx struct { + msg types.Message + signature pack.Bytes65 +} + +// Hash returns the hash that uniquely identifies the transaction. +// Generally, hashes are irreversible hash functions that consume the +// content of the transaction. +func (tx Tx) Hash() pack.Bytes { + return pack.NewBytes(tx.msg.Cid().Hash()) +} + +// From returns the address that is sending the transaction. Generally, +// this is also the address that must sign the transaction. +func (tx Tx) From() address.Address { + return address.Address(tx.msg.From.String()) +} + +// To returns the address that is receiving the transaction. This can be the +// address of an external account, controlled by a private key, or it can be +// the address of a contract. +func (tx Tx) To() address.Address { + return address.Address(tx.msg.To.String()) +} + +// Value being sent from the sender to the receiver. +func (tx Tx) Value() pack.U256 { + return pack.NewU256FromInt(tx.msg.Value.Int) +} + +// Nonce returns the nonce used to order the transaction with respect to all +// other transactions signed and submitted by the sender. +func (tx Tx) Nonce() pack.U256 { + return pack.NewU256FromU64(pack.NewU64(tx.msg.Nonce)) +} + +// Payload returns arbitrary data that is associated with the transaction. +// Generally, this payload is used to send notes between external accounts, +// or invoke business logic on a contract. +func (tx Tx) Payload() contract.CallData { + if tx.msg.Method == 0 { + if len(tx.msg.Params) == 0 { + return contract.CallData([]byte{}) + } + return contract.CallData(append([]byte{0}, tx.msg.Params...)) + } + if len(tx.msg.Params) == 0 { + return contract.CallData([]byte{byte(tx.msg.Method)}) + } + return contract.CallData(append([]byte{byte(tx.msg.Method)}, tx.msg.Params...)) +} + +// Sighashes returns the digests that must be signed before the transaction +// can be submitted by the client. +func (tx Tx) Sighashes() ([]pack.Bytes32, error) { + return []pack.Bytes32{blake2b.Sum256(tx.Hash())}, nil +} + +// Sign the transaction by injecting signatures for the required sighashes. +// The serialized public key used to sign the sighashes must also be +// specified. +func (tx Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { + if len(signatures) != 1 { + return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) + } + tx.signature = signatures[0] + return nil +} + +// Serialize the transaction into bytes. Generally, this is the format in +// which the transaction will be submitted by the client. +func (tx Tx) Serialize() (pack.Bytes, error) { + buf := new(bytes.Buffer) + if err := tx.msg.MarshalCBOR(buf); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +type TxBuilder struct { + gasPrice pack.U256 + gasLimit pack.U256 +} + +func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { + return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} +} + +func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (account.Tx, error) { + filfrom, err := filaddress.NewFromString(string(from)) + if err != nil { + return nil, fmt.Errorf("bad from address '%v': %v", from, err) + } + filto, err := filaddress.NewFromString(string(to)) + if err != nil { + return nil, fmt.Errorf("bad to address '%v': %v", to, err) + } + methodNum := abi.MethodNum(0) + if len(payload) > 0 { + methodNum = abi.MethodNum(payload[0]) + payload = payload[1:] + } + return Tx{ + msg: types.Message{ + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: value.Int().Uint64(), + GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, + GasLimit: txBuilder.gasLimit.Int().Int64(), + Method: methodNum, + Params: payload, + }, + signature: pack.Bytes65{}, + }, nil +} + +// ClientOptions are used to parameterise the behaviour of the Client. +type ClientOptions struct { + MultiAddress string + AuthToken string +} + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the multi-address and authentication token should +// be changed. +func DefaultClientOptions() ClientOptions { + return ClientOptions{ + MultiAddress: DefaultClientMultiAddress, + AuthToken: DefaultClientAuthToken, + } +} + +// WithAddress returns a modified version of the options with the given API +// multi-address. +func (opts ClientOptions) WithAddress(multiAddr string) ClientOptions { + opts.MultiAddress = multiAddr + return opts +} + +// WithAuthToken returns a modified version of the options with the given +// authentication token. +func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { + opts.AuthToken = authToken + return opts +} + +type Client struct { + opts ClientOptions + // node api.FullNode + // closer jsonrpc.ClientCloser +} + +func NewClient(opts ClientOptions) (*Client, error) { + // authToken, err := hex.DecodeString(opts.AuthToken) + // if err != nil { + // return nil, fmt.Errorf("bad auth token '%v': %v", err) + // } + // multiAddr, err := multiaddr.NewMultiaddr(opts.MultiAddress) + // if err != nil { + // return nil, fmt.Errorf("bad multi-address '%v': %v", err) + // } + // info := cli.APIInfo{ + // Addr: multiAddr, + // Token: authToken, + // } + // dialArgs, err := info.DialArgs() + // if err != nil { + // return nil, err + // } + // authHeader := info.AuthHeader() + // node, closer, err := filclient.NewFullNodeRPC(dialArgs, authHeader) + // if err != nil { + // return nil, err + // } + + // return &Client{ + // opts: opts, + // node: node, + // closer: closer, + // }, nil + return nil, nil +} + +// Tx returns the transaction uniquely identified by the given transaction +// hash. It also returns the number of confirmations for the transaction. +func (client *Client) Tx(context.Context, pack.Bytes) (account.Tx, pack.U64, error) { + panic("unimplemented") +} + +// SubmitTx to the underlying blockchain network. +func (client *Client) SubmitTx(context.Context, account.Tx) error { + panic("unimplemented") +} diff --git a/chain/filecoin/account_test.go b/chain/filecoin/account_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/account_test.go @@ -0,0 +1 @@ +package filecoin_test diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go new file mode 100644 index 00000000..28023624 --- /dev/null +++ b/chain/filecoin/address.go @@ -0,0 +1,34 @@ +package filecoin + +import ( + filaddress "github.com/filecoin-project/go-address" + "github.com/renproject/multichain/api/address" +) + +type AddressEncoder struct{} + +func NewAddressEncoder() AddressEncoder { + return AddressEncoder{} +} + +func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) { + addr, err := filaddress.NewFromBytes([]byte(raw)) + if err != nil { + return address.Address(""), err + } + return address.Address(addr.String()), nil +} + +type AddressDecoder struct{} + +func NewAddressDecoder() AddressDecoder { + return AddressDecoder{} +} + +func (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + rawAddr, err := filaddress.NewFromString(string(addr)) + if err != nil { + return nil, err + } + return address.RawAddress(rawAddr.Bytes()), nil +} diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/address_test.go @@ -0,0 +1 @@ +package filecoin_test diff --git a/chain/filecoin/filecoin.go b/chain/filecoin/filecoin.go new file mode 100644 index 00000000..ee1662ba --- /dev/null +++ b/chain/filecoin/filecoin.go @@ -0,0 +1 @@ +package filecoin \ No newline at end of file diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go new file mode 100644 index 00000000..732971f8 --- /dev/null +++ b/chain/filecoin/filecoin_test.go @@ -0,0 +1 @@ +package filecoin_test \ No newline at end of file diff --git a/chain/filecoin/filecoint_suite_test.go b/chain/filecoin/filecoint_suite_test.go new file mode 100644 index 00000000..732971f8 --- /dev/null +++ b/chain/filecoin/filecoint_suite_test.go @@ -0,0 +1 @@ +package filecoin_test \ No newline at end of file From 4cce076150e5a60590bb9bf7296db69aff853dd7 Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 18 Aug 2020 16:31:13 +1000 Subject: [PATCH 003/335] add terra impl too --- chain/terra/address.go | 15 ++++ chain/terra/address_test.go | 25 ++++++ chain/terra/terra.go | 26 ++++++ chain/terra/terra_suite_test.go | 13 +++ chain/terra/terra_test.go | 140 ++++++++++++++++++++++++++++++++ 5 files changed, 219 insertions(+) create mode 100644 chain/terra/address.go create mode 100644 chain/terra/address_test.go create mode 100644 chain/terra/terra.go create mode 100644 chain/terra/terra_suite_test.go create mode 100644 chain/terra/terra_test.go diff --git a/chain/terra/address.go b/chain/terra/address.go new file mode 100644 index 00000000..6edd3624 --- /dev/null +++ b/chain/terra/address.go @@ -0,0 +1,15 @@ +package terra + +import "github.com/renproject/multichain/chain/cosmos" + +type ( + AddressDecoder = cosmos.AddressDecoder + AddressEncoder = cosmos.AddressEncoder + AddressEncodeDecoder = cosmos.AddressEncodeDecoder +) + +var ( + NewAddressDecoder = cosmos.NewAddressDecoder + NewAddressEncoder = cosmos.NewAddressEncoder + NewAddressEnodeDecoder = cosmos.NewAddressEncodeDecoder +) diff --git a/chain/terra/address_test.go b/chain/terra/address_test.go new file mode 100644 index 00000000..be7528f8 --- /dev/null +++ b/chain/terra/address_test.go @@ -0,0 +1,25 @@ +package terra_test + +import ( + "github.com/renproject/multichain/chain/terra" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Terra", func() { + Context("when decoding address", func() { + Context("when decoding Terra address", func() { + It("should work", func() { + decoder := terra.NewAddressDecoder() + + addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" + addr, err := decoder.DecodeAddress(pack.NewString(addrStr)) + + Expect(err).ToNot(HaveOccurred()) + Expect(addr.AccAddress().String()).Should(Equal(addrStr)) + }) + }) + }) +}) \ No newline at end of file diff --git a/chain/terra/terra.go b/chain/terra/terra.go new file mode 100644 index 00000000..a4b7193a --- /dev/null +++ b/chain/terra/terra.go @@ -0,0 +1,26 @@ +package terra + +import ( + "github.com/renproject/multichain/chain/cosmos" + "github.com/terra-project/core/app" +) + +type ( + Client = cosmos.Client + ClientOptions = cosmos.ClientOptions + Tx = cosmos.Tx + TxBuilder = cosmos.TxBuilder + TxBuilderOptions = cosmos.TxBuilderOptions +) + +// NewClient returns returns a new Client with terra codec +func NewClient(opts ClientOptions) Client { + return cosmos.NewClient(opts, app.MakeCodec()) +} + +// NewTxBuilder returns an implementation of the transaction builder interface +// from the Cosmos Compat API, and exposes the functionality to build simple +// Terra transactions. +func NewTxBuilder(opts TxBuilderOptions) TxBuilder { + return cosmos.NewTxBuilder(opts).WithCodec(app.MakeCodec()) +} diff --git a/chain/terra/terra_suite_test.go b/chain/terra/terra_suite_test.go new file mode 100644 index 00000000..11f9c854 --- /dev/null +++ b/chain/terra/terra_suite_test.go @@ -0,0 +1,13 @@ +package terra_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestTerra(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Terra Suite") +} diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go new file mode 100644 index 00000000..9f8a7159 --- /dev/null +++ b/chain/terra/terra_test.go @@ -0,0 +1,140 @@ +package terra_test + +import ( + "encoding/hex" + "os" + "strings" + "time" + + "github.com/tendermint/tendermint/crypto/secp256k1" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/terra-project/core/app" + + "github.com/renproject/multichain/chain/terra" + "github.com/renproject/multichain/compat/cosmoscompat" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Terra", func() { + Context("when submitting transactions", func() { + Context("when sending LUNA to multiple addresses", func() { + It("should work", func() { + // Load private key, and assume that the associated address has + // funds to spend. You can do this by setting TERRA_PK to the + // value specified in the `./multichaindeploy/.env` file. + pkEnv := os.Getenv("TERRA_PK") + if pkEnv == "" { + panic("TERRA_PK is undefined") + } + + addrEnv := os.Getenv("TERRA_ADDRESS") + if addrEnv == "" { + panic("TERRA_ADDRESS is undefined") + } + + // pkEnv := "a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330" + // addrEnv := "terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u" + + pkBz, err := hex.DecodeString(pkEnv) + Expect(err).ToNot(HaveOccurred()) + + var pk secp256k1.PrivKeySecp256k1 + copy(pk[:], pkBz) + + addr := cosmoscompat.Address(pk.PubKey().Address()) + + decoder := terra.NewAddressDecoder() + expectedAddr, err := decoder.DecodeAddress(pack.NewString(addrEnv)) + Expect(err).ToNot(HaveOccurred()) + Expect(addr).Should(Equal(expectedAddr)) + + pk1 := secp256k1.GenPrivKey() + pk2 := secp256k1.GenPrivKey() + + recipient1 := sdk.AccAddress(pk1.PubKey().Address()) + recipient2 := sdk.AccAddress(pk2.PubKey().Address()) + + msgs := []cosmoscompat.MsgSend{ + { + FromAddress: cosmoscompat.Address(addr), + ToAddress: cosmoscompat.Address(recipient1), + Amount: cosmoscompat.Coins{ + { + Denom: "uluna", + Amount: pack.U64(1000000), + }, + }, + }, + { + FromAddress: cosmoscompat.Address(addr), + ToAddress: cosmoscompat.Address(recipient2), + Amount: cosmoscompat.Coins{ + { + Denom: "uluna", + Amount: pack.U64(2000000), + }, + }, + }, + } + + client := cosmoscompat.NewClient(cosmoscompat.DefaultClientOptions(), app.MakeCodec()) + account, err := client.Account(addr) + Expect(err).NotTo(HaveOccurred()) + + txBuilder := terra.NewTxBuilder(cosmoscompat.TxOptions{ + AccountNumber: account.AccountNumber, + SequenceNumber: account.SequenceNumber, + Gas: 200000, + ChainID: "testnet", + Memo: "multichain", + Fees: cosmoscompat.Coins{ + { + Denom: "uluna", + Amount: pack.U64(3000), + }, + }, + }).WithCodec(app.MakeCodec()) + + tx, err := txBuilder.BuildTx(msgs) + Expect(err).NotTo(HaveOccurred()) + + sigBytes, err := pk.Sign(tx.SigBytes()) + Expect(err).NotTo(HaveOccurred()) + + pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) + err = tx.Sign([]cosmoscompat.StdSignature{ + { + Signature: pack.NewBytes(sigBytes), + PubKey: pack.NewBytes(pubKey[:]), + }, + }) + Expect(err).NotTo(HaveOccurred()) + + txHash, err := client.SubmitTx(tx, pack.NewString("sync")) + Expect(err).NotTo(HaveOccurred()) + + for { + // Loop until the transaction has at least a few + // confirmations. This implies that the transaction is + // definitely valid, and the test has passed. We were + // successfully able to use the multichain to construct and + // submit a Bitcoin transaction! + _, err := client.Tx(txHash) + if err == nil { + break + } + + if !strings.Contains(err.Error(), "not found") { + Expect(err).NotTo(HaveOccurred()) + } + + time.Sleep(10 * time.Second) + } + }) + }) + }) +}) From 653c210c6b26e9e0d46621a4fb96145a637944fd Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 19 Aug 2020 15:13:23 +0530 Subject: [PATCH 004/335] testing address impl for filecoin --- chain/filecoin/address.go | 19 ++--- chain/filecoin/address_test.go | 96 ++++++++++++++++++++++++++ chain/filecoin/filecoin.go | 2 +- chain/filecoin/filecoin_test.go | 2 +- chain/filecoin/filecoint_suite_test.go | 14 +++- go.mod | 1 + 6 files changed, 123 insertions(+), 11 deletions(-) diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go index 28023624..afe9333f 100644 --- a/chain/filecoin/address.go +++ b/chain/filecoin/address.go @@ -5,10 +5,19 @@ import ( "github.com/renproject/multichain/api/address" ) +type AddressEncoderDecoder struct { + AddressEncoder + AddressDecoder +} + type AddressEncoder struct{} +type AddressDecoder struct{} -func NewAddressEncoder() AddressEncoder { - return AddressEncoder{} +func NewAddressEncoderDecoder() AddressEncoderDecoder { + return AddressEncoderDecoder{ + AddressEncoder: AddressEncoder{}, + AddressDecoder: AddressDecoder{}, + } } func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) { @@ -19,12 +28,6 @@ func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Add return address.Address(addr.String()), nil } -type AddressDecoder struct{} - -func NewAddressDecoder() AddressDecoder { - return AddressDecoder{} -} - func (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { rawAddr, err := filaddress.NewFromString(string(addr)) if err != nil { diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go index 0d419baa..b2c96db3 100644 --- a/chain/filecoin/address_test.go +++ b/chain/filecoin/address_test.go @@ -1 +1,97 @@ package filecoin_test + +import ( + "math/rand" + "testing/quick" + "time" + + filaddress "github.com/filecoin-project/go-address" + "github.com/multiformats/go-varint" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/filecoin" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Address", func() { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + + encoderDecoder := filecoin.NewAddressEncoderDecoder() + + Context("when encoding and decoding", func() { + Context("for ID protocol", func() { + It("should behave correctly without errors", func() { + f := func() bool { + x := varint.ToUvarint(r.Uint64()) + x = append([]byte{byte(filaddress.ID)}, x...) + + rawAddr := address.RawAddress(pack.NewBytes(x[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for Sepc protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.PayloadHashLength]byte) bool { + y := append([]byte{byte(filaddress.SECP256K1)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for Actor protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.PayloadHashLength]byte) bool { + y := append([]byte{byte(filaddress.Actor)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for BLS protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.BlsPublicKeyBytes]byte) bool { + y := append([]byte{byte(filaddress.BLS)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + }) +}) diff --git a/chain/filecoin/filecoin.go b/chain/filecoin/filecoin.go index ee1662ba..e0985944 100644 --- a/chain/filecoin/filecoin.go +++ b/chain/filecoin/filecoin.go @@ -1 +1 @@ -package filecoin \ No newline at end of file +package filecoin diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 732971f8..0d419baa 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -1 +1 @@ -package filecoin_test \ No newline at end of file +package filecoin_test diff --git a/chain/filecoin/filecoint_suite_test.go b/chain/filecoin/filecoint_suite_test.go index 732971f8..db0159ad 100644 --- a/chain/filecoin/filecoint_suite_test.go +++ b/chain/filecoin/filecoint_suite_test.go @@ -1 +1,13 @@ -package filecoin_test \ No newline at end of file +package filecoin_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestFilecoin(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Filecoin Suite") +} diff --git a/go.mod b/go.mod index 9d1029f0..5a9dec12 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( github.com/ipfs/go-hamt-ipld v0.1.1 // indirect github.com/lib/pq v1.7.0 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 + github.com/multiformats/go-varint v0.0.5 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/raulk/clock v1.1.0 // indirect From 9a039d533ac7bbb15da447b197af10eec48683b0 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 20 Aug 2020 10:55:41 +0530 Subject: [PATCH 005/335] todos for filecoin support --- .gitmodules | 3 ++ chain/filecoin/account.go | 90 +++++++++++++++++++++++---------------- go.mod | 3 ++ go.sum | 22 ++++++++++ 4 files changed, 81 insertions(+), 37 deletions(-) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..4488466e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "filecoin-ffi"] + path = chain/filecoin/filecoin-ffi + url = git@github.com:filecoin-project/filecoin-ffi.git diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 2e1fa804..503adf0a 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -4,15 +4,14 @@ import ( "bytes" "context" "fmt" + "net/http" - // filclient "github.com/filecoin-project/lotus/api/client" filaddress "github.com/filecoin-project/go-address" - // "github.com/filecoin-project/go-jsonrpc" - // "github.com/filecoin-project/lotus/api" + filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" - // "github.com/filecoin-project/lotus/cli" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -21,6 +20,7 @@ import ( ) const ( + AuthorizationKey = "Authorization" DefaultClientMultiAddress = "" DefaultClientAuthToken = "" ) @@ -175,49 +175,65 @@ func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { } type Client struct { - opts ClientOptions - // node api.FullNode - // closer jsonrpc.ClientCloser + opts ClientOptions + node api.FullNode + closer jsonrpc.ClientCloser } +// NewClient creates and returns a new JSON-RPC client to the Filecoin node func NewClient(opts ClientOptions) (*Client, error) { - // authToken, err := hex.DecodeString(opts.AuthToken) - // if err != nil { - // return nil, fmt.Errorf("bad auth token '%v': %v", err) - // } - // multiAddr, err := multiaddr.NewMultiaddr(opts.MultiAddress) - // if err != nil { - // return nil, fmt.Errorf("bad multi-address '%v': %v", err) - // } - // info := cli.APIInfo{ - // Addr: multiAddr, - // Token: authToken, - // } - // dialArgs, err := info.DialArgs() + requestHeaders := make(http.Header) + if opts.AuthToken != DefaultClientAuthToken { + requestHeaders.Add(AuthorizationKey, opts.AuthToken) + } + + node, closer, err := filclient.NewFullNodeRPC(opts.MultiAddress, requestHeaders) + if err != nil { + return nil, err + } + + return &Client{opts, node, closer}, nil +} + +// Tx returns the transaction uniquely identified by the given transaction +// hash. It also returns the number of confirmations for the transaction. +func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { + // parse the transaction ID to a message ID + // msgId, err := cid.Parse(txId.String()) // if err != nil { - // return nil, err + // return nil, nil, fmt.Errorf("parsing txId: %v", err) // } - // authHeader := info.AuthHeader() - // node, closer, err := filclient.NewFullNodeRPC(dialArgs, authHeader) + + // get message + // message, err := client.node.ChainGetMessage(ctx, msgId) // if err != nil { - // return nil, err + // return nil, nil, fmt.Errorf("fetching tx: %v", err) // } - // return &Client{ - // opts: opts, - // node: node, - // closer: closer, - // }, nil - return nil, nil -} + // TODO?: See if we can get a signed message -// Tx returns the transaction uniquely identified by the given transaction -// hash. It also returns the number of confirmations for the transaction. -func (client *Client) Tx(context.Context, pack.Bytes) (account.Tx, pack.U64, error) { - panic("unimplemented") + // TODO?: API call to get the block number for the above message + + // get most recent block number + // 1. get chain tipset + // 2. choose the most recent block from tipset.blks + // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 + // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 } // SubmitTx to the underlying blockchain network. -func (client *Client) SubmitTx(context.Context, account.Tx) error { - panic("unimplemented") +// TODO: should also return a transaction hash (pack.Bytes) ? +func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { + // construct crypto.Signature + // https://github.com/filecoin-project/specs-actors/blob/master/actors/crypto/signature.go + + // construct types.SignedMessage + // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/signedmessage.go + + // submit transaction to mempool + // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L169 + // msgId, err := client.node.MpoolPush(ctx, &signedMessage) + // if err != nil { + // return fmt.Errorf("pushing message to message pool: %v", err) + // } } diff --git a/go.mod b/go.mod index 5a9dec12..0bfeb41b 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect + github.com/ipfs/go-cid v0.0.6 github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect github.com/ipfs/go-hamt-ipld v0.1.1 // indirect github.com/lib/pq v1.7.0 // indirect @@ -36,3 +37,5 @@ require ( go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 ) + +replace github.com/filecoin-project/filecoin-ffi => /Users/rohitnarurkar/Develop/go-workspace/src/github.com/renproject/multichain/chain/filecoin/filecoin-ffi diff --git a/go.sum b/go.sum index 92124c96..f5b1780f 100644 --- a/go.sum +++ b/go.sum @@ -175,6 +175,7 @@ github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9 github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= @@ -276,6 +277,7 @@ github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= github.com/filecoin-project/go-fil-markets v0.3.2 h1:fvNgdTTIVtckBu61wxbKYSMJzedoFFIKYJagiCDFCiM= github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= +github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= @@ -293,6 +295,7 @@ github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlS github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= +github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= @@ -303,6 +306,7 @@ github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 h1:7wH0V1OhS5gkjlJF/PvwS6MuS1oeVqCJlNECgf9eabw= github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -360,6 +364,7 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -459,11 +464,13 @@ github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a/go.mod h github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -580,6 +587,7 @@ github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjN github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= +github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6ZpusRg= github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= @@ -1208,6 +1216,7 @@ github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= @@ -1354,6 +1363,7 @@ github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpX github.com/terra-project/core v0.3.7 h1:LTuDl+kEv3JBEgoAypTXeqNrxdt5ECCKdxJ8XNkvntU= github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -1413,9 +1423,12 @@ github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGw github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= +github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1434,6 +1447,7 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1525,6 +1539,7 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1586,6 +1601,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1710,6 +1726,7 @@ golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1844,6 +1861,11 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 740388bc711cdee87dbed0fadbafbde9e822b05e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 Aug 2020 12:35:40 +0530 Subject: [PATCH 006/335] acala docker setup and compiling code (not tested) --- chain/acala/acala.go | 270 ++++++++++++++++++++++++++++ chain/acala/acala_suite_test.go | 13 ++ chain/acala/acala_test.go | 36 ++++ chain/acala/address.go | 38 ++++ chain/acala/decode.go | 309 ++++++++++++++++++++++++++++++++ go.mod | 2 + go.sum | 9 + infra/acala/Dockerfile | 38 ++++ infra/acala/run.sh | 10 ++ infra/docker-compose.yaml | 13 ++ 10 files changed, 738 insertions(+) create mode 100644 chain/acala/acala.go create mode 100644 chain/acala/acala_suite_test.go create mode 100644 chain/acala/acala_test.go create mode 100644 chain/acala/address.go create mode 100644 chain/acala/decode.go create mode 100644 infra/acala/Dockerfile create mode 100644 infra/acala/run.sh diff --git a/chain/acala/acala.go b/chain/acala/acala.go new file mode 100644 index 00000000..6daf885e --- /dev/null +++ b/chain/acala/acala.go @@ -0,0 +1,270 @@ +package acala + +import ( + "context" + "fmt" + + gsrpc "github.com/centrifuge/go-substrate-rpc-client" + "github.com/centrifuge/go-substrate-rpc-client/types" + "github.com/renproject/multichain" + "github.com/renproject/pack" + "go.uber.org/zap" +) + +const DefaultClientRPCURL = "ws://127.0.0.1:9933" + +type ClientOptions struct { + Logger *zap.Logger + rpcURL pack.String +} + +func DefaultClientOptions() ClientOptions { + logger, err := zap.NewDevelopment() + if err != nil { + panic(err) + } + return ClientOptions{ + Logger: logger, + rpcURL: DefaultClientRPCURL, + } +} + +func (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions { + opts.rpcURL = rpcURL + return opts +} + +type Client struct { + opts ClientOptions + api gsrpc.SubstrateAPI +} + +func NewClient(opts ClientOptions) (*Client, error) { + substrateAPI, err := gsrpc.NewSubstrateAPI(string(opts.rpcURL)) + if err != nil { + return nil, err + } + + return &Client{ + opts: opts, + api: *substrateAPI, + }, nil +} + +func printEvents(meta *types.Metadata, data *types.StorageDataRaw, nhBlock types.Hash) error { + // key, err := types.CreateStorageKey(meta, "RenToken", "Events", nil, nil) + // if err != nil { + // return err + // } + + fmt.Printf("Meta: %#v\n", meta) + + // var er EventRecordsRaw + // err = est.getStorage(key, &er, nhBlock) + // if err != nil { + // return err + // } + + fmt.Printf("data: %#v\n", data) + + er := types.EventRecordsRaw(*data) + + e := EventsWithMint{} + err := DecodeEvents(&er, meta, &e) + if err != nil { + return err + } + + // decoder := scale.NewDecoder(bytes.NewReader(er)) + + // // determine number of events + // n, err := decoder.DecodeUintCompact() + // if err != nil { + // return err + // } + + // fmt.Printf("found %v events", n) + + // // iterate over events + // for i := uint64(0); i < n.Uint64(); i++ { + // fmt.Printf("decoding event #%v\n", i) + + // // decode Phase + // phase := types.Phase{} + // err := decoder.Decode(&phase) + // if err != nil { + // return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) + // } + + // // decode EventID + // id := types.EventID{} + // err = decoder.Decode(&id) + // if err != nil { + // return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) + // } + + // fmt.Printf("event #%v has EventID %v\n", i, id) + + // } + + // events := types.EventRecords{} + // err := EventRecordsRaw(*data).DecodeEventRecords(meta, &events) + // if err != nil { + // panic(err) + // } + + // Show what we are busy with + for _, e := range e.RenToken_AssetsMinted { + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Phase) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Who) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Currency) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Amount) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Topics) + } + // for _, e := range e.Balances_Endowed { + // fmt.Printf("[EVENT] Balances:Endowed:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) + // } + // for _, e := range e.Balances_DustLost { + // fmt.Printf("[EVENT] Balances:DustLost:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) + // } + // for _, e := range e.Balances_Transfer { + // fmt.Printf("[EVENT] Balances:Transfer:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v, %v, %v\n", e.From, e.To, e.Value) + // } + // for _, e := range e.Balances_BalanceSet { + // fmt.Printf("[EVENT] Balances:BalanceSet:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v, %v, %v\n", e.Who, e.Free, e.Reserved) + // } + // for _, e := range e.Balances_Deposit { + // fmt.Printf("[EVENT] Balances:Deposit:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v, %v\n", e.Who, e.Balance) + // } + // for _, e := range e.Grandpa_NewAuthorities { + // fmt.Printf("[EVENT] Grandpa:NewAuthorities:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.NewAuthorities) + // } + // for _, e := range e.Grandpa_Paused { + // fmt.Printf("[EVENT] Grandpa:Paused:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.Grandpa_Resumed { + // fmt.Printf("[EVENT] Grandpa:Resumed:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.ImOnline_HeartbeatReceived { + // fmt.Printf("[EVENT] ImOnline:HeartbeatReceived:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x\n", e.AuthorityID) + // } + // for _, e := range e.ImOnline_AllGood { + // fmt.Printf("[EVENT] ImOnline:AllGood:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.ImOnline_SomeOffline { + // fmt.Printf("[EVENT] ImOnline:SomeOffline:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.IdentificationTuples) + // } + // for _, e := range e.Indices_IndexAssigned { + // fmt.Printf("[EVENT] Indices:IndexAssigned:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x%v\n", e.AccountID, e.AccountIndex) + // } + // for _, e := range e.Indices_IndexFreed { + // fmt.Printf("[EVENT] Indices:IndexFreed:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.AccountIndex) + // } + // for _, e := range e.Offences_Offence { + // fmt.Printf("[EVENT] Offences:Offence:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v%v\n", e.Kind, e.OpaqueTimeSlot) + // } + // for _, e := range e.Session_NewSession { + // fmt.Printf("[EVENT] Session:NewSession:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.SessionIndex) + // } + // for _, e := range e.Staking_Reward { + // fmt.Printf("[EVENT] Staking:Reward:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.Balance) + // } + // for _, e := range e.Staking_Slash { + // fmt.Printf("[EVENT] Staking:Slash:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x%v\n", e.AccountID, e.Balance) + // } + // for _, e := range e.Staking_OldSlashingReportDiscarded { + // fmt.Printf("[EVENT] Staking:OldSlashingReportDiscarded:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.SessionIndex) + // } + // for _, e := range e.System_ExtrinsicSuccess { + // fmt.Printf("[EVENT] System:ExtrinsicSuccess:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.System_ExtrinsicFailed { + // fmt.Printf("[EVENT] System:ErtrinsicFailed:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.DispatchError) + // } + // for _, e := range e.System_CodeUpdated { + // fmt.Printf("[EVENT] System:CodeUpdated:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.System_NewAccount { + // fmt.Printf("[EVENT] System:NewAccount:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x\n", e.Who) + // } + // for _, e := range e.System_KilledAccount { + // fmt.Printf("[EVENT] System:KilledAccount:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#X\n", e.Who) + // } + + return nil +} + +func (client *Client) BurnEvent(ctx context.Context, asset multichain.Asset, nonce pack.Bytes32, blockheight pack.U64) (amount pack.U256, to pack.String, confs int64, err error) { + + meta, err := client.api.RPC.State.GetMetadataLatest() + if err != nil { + panic(err) + } + + // fmt.Printf("%#v\n", meta) + + // Subscribe to system events via storage + key, err := types.CreateStorageKey(meta, "System", "Events", nil, nil) + if err != nil { + panic(err) + } + + blockhash, err := client.api.RPC.Chain.GetBlockHash(blockheight.Uint64()) + if err != nil { + panic(err) + } + + fmt.Printf("blockhash: %#v\n", blockhash.Hex()) + + data, err := client.api.RPC.State.GetStorageRaw(key, blockhash) + + if err = printEvents(meta, data, blockhash); err != nil { + panic(err) + } + + fmt.Printf("\nLive events:\n") + + // fmt.Printf("data: %#v\n", data) + + // panic("unimplemented") + + sub, err := client.api.RPC.State.SubscribeStorageRaw([]types.StorageKey{key}) + if err != nil { + panic(err) + } + defer sub.Unsubscribe() + + // outer for loop for subscription notifications + for { + set := <-sub.Chan() + // inner loop for the changes within one of those notifications + for _, chng := range set.Changes { + if !types.Eq(chng.StorageKey, key) || !chng.HasStorageData { + // skip, we are only interested in events with content + continue + } + + // printEvents(meta, &chng.StorageData) + } + } + + // return pack.U256{}, pack.String(""), 0, fmt.Errorf("unimplemented") +} diff --git a/chain/acala/acala_suite_test.go b/chain/acala/acala_suite_test.go new file mode 100644 index 00000000..f91d1e63 --- /dev/null +++ b/chain/acala/acala_suite_test.go @@ -0,0 +1,13 @@ +package acala_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestSubstratecompat(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Acala Suite") +} diff --git a/chain/acala/acala_test.go b/chain/acala/acala_test.go new file mode 100644 index 00000000..edc6f3d5 --- /dev/null +++ b/chain/acala/acala_test.go @@ -0,0 +1,36 @@ +package acala_test + +import ( + "context" + "fmt" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/acala" + "github.com/renproject/pack" +) + +var _ = Describe("Substrate client", func() { + Context("when verifying burns", func() { + It("should verify a valid burn", func() { + client, err := acala.NewClient(acala.DefaultClientOptions()) + if err != nil { + panic(err) + } + + nonce := [32]byte{0} + amount, to, confs, err := client.BurnEvent(context.Background(), multichain.BTC, pack.NewBytes32(nonce), pack.NewU64(3047)) + if err != nil { + panic(err) + } + + fmt.Printf("Amount: %v\n", amount) + fmt.Printf("To: %v\n", to) + fmt.Printf("Confs: %v\n", confs) + + Expect(amount).Should(Equal(6000)) + }) + }) +}) diff --git a/chain/acala/address.go b/chain/acala/address.go new file mode 100644 index 00000000..5a0a49dc --- /dev/null +++ b/chain/acala/address.go @@ -0,0 +1,38 @@ +package acala + +import ( + "fmt" + + "github.com/btcsuite/btcutil/base58" + "github.com/renproject/pack" +) + +// An Address represents a public address on a Substrate blockchain. It can be +// the address of an external account, or the address of a smart contract. +type Address pack.Bytes + +// The AddressDecoder defines an interface for decoding string representations +// of Substrate address into the concrete Address type. +type AddressDecoder interface { + DecodeAddress(pack.String) (Address, error) +} + +type addressDecoder struct{} + +// NewAddressDecoder returns the default AddressDecoder for Substract chains. It +// uses the Bitcoin base58 alphabet to decode the string, and interprets the +// result as a 2-byte address type, 32-byte array, and 1-byte checksum. +func NewAddressDecoder() AddressDecoder { + return addressDecoder{} +} + +// DecodeAddress the string using the Bitcoin base58 alphabet. If the string +// does not a 2-byte address type, 32-byte array, and 1-byte checksum, then an +// error is returned. +func (addressDecoder) DecodeAddress(encoded pack.String) (Address, error) { + data := base58.Decode(encoded.String()) + if len(data) != 35 { + return Address{}, fmt.Errorf("expected 35 bytes, got %v bytes", len(data)) + } + return Address(data), nil +} diff --git a/chain/acala/decode.go b/chain/acala/decode.go new file mode 100644 index 00000000..6fff7eca --- /dev/null +++ b/chain/acala/decode.go @@ -0,0 +1,309 @@ +package acala + +import ( + "bytes" + "errors" + "fmt" + "reflect" + + "github.com/centrifuge/go-substrate-rpc-client/scale" + "github.com/centrifuge/go-substrate-rpc-client/types" +) + +type eventAssetsMinted struct { + Phase types.Phase + Who types.AccountID + Currency types.U8 + Amount types.U128 + Topics []types.Hash +} + +type EventsWithMint struct { + types.EventRecords + RenToken_AssetsMinted []eventAssetsMinted //nolint:stylecheck,golint +} + +func FindEventForEventID(m types.MetadataV10, eventID types.EventID) (*types.EventMetadataV4, error) { + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mi != eventID[0] { + mi++ + continue + } + if int(eventID[1]) >= len(mod.Events) { + return nil, fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return &mod.Events[eventID[1]], nil + } + return nil, fmt.Errorf("module index %v out of range", eventID[0]) +} + +// DecodeEventRecords decodes the events records from an EventRecordRaw into a target t using the given Metadata m +// If this method returns an error like `unable to decode Phase for event #x: EOF`, it is likely that you have defined +// a custom event record with a wrong type. For example your custom event record has a field with a length prefixed +// type, such as types.Bytes, where your event in reallity contains a fixed width type, such as a types.U32. +func DecodeEvents(e *types.EventRecordsRaw, m *types.Metadata, t interface{}) error { + // ensure t is a pointer + ttyp := reflect.TypeOf(t) + if ttyp.Kind() != reflect.Ptr { + return errors.New("target must be a pointer, but is " + fmt.Sprint(ttyp)) + } + // ensure t is not a nil pointer + tval := reflect.ValueOf(t) + if tval.IsNil() { + return errors.New("target is a nil pointer") + } + val := tval.Elem() + typ := val.Type() + // ensure val can be set + if !val.CanSet() { + return fmt.Errorf("unsettable value %v", typ) + } + // ensure val points to a struct + if val.Kind() != reflect.Struct { + return fmt.Errorf("target must point to a struct, but is " + fmt.Sprint(typ)) + } + + decoder := scale.NewDecoder(bytes.NewReader(*e)) + + // determine number of events + n, err := decoder.DecodeUintCompact() + if err != nil { + return err + } + + fmt.Println(fmt.Sprintf("found %v events", n)) + + // iterate over events + for i := uint64(0); i < n; i++ { + fmt.Println(fmt.Sprintf("decoding event #%v", i)) + + // decode Phase + phase := types.Phase{} + err := decoder.Decode(&phase) + if err != nil { + return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) + } + + // decode EventID + id := types.EventID{} + err = decoder.Decode(&id) + if err != nil { + return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) + } + + fmt.Println(fmt.Sprintf("event #%v has EventID %v", i, id)) + + // ask metadata for method & event name for event + moduleName, eventName, err := m.FindEventNamesForEventID(id) + // moduleName, eventName, err := "System", "ExtrinsicSuccess", nil + if err != nil { + fmt.Printf("unable to find event with EventID %v in metadata for event #%v: %s\n", id, i, err) + continue + // return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) + } + + fmt.Println(fmt.Sprintf("event #%v is in module %v with event name %v", i, moduleName, eventName)) + + // check whether name for eventID exists in t + field := val.FieldByName(fmt.Sprintf("%v_%v", moduleName, eventName)) + if !field.IsValid() { + eventParams, err := FindEventForEventID(m.AsMetadataV10, id) + if err != nil { + return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) + } + + for j := 0; j < len(eventParams.Args); j++ { + fmt.Printf("decoding field: %v (%v)\n", j, eventParams.Args[j]) + switch eventParams.Args[j] { + case "u8": + param := types.U8(0) + err = decoder.Decode(param) + case "u16": + param := types.U16(0) + err = decoder.Decode(param) + case "u32": + param := types.U32(0) + err = decoder.Decode(param) + case "u64": + param := types.U64(0) + err = decoder.Decode(param) + case "u128": + param := types.U128{} + err = decoder.Decode(param) + case "u256": + param := types.U256{} + err = decoder.Decode(param) + case "Phase": + param := types.Phase{} + err = decoder.Decode(param) + case "DispatchInfo": + param := types.DispatchInfo{} + err = decoder.Decode(param) + case "DispatchError": + param := types.DispatchError{} + err = decoder.Decode(param) + case "AccountId": + param := types.AccountID{} + err = decoder.Decode(param) + case "AccountIndex": + param := types.AccountIndex(0) + err = decoder.Decode(param) + // case "Balance": + // param := types.Balance{} + // err = decoder.Decode(param) + // case "Status": + // param := types.Status{} + // err = decoder.Decode(param) + case "bool": + param := types.Bool(false) + err = decoder.Decode(param) + // case "CallHash": + // param := types.CallHash{} + // err = decoder.Decode(param) + // case "Timepoint": + // param := types.Timepoint{} + // err = decoder.Decode(param) + // case "ProposalIndex": + // param := types.ProposalIndex{} + // err = decoder.Decode(param) + case "Hash": + param := types.Hash{} + err = decoder.Decode(param) + // case "EraIndex": + // param := types.EraIndex{} + // err = decoder.Decode(param) + // case "SessionIndex": + // param := types.SessionIndex{} + // err = decoder.Decode(param) + // case "ElectionCompute": + // param := types.ElectionCompute{} + // err = decoder.Decode(param) + // case "MemberCount": + // param := types.MemberCount{} + // err = decoder.Decode(param) + // case "sp_std": + // param := // types.sp_std::marker::PhantomData<(AccountId, Event)>{} + // err = decoder.Decode(param) + // case "Vec": + // param := // types.Vec<(OracleKey, OracleValue)>{} + // err = decoder.Decode(param) + // case "CurrencyId": + // param := types.CurrencyId{} + // err = decoder.Decode(param) + // case "Amount": + // param := types.Amount{} + // err = decoder.Decode(param) + // case "VestingSchedule": + // param := types.VestingSchedule{} + // err = decoder.Decode(param) + case "BlockNumber": + param := types.BlockNumber(0) + err = decoder.Decode(param) + // case "DispatchId": + // param := types.DispatchId{} + // err = decoder.Decode(param) + case "StorageKey": + param := types.StorageKey{} + err = decoder.Decode(param) + // case "StorageValue": + // param := types.StorageValue{} + // err = decoder.Decode(param) + // case "AuctionId": + // param := types.AuctionId{} + // err = decoder.Decode(param) + // case "Price": + // param := types.Price{} + // err = decoder.Decode(param) + // case "DebitAmount": + // param := types.DebitAmount{} + // err = decoder.Decode(param) + // case "DebitBalance": + // param := types.DebitBalance{} + // err = decoder.Decode(param) + // case "Share": + // param := types.Share{} + // err = decoder.Decode(param) + // case "LiquidationStrategy": + // param := types.LiquidationStrategy{} + // err = decoder.Decode(param) + // case "Option": + // param := types.Option{} + // err = decoder.Decode(param) + // case "Option": + // param := types.Option{} + // err = decoder.Decode(param) + // case "Rate": + // param := types.Rate{} + // err = decoder.Decode(param) + // case "Vec": + // param := // types.Vec<(CurrencyId, Balance)>{} + // err = decoder.Decode(param) + // case "AirDropCurrencyId": + // param := types.AirDropCurrencyId{} + // err = decoder.Decode(param) + // case "Vec": + // param := // types.Vec{} + // err = decoder.Decode(param) + + case "AuthorityList": + param := []struct { + AuthorityID types.AuthorityID + AuthorityWeight types.U64 + }{} + err = decoder.Decode(param) + default: + return fmt.Errorf("unable to decode field %v_%v arg #%v %v", moduleName, + eventName, j, eventParams.Args[j]) + } + } + + fmt.Printf("unable to find field %v_%v for event #%v with EventID %v\n", moduleName, eventName, i, id) + continue + // return fmt.Errorf("unable to find field %v_%v for event #%v with EventID %v", moduleName, eventName, i, id) + } + + // create a pointer to with the correct type that will hold the decoded event + holder := reflect.New(field.Type().Elem()) + + // ensure first field is for Phase, last field is for Topics + numFields := holder.Elem().NumField() + fmt.Printf("numFields: %v\n", numFields) + if numFields < 2 { + return fmt.Errorf("expected event #%v with EventID %v, field %v_%v to have at least 2 fields "+ + "(for Phase and Topics), but has %v fields", i, id, moduleName, eventName, numFields) + } + phaseField := holder.Elem().FieldByIndex([]int{0}) + if phaseField.Type() != reflect.TypeOf(phase) { + return fmt.Errorf("expected the first field of event #%v with EventID %v, field %v_%v to be of type "+ + "types.Phase, but got %v", i, id, moduleName, eventName, phaseField.Type()) + } + topicsField := holder.Elem().FieldByIndex([]int{numFields - 1}) + if topicsField.Type() != reflect.TypeOf([]types.Hash{}) { + return fmt.Errorf("expected the last field of event #%v with EventID %v, field %v_%v to be of type "+ + "[]types.Hash for Topics, but got %v", i, id, moduleName, eventName, topicsField.Type()) + } + + // set the phase we decoded earlier + phaseField.Set(reflect.ValueOf(phase)) + + // set the remaining fields + for j := 1; j < numFields; j++ { + fmt.Printf("decoding field: %v\n", j) + err = decoder.Decode(holder.Elem().FieldByIndex([]int{j}).Addr().Interface()) + if err != nil { + return fmt.Errorf("unable to decode field %v event #%v with EventID %v, field %v_%v: %v", j, i, id, moduleName, + eventName, err) + } + } + + // add the decoded event to the slice + field.Set(reflect.Append(field, holder.Elem())) + + fmt.Println(fmt.Sprintf("decoded event #%v", i)) + } + return nil +} diff --git a/go.mod b/go.mod index 9d1029f0..48c050e4 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.14 require ( github.com/btcsuite/btcd v0.20.1-beta github.com/btcsuite/btcutil v1.0.2 + github.com/centrifuge/go-substrate-rpc-client v1.1.0 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf github.com/cosmos/cosmos-sdk v0.39.1 github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect @@ -25,6 +26,7 @@ require ( github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 + github.com/pierrec/xxHash v0.1.5 // indirect github.com/raulk/clock v1.1.0 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 diff --git a/go.sum b/go.sum index 690ddb94..fd226e27 100644 --- a/go.sum +++ b/go.sum @@ -80,6 +80,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -126,6 +127,8 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/centrifuge/go-substrate-rpc-client v1.1.0 h1:cpfG7KKwy+n7FRb1LkiMYwi6e4gwzaooGfPIzXXQj6w= +github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -175,6 +178,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= @@ -313,6 +317,7 @@ github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNI github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -397,6 +402,7 @@ github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -1062,6 +1068,8 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= +github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1133,6 +1141,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= diff --git a/infra/acala/Dockerfile b/infra/acala/Dockerfile new file mode 100644 index 00000000..a988fb74 --- /dev/null +++ b/infra/acala/Dockerfile @@ -0,0 +1,38 @@ +FROM ubuntu:xenial + +RUN apt-get update && apt-get install --yes --fix-missing software-properties-common curl git clang +RUN apt-get install --yes --fix-missing --no-install-recommends build-essential + +# Install Rust +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + +# Clone repository +RUN git clone https://github.com/AcalaNetwork/Acala.git + +RUN mv Acala /app +WORKDIR /app + +# TEMPORARY: use the branch that has a good reference to the submodules +# TODO: remove when the `master` branch of Acala is updated +RUN git fetch +RUN git checkout update-orml +RUN git pull + +# Make sure submodule.recurse is set to true to make life with submodule easier. +RUN git config --global submodule.recurse true + +# Build +RUN make init +RUN make build + +WORKDIR / +COPY run.sh /root/ +RUN chmod +x /root/run.sh + +# rpc port +EXPOSE 9933 +# ws port +EXPOSE 9944 + +ENTRYPOINT ["./root/run.sh"] diff --git a/infra/acala/run.sh b/infra/acala/run.sh new file mode 100644 index 00000000..a48318f1 --- /dev/null +++ b/infra/acala/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash +ADDRESS=$1 + +# Start +cd /app +make run +sleep 10 + +# Print setup +echo "ACALA_ADDRESS=$ADDRESS" diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 9bd5fa9c..06e86c5a 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -1,5 +1,18 @@ version: "2" services: + # + # Acala + # + acala: + build: + context: ./acala + ports: + - "0.0.0.0:9933:9933" + - "0.0.0.0:9944:9944" + entrypoint: + - "./root/run.sh" + - "${ACALA_ADDRESS}" + # # Bitcoin # From e9f4aff491458d44f9236f9086f767934eb1f5b1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 Aug 2020 20:21:14 +0530 Subject: [PATCH 007/335] clean up | binance smart chain docker setup --- chain/acala/acala.go | 144 +------------------------------- chain/acala/acala_test.go | 23 +---- infra/.env | 7 ++ infra/binance/Dockerfile | 15 ++++ infra/binance/Dockerfile-riolta | 23 +++++ infra/binance/run.sh | 11 +++ infra/docker-compose.yaml | 13 +++ 7 files changed, 72 insertions(+), 164 deletions(-) create mode 100644 infra/binance/Dockerfile create mode 100644 infra/binance/Dockerfile-riolta create mode 100644 infra/binance/run.sh diff --git a/chain/acala/acala.go b/chain/acala/acala.go index 6daf885e..3452b7c2 100644 --- a/chain/acala/acala.go +++ b/chain/acala/acala.go @@ -11,7 +11,7 @@ import ( "go.uber.org/zap" ) -const DefaultClientRPCURL = "ws://127.0.0.1:9933" +const DefaultClientRPCURL = "http://127.0.0.1:9944" type ClientOptions struct { Logger *zap.Logger @@ -52,68 +52,13 @@ func NewClient(opts ClientOptions) (*Client, error) { } func printEvents(meta *types.Metadata, data *types.StorageDataRaw, nhBlock types.Hash) error { - // key, err := types.CreateStorageKey(meta, "RenToken", "Events", nil, nil) - // if err != nil { - // return err - // } - - fmt.Printf("Meta: %#v\n", meta) - - // var er EventRecordsRaw - // err = est.getStorage(key, &er, nhBlock) - // if err != nil { - // return err - // } - - fmt.Printf("data: %#v\n", data) - er := types.EventRecordsRaw(*data) - e := EventsWithMint{} err := DecodeEvents(&er, meta, &e) if err != nil { return err } - // decoder := scale.NewDecoder(bytes.NewReader(er)) - - // // determine number of events - // n, err := decoder.DecodeUintCompact() - // if err != nil { - // return err - // } - - // fmt.Printf("found %v events", n) - - // // iterate over events - // for i := uint64(0); i < n.Uint64(); i++ { - // fmt.Printf("decoding event #%v\n", i) - - // // decode Phase - // phase := types.Phase{} - // err := decoder.Decode(&phase) - // if err != nil { - // return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) - // } - - // // decode EventID - // id := types.EventID{} - // err = decoder.Decode(&id) - // if err != nil { - // return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) - // } - - // fmt.Printf("event #%v has EventID %v\n", i, id) - - // } - - // events := types.EventRecords{} - // err := EventRecordsRaw(*data).DecodeEventRecords(meta, &events) - // if err != nil { - // panic(err) - // } - - // Show what we are busy with for _, e := range e.RenToken_AssetsMinted { fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Phase) fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Who) @@ -121,93 +66,6 @@ func printEvents(meta *types.Metadata, data *types.StorageDataRaw, nhBlock types fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Amount) fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Topics) } - // for _, e := range e.Balances_Endowed { - // fmt.Printf("[EVENT] Balances:Endowed:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) - // } - // for _, e := range e.Balances_DustLost { - // fmt.Printf("[EVENT] Balances:DustLost:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) - // } - // for _, e := range e.Balances_Transfer { - // fmt.Printf("[EVENT] Balances:Transfer:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v, %v, %v\n", e.From, e.To, e.Value) - // } - // for _, e := range e.Balances_BalanceSet { - // fmt.Printf("[EVENT] Balances:BalanceSet:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v, %v, %v\n", e.Who, e.Free, e.Reserved) - // } - // for _, e := range e.Balances_Deposit { - // fmt.Printf("[EVENT] Balances:Deposit:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v, %v\n", e.Who, e.Balance) - // } - // for _, e := range e.Grandpa_NewAuthorities { - // fmt.Printf("[EVENT] Grandpa:NewAuthorities:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.NewAuthorities) - // } - // for _, e := range e.Grandpa_Paused { - // fmt.Printf("[EVENT] Grandpa:Paused:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.Grandpa_Resumed { - // fmt.Printf("[EVENT] Grandpa:Resumed:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.ImOnline_HeartbeatReceived { - // fmt.Printf("[EVENT] ImOnline:HeartbeatReceived:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x\n", e.AuthorityID) - // } - // for _, e := range e.ImOnline_AllGood { - // fmt.Printf("[EVENT] ImOnline:AllGood:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.ImOnline_SomeOffline { - // fmt.Printf("[EVENT] ImOnline:SomeOffline:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.IdentificationTuples) - // } - // for _, e := range e.Indices_IndexAssigned { - // fmt.Printf("[EVENT] Indices:IndexAssigned:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x%v\n", e.AccountID, e.AccountIndex) - // } - // for _, e := range e.Indices_IndexFreed { - // fmt.Printf("[EVENT] Indices:IndexFreed:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.AccountIndex) - // } - // for _, e := range e.Offences_Offence { - // fmt.Printf("[EVENT] Offences:Offence:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v%v\n", e.Kind, e.OpaqueTimeSlot) - // } - // for _, e := range e.Session_NewSession { - // fmt.Printf("[EVENT] Session:NewSession:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.SessionIndex) - // } - // for _, e := range e.Staking_Reward { - // fmt.Printf("[EVENT] Staking:Reward:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.Balance) - // } - // for _, e := range e.Staking_Slash { - // fmt.Printf("[EVENT] Staking:Slash:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x%v\n", e.AccountID, e.Balance) - // } - // for _, e := range e.Staking_OldSlashingReportDiscarded { - // fmt.Printf("[EVENT] Staking:OldSlashingReportDiscarded:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.SessionIndex) - // } - // for _, e := range e.System_ExtrinsicSuccess { - // fmt.Printf("[EVENT] System:ExtrinsicSuccess:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.System_ExtrinsicFailed { - // fmt.Printf("[EVENT] System:ErtrinsicFailed:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.DispatchError) - // } - // for _, e := range e.System_CodeUpdated { - // fmt.Printf("[EVENT] System:CodeUpdated:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.System_NewAccount { - // fmt.Printf("[EVENT] System:NewAccount:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x\n", e.Who) - // } - // for _, e := range e.System_KilledAccount { - // fmt.Printf("[EVENT] System:KilledAccount:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#X\n", e.Who) - // } return nil } diff --git a/chain/acala/acala_test.go b/chain/acala/acala_test.go index edc6f3d5..55021661 100644 --- a/chain/acala/acala_test.go +++ b/chain/acala/acala_test.go @@ -1,36 +1,17 @@ package acala_test import ( - "context" - "fmt" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/renproject/multichain" "github.com/renproject/multichain/chain/acala" - "github.com/renproject/pack" ) var _ = Describe("Substrate client", func() { Context("when verifying burns", func() { It("should verify a valid burn", func() { - client, err := acala.NewClient(acala.DefaultClientOptions()) - if err != nil { - panic(err) - } - - nonce := [32]byte{0} - amount, to, confs, err := client.BurnEvent(context.Background(), multichain.BTC, pack.NewBytes32(nonce), pack.NewU64(3047)) - if err != nil { - panic(err) - } - - fmt.Printf("Amount: %v\n", amount) - fmt.Printf("To: %v\n", to) - fmt.Printf("Confs: %v\n", confs) - - Expect(amount).Should(Equal(6000)) + _, err := acala.NewClient(acala.DefaultClientOptions()) + Expect(err).ToNot(HaveOccurred()) }) }) }) diff --git a/infra/.env b/infra/.env index bf2515ac..be8dd432 100644 --- a/infra/.env +++ b/infra/.env @@ -1,3 +1,10 @@ +# +# Binance Smart Chain +# + +export BINANCE_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" +export BINANCE_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A + # # Bitcoin # diff --git a/infra/binance/Dockerfile b/infra/binance/Dockerfile new file mode 100644 index 00000000..f8646aa1 --- /dev/null +++ b/infra/binance/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:xenial + +RUN apt-get update --fix-missing +RUN apt-get install --yes curl + +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - +RUN apt-get install --yes nodejs +RUN npm install -g ganache-cli + +COPY run.sh /root/run.sh +RUN chmod +x /root/run.sh + +EXPOSE 8575 + +ENTRYPOINT ["./root/run.sh"] diff --git a/infra/binance/Dockerfile-riolta b/infra/binance/Dockerfile-riolta new file mode 100644 index 00000000..a63ce80c --- /dev/null +++ b/infra/binance/Dockerfile-riolta @@ -0,0 +1,23 @@ +# Build Geth in a stock Go builder container +FROM golang:1.14-alpine as builder + +RUN apk add --no-cache make gcc musl-dev linux-headers git + +WORKDIR /app +RUN git clone -b 1.0.1.beta.2 https://github.com/binance-chain/bsc +WORKDIR /app/bsc + +RUN make geth + +RUN touch genesis.json +RUN touch config.yaml +RUN wget -q -O genesis.json https://github.com/binance-chain/bsc/releases/download/v1.0.0-beta.1/genesis.json +RUN wget -q -O config.yaml https://github.com/binance-chain/bsc/releases/download/v1.0.0-beta.1/config.toml + +# RPC port +EXPOSE 8575 + +# init the node with genesis file +RUN ./build/bin/geth --datadir node init genesis.json + +ENTRYPOINT ["./build/bin/geth", "--config", "./config.yaml", "--datadir", "./node", "--rpc", "--rpcport", "8575"] diff --git a/infra/binance/run.sh b/infra/binance/run.sh new file mode 100644 index 00000000..2114daf0 --- /dev/null +++ b/infra/binance/run.sh @@ -0,0 +1,11 @@ +#!/bin/bash +MNEMONIC=$1 +ADDRESS=$2 + +ganache-cli \ + -h 0.0.0.0 \ + -k muirGlacier \ + -i 420 \ + -m "$MNEMONIC" \ + -p 8575 \ + -u $ADDRESS diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 06e86c5a..2e7c8dfe 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -13,6 +13,19 @@ services: - "./root/run.sh" - "${ACALA_ADDRESS}" + # + # Binance Smart Chain + # + binance: + build: + context: ./binance + ports: + - "0.0.0.0:8575:8575" + # entrypoint: + # - "./root/run.sh" + # - "${BINANCE_MNEMONIC}" + # - "${BINANCE_ADDRESS}" + # # Bitcoin # From dc05145575c624b1edfde2144d3702f8c27c7fe5 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 Aug 2020 20:32:12 +0530 Subject: [PATCH 008/335] (fix) uncomment the entrypoint for binance dev docker setup --- infra/docker-compose.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 2e7c8dfe..4c835599 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -21,10 +21,10 @@ services: context: ./binance ports: - "0.0.0.0:8575:8575" - # entrypoint: - # - "./root/run.sh" - # - "${BINANCE_MNEMONIC}" - # - "${BINANCE_ADDRESS}" + entrypoint: + - "./root/run.sh" + - "${BINANCE_MNEMONIC}" + - "${BINANCE_ADDRESS}" # # Bitcoin From 8af712f47954fd70d86be2e547264a58182ad85d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 26 Aug 2020 00:56:28 +0530 Subject: [PATCH 009/335] remove filecoin-ffi --- .gitmodules | 3 --- go.mod | 2 -- 2 files changed, 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4488466e..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "filecoin-ffi"] - path = chain/filecoin/filecoin-ffi - url = git@github.com:filecoin-project/filecoin-ffi.git diff --git a/go.mod b/go.mod index 0bfeb41b..d8339333 100644 --- a/go.mod +++ b/go.mod @@ -37,5 +37,3 @@ require ( go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 ) - -replace github.com/filecoin-project/filecoin-ffi => /Users/rohitnarurkar/Develop/go-workspace/src/github.com/renproject/multichain/chain/filecoin/filecoin-ffi From 632cca4d9463e97d9a74f8334de9f40763207b4c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 27 Aug 2020 23:04:08 +0530 Subject: [PATCH 010/335] implement the account API for Ethereum --- api/account/account.go | 4 +- chain/ethereum/account.go | 89 +++++++++++++++++++++++++++++++++++++++ chain/ethereum/gas.go | 31 ++++++++++++++ go.sum | 7 +++ multichain.go | 47 +++++++++++++++++++++ 5 files changed, 176 insertions(+), 2 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 7d309721..c4114d37 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -39,12 +39,12 @@ type Tx interface { // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighashes() ([]pack.Bytes32, error) + Sighashes() (pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign([]pack.Bytes65, pack.Bytes) error + Sign(pack.Bytes65, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 59dd7210..49f31805 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -1 +1,90 @@ package ethereum + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" + "github.com/renproject/pack" +) + +type TxBuilder struct { + config *params.ChainConfig +} + +func NewTxBuilder(config *params.ChainConfig) TxBuilder { + return TxBuilder{config: config} +} + +func (txBuilder TxBuilder) BuildTx( + from, to address.Address, + value, nonce pack.U256, + payload pack.Bytes, +) (account.Tx, error) { + panic("unimplemented") +} + +type Tx struct { + from Address + + tx *types.Transaction + + signer types.Signer + signed bool +} + +func (tx *Tx) Hash() pack.Bytes { + return pack.NewBytes(tx.tx.Hash().Bytes()) +} + +func (tx *Tx) From() address.Address { + return address.Address(tx.from.String()) +} + +func (tx *Tx) To() address.Address { + return address.Address(tx.tx.To().String()) +} + +func (tx *Tx) Value() pack.U256 { + return pack.NewU256FromInt(tx.tx.Value()) +} + +func (tx *Tx) Nonce() pack.U256 { + return pack.NewU256FromU64(pack.NewU64(tx.tx.Nonce())) +} + +func (tx *Tx) Payload() contract.CallData { + return contract.CallData(pack.NewBytes(tx.tx.Data())) +} + +func (tx *Tx) Sighashes() (pack.Bytes32, error) { + sighash := tx.signer.Hash(tx.tx) + return pack.NewBytes32(sighash), nil +} + +func (tx *Tx) Sign(signature pack.Bytes65, pubKey pack.Bytes) error { + if tx.signed { + return fmt.Errorf("already signed") + } + + signedTx, err := tx.tx.WithSignature(tx.signer, signature.Bytes()) + if err != nil { + return err + } + + tx.tx = signedTx + tx.signed = true + return nil +} + +func (tx *Tx) Serialize() (pack.Bytes, error) { + serialized, err := tx.tx.MarshalJSON() + if err != nil { + return pack.Bytes{}, err + } + + return pack.NewBytes(serialized), nil +} diff --git a/chain/ethereum/gas.go b/chain/ethereum/gas.go index 59dd7210..f091bb6d 100644 --- a/chain/ethereum/gas.go +++ b/chain/ethereum/gas.go @@ -1 +1,32 @@ package ethereum + +import ( + "context" + + "github.com/renproject/pack" +) + +// A GasEstimator returns the gas price (in wei) that is needed in order to +// confirm transactions with an estimated maximum delay of one block. In +// distributed networks that collectively build, sign, and submit transactions, +// it is important that all nodes in the network have reached consensus on the +// gas price. +type GasEstimator struct { + wei pack.U256 +} + +// NewGasEstimator returns a simple gas estimator that always returns the given +// gas price (in wei) to be used for broadcasting an Ethereum transaction. +func NewGasEstimator(wei pack.U256) GasEstimator { + return GasEstimator{ + wei: wei, + } +} + +// EstimateGasPrice returns the number of wei that is needed in order to confirm +// transactions with an estimated maximum delay of one block. It is the +// responsibility of the caller to know the number of bytes in their +// transaction. +func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { + return gasEstimator.wei, nil +} diff --git a/go.sum b/go.sum index fd226e27..ace4f857 100644 --- a/go.sum +++ b/go.sum @@ -63,6 +63,7 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= +github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= @@ -130,7 +131,9 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/centrifuge/go-substrate-rpc-client v1.1.0 h1:cpfG7KKwy+n7FRb1LkiMYwi6e4gwzaooGfPIzXXQj6w= github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -361,6 +364,7 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 h1:lMm2hD9Fy0ynom5+85/pbdkiYcBqM1JWmhpAXLmy0fw= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -1153,6 +1157,7 @@ github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJP github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= @@ -1219,7 +1224,9 @@ github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfD github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= +github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= diff --git a/multichain.go b/multichain.go index 8441fba1..26503c1e 100644 --- a/multichain.go +++ b/multichain.go @@ -95,6 +95,17 @@ func (asset Asset) OriginChain() Chain { } } +func (asset Asset) ChainType() ChainType { + switch asset { + case BCH, BTC, DGB, DOGE, ZEC: + return ChainTypeUTXOBased + case BNB, ETH: + return ChainTypeAccountBased + default: + return ChainType("") + } +} + // SizeHint returns the number of bytes required to represent the asset in // binary. func (asset Asset) SizeHint() int { @@ -149,3 +160,39 @@ func (chain Chain) Marshal(buf []byte, rem int) ([]byte, int, error) { func (chain *Chain) Unmarshal(buf []byte, rem int) ([]byte, int, error) { return surge.UnmarshalString((*string)(chain), buf, rem) } + +func (chain Chain) ChainType() ChainType { + switch chain { + case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: + return ChainTypeUTXOBased + case BinanceSmartChain, Ethereum: + return ChainTypeAccountBased + default: + return ChainType("") + } +} + +func (chain Chain) IsAccountBased() bool { + switch chain { + case BinanceSmartChain, Ethereum: + return true + default: + return false + } +} + +func (chain Chain) IsUTXOBased() bool { + switch chain { + case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: + return true + default: + return false + } +} + +type ChainType string + +const ( + ChainTypeAccountBased = ChainType("AccountBased") + ChainTypeUTXOBased = ChainType("UTXOBased") +) From 97fbe986f2ed4b3dce10e85bbf0508d32769b474 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 28 Aug 2020 03:16:09 +0530 Subject: [PATCH 011/335] an account-based tx has a single sighash --- api/account/account.go | 4 ++-- chain/ethereum/account.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index c4114d37..5e5ecdfd 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -37,9 +37,9 @@ type Tx interface { // call functions on a contract. Payload() contract.CallData - // Sighashes that must be signed before the transaction can be submitted by + // Sighash that must be signed before the transaction can be submitted by // the client. - Sighashes() (pack.Bytes32, error) + Sighash() (pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 49f31805..e8f6bfea 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -60,7 +60,7 @@ func (tx *Tx) Payload() contract.CallData { return contract.CallData(pack.NewBytes(tx.tx.Data())) } -func (tx *Tx) Sighashes() (pack.Bytes32, error) { +func (tx *Tx) Sighash() (pack.Bytes32, error) { sighash := tx.signer.Hash(tx.tx) return pack.NewBytes32(sighash), nil } From 5f55852d27e73c74e951dfaf26605996c40242b6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 00:38:10 +0530 Subject: [PATCH 012/335] add gas limit, fetching tx --- api/account/account.go | 2 +- api/gas/gas.go | 9 ++++++ chain/bitcoin/gas.go | 7 +++++ chain/ethereum/account.go | 59 ++++++++++++++++++++++++++++++++++++++- chain/ethereum/gas.go | 12 ++++++++ 5 files changed, 87 insertions(+), 2 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 5e5ecdfd..d530863d 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -56,7 +56,7 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { - BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (Tx, error) + BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } // The Client interface defines the functionality required to interact with a diff --git a/api/gas/gas.go b/api/gas/gas.go index 2578fc80..36d94b43 100644 --- a/api/gas/gas.go +++ b/api/gas/gas.go @@ -10,6 +10,12 @@ import ( "github.com/renproject/pack" ) +type TxType uint8 + +const ( + ETHTransfer = TxType(0) +) + // The Estimator interface defines the functionality required to know the // current recommended gas prices. type Estimator interface { @@ -22,4 +28,7 @@ type Estimator interface { // required to get a transaction into one of the next few blocks (because // blocks happen a lot faster). EstimateGasPrice(context.Context) (pack.U256, error) + + // EstimateGasLimit ... + EstimateGasLimit(TxType) (pack.U256, error) } diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index 40207885..e901fc1e 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -3,6 +3,7 @@ package bitcoin import ( "context" + "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -30,3 +31,9 @@ func NewGasEstimator(satsPerByte pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.satsPerByte, nil } + +// EstimateGasLimit returns the gas limit for a transaction. This is not relevant +// for UTXO type of chains +func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { + return pack.NewU256([32]byte{}), nil +} diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index e8f6bfea..cc66b22c 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -1,9 +1,12 @@ package ethereum import ( + "context" "fmt" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/params" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -22,9 +25,24 @@ func NewTxBuilder(config *params.ChainConfig) TxBuilder { func (txBuilder TxBuilder) BuildTx( from, to address.Address, value, nonce pack.U256, + gasPrice, gasLimit pack.U256, payload pack.Bytes, ) (account.Tx, error) { - panic("unimplemented") + toAddr, err := NewAddressFromHex(string(to)) + if err != nil { + return nil, fmt.Errorf("decoding address: %v", err) + } + fromAddr, err := NewAddressFromHex(string(from)) + if err != nil { + return nil, fmt.Errorf("decoding address: %v", err) + } + + tx := types.NewTransaction(nonce.Int().Uint64(), common.Address(toAddr), value.Int(), gasLimit.Int().Uint64(), gasPrice.Int(), []byte(payload)) + + signer := types.MakeSigner(txBuilder.config, nil) + signed := false + + return &Tx{fromAddr, tx, signer, signed}, nil } type Tx struct { @@ -88,3 +106,42 @@ func (tx *Tx) Serialize() (pack.Bytes, error) { return pack.NewBytes(serialized), nil } + +type EthClient struct { + client *ethclient.Client +} + +func NewClient(rpcURL pack.String) (account.Client, error) { + client, err := ethclient.Dial(string(rpcURL)) + if err != nil { + return nil, fmt.Errorf("dialing RPC URL %v: %v", rpcURL, err) + } + + return EthClient{client}, nil +} + +func (client EthClient) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { + txHash := common.BytesToHash(txId) + tx, isPending, err := client.client.TransactionByHash(ctx, txHash) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching tx: %v", err) + } + if isPending { + return nil, pack.NewU64(0), fmt.Errorf("tx not confirmed") + } + txReceipt, err := client.client.TransactionReceipt(ctx, txHash) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching tx receipt: %v", err) + } + block, err := client.client.BlockByNumber(ctx, nil) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching current block: %v", err) + } + confs := block.NumberU64() - txReceipt.BlockNumber.Uint64() + 1 + + return &Tx{tx: tx}, pack.NewU64(confs), nil +} + +func (client EthClient) SubmitTx(ctx context.Context, tx account.Tx) error { + panic("unimplemented") +} diff --git a/chain/ethereum/gas.go b/chain/ethereum/gas.go index f091bb6d..c2c9addb 100644 --- a/chain/ethereum/gas.go +++ b/chain/ethereum/gas.go @@ -2,7 +2,9 @@ package ethereum import ( "context" + "fmt" + "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -30,3 +32,13 @@ func NewGasEstimator(wei pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.wei, nil } + +// EstimateGasLimit returns the gas limit depending on what type of transaction we wish to do +func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { + switch txType { + case gas.ETHTransfer: + return pack.NewU256FromU64(pack.NewU64(21000)), nil + default: + return pack.NewU256([32]byte{}), fmt.Errorf("non-exhaustive transaction type: %v", txType) + } +} From fccf27ef1a2cf82a6a906a98834ebc041c6c9861 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 09:57:25 +0530 Subject: [PATCH 013/335] add support for filecoin | compilation issues --- .gitmodules | 3 + chain/filecoin/account.go | 239 ++++++++++++++++++++++++++ chain/filecoin/account_test.go | 1 + chain/filecoin/address.go | 37 ++++ chain/filecoin/address_test.go | 97 +++++++++++ chain/filecoin/filecoin-ffi | 1 + chain/filecoin/filecoin.go | 1 + chain/filecoin/filecoin_suite_test.go | 13 ++ chain/filecoin/filecoin_test.go | 1 + go.mod | 27 ++- go.sum | 118 +++++++++++++ 11 files changed, 532 insertions(+), 6 deletions(-) create mode 100644 .gitmodules create mode 100644 chain/filecoin/account.go create mode 100644 chain/filecoin/account_test.go create mode 100644 chain/filecoin/address.go create mode 100644 chain/filecoin/address_test.go create mode 160000 chain/filecoin/filecoin-ffi create mode 100644 chain/filecoin/filecoin.go create mode 100644 chain/filecoin/filecoin_suite_test.go create mode 100644 chain/filecoin/filecoin_test.go diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e1b9bf3c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "chain/filecoin/filecoin-ffi"] + path = chain/filecoin/filecoin-ffi + url = https://github.com/filecoin-project/filecoin-ffi diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go new file mode 100644 index 00000000..503adf0a --- /dev/null +++ b/chain/filecoin/account.go @@ -0,0 +1,239 @@ +package filecoin + +import ( + "bytes" + "context" + "fmt" + "net/http" + + filaddress "github.com/filecoin-project/go-address" + filclient "github.com/filecoin-project/lotus/api/client" + "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/ipfs/go-cid" + "github.com/minio/blake2b-simd" + "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" + "github.com/renproject/pack" +) + +const ( + AuthorizationKey = "Authorization" + DefaultClientMultiAddress = "" + DefaultClientAuthToken = "" +) + +type Tx struct { + msg types.Message + signature pack.Bytes65 +} + +// Hash returns the hash that uniquely identifies the transaction. +// Generally, hashes are irreversible hash functions that consume the +// content of the transaction. +func (tx Tx) Hash() pack.Bytes { + return pack.NewBytes(tx.msg.Cid().Hash()) +} + +// From returns the address that is sending the transaction. Generally, +// this is also the address that must sign the transaction. +func (tx Tx) From() address.Address { + return address.Address(tx.msg.From.String()) +} + +// To returns the address that is receiving the transaction. This can be the +// address of an external account, controlled by a private key, or it can be +// the address of a contract. +func (tx Tx) To() address.Address { + return address.Address(tx.msg.To.String()) +} + +// Value being sent from the sender to the receiver. +func (tx Tx) Value() pack.U256 { + return pack.NewU256FromInt(tx.msg.Value.Int) +} + +// Nonce returns the nonce used to order the transaction with respect to all +// other transactions signed and submitted by the sender. +func (tx Tx) Nonce() pack.U256 { + return pack.NewU256FromU64(pack.NewU64(tx.msg.Nonce)) +} + +// Payload returns arbitrary data that is associated with the transaction. +// Generally, this payload is used to send notes between external accounts, +// or invoke business logic on a contract. +func (tx Tx) Payload() contract.CallData { + if tx.msg.Method == 0 { + if len(tx.msg.Params) == 0 { + return contract.CallData([]byte{}) + } + return contract.CallData(append([]byte{0}, tx.msg.Params...)) + } + if len(tx.msg.Params) == 0 { + return contract.CallData([]byte{byte(tx.msg.Method)}) + } + return contract.CallData(append([]byte{byte(tx.msg.Method)}, tx.msg.Params...)) +} + +// Sighashes returns the digests that must be signed before the transaction +// can be submitted by the client. +func (tx Tx) Sighashes() ([]pack.Bytes32, error) { + return []pack.Bytes32{blake2b.Sum256(tx.Hash())}, nil +} + +// Sign the transaction by injecting signatures for the required sighashes. +// The serialized public key used to sign the sighashes must also be +// specified. +func (tx Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { + if len(signatures) != 1 { + return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) + } + tx.signature = signatures[0] + return nil +} + +// Serialize the transaction into bytes. Generally, this is the format in +// which the transaction will be submitted by the client. +func (tx Tx) Serialize() (pack.Bytes, error) { + buf := new(bytes.Buffer) + if err := tx.msg.MarshalCBOR(buf); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +type TxBuilder struct { + gasPrice pack.U256 + gasLimit pack.U256 +} + +func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { + return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} +} + +func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (account.Tx, error) { + filfrom, err := filaddress.NewFromString(string(from)) + if err != nil { + return nil, fmt.Errorf("bad from address '%v': %v", from, err) + } + filto, err := filaddress.NewFromString(string(to)) + if err != nil { + return nil, fmt.Errorf("bad to address '%v': %v", to, err) + } + methodNum := abi.MethodNum(0) + if len(payload) > 0 { + methodNum = abi.MethodNum(payload[0]) + payload = payload[1:] + } + return Tx{ + msg: types.Message{ + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: value.Int().Uint64(), + GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, + GasLimit: txBuilder.gasLimit.Int().Int64(), + Method: methodNum, + Params: payload, + }, + signature: pack.Bytes65{}, + }, nil +} + +// ClientOptions are used to parameterise the behaviour of the Client. +type ClientOptions struct { + MultiAddress string + AuthToken string +} + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the multi-address and authentication token should +// be changed. +func DefaultClientOptions() ClientOptions { + return ClientOptions{ + MultiAddress: DefaultClientMultiAddress, + AuthToken: DefaultClientAuthToken, + } +} + +// WithAddress returns a modified version of the options with the given API +// multi-address. +func (opts ClientOptions) WithAddress(multiAddr string) ClientOptions { + opts.MultiAddress = multiAddr + return opts +} + +// WithAuthToken returns a modified version of the options with the given +// authentication token. +func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { + opts.AuthToken = authToken + return opts +} + +type Client struct { + opts ClientOptions + node api.FullNode + closer jsonrpc.ClientCloser +} + +// NewClient creates and returns a new JSON-RPC client to the Filecoin node +func NewClient(opts ClientOptions) (*Client, error) { + requestHeaders := make(http.Header) + if opts.AuthToken != DefaultClientAuthToken { + requestHeaders.Add(AuthorizationKey, opts.AuthToken) + } + + node, closer, err := filclient.NewFullNodeRPC(opts.MultiAddress, requestHeaders) + if err != nil { + return nil, err + } + + return &Client{opts, node, closer}, nil +} + +// Tx returns the transaction uniquely identified by the given transaction +// hash. It also returns the number of confirmations for the transaction. +func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { + // parse the transaction ID to a message ID + // msgId, err := cid.Parse(txId.String()) + // if err != nil { + // return nil, nil, fmt.Errorf("parsing txId: %v", err) + // } + + // get message + // message, err := client.node.ChainGetMessage(ctx, msgId) + // if err != nil { + // return nil, nil, fmt.Errorf("fetching tx: %v", err) + // } + + // TODO?: See if we can get a signed message + + // TODO?: API call to get the block number for the above message + + // get most recent block number + // 1. get chain tipset + // 2. choose the most recent block from tipset.blks + // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 + // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 +} + +// SubmitTx to the underlying blockchain network. +// TODO: should also return a transaction hash (pack.Bytes) ? +func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { + // construct crypto.Signature + // https://github.com/filecoin-project/specs-actors/blob/master/actors/crypto/signature.go + + // construct types.SignedMessage + // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/signedmessage.go + + // submit transaction to mempool + // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L169 + // msgId, err := client.node.MpoolPush(ctx, &signedMessage) + // if err != nil { + // return fmt.Errorf("pushing message to message pool: %v", err) + // } +} diff --git a/chain/filecoin/account_test.go b/chain/filecoin/account_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/account_test.go @@ -0,0 +1 @@ +package filecoin_test diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go new file mode 100644 index 00000000..afe9333f --- /dev/null +++ b/chain/filecoin/address.go @@ -0,0 +1,37 @@ +package filecoin + +import ( + filaddress "github.com/filecoin-project/go-address" + "github.com/renproject/multichain/api/address" +) + +type AddressEncoderDecoder struct { + AddressEncoder + AddressDecoder +} + +type AddressEncoder struct{} +type AddressDecoder struct{} + +func NewAddressEncoderDecoder() AddressEncoderDecoder { + return AddressEncoderDecoder{ + AddressEncoder: AddressEncoder{}, + AddressDecoder: AddressDecoder{}, + } +} + +func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) { + addr, err := filaddress.NewFromBytes([]byte(raw)) + if err != nil { + return address.Address(""), err + } + return address.Address(addr.String()), nil +} + +func (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + rawAddr, err := filaddress.NewFromString(string(addr)) + if err != nil { + return nil, err + } + return address.RawAddress(rawAddr.Bytes()), nil +} diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go new file mode 100644 index 00000000..1b4497cb --- /dev/null +++ b/chain/filecoin/address_test.go @@ -0,0 +1,97 @@ +package filecoin_test + +import ( + "math/rand" + "testing/quick" + "time" + + filaddress "github.com/filecoin-project/go-address" + "github.com/multiformats/go-varint" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/filecoin" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Address", func() { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + + encoderDecoder := filecoin.NewAddressEncoderDecoder() + + Context("when encoding and decoding", func() { + Context("for ID protocol", func() { + It("should behave correctly without errors", func() { + f := func() bool { + x := varint.ToUvarint(r.Uint64()) + x = append([]byte{byte(filaddress.ID)}, x...) + + rawAddr := address.RawAddress(pack.NewBytes(x[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for Sepc protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.PayloadHashLength]byte) bool { + y := append([]byte{byte(filaddress.SECP256K1)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for Actor protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.PayloadHashLength]byte) bool { + y := append([]byte{byte(filaddress.Actor)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for BLS protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.BlsPublicKeyBytes]byte) bool { + y := append([]byte{byte(filaddress.BLS)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + }) +}) diff --git a/chain/filecoin/filecoin-ffi b/chain/filecoin/filecoin-ffi new file mode 160000 index 00000000..777a6fbf --- /dev/null +++ b/chain/filecoin/filecoin-ffi @@ -0,0 +1 @@ +Subproject commit 777a6fbf4446b1112adfd4fa5dd88e0c88974122 diff --git a/chain/filecoin/filecoin.go b/chain/filecoin/filecoin.go new file mode 100644 index 00000000..e0985944 --- /dev/null +++ b/chain/filecoin/filecoin.go @@ -0,0 +1 @@ +package filecoin diff --git a/chain/filecoin/filecoin_suite_test.go b/chain/filecoin/filecoin_suite_test.go new file mode 100644 index 00000000..db0159ad --- /dev/null +++ b/chain/filecoin/filecoin_suite_test.go @@ -0,0 +1,13 @@ +package filecoin_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestFilecoin(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Filecoin Suite") +} diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/filecoin_test.go @@ -0,0 +1 @@ +package filecoin_test diff --git a/go.mod b/go.mod index 48c050e4..f1d625e0 100644 --- a/go.mod +++ b/go.mod @@ -9,31 +9,46 @@ require ( github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf github.com/cosmos/cosmos-sdk v0.39.1 github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect + github.com/elastic/go-sysinfo v1.4.0 // indirect + github.com/elastic/go-windows v1.0.1 // indirect github.com/ethereum/go-ethereum v1.9.19 - github.com/filecoin-project/go-address v0.0.3 + github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-bitfield v0.1.0 // indirect github.com/filecoin-project/go-data-transfer v0.5.0 // indirect - github.com/filecoin-project/go-fil-markets v0.3.2 // indirect + github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4 github.com/filecoin-project/lotus v0.4.1 github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect - github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 - github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect + github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf + github.com/gorilla/mux v1.8.0 // indirect + github.com/ipfs/go-cid v0.0.7 github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect github.com/ipfs/go-hamt-ipld v0.1.1 // indirect + github.com/ipld/go-ipld-prime v0.0.3 // indirect github.com/lib/pq v1.7.0 // indirect + github.com/libp2p/go-libp2p-core v0.6.1 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 + github.com/multiformats/go-multiaddr v0.3.1 // indirect + github.com/multiformats/go-varint v0.0.6 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/pierrec/xxHash v0.1.5 // indirect + github.com/prometheus/procfs v0.1.3 // indirect github.com/raulk/clock v1.1.0 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 github.com/renproject/surge v1.2.5 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.3.7 + github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377 github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect go.uber.org/zap v1.15.0 - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a + golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8 // indirect + golang.org/x/tools v0.0.0-20200825202427-b303f430e36d // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5 // indirect + modernc.org/golex v1.0.1 // indirect ) + +replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi diff --git a/go.sum b/go.sum index ace4f857..02f81257 100644 --- a/go.sum +++ b/go.sum @@ -52,6 +52,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= +github.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -170,9 +171,11 @@ github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9 github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= +github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -216,7 +219,9 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-sysinfo v1.4.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -242,26 +247,38 @@ github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d/g github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= +github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef h1:Wi5E+P1QfHP8IF27eUiTx5vYfqQZwfPxzq3oFEq8w8U= github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef/go.mod h1:SrA+pWVoUivqKOfC+ckVYbx41hWz++HxJcrlmHNnebU= +github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= +github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc h1:cODZD2YzpTUtrOSxbEnWFcQHidNRZiRdvLxySjGvG/M= github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc/go.mod h1:KsFPWjF+UUYl6n9A+qbg4bjFgAOneicFZtDH/LQEX2U= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.2/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1 h1:xuHlrdznafh7ul5t4xEncnA4qgpQvJZEw+mr98eqHXw= github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.1.0 h1:ZDAQjvXuLzbrLnwfFruQFJP7IhImmXLuO+8i2qeAczM= github.com/filecoin-project/go-bitfield v0.1.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v0.3.0/go.mod h1:cONglGP4s/d+IUQw5mWZrQK+FQATQxr3AXzi4dRh0l4= +github.com/filecoin-project/go-data-transfer v0.5.0 h1:pvWlab69BD5dwheRHjjBjFB6m7CEqEZeI+aChtVqKVk= github.com/filecoin-project/go-data-transfer v0.5.0/go.mod h1:7yckbsPPMGuN3O1+SYNE/lowwheaUn5woGILpjN52UI= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= +github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4 h1:VqNmKGy4/ryzo/TqevSa1kancc3hSdws7sl/NCTZzT0= github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= +github.com/filecoin-project/go-fil-markets v0.3.2 h1:fvNgdTTIVtckBu61wxbKYSMJzedoFFIKYJagiCDFCiM= github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= +github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= @@ -271,21 +288,27 @@ github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/g github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200619205156-c7bf525c06ef/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= +github.com/filecoin-project/lotus v0.4.1 h1:rg9X3TY7ymT+m6ATIQ7xt8FW2CpCeznwOFfbONPMz84= github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlSclQamx+sQDKRMI= github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= +github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= +github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf h1:2ERozAZteHYef3tVLVJRepzYieLtJdxvfXNUel19CeU= github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= +github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 h1:7wH0V1OhS5gkjlJF/PvwS6MuS1oeVqCJlNECgf9eabw= github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -300,6 +323,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0= github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1/go.mod h1:0eHX/BVySxPc6SE2mZRoppGq7qcEagxdmQnA3dzork8= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -332,6 +356,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= @@ -340,6 +365,7 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -385,6 +411,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= @@ -399,7 +426,10 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -433,11 +463,13 @@ github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a/go.mod h github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -449,6 +481,7 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -467,6 +500,7 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= +github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg= github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis= @@ -475,11 +509,13 @@ github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiL github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= github.com/ipfs/go-bitswap v0.2.8/go.mod h1:2Yjog0GMdH8+AsxkE0DI9D2mANaUTxbVVav0pPoZoug= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= +github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI= github.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So= github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= github.com/ipfs/go-blockservice v0.1.3/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= +github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834 h1:hFJoI1D2a3MqiNkSb4nKwrdkhCngUxUTFNwVwovZX2s= github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -488,7 +524,10 @@ github.com/ipfs/go-cid v0.0.4-0.20191112011718-79e75dffeb10/go.mod h1:/BYOuUoxkE github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= +github.com/ipfs/go-cid v0.0.6 h1:go0y+GcDOGeJIV01FeBsta4FHngoA4Wz7KMeLkXAhMs= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= +github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= @@ -498,6 +537,7 @@ github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRV github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= @@ -512,18 +552,22 @@ github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZ github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY= +github.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEPb0= github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83 h1:tkGDAwcZfzDFeBNyBWYOM02Qw0rGpA2UuCvq49T3K5o= github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= github.com/ipfs/go-hamt-ipld v0.1.1-0.20200501020327-d53d20a7063e/go.mod h1:giiPqWYCnRBYpNTsJ/EX1ojldX5kTXrXYckSJQ7ko9M= github.com/ipfs/go-hamt-ipld v0.1.1-0.20200605182717-0310ad2b0b1f/go.mod h1:phOFBB7W73N9dg1glcb1fQ9HtQFDUpeyJgatW8ns0bw= +github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= +github.com/ipfs/go-ipfs-blockstore v1.0.0 h1:pmFp5sFYsYVvMOp9X01AK3s85usVcLvkBTRsN6SnfUA= github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= @@ -534,31 +578,38 @@ github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1Y github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= +github.com/ipfs/go-ipfs-ds-help v1.0.0 h1:bEQ8hMGs80h0sR8O4tfDgV6B01aaF9qeTrujrTLYV3g= github.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE= +github.com/ipfs/go-ipfs-exchange-interface v0.0.1 h1:LJXIo9W7CAmugqI+uofioIpRb6rY30GUu7G6LUfpMvM= github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= +github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6ZpusRg= github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= +github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= +github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= github.com/ipfs/go-ipld-cbor v0.0.1/go.mod h1:RXHr8s4k0NE0TKhnrxqZC9M888QfsBN9rhS5NjfKzY8= github.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= +github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf h1:PRCy+w3GocY77CBEwTprp6hn7PLiEU1YToKe7B+1FVk= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= +github.com/ipfs/go-ipld-format v0.2.0 h1:xGlJKkArkmBvowr+GMCX0FEZtkro71K1AwiKnL37mwA= github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= github.com/ipfs/go-ipns v0.0.2/go.mod h1:WChil4e0/m9cIINWLxZe1Jtf77oz5L05rO2ei/uKJ5U= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= @@ -566,17 +617,20 @@ github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSI github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= +github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= +github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4 h1:3bijxqzQ1O9yg7gd7Aqk80oaEvsJ+uXw0zSvi2qR3Jw= github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= +github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= @@ -588,13 +642,17 @@ github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= +github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= github.com/ipld/go-car v0.1.1-0.20200429200904-c222d793c339/go.mod h1:eajxljm6I8o3LitnFeVEmucwZmz7+yLSiKce9yYMefg= github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= +github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e h1:ZISbJlM0urTANR9KRfRaqlBmyOj5uUtxs2r4Up9IXsA= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= +github.com/ipld/go-ipld-prime v0.0.3 h1:OjjcSu6gZ2auqLK++HfGKB+3aTfx3rnTNgxDorWQKjA= +github.com/ipld/go-ipld-prime v0.0.3/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -609,6 +667,7 @@ github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -659,6 +718,7 @@ github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= +github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= @@ -733,7 +793,10 @@ github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM= github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= +github.com/libp2p/go-libp2p-core v0.6.0 h1:u03qofNYTBN+yVg08PuAKylZogVf0xcTEeM8skGf+ak= github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= +github.com/libp2p/go-libp2p-core v0.6.1 h1:XS+Goh+QegCDojUZp00CaPMfiEADCrLjNZskWE7pvqs= +github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= @@ -851,6 +914,7 @@ github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+ github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= +github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= @@ -859,6 +923,7 @@ github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIY github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= @@ -940,15 +1005,18 @@ github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nr github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= @@ -962,8 +1030,13 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= @@ -972,11 +1045,16 @@ github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lg github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= +github.com/multiformats/go-multiaddr v0.2.2 h1:XZLDTszBIJe6m0zF6ITBrEcZR73OPUhCBBS9rYAuUzI= github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= +github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= +github.com/multiformats/go-multiaddr v0.3.1 h1:1bxa+W7j9wZKTZREySx1vPMs2TqrYWjVZ7zE6/XLG1I= +github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.3/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.1.0/go.mod h1:01k2RAqtoXIuPa3DCavAE9/6jc6nM0H3EgZyfUhN2oY= +github.com/multiformats/go-multiaddr-dns v0.2.0 h1:YWJoIDwLePniH7OU5hBnDZV6SWuvJqJ0YtN6pLeH9zA= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= @@ -987,8 +1065,10 @@ github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQ github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= +github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA= github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= @@ -997,6 +1077,7 @@ github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= @@ -1004,7 +1085,10 @@ github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wS github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= +github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= @@ -1051,6 +1135,7 @@ github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.m github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= @@ -1076,12 +1161,14 @@ github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -1124,6 +1211,7 @@ github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= @@ -1132,6 +1220,7 @@ github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmO github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= @@ -1203,6 +1292,7 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -1265,6 +1355,7 @@ github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6 github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -1301,7 +1392,9 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200501014322-5f9941ef88e0/go.mod h1:X github.com/whyrusleeping/cbor-gen v0.0.0-20200501232601-351665a6e756/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377 h1:LHFlP/ktDvOnCap7PsT87cs7Gwd0p+qv6Qm5g2ZPR+I= github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c h1:BMg3YUwLEUIYBJoYZVhA4ZDTciXRj6r7ffOCshWrsoE= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= @@ -1323,9 +1416,12 @@ github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGw github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= +github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1344,7 +1440,10 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1404,6 +1503,9 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1434,6 +1536,7 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1494,6 +1597,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1564,6 +1668,8 @@ golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8 h1:AvbQYmiaaaza3cW3QXRyPo5kYgpFIzOAfeAAN7m3qQ4= +golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1618,6 +1724,8 @@ golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1746,7 +1854,17 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= +howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= +modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/golex v1.0.1/go.mod h1:QCA53QtsT1NdGkaZZkF5ezFwk4IXh4BGNafAARTC254= +modernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk= +modernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk= +modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From e28988edd0c306359b50719eb15ac3c6d978a2f4 Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 31 Aug 2020 14:39:01 +1000 Subject: [PATCH 014/335] fix deps --- .gitmodules | 3 + chain/filecoin/account.go | 21 +-- go.mod | 35 ++-- go.sum | 356 +++++++++++++++++++++----------------- 4 files changed, 223 insertions(+), 192 deletions(-) diff --git a/.gitmodules b/.gitmodules index e69de29b..ce71b4f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "chain/filecoin/filecoin-ffi"] + path = chain/filecoin/filecoin-ffi + url = https://github.com/filecoin-project/filecoin-ffi \ No newline at end of file diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 503adf0a..2e9c082a 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -7,11 +7,12 @@ import ( "net/http" filaddress "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/lotus/api" filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" - "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -129,15 +130,15 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U } return Tx{ msg: types.Message{ - Version: types.MessageVersion, - From: filfrom, - To: filto, - Value: big.Int{Int: value.Int()}, - Nonce: value.Int().Uint64(), - GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, - GasLimit: txBuilder.gasLimit.Int().Int64(), - Method: methodNum, - Params: payload, + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: value.Int().Uint64(), + GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, + GasFeeCap: txBuilder.gasLimit.Int().Int64(), + Method: methodNum, + Params: payload, }, signature: pack.Bytes65{}, }, nil diff --git a/go.mod b/go.mod index d8339333..835147d5 100644 --- a/go.mod +++ b/go.mod @@ -3,37 +3,24 @@ module github.com/renproject/multichain go 1.14 require ( - github.com/btcsuite/btcd v0.20.1-beta + github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcutil v1.0.2 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf - github.com/cosmos/cosmos-sdk v0.39.1 - github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect - github.com/ethereum/go-ethereum v1.9.19 + github.com/ethereum/go-ethereum v1.9.20 github.com/filecoin-project/go-address v0.0.3 - github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect - github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-bitfield v0.1.0 // indirect - github.com/filecoin-project/go-data-transfer v0.5.0 // indirect - github.com/filecoin-project/go-fil-markets v0.3.2 // indirect - github.com/filecoin-project/lotus v0.4.1 - github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect - github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 - github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect - github.com/ipfs/go-cid v0.0.6 - github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect - github.com/ipfs/go-hamt-ipld v0.1.1 // indirect - github.com/lib/pq v1.7.0 // indirect + github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 + github.com/filecoin-project/lotus v0.5.6 + github.com/filecoin-project/specs-actors v0.9.3 + github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 - github.com/multiformats/go-varint v0.0.5 + github.com/multiformats/go-varint v0.0.6 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 - github.com/raulk/clock v1.1.0 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 - github.com/renproject/surge v1.2.5 - github.com/tendermint/tendermint v0.33.8 - github.com/terra-project/core v0.3.7 - github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect + github.com/renproject/surge v1.2.6 go.uber.org/zap v1.15.0 - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a ) + +replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi diff --git a/go.sum b/go.sum index 879bc13a..ed7b6f42 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -31,9 +30,9 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -49,9 +48,9 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= +github.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -65,8 +64,7 @@ github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3o github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= @@ -92,10 +90,10 @@ github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.32.11/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -103,25 +101,27 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129/go.mod h1:u9UyCz2eTrSGy6fbupqJ54eY5c4IC8gREQ1053dK12U= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -141,26 +141,17 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.2.1-0.20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.37.14/go.mod h1:qKU3AzVJ0GGWARqImZj24CIX35Q4nJEE+WrXVU/CzFo= -github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= -github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -168,15 +159,18 @@ github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuv github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= +github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= @@ -194,21 +188,19 @@ github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= -github.com/drand/drand v0.9.2-0.20200616080806-a94e9c1636a4/go.mod h1:Bu8QYdU0YdB2ZQZezHxabmOIciddiwLRnyV4nuZ2HQE= github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4/go.mod h1:SnqWL9jksIMK63UKkfmWI6f9PDN8ROoCgg+Z4zWk7hg= github.com/drand/kyber v1.0.1-0.20200110225416-8de27ed8c0e2/go.mod h1:UpXoA0Upd1N9l4TvRPHr1qAUBBERj6JQ/mnKI3BPEmw= github.com/drand/kyber v1.0.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.0/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= github.com/drand/kyber v1.1.1/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= github.com/drand/kyber-bls12381 v0.1.0/go.mod h1:N1emiHpm+jj7kMlxEbu3MUyOiooTgNySln564cgD9mk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= @@ -217,79 +209,92 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/ethereum/go-ethereum v1.9.19 h1:c9IrhzqPKY+ZkS/YhXCO3rgNzlxsVrCYIRvrIAFmIWM= -github.com/ethereum/go-ethereum v1.9.19/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= +github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= +github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200615191232-6be1a8c6ed09/go.mod h1:HEJn6kOXMNhCNBYNTO/lrEI7wSgqCOR6hN5ecfYUnC8= +github.com/filecoin-project/chain-validation v0.0.6-0.20200813000554-40c22fe26eef/go.mod h1:SMj5VK1pYgqC8FXVEtOBRTc+9AIrYu+C+K3tAXi2Rk8= github.com/filecoin-project/filecoin-ffi v0.0.0-20200326153646-e899cc1dd072/go.mod h1:PtH9YP0rURHUKHrKeEBeWg/BqIBMQOz8wtlXlVGREBE= -github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d/go.mod h1:vlQ7sDkbrtM70QMJFDvEyTDywY5SvIjadRCUB+76l90= +github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d h1:YVh0Q+1iUvbv7SIfwA/alULOlWjQNOEnV72rgeYweLY= github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef/go.mod h1:SrA+pWVoUivqKOfC+ckVYbx41hWz++HxJcrlmHNnebU= +github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc/go.mod h1:KsFPWjF+UUYl6n9A+qbg4bjFgAOneicFZtDH/LQEX2U= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 h1:K6t4Hrs+rwUxBz2xg88Bdqeh4k5/rycQFdPseZhRyfE= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.1.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= +github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-data-transfer v0.3.0/go.mod h1:cONglGP4s/d+IUQw5mWZrQK+FQATQxr3AXzi4dRh0l4= -github.com/filecoin-project/go-data-transfer v0.5.0/go.mod h1:7yckbsPPMGuN3O1+SYNE/lowwheaUn5woGILpjN52UI= +github.com/filecoin-project/go-data-transfer v0.6.1/go.mod h1:uRYBRKVBVM12CSusBtVrzDHkVw/3DKZpkxKJVP1Ydas= +github.com/filecoin-project/go-data-transfer v0.6.3 h1:7TLwm8nuodHYD/uiwJjKc/PGRR+LwqM8jmlZqgWuUfY= +github.com/filecoin-project/go-data-transfer v0.6.3/go.mod h1:PmBKVXkhh67/tnEdJXQwDHl5mT+7Tbcwe1NPninqhnM= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= -github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= -github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= -github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= +github.com/filecoin-project/go-fil-markets v0.5.6-0.20200814234959-80b1788108ac/go.mod h1:umicPCaN99ysHTiYOmwhuLxTFbOwcsI+mdw/t96vvM4= +github.com/filecoin-project/go-fil-markets v0.5.6/go.mod h1:SJApXAKr5jyGpbzDEOhvemui0pih7hhT8r2MXJxCP1E= +github.com/filecoin-project/go-fil-markets v0.5.8 h1:uwl0QNUVmmSlUQfxshpj21Dmhh6WKTQNhnb1GMfdp18= +github.com/filecoin-project/go-fil-markets v0.5.8/go.mod h1:6ZX1vbZbnukbVQ8tCB/MmEizuW/bmRX7SpGAltU3KVg= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 h1:FXtCp0ybqdQL9knb3OGDpkNTaBbPxgkqPeWKotUwkH0= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= +github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= +github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200619205156-c7bf525c06ef/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 h1:Jbburj7Ih2iaJ/o5Q9A+EAeTabME6YII7FLi9SKUf5c= +github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= -github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlSclQamx+sQDKRMI= -github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= -github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= -github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= +github.com/filecoin-project/lotus v0.4.3-0.20200819133134-a21234cd54d5/go.mod h1:YYUqCqyv4odVgKSFQAnIdAl0v1cIfbEYnF9E118dMGQ= +github.com/filecoin-project/lotus v0.4.3-0.20200819134055-b13681df3205/go.mod h1:rooripL/X8ixwUngDPzphAv/RKZXWBprbyxxDW0EJi0= +github.com/filecoin-project/lotus v0.4.3-0.20200820203717-d1718369a182/go.mod h1:biFZPQ/YyQGfkHUmHMiaNf2hnD6zm1+OAXPQYQ61Zkg= +github.com/filecoin-project/lotus v0.5.6 h1:3Jea/vfZBs95KmNuqyXGEpB6h+uF69xyMz0OD+Igpi8= +github.com/filecoin-project/lotus v0.5.6/go.mod h1:JeT2ti5ArW4B69k1FMMFV1rj00wX4ooHMX6zS5MgY+w= +github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= +github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= +github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= -github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= +github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= +github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= +github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= +github.com/filecoin-project/specs-actors v0.9.2/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= +github.com/filecoin-project/specs-actors v0.9.3 h1:Fi75G/UQ7R4eiIwnN+S6bBQ9LqKivyJdw62jJzTi6aE= +github.com/filecoin-project/specs-actors v0.9.3/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/statediff v0.0.1/go.mod h1:qNWauolLFEzOiA4LNWermBRVNbaZHfPcPevumZeh+hE= +github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= +github.com/filecoin-project/test-vectors v0.0.0-20200819133914-e20cc29cc926/go.mod h1:ou1Im2BTyrYTnXX8yj5VvC+DTfbIrwESJjKDxbh31nA= +github.com/filecoin-project/test-vectors v0.0.0-20200826113833-9ffe6524729d/go.mod h1:hY/JN3OFRtykBrMByFjTonUFEOW2bRJjyR5YMUh3jLw= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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= -github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -297,6 +302,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0= github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1/go.mod h1:0eHX/BVySxPc6SE2mZRoppGq7qcEagxdmQnA3dzork8= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -305,7 +311,6 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -319,7 +324,6 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -328,23 +332,24 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -370,9 +375,9 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= +github.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -381,6 +386,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= @@ -392,33 +398,26 @@ github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORR github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3vH7VqgtMxQ= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= @@ -446,6 +445,7 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -464,6 +464,7 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= +github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg= github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis= @@ -471,12 +472,15 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= github.com/ipfs/go-bitswap v0.2.8/go.mod h1:2Yjog0GMdH8+AsxkE0DI9D2mANaUTxbVVav0pPoZoug= +github.com/ipfs/go-bitswap v0.2.20/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= +github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI= github.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So= github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= github.com/ipfs/go-blockservice v0.1.3/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= +github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834 h1:hFJoI1D2a3MqiNkSb4nKwrdkhCngUxUTFNwVwovZX2s= github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -486,6 +490,8 @@ github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= +github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= @@ -495,6 +501,8 @@ github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRV github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= @@ -509,19 +517,24 @@ github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZ github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY= +github.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEPb0= github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= -github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-fs-lock v0.0.6/go.mod h1:OTR+Rj9sHiRubJh3dRhD15Juhd/+w6VPOY28L7zESmM= +github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.1.1/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.1.2 h1:25Ll9kIXCE+DY0dicvfS3KMw+U5sd01b/FJbA7KAbhg= +github.com/ipfs/go-graphsync v0.1.2/go.mod h1:sLXVXm1OxtE2XYPw62MuXCdAuNwkAdsbnfrmos5odbA= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200501020327-d53d20a7063e/go.mod h1:giiPqWYCnRBYpNTsJ/EX1ojldX5kTXrXYckSJQ7ko9M= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200605182717-0310ad2b0b1f/go.mod h1:phOFBB7W73N9dg1glcb1fQ9HtQFDUpeyJgatW8ns0bw= +github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= +github.com/ipfs/go-ipfs-blockstore v1.0.1 h1:fnuVj4XdZp4yExhd0CnUwAiMNJHiPnfInhiuwz4lW1w= +github.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= @@ -531,8 +544,11 @@ github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1Y github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= +github.com/ipfs/go-ipfs-ds-help v1.0.0 h1:bEQ8hMGs80h0sR8O4tfDgV6B01aaF9qeTrujrTLYV3g= github.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE= +github.com/ipfs/go-ipfs-exchange-interface v0.0.1 h1:LJXIo9W7CAmugqI+uofioIpRb6rY30GUu7G6LUfpMvM= github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= +github.com/ipfs/go-ipfs-exchange-offline v0.0.1 h1:P56jYKZF7lDDOLx5SotVh5KFxoY6C81I1NSHW1FxGew= github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= @@ -542,21 +558,25 @@ github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6Zpu github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= +github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= +github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= github.com/ipfs/go-ipld-cbor v0.0.1/go.mod h1:RXHr8s4k0NE0TKhnrxqZC9M888QfsBN9rhS5NjfKzY8= github.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= +github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf h1:PRCy+w3GocY77CBEwTprp6hn7PLiEU1YToKe7B+1FVk= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= +github.com/ipfs/go-ipld-format v0.2.0 h1:xGlJKkArkmBvowr+GMCX0FEZtkro71K1AwiKnL37mwA= github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= github.com/ipfs/go-ipns v0.0.2/go.mod h1:WChil4e0/m9cIINWLxZe1Jtf77oz5L05rO2ei/uKJ5U= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= @@ -564,17 +584,23 @@ github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSI github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= +github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= +github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= +github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4 h1:3bijxqzQ1O9yg7gd7Aqk80oaEvsJ+uXw0zSvi2qR3Jw= github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= +github.com/ipfs/go-merkledag v0.3.2 h1:MRqj40QkrWkvPswXs4EfSslhZ4RVPRbxwX11js0t1xY= +github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= +github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= @@ -586,14 +612,17 @@ github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= +github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= -github.com/ipld/go-car v0.1.1-0.20200429200904-c222d793c339/go.mod h1:eajxljm6I8o3LitnFeVEmucwZmz7+yLSiKce9yYMefg= github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= +github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef h1:/yPelt/0CuzZsmRkYzBBnJ499JnAOGaIaAXHujx96ic= +github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= +github.com/ipld/go-ipld-prime-proto v0.0.0-20200828231332-ae0aea07222b/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -607,13 +636,14 @@ github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -635,7 +665,6 @@ github.com/kabukky/httpscerts v0.0.0-20150320125433-617593d7dcb3/go.mod h1:BYpt4 github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -652,11 +681,11 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= +github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= @@ -680,10 +709,11 @@ github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZk github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= -github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQqBbYJ+BnA= github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= +github.com/libp2p/go-libp2p v0.10.3/go.mod h1:0ER6iPSaPeQjryNgOnm9bLNpMJCYmuw54xJXsVR17eE= +github.com/libp2p/go-libp2p v0.11.0/go.mod h1:3/ogJDXsbbepEfqtZKBR/DedzxJXCeK17t2Z9RE9bEE= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= @@ -692,12 +722,14 @@ github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQ github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= +github.com/libp2p/go-libp2p-autonat v0.3.2/go.mod h1:0OzOi1/cVc7UcxfOddemYD5vzEqi4fwRbnZcJGLi68U= github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= +github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= github.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE= github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= @@ -707,6 +739,7 @@ github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3 github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= +github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= @@ -732,6 +765,8 @@ github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqe github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= +github.com/libp2p/go-libp2p-core v0.6.1 h1:XS+Goh+QegCDojUZp00CaPMfiEADCrLjNZskWE7pvqs= +github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= @@ -742,6 +777,8 @@ github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFT github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= +github.com/libp2p/go-libp2p-discovery v0.5.0 h1:Qfl+e5+lfDgwdrXdu4YNCWyEo3fWuP+WgN9mN0iWviQ= +github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= @@ -749,7 +786,7 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= github.com/libp2p/go-libp2p-kad-dht v0.2.1/go.mod h1:k7ONOlup7HKzQ68dE6lSnp07cdxdkmnRa+6B4Fh9/w0= -github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= +github.com/libp2p/go-libp2p-kad-dht v0.8.3/go.mod h1:HnYYy8taJWESkqiESd1ngb9XX/XGGsMA5G0Vj2HoSh4= github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= @@ -760,6 +797,7 @@ github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3 github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= +github.com/libp2p/go-libp2p-mplex v0.2.4/go.mod h1:mI7iOezdWFOisvUwaYd3IDrJ4oVmgoXK8H331ui39CE= github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= @@ -782,19 +820,26 @@ github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRj github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= +github.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q= github.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= -github.com/libp2p/go-libp2p-pubsub v0.3.2/go.mod h1:Uss7/Cfz872KggNb+doCVPHeCDmXB7z500m/R8DaAUk= +github.com/libp2p/go-libp2p-pubsub v0.3.4/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.5-0.20200820194335-bfc96c2cd081/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.5 h1:iF75GWpcxKEUQU8tTkgLy69qIQvfhL+t6U6ndQrB6ho= +github.com/libp2p/go-libp2p-pubsub v0.3.5/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= +github.com/libp2p/go-libp2p-quic-transport v0.7.1/go.mod h1:TD31to4E5exogR/GWHClXCfkktigjAl5rXSt7HoxNvY= +github.com/libp2p/go-libp2p-quic-transport v0.8.0/go.mod h1:F2FG/6Bzz0U6essUVxDzE0s9CrY4XGLbl7QEmDNvU7A= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= +github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= @@ -812,12 +857,14 @@ github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaT github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= +github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= +github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= @@ -849,18 +896,24 @@ github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+ github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= +github.com/libp2p/go-msgio v0.0.6 h1:lQ7Uc0kS1wb1EfRxO2Eir/RJoHkHn7t6o+EiwsYIKJA= +github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= +github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= +github.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw= github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= @@ -873,6 +926,7 @@ github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19 github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= +github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= github.com/libp2p/go-ws-transport v0.0.1/go.mod h1:p3bKjDWHEgtuKKj+2OdPYs5dAPIjtpQGHF2tJfGz7Ww= @@ -894,16 +948,20 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.17.3/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.18.0/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= +github.com/marten-seemann/qpack v0.2.0/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/marten-seemann/qtls v0.9.1/go.mod h1:T1MmAdDPyISzxlK6kjRr0pcZFBVd1OZbBb/j3cvzHhk= +github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= +github.com/marten-seemann/qtls-go1-15 v0.1.0/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -915,7 +973,6 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -937,16 +994,19 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= @@ -961,7 +1021,11 @@ github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVq github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= @@ -971,12 +1035,17 @@ github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= +github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= +github.com/multiformats/go-multiaddr v0.3.1 h1:1bxa+W7j9wZKTZREySx1vPMs2TqrYWjVZ7zE6/XLG1I= +github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.3/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.1.0/go.mod h1:01k2RAqtoXIuPa3DCavAE9/6jc6nM0H3EgZyfUhN2oY= +github.com/multiformats/go-multiaddr-dns v0.2.0 h1:YWJoIDwLePniH7OU5hBnDZV6SWuvJqJ0YtN6pLeH9zA= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= +github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= github.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= @@ -985,8 +1054,11 @@ github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQ github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= +github.com/multiformats/go-multiaddr-net v0.2.0 h1:MSXRGN0mFymt6B1yo/6BPnIRpLPEnKgQNvVfCX5VDJk= +github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA= github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= @@ -995,14 +1067,19 @@ github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= +github.com/multiformats/go-multistream v0.1.2 h1:knyamLYMPFPngQjGQ0lhnlys3jtVR/3xV6TREUJr+fE= +github.com/multiformats/go-multistream v0.1.2/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= +github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= @@ -1034,6 +1111,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -1050,46 +1128,42 @@ github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NH github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/otiai10/copy v1.0.2/go.mod h1:c7RpqBkwMom4bYTSkLSym4VSJz/XtncWRAj/J4PEIMY= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= -github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1098,11 +1172,9 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -1114,38 +1186,34 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y= github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= github.com/renproject/pack v0.2.3/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= -github.com/renproject/surge v1.2.5 h1:P2qKZxWiKrC8hw7in/hXVtic+dGkhd1M0H/1Lj+fJnw= github.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= +github.com/renproject/surge v1.2.6 h1:4EV2jbBPvQM8Wnv5zL1N1X/UbaH6AZiRUv7r4xZ8ncA= +github.com/renproject/surge v1.2.6/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -1189,7 +1257,6 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= @@ -1198,25 +1265,16 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= @@ -1233,40 +1291,18 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/supranational/blst v0.1.1/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= -github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= -github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.13/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= -github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.8/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= -github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -1284,19 +1320,20 @@ github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= -github.com/whyrusleeping/cbor-gen v0.0.0-20190917003517-d78d67427694/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191212224538-d370462a7e8a/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200206220010-03c9665e2a66/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200402171437-3d27c146c105/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501014322-5f9941ef88e0/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501232601-351665a6e756/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee h1:U7zWWvvAjT76EiuWPSOiZlQDnaQYPxPoxugTtTAcJK0= +github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= @@ -1312,25 +1349,29 @@ github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84 github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= +github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= +github.com/willscott/go-cmp v0.5.2-0.20200812183318-8affb9542345/go.mod h1:D7hA8H5pyQx7Y5Em7IWx1R4vNJzfon3gpG9nxjkITjQ= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= +github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg= go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= @@ -1341,8 +1382,9 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1350,6 +1392,7 @@ go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= +go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1366,6 +1409,7 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20190218023631-ce4c26f7be8e/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20190313082347-94abd6928b1d/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1394,14 +1438,15 @@ golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1434,6 +1479,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1459,7 +1505,6 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1476,8 +1521,9 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1506,7 +1552,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1527,7 +1572,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1619,6 +1663,7 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1675,7 +1720,6 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1684,7 +1728,6 @@ google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLD google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -1693,9 +1736,7 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200617041141-9a465503579e/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1716,7 +1757,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1732,7 +1772,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1746,6 +1785,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= From 3084b3e3eb362274efe607f39e045c1af8172736 Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 31 Aug 2020 14:41:01 +1000 Subject: [PATCH 015/335] fix comp errs --- chain/filecoin/account.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 2e9c082a..6876f55a 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -135,8 +135,8 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U To: filto, Value: big.Int{Int: value.Int()}, Nonce: value.Int().Uint64(), - GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, - GasFeeCap: txBuilder.gasLimit.Int().Int64(), + GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, + GasLimit: txBuilder.gasLimit.Int().Int64(), Method: methodNum, Params: payload, }, @@ -188,7 +188,7 @@ func NewClient(opts ClientOptions) (*Client, error) { requestHeaders.Add(AuthorizationKey, opts.AuthToken) } - node, closer, err := filclient.NewFullNodeRPC(opts.MultiAddress, requestHeaders) + node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.MultiAddress, requestHeaders) if err != nil { return nil, err } @@ -220,6 +220,7 @@ func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack // 2. choose the most recent block from tipset.blks // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 + panic("unimplemented") } // SubmitTx to the underlying blockchain network. @@ -237,4 +238,5 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // if err != nil { // return fmt.Errorf("pushing message to message pool: %v", err) // } + panic("unimplemented") } From 5eac4576aebd394d23bcda76bf8f019bc8dcd0bb Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 31 Aug 2020 14:44:18 +1000 Subject: [PATCH 016/335] fix nil err --- chain/filecoin/account.go | 19 +- .../filecoin-ffi/.circleci/config.yml | 341 ++ chain/filecoin/filecoin-ffi/.gitignore | 11 + chain/filecoin/filecoin-ffi/CHANGELOG.md | 292 ++ chain/filecoin/filecoin-ffi/LICENSE-APACHE | 7 + chain/filecoin/filecoin-ffi/LICENSE-MIT | 23 + chain/filecoin/filecoin-ffi/Makefile | 40 + chain/filecoin/filecoin-ffi/README.md | 74 + chain/filecoin/filecoin-ffi/bls.go | 140 + chain/filecoin/filecoin-ffi/bls_test.go | 186 + chain/filecoin/filecoin-ffi/build.sh | 13 + .../filecoin-ffi/cgoleakdetect/runner.go | 63 + chain/filecoin/filecoin-ffi/filcrypto.yml | 37 + .../filecoin-ffi/generated/cgo_helpers.go | 3517 +++++++++++++++++ .../filecoin-ffi/generated/cgo_helpers.h | 9 + .../filecoin/filecoin-ffi/generated/const.go | 53 + .../filecoin-ffi/generated/customallocs.go | 54 + .../filecoin-ffi/generated/generated.go | 809 ++++ .../filecoin/filecoin-ffi/generated/types.go | 319 ++ chain/filecoin/filecoin-ffi/go.mod | 15 + chain/filecoin/filecoin-ffi/go.sum | 190 + .../filecoin-ffi/headerstubs/stdarg.h | 0 .../filecoin-ffi/headerstubs/stdbool.h | 0 .../filecoin-ffi/headerstubs/stdint.h | 4 + .../filecoin-ffi/headerstubs/stdlib.h | 0 chain/filecoin/filecoin-ffi/install-filcrypto | 225 ++ chain/filecoin/filecoin-ffi/mkreleaselog | 240 ++ chain/filecoin/filecoin-ffi/parameters.json | 152 + chain/filecoin/filecoin-ffi/proofs.go | 966 +++++ chain/filecoin/filecoin-ffi/proofs_test.go | 164 + chain/filecoin/filecoin-ffi/run_tests.sh | 3 + chain/filecoin/filecoin-ffi/rust/Cargo.lock | 3023 ++++++++++++++ chain/filecoin/filecoin-ffi/rust/Cargo.toml | 44 + chain/filecoin/filecoin-ffi/rust/build.rs | 11 + .../filecoin/filecoin-ffi/rust/cbindgen.toml | 23 + .../filecoin-ffi/rust/filcrypto.pc.template | 4 + .../filecoin/filecoin-ffi/rust/rust-toolchain | 1 + .../rust/rustc-target-features-optimized.json | 34 + .../rust/scripts/build-release.sh | 56 + .../rust/scripts/package-release.sh | 38 + .../rust/scripts/publish-release.sh | 73 + .../filecoin/filecoin-ffi/rust/src/bls/api.rs | 437 ++ .../filecoin/filecoin-ffi/rust/src/bls/mod.rs | 2 + .../filecoin-ffi/rust/src/bls/types.rs | 67 + chain/filecoin/filecoin-ffi/rust/src/lib.rs | 6 + .../filecoin-ffi/rust/src/proofs/api.rs | 1725 ++++++++ .../filecoin-ffi/rust/src/proofs/helpers.rs | 134 + .../filecoin-ffi/rust/src/proofs/mod.rs | 4 + .../filecoin-ffi/rust/src/proofs/types.rs | 609 +++ .../filecoin-ffi/rust/src/util/api.rs | 168 + .../filecoin-ffi/rust/src/util/mod.rs | 2 + .../filecoin-ffi/rust/src/util/types.rs | 55 + chain/filecoin/filecoin-ffi/tools.go | 7 + chain/filecoin/filecoin-ffi/types.go | 127 + chain/filecoin/filecoin-ffi/workflows.go | 393 ++ 55 files changed, 15000 insertions(+), 9 deletions(-) create mode 100644 chain/filecoin/filecoin-ffi/.circleci/config.yml create mode 100644 chain/filecoin/filecoin-ffi/.gitignore create mode 100644 chain/filecoin/filecoin-ffi/CHANGELOG.md create mode 100644 chain/filecoin/filecoin-ffi/LICENSE-APACHE create mode 100644 chain/filecoin/filecoin-ffi/LICENSE-MIT create mode 100644 chain/filecoin/filecoin-ffi/Makefile create mode 100644 chain/filecoin/filecoin-ffi/README.md create mode 100644 chain/filecoin/filecoin-ffi/bls.go create mode 100644 chain/filecoin/filecoin-ffi/bls_test.go create mode 100755 chain/filecoin/filecoin-ffi/build.sh create mode 100644 chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go create mode 100644 chain/filecoin/filecoin-ffi/filcrypto.yml create mode 100644 chain/filecoin/filecoin-ffi/generated/cgo_helpers.go create mode 100644 chain/filecoin/filecoin-ffi/generated/cgo_helpers.h create mode 100644 chain/filecoin/filecoin-ffi/generated/const.go create mode 100644 chain/filecoin/filecoin-ffi/generated/customallocs.go create mode 100644 chain/filecoin/filecoin-ffi/generated/generated.go create mode 100644 chain/filecoin/filecoin-ffi/generated/types.go create mode 100644 chain/filecoin/filecoin-ffi/go.mod create mode 100644 chain/filecoin/filecoin-ffi/go.sum create mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdarg.h create mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdbool.h create mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdint.h create mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdlib.h create mode 100755 chain/filecoin/filecoin-ffi/install-filcrypto create mode 100755 chain/filecoin/filecoin-ffi/mkreleaselog create mode 100644 chain/filecoin/filecoin-ffi/parameters.json create mode 100644 chain/filecoin/filecoin-ffi/proofs.go create mode 100644 chain/filecoin/filecoin-ffi/proofs_test.go create mode 100755 chain/filecoin/filecoin-ffi/run_tests.sh create mode 100644 chain/filecoin/filecoin-ffi/rust/Cargo.lock create mode 100644 chain/filecoin/filecoin-ffi/rust/Cargo.toml create mode 100644 chain/filecoin/filecoin-ffi/rust/build.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/cbindgen.toml create mode 100644 chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template create mode 100644 chain/filecoin/filecoin-ffi/rust/rust-toolchain create mode 100644 chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json create mode 100755 chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh create mode 100755 chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh create mode 100755 chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh create mode 100644 chain/filecoin/filecoin-ffi/rust/src/bls/api.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/bls/types.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/lib.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/util/api.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/util/mod.rs create mode 100644 chain/filecoin/filecoin-ffi/rust/src/util/types.rs create mode 100644 chain/filecoin/filecoin-ffi/tools.go create mode 100644 chain/filecoin/filecoin-ffi/types.go create mode 100644 chain/filecoin/filecoin-ffi/workflows.go diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 6876f55a..1938c4af 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -130,15 +130,16 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U } return Tx{ msg: types.Message{ - Version: types.MessageVersion, - From: filfrom, - To: filto, - Value: big.Int{Int: value.Int()}, - Nonce: value.Int().Uint64(), - GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, - GasLimit: txBuilder.gasLimit.Int().Int64(), - Method: methodNum, - Params: payload, + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: value.Int().Uint64(), + GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, + GasPremium: big.Int{Int: pack.NewU256([32]byte{}).Int()}, + GasLimit: txBuilder.gasLimit.Int().Int64(), + Method: methodNum, + Params: payload, }, signature: pack.Bytes65{}, }, nil diff --git a/chain/filecoin/filecoin-ffi/.circleci/config.yml b/chain/filecoin/filecoin-ffi/.circleci/config.yml new file mode 100644 index 00000000..dab1e6b9 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/.circleci/config.yml @@ -0,0 +1,341 @@ +version: 2.1 + +orbs: + go: gotest/tools@0.0.9 + shellcheck: circleci/shellcheck@1.3.15 + +executors: + golang: + docker: + - image: circleci/golang:1.13 + resource_class: 2xlarge + rust: + docker: + - image: filecoin/rust:latest + resource_class: 2xlarge + +jobs: + gofmt: + executor: golang + steps: + - configure_environment_variables + - prepare + - go/mod-download + - run: + command: "! go fmt ./... 2>&1 | read" + go_lint: + description: Run various linters + executor: golang + steps: + - configure_environment_variables + - prepare + - go/mod-download + - go/install-golangci-lint: + gobin: $HOME/.local/bin + version: 1.23.8 + - run: + command: make go-lint + build_and_test_linux_cgo_bindings: + parameters: + run_leak_detector: + type: boolean + default: false + executor: golang + working_directory: ~/go/src/github.com/filecoin-project/filecoin-ffi + steps: + - configure_environment_variables + - prepare + - build_project + - restore_parameter_cache + - obtain_filecoin_parameters + - save_parameter_cache + - run_tests: + run_leak_detector: << parameters.run_leak_detector >> + build_darwin_cgo_bindings: + macos: + xcode: "10.0.0" + working_directory: ~/go/src/github.com/filecoin-project/filecoin-ffi + resource_class: large + steps: + - configure_environment_variables: + linux: false + darwin: true + - prepare: + linux: false + darwin: true + - build_project + - compile_tests + - ensure_generated_cgo_up_to_date + publish_linux_staticlib: + executor: golang + steps: + - configure_environment_variables + - prepare + - publish_release + publish_darwin_staticlib: + macos: + xcode: "10.0.0" + working_directory: ~/crate + steps: + - configure_environment_variables: + linux: false + darwin: true + - prepare: + linux: false + darwin: true + - run: cd rust && rustup install $(cat rust-toolchain) + - run: cd rust && rustup default $(cat rust-toolchain) + - run: cd rust && cargo fetch + - publish_release + cargo_fetch: + executor: rust + working_directory: /mnt/crate + steps: + - configure_environment_variables + - checkout + - restore_cache: + keys: + - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} + - run: cd rust && rustup install $(cat rust-toolchain) + - run: cd rust && rustup default $(cat rust-toolchain) + - run: cd rust && rustup component add rustfmt + - run: cd rust && rustup component add clippy + - run: cd rust && cargo fetch + - run: cd rust && rustc +$(cat rust-toolchain) --version + - persist_to_workspace: + root: "." + paths: + - rust/Cargo.lock + - save_cache: + key: cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} + paths: + - /root/.cargo + - /root/.rustup + rustfmt: + executor: rust + working_directory: /mnt/crate + steps: + - configure_environment_variables + - checkout + - restore_cache: + keys: + - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} + - run: + name: Run cargo fmt + command: cargo fmt --manifest-path ./rust/Cargo.toml --all -- --check + clippy: + executor: rust + working_directory: /mnt/crate + steps: + - configure_environment_variables + - checkout + - restore_cache: + keys: + - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} + - run: cd rust && rustup install $(cat rust-toolchain) + - run: cd rust && rustup default $(cat rust-toolchain) + - run: cd rust && rustup component add rustfmt + - run: cd rust && rustup component add clippy + - run: cd rust && cargo fetch + - run: + name: Run cargo clippy + command: cd rust && cargo +$(cat rust-toolchain) clippy --all-targets --all-features -- -D warnings + +workflows: + version: 2 + test_all: + jobs: + # Lint the install Bash script + - shellcheck/check: + pattern: 'install-filcrypto' + - cargo_fetch + - rustfmt: + requires: + - cargo_fetch + - clippy: + requires: + - cargo_fetch + - gofmt + - go_lint + - build_and_test_linux_cgo_bindings: + filters: + branches: + only: + - master + run_leak_detector: true + - build_and_test_linux_cgo_bindings: + filters: + branches: + ignore: + - master + run_leak_detector: false + - publish_linux_staticlib: + filters: + branches: + only: + - master + - build_darwin_cgo_bindings + - publish_darwin_staticlib: + filters: + branches: + only: + - master + +commands: + prepare: + parameters: + linux: + default: true + description: is a linux build environment? + type: boolean + darwin: + default: false + description: is a darwin build environment? + type: boolean + steps: + - checkout + - when: + condition: << parameters.linux >> + steps: + - go/install-ssh + - go/install: {package: git} + - run: sudo apt-get update + - run: sudo apt-get install -y jq valgrind ocl-icd-opencl-dev clang libssl-dev + - run: curl https://sh.rustup.rs -sSf | sh -s -- -y + - when: + condition: << parameters.darwin >> + steps: + - run: + name: Install Go + command: | + curl https://dl.google.com/go/go1.13.7.darwin-amd64.pkg -o /tmp/go.pkg && \ + sudo installer -pkg /tmp/go.pkg -target / + go version + - run: + name: Install other dependencies with Homebrew + command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config md5sha1sum jq + - run: + name: Install Rust toolchain + command: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + rustc --version + - run: + name: Ensure appropriate toolchain is installed + command: | + rustup install $(cat ./rust/rust-toolchain) + - run: git submodule sync + - run: git submodule update --init + + publish_release: + steps: + - run: + name: Build and publish the standard release + command: | + cd rust + + TARBALL_PATH="/tmp/${CIRCLE_PROJECT_REPONAME}-$(uname)-standard.tar.gz" + RELEASE_NAME="${CIRCLE_PROJECT_REPONAME}-$(uname)-standard" + + ./scripts/build-release.sh filcrypto $(cat ./rust-toolchain) --verbose --locked --all + ./scripts/package-release.sh $TARBALL_PATH + ./scripts/publish-release.sh $TARBALL_PATH $RELEASE_NAME + - run: + name: Build and publish the optimized release + command: | + cd rust + + TARBALL_PATH="/tmp/${CIRCLE_PROJECT_REPONAME}-$(uname)-optimized.tar.gz" + RELEASE_NAME="${CIRCLE_PROJECT_REPONAME}-$(uname)-optimized" + RUSTFLAGS="-C target-feature=$(cat rustc-target-features-optimized.json | jq -r '.[].rustc_target_feature' | tr '\n' ',')" + + ./scripts/build-release.sh filcrypto $(cat ./rust-toolchain) --verbose --locked --all + ./scripts/package-release.sh $TARBALL_PATH + ./scripts/publish-release.sh $TARBALL_PATH $RELEASE_NAME + configure_environment_variables: + parameters: + linux: + default: true + description: is a Linux build environment? + type: boolean + darwin: + default: false + description: is a Darwin build environment? + type: boolean + steps: + - run: + name: Configure environment variables + command: | + echo 'export FIL_PROOFS_PARAMETER_CACHE="${HOME}/filecoin-proof-parameters/"' >> $BASH_ENV + echo 'export GO111MODULE=on' >> $BASH_ENV + echo 'export GOPATH="${HOME}/go"' >> $BASH_ENV + echo 'export PATH="/usr/local/go/bin:${HOME}/.cargo/bin:${PATH}:${HOME}/go/bin:${HOME}/.bin"' >> $BASH_ENV + echo 'export RUST_LOG=info' >> $BASH_ENV + echo 'export CIRCLE_ARTIFACTS="/tmp"' >> $BASH_ENV + - when: + condition: << parameters.darwin >> + steps: + - run: + name: Add a few more environment variables + command: | + echo 'export PATH="${HOME}/.cargo/bin:${HOME}/.bin:${PATH}"' >> $BASH_ENV + obtain_filecoin_parameters: + steps: + - run: | + DIR=$(pwd) + cd $(mktemp -d) + GOPATH=/tmp GO111MODULE=off go get github.com/filecoin-project/go-paramfetch/paramfetch + GOPATH=/tmp GO111MODULE=off go build -o go-paramfetch github.com/filecoin-project/go-paramfetch/paramfetch + ./go-paramfetch 2048 "${DIR}/parameters.json" + build_project: + steps: + - run: + name: Build project + command: make + - run: + name: Build project without CGO + command: env CGO_ENABLED=0 go build . + ensure_generated_cgo_up_to_date: + steps: + - run: + name: Generate CGO bindings (using forked c-for-go) and compare with what's tracked by Git + command: | + make cgo-gen + git diff --exit-code ./generated/ + run_tests: + parameters: + run_leak_detector: + type: boolean + default: false + steps: + - when: + condition: <> + steps: + - run: + name: Run leak detector + command: make cgo-leakdetect + no_output_timeout: 60m + + - run: + name: Run the Rust tests + command: cd rust && FIL_PROOFS_PARAMETER_CACHE="${HOME}/filecoin-proof-parameters/" RUST_LOG=info cargo test --all --release && cd .. + no_output_timeout: 60m + - run: + name: Run the Go tests + command: GODEBUG=cgocheck=2 RUST_LOG=info go test -p 1 -timeout 60m + no_output_timeout: 60m + compile_tests: + steps: + - run: + name: Build project and tests, but don't actually run the tests (used to verify that build/link works with Darwin) + command: GODEBUG=cgocheck=2 RUST_LOG=info go test -run=^$ + restore_parameter_cache: + steps: + - restore_cache: + keys: + - v28-proof-params-{{ arch }} + save_parameter_cache: + steps: + - save_cache: + key: v28-proof-params-{{ arch }} + paths: + - "~/filecoin-proof-parameters/" diff --git a/chain/filecoin/filecoin-ffi/.gitignore b/chain/filecoin/filecoin-ffi/.gitignore new file mode 100644 index 00000000..f35581b9 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/.gitignore @@ -0,0 +1,11 @@ +**/*.rs.bk +**/include +**/paramcache +**/target +.install-filcrypto +filcrypto.h +filcrypto.pc +filecoin.h +filecoin.pc +*.a +simulator diff --git a/chain/filecoin/filecoin-ffi/CHANGELOG.md b/chain/filecoin/filecoin-ffi/CHANGELOG.md new file mode 100644 index 00000000..34c6d2fa --- /dev/null +++ b/chain/filecoin/filecoin-ffi/CHANGELOG.md @@ -0,0 +1,292 @@ +# filecoin-ffi changelog + +## 0.30.3 + +This release adds `FauxRep` to the `ffi` package, and a few other +rust-fil-proofs improvements, which you can read about [here](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#403---2020-07-01). + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - add FauxRep to ffi package (#118) ([filecoin-project/filecoin-ffi#118](https://github.com/filecoin-project/filecoin-ffi/pull/118)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Erin Swenson-Healey | 1 | +370/-143 | 9 | + +## 0.30.2 + +This release fixed a bug in the `ffi.Aggregate` function, which did not properly +handle a NUL byte (representing an error) returned from the `fil_aggregate` Rust +function. + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - handle null pointer returned from fil_aggregate (#116) ([filecoin-project/filecoin-ffi#116](https://github.com/filecoin-project/filecoin-ffi/pull/116)) + - 0.30.1 changelog (#114) ([filecoin-project/filecoin-ffi#114](https://github.com/filecoin-project/filecoin-ffi/pull/114)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Erin Swenson-Healey | 2 | +45/-1 | 3 | + +## 0.30.1 + +This release wil include Window PoSt speedups (2x measured for 32GiB sectors), +RAM reduction of 56GiB for 32GiB sectors (mmap'd parent cache with windows for +access, rather than all in RAM at once), and some phase2/trusted setup related +updates (for the trusted setup participants). + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - update to rust-fil-proofs 4.0.2 (#113) ([filecoin-project/filecoin-ffi#113](https://github.com/filecoin-project/filecoin-ffi/pull/113)) + - run the Rust tests before running the Go tests (#112) ([filecoin-project/filecoin-ffi#112](https://github.com/filecoin-project/filecoin-ffi/pull/112)) + - Update master dependencies ([filecoin-project/filecoin-ffi#111](https://github.com/filecoin-project/filecoin-ffi/pull/111)) + - update changelog for 0.30.0 release ([filecoin-project/filecoin-ffi#109](https://github.com/filecoin-project/filecoin-ffi/pull/109)) +- github.com/filecoin-project/specs-actors (v0.6.0 -> v0.6.1) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| nemo | 3 | +1463/-1782 | 17 | +| Alex North | 2 | +139/-116 | 3 | +| Erin Swenson-Healey | 2 | +90/-68 | 7 | +| laser | 1 | +31/-0 | 1 | + +## 0.30.0 + +This release includes an update specs-actors (splits abi.RegisteredProof into +two new types - one for seal and one for PoSt) and an update to rust-fil-proofs +4.0.0, which you can read about [here](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#400---2020-06-15). + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - update to rust-fil-proofs 4.0.0 (#108) ([filecoin-project/filecoin-ffi#108](https://github.com/filecoin-project/filecoin-ffi/pull/108)) + - specs-actors v0.6 ([filecoin-project/filecoin-ffi#107](https://github.com/filecoin-project/filecoin-ffi/pull/107)) + - changelog for 0.28.0, 0.28.1, and 0.29.0 (#106) ([filecoin-project/filecoin-ffi#106](https://github.com/filecoin-project/filecoin-ffi/pull/106)) +- github.com/filecoin-project/specs-actors (v0.5.4-0.20200521014528-0df536f7e461 -> v0.6.0) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Frrist | 3 | +454/-239 | 22 | +| Whyrusleeping | 2 | +485/-119 | 19 | +| Alex North | 7 | +424/-151 | 15 | +| Łukasz Magiera | 4 | +227/-154 | 13 | +| Alex Cruikshank | 4 | +262/-85 | 10 | +| porcuquine | 1 | +172/-171 | 15 | +| Erin Swenson-Healey | 3 | +153/-30 | 5 | +| ZenGround0 | 3 | +42/-17 | 16 | +| ZX | 2 | +16/-19 | 4 | +| WEI YANG | 1 | +6/-2 | 1 | +| Henri | 1 | +2/-2 | 1 | + + +## 0.29.0 + +Big changes here! We moved off of the nightly Rust channel, fixed a nasty file +descriptor-leak, and (most importantly) updated to [v27 parameters and keys](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#300---2020-06-08). + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - fix: update to filecoin-proofs-api v3.0.0 ([filecoin-project/filecoin-ffi#105](https://github.com/filecoin-project/filecoin-ffi/pull/105)) + - explicitly close os.File to force release of file descriptor (#97) ([filecoin-project/filecoin-ffi#97](https://github.com/filecoin-project/filecoin-ffi/pull/97)) + - fix: use stable 1.43.1 release ([filecoin-project/filecoin-ffi#102](https://github.com/filecoin-project/filecoin-ffi/pull/102)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| nemo | 2 | +133/-132 | 4 | +| Erin Swenson-Healey | 1 | +47/-1 | 2 | +| Volker Mische | 1 | +1/-3 | 3 | + + +## 0.28.1 + +This release modifies the rust-filecoin-proofs-api dependency, downloading it +from crates.io instead of GitHub. No behavior changes. + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - fix: point to published filecoin-proofs-api crate ([filecoin-project/filecoin-ffi#104](https://github.com/filecoin-project/filecoin-ffi/pull/104)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| nemo | 1 | +6/-5 | 3 | + + +## 0.28.0 + +This release adds unseal-to-a-file-descriptor functionality to the API, improves +merkle tree cache usage, [and more](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#200---2020-05-27). + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - integrate rust-fil-proofs 2.0.0 release (#98) ([filecoin-project/filecoin-ffi#98](https://github.com/filecoin-project/filecoin-ffi/pull/98)) + - release notes for 0.27.0 (#96) ([filecoin-project/filecoin-ffi#96](https://github.com/filecoin-project/filecoin-ffi/pull/96)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Erin Swenson-Healey | 2 | +245/-371 | 9 | + + +## 0.27.0 + +This release migrates from specs-actors 0.4.1 to 0.5.4. + +### Breaking Changes + +- The `VerifySeal` function has been modified to accept the revamped `abi.SealVerifyInfo` type. + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - consume new abi.SealVerifyInfo structure (#89) ([filecoin-project/filecoin-ffi#89](https://github.com/filecoin-project/filecoin-ffi/pull/89)) + - add changelog and changelog generator (#95) ([filecoin-project/filecoin-ffi#95](https://github.com/filecoin-project/filecoin-ffi/pull/95)) +- github.com/filecoin-project/go-bitfield (v0.0.0-20200416002808-b3ee67ec9060 -> v0.0.1): + - zero out bitfields during subtraction when they end up empty ([filecoin-project/go-bitfield#4](https://github.com/filecoin-project/go-bitfield/pull/4)) + - Create go.yml +- github.com/filecoin-project/specs-actors (v0.4.1-0.20200509020627-3c96f54f3d7d -> v0.5.4-0.20200521014528-0df536f7e461): + - decouple SealVerifyInfo from OnChainSealVerifyInfo (and rename to SealVerifyParams) (#378) ([filecoin-project/specs-actors#378](https://github.com/filecoin-project/specs-actors/pull/378)) + - add Unencodable Return method to puppet actor (#384) ([filecoin-project/specs-actors#384](https://github.com/filecoin-project/specs-actors/pull/384)) + - call validate caller (#379) ([filecoin-project/specs-actors#379](https://github.com/filecoin-project/specs-actors/pull/379)) + - handle last cron tick in market actor properly (#376) ([filecoin-project/specs-actors#376](https://github.com/filecoin-project/specs-actors/pull/376)) + - stop puppet actor panic when sendreturn is nil (#375) ([filecoin-project/specs-actors#375](https://github.com/filecoin-project/specs-actors/pull/375)) + - Change window post deadline duration to 1hr. (#373) ([filecoin-project/specs-actors#373](https://github.com/filecoin-project/specs-actors/pull/373)) + - cbor-gen for reward actor state (#372) ([filecoin-project/specs-actors#372](https://github.com/filecoin-project/specs-actors/pull/372)) + - Fractional network time (#367) ([filecoin-project/specs-actors#367](https://github.com/filecoin-project/specs-actors/pull/367)) + - deps: go-bitfield v0.0.1 (#369) ([filecoin-project/specs-actors#369](https://github.com/filecoin-project/specs-actors/pull/369)) + - update block reward target from KPI event, use that value to pay block rewards (#366) ([filecoin-project/specs-actors#366](https://github.com/filecoin-project/specs-actors/pull/366)) + - Helpers and mocks for miner window post unit tests. (#354) ([filecoin-project/specs-actors#354](https://github.com/filecoin-project/specs-actors/pull/354)) + - Change min miner power from 10TiB to 1TiB for testnet-2 (#368) ([filecoin-project/specs-actors#368](https://github.com/filecoin-project/specs-actors/pull/368)) + - Remove incorrect assumption about window post proof slice (#361) ([filecoin-project/specs-actors#361](https://github.com/filecoin-project/specs-actors/pull/361)) + - miner: Restrict supported proof types in miner ctor (#363) ([filecoin-project/specs-actors#363](https://github.com/filecoin-project/specs-actors/pull/363)) + - dont include value in the error message for set errors (#365) ([filecoin-project/specs-actors#365](https://github.com/filecoin-project/specs-actors/pull/365)) + - Fix nil verified deal weight (#360) ([filecoin-project/specs-actors#360](https://github.com/filecoin-project/specs-actors/pull/360)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Erin Swenson-Healey | 3 | +501/-293 | 12 | +| Łukasz Magiera | 4 | +388/-181 | 21 | +| Alex North | 5 | +346/-71 | 9 | +| Jakub Sztandera | 3 | +94/-9 | 5 | +| Whyrusleeping | 4 | +66/-36 | 9 | +| ZX | 1 | +21/-42 | 3 | +| Jeromy | 1 | +62/-0 | 2 | +| Frrist | 2 | +27/-8 | 2 | +| cerasusland | 1 | +2/-5 | 1 | + +## 0.26.2 + +This release contains a fix for a bug which prevented unmodified miners from +generating Winning PoSts for 64GiB sectors. It also contains a fix for a bug +which was an occasional source of `bad file descriptor` errors observed during +CommP generation (our hypothesis is that the `*os.File` was being GC'ed before +the CGO call returned). + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - don't let Go garbage collect FD until FFI call returns ([filecoin-project/filecoin-ffi#84](https://github.com/filecoin-project/filecoin-ffi/pull/84)) + - fix: error if there is already a logger + - add winning PoSt for 64 GiB (#93) ([filecoin-project/filecoin-ffi#93](https://github.com/filecoin-project/filecoin-ffi/pull/93)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Volker Mische | 1 | +24/-7 | 1 | +| laser | 1 | +5/-5 | 1 | +| shannon-6block | 1 | +2/-0 | 1 | + +## 0.26.1 + +This release updates to version 0.4.1 of specs-actors, which (among other +things) extends the `RegisteredProof` types to include 64GiB sector sizes. It +also includes a fix for Window PoSt (multiple proofs were being flattened into +a single byte array) and various fixes for bellperson and neptune Rust crates. + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - Update deps revisited ([filecoin-project/filecoin-ffi#91](https://github.com/filecoin-project/filecoin-ffi/pull/91)) + - newest upstream (#88) ([filecoin-project/filecoin-ffi#88](https://github.com/filecoin-project/filecoin-ffi/pull/88)) + - update rust-filecoin-proofs-api to include PoSt fix (#87) ([filecoin-project/filecoin-ffi#87](https://github.com/filecoin-project/filecoin-ffi/pull/87)) + - upgrade to specs-actors 0.4.1 (64GiB sector support) ([filecoin-project/filecoin-ffi#85](https://github.com/filecoin-project/filecoin-ffi/pull/85)) + - Upgrade to specs-actors v0.3.0 (#81) ([filecoin-project/filecoin-ffi#81](https://github.com/filecoin-project/filecoin-ffi/pull/81)) +- github.com/filecoin-project/go-amt-ipld (v2.0.1-0.20200131012142-05d80eeccc5e -> v2.0.1-0.20200424220931-6263827e49f2): + - implement method to get first index in amt ([filecoin-project/go-amt-ipld#11](https://github.com/filecoin-project/go-amt-ipld/pull/11)) + - implement ForEachAt method to support iteration starting at a given i… ([filecoin-project/go-amt-ipld#10](https://github.com/filecoin-project/go-amt-ipld/pull/10)) +- github.com/filecoin-project/specs-actors (v0.2.0 -> v0.4.1-0.20200509020627-3c96f54f3d7d): + - Minting function maintainability (#356) ([filecoin-project/specs-actors#356](https://github.com/filecoin-project/specs-actors/pull/356)) + - support for 64GiB sectors (#355) ([filecoin-project/specs-actors#355](https://github.com/filecoin-project/specs-actors/pull/355)) + - Temporary param update (#352) ([filecoin-project/specs-actors#352](https://github.com/filecoin-project/specs-actors/pull/352)) + - document reward minting function tests (#348) ([filecoin-project/specs-actors#348](https://github.com/filecoin-project/specs-actors/pull/348)) + - puppet type and method for failed marshal to cbor (#347) ([filecoin-project/specs-actors#347](https://github.com/filecoin-project/specs-actors/pull/347)) + - Unit tests for prove commit sector (#351) ([filecoin-project/specs-actors#351](https://github.com/filecoin-project/specs-actors/pull/351)) + - Fix failure to detect faults of exactly-full top partition (#350) ([filecoin-project/specs-actors#350](https://github.com/filecoin-project/specs-actors/pull/350)) + - Fix checking of fault/recovery declaration deadlines (#349) ([filecoin-project/specs-actors#349](https://github.com/filecoin-project/specs-actors/pull/349)) + - Set ConsensusMinerMinPower to 10TiB (#344) ([filecoin-project/specs-actors#344](https://github.com/filecoin-project/specs-actors/pull/344)) + - improve deal accounting performance (#309) ([filecoin-project/specs-actors#309](https://github.com/filecoin-project/specs-actors/pull/309)) + - DeadlineInfo handles expired proving period (#343) ([filecoin-project/specs-actors#343](https://github.com/filecoin-project/specs-actors/pull/343)) + - document reward-minting taylorSeriesExpansion (#338) ([filecoin-project/specs-actors#338](https://github.com/filecoin-project/specs-actors/pull/338)) + - implement puppet actor (#290) ([filecoin-project/specs-actors#290](https://github.com/filecoin-project/specs-actors/pull/290)) + - Fix the 32GiB Window PoSt partition size again (#337) ([filecoin-project/specs-actors#337](https://github.com/filecoin-project/specs-actors/pull/337)) + - Fix seal proof type in miner actor and parameterize WPoSt partition size by it (#336) ([filecoin-project/specs-actors#336](https://github.com/filecoin-project/specs-actors/pull/336)) + - Change WPoStPartitionSectors to 2349 (#332) ([filecoin-project/specs-actors#332](https://github.com/filecoin-project/specs-actors/pull/332)) + - Remove unused SectorSize from VerifyDealsOnSectorProveCommitParams (#328) ([filecoin-project/specs-actors#328](https://github.com/filecoin-project/specs-actors/pull/328)) + - require success in reward actor send reward (#331) ([filecoin-project/specs-actors#331](https://github.com/filecoin-project/specs-actors/pull/331)) + - Power actor CreateMiner passes on value received to new actor (#327) ([filecoin-project/specs-actors#327](https://github.com/filecoin-project/specs-actors/pull/327)) + - Specify cron genesis entries (#326) ([filecoin-project/specs-actors#326](https://github.com/filecoin-project/specs-actors/pull/326)) + - Remove SysErrInternal definition, use of which is always a bug (#304) ([filecoin-project/specs-actors#304](https://github.com/filecoin-project/specs-actors/pull/304)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Alex North | 13 | +654/-280 | 35 | +| Whyrusleeping | 2 | +273/-437 | 13 | +| Frrist | 3 | +455/-6 | 7 | +| davidad (David A. Dalrymple) | 3 | +245/-46 | 5 | +| Jeromy | 2 | +166/-4 | 4 | +| laser | 4 | +110/-48 | 6 | +| Erin Swenson-Healey | 3 | +50/-30 | 5 | +| ZX | 1 | +48/-20 | 5 | +| nemo | 1 | +4/-56 | 2 | + +## 0.26.0 + +This release migrates from v25 to v26 Groth parameters, which allows us to use +64GiB sectors. It also adds some safety to the CGO bindings, which were +previously sharing Go memory with C, resulting in some errors when running with +`cgocheck=2`. + +### Changelog + +- github.com/filecoin-project/filecoin-ffi: + - update to v26 Groth parameters (#83) ([filecoin-project/filecoin-ffi#83](https://github.com/filecoin-project/filecoin-ffi/pull/83)) + - handle allocations for problematic structs to avoid sharing pointers-to-pointers with C (from Go) (#82) ([filecoin-project/filecoin-ffi#82](https://github.com/filecoin-project/filecoin-ffi/pull/82)) + +### Contributors + +| Contributor | Commits | Lines ± | Files Changed | +|-------------|---------|---------|---------------| +| Erin Swenson-Healey | 2 | +514/-375 | 15 | diff --git a/chain/filecoin/filecoin-ffi/LICENSE-APACHE b/chain/filecoin/filecoin-ffi/LICENSE-APACHE new file mode 100644 index 00000000..25d5a005 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/LICENSE-APACHE @@ -0,0 +1,7 @@ + Copyright (c) 2018 Filecoin Project + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/chain/filecoin/filecoin-ffi/LICENSE-MIT b/chain/filecoin/filecoin-ffi/LICENSE-MIT new file mode 100644 index 00000000..468cd79a --- /dev/null +++ b/chain/filecoin/filecoin-ffi/LICENSE-MIT @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/chain/filecoin/filecoin-ffi/Makefile b/chain/filecoin/filecoin-ffi/Makefile new file mode 100644 index 00000000..7d207b2d --- /dev/null +++ b/chain/filecoin/filecoin-ffi/Makefile @@ -0,0 +1,40 @@ +DEPS:=filcrypto.h filcrypto.pc libfilcrypto.a + +all: $(DEPS) +.PHONY: all + +# Create a file so that parallel make doesn't call `./install-filcrypto` for +# each of the deps +$(DEPS): .install-filcrypto ; + +.install-filcrypto: rust + ./install-filcrypto + @touch $@ + +clean: + rm -rf $(DEPS) .install-filcrypto + rm -f ./runner + cd rust && cargo clean && cd .. +.PHONY: clean + +go-lint: $(DEPS) + golangci-lint run -v --concurrency 2 --new-from-rev origin/master +.PHONY: go-lint + +shellcheck: + shellcheck install-filcrypto + +lint: shellcheck go-lint + +cgo-leakdetect: runner + valgrind --leak-check=full --show-leak-kinds=definite ./runner +.PHONY: cgo-leakdetect + +cgo-gen: $(DEPS) + go run github.com/xlab/c-for-go --nostamp filcrypto.yml +.PHONY: cgo-gen + +runner: $(DEPS) + rm -f ./runner + go build -o ./runner ./cgoleakdetect/ +.PHONY: runner diff --git a/chain/filecoin/filecoin-ffi/README.md b/chain/filecoin/filecoin-ffi/README.md new file mode 100644 index 00000000..678ccd96 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/README.md @@ -0,0 +1,74 @@ +# Filecoin Proofs FFI + +> C and CGO bindings for Filecoin's Rust libraries + +## Building + +To build and install libfilcrypto, its header file and pkg-config manifest, run: + +```shell +make +``` + +To optionally authenticate with GitHub for assets download (to increase API limits) +set `GITHUB_TOKEN` to personal access token. + +If no precompiled static library is available for your operating system, the +build tooling will attempt to compile a static library from local Rust sources. + +### Forcing Local Build + +To opt out of downloading precompiled assets, set `FFI_BUILD_FROM_SOURCE=1`: + +```shell +rm .install-filcrypto \ + ; make clean \ + ; FFI_BUILD_FROM_SOURCE=1 make +``` + +## Updating rust-fil-proofs (via rust-filecoin-proofs-api) + +If rust-fil-proofs has changed from commit X to Y and you wish to get Y into +the filecoin-ffi project, you need to do a few things: + +1. Update the rust-filecoin-proofs-api [Cargo.toml][1] file to point to Y +2. Run `cd rust && cargo update -p "filecoin-proofs-api"` from the root of the filecoin-ffi project +3. After the previous step alters your Cargo.lock file, commit and push + +## go get + +`go get` needs some additional steps in order to work as expected. + +Get the source, add this repo as a submodule to your repo, build it and point to it: + +```shell +$ go get github.com/filecoin-project/filecoin-ffi +$ git submodule add https://github.com/filecoin-project/filecoin-ffi.git extern/filecoin-ffi +$ make -C extern/filecoin-ffi +$ go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./extern/filecoin-ffi +``` + +## Updating CGO Bindings + +The CGO bindings are generated using [c-for-go](https://github.com/xlab/c-for-go) +and committed to Git. To generate bindings yourself, install the c-for-go +binary, ensure that it's on your path, and then run `make cgo-gen`. CI builds +will fail if generated CGO diverges from what's checked into Git. + +## Updating the Changelog + +The `mkreleaselog` script (in the project root) can be used to generate a good +portion of the filecoin-ffi changelog. For historical reasons, the script must +be run from the root of a filecoin-ffi checkout which is in your `$GOPATH`. + +Run it like so: + +```shell +./mkreleaselog v0.25.0 v0.26.0 > /tmp/v0.26.0.notes.txt +``` + +## License + +MIT or Apache 2.0 + +[1]: https://github.com/filecoin-project/rust-filecoin-proofs-api/commit/61fde0e581cc38abc4e13dbe96145c9ad2f1f0f5 diff --git a/chain/filecoin/filecoin-ffi/bls.go b/chain/filecoin/filecoin-ffi/bls.go new file mode 100644 index 00000000..3fce99b2 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/bls.go @@ -0,0 +1,140 @@ +//+build cgo + +package ffi + +import ( + "github.com/filecoin-project/filecoin-ffi/generated" +) + +// #cgo LDFLAGS: ${SRCDIR}/libfilcrypto.a +// #cgo pkg-config: ${SRCDIR}/filcrypto.pc +// #include "./filcrypto.h" +import "C" + +// Hash computes the digest of a message +func Hash(message Message) Digest { + resp := generated.FilHash(string(message), uint(len(message))) + resp.Deref() + resp.Digest.Deref() + + defer generated.FilDestroyHashResponse(resp) + + var out Digest + copy(out[:], resp.Digest.Inner[:]) + return out +} + +// Verify verifies that a signature is the aggregated signature of digests - pubkeys +func Verify(signature *Signature, digests []Digest, publicKeys []PublicKey) bool { + // prep data + flattenedDigests := make([]byte, DigestBytes*len(digests)) + for idx, digest := range digests { + copy(flattenedDigests[(DigestBytes*idx):(DigestBytes*(1+idx))], digest[:]) + } + + flattenedPublicKeys := make([]byte, PublicKeyBytes*len(publicKeys)) + for idx, publicKey := range publicKeys { + copy(flattenedPublicKeys[(PublicKeyBytes*idx):(PublicKeyBytes*(1+idx))], publicKey[:]) + } + + isValid := generated.FilVerify(string(signature[:]), string(flattenedDigests), uint(len(flattenedDigests)), string(flattenedPublicKeys), uint(len(flattenedPublicKeys))) + + return isValid > 0 +} + +// HashVerify verifies that a signature is the aggregated signature of hashed messages. +func HashVerify(signature *Signature, messages []Message, publicKeys []PublicKey) bool { + var flattenedMessages string + messagesSizes := make([]uint, len(messages)) + for idx := range messages { + flattenedMessages = flattenedMessages + string(messages[idx]) + messagesSizes[idx] = uint(len(messages[idx])) + } + + flattenedPublicKeys := make([]byte, PublicKeyBytes*len(publicKeys)) + for idx, publicKey := range publicKeys { + copy(flattenedPublicKeys[(PublicKeyBytes*idx):(PublicKeyBytes*(1+idx))], publicKey[:]) + } + + isValid := generated.FilHashVerify(string(signature[:]), flattenedMessages, uint(len(flattenedMessages)), messagesSizes, uint(len(messagesSizes)), string(flattenedPublicKeys), uint(len(flattenedPublicKeys))) + + return isValid > 0 +} + +// Aggregate aggregates signatures together into a new signature. If the +// provided signatures cannot be aggregated (due to invalid input or an +// an operational error), Aggregate will return nil. +func Aggregate(signatures []Signature) *Signature { + // prep data + flattenedSignatures := make([]byte, SignatureBytes*len(signatures)) + for idx, sig := range signatures { + copy(flattenedSignatures[(SignatureBytes*idx):(SignatureBytes*(1+idx))], sig[:]) + } + + resp := generated.FilAggregate(string(flattenedSignatures), uint(len(flattenedSignatures))) + if resp == nil { + return nil + } + + defer generated.FilDestroyAggregateResponse(resp) + + resp.Deref() + resp.Signature.Deref() + + var out Signature + copy(out[:], resp.Signature.Inner[:]) + return &out +} + +// PrivateKeyGenerate generates a private key +func PrivateKeyGenerate() PrivateKey { + resp := generated.FilPrivateKeyGenerate() + resp.Deref() + resp.PrivateKey.Deref() + defer generated.FilDestroyPrivateKeyGenerateResponse(resp) + + var out PrivateKey + copy(out[:], resp.PrivateKey.Inner[:]) + return out +} + +// PrivateKeyGenerate generates a private key in a predictable manner +func PrivateKeyGenerateWithSeed(seed PrivateKeyGenSeed) PrivateKey { + var ary generated.Fil32ByteArray + copy(ary.Inner[:], seed[:]) + + resp := generated.FilPrivateKeyGenerateWithSeed(ary) + resp.Deref() + resp.PrivateKey.Deref() + defer generated.FilDestroyPrivateKeyGenerateResponse(resp) + + var out PrivateKey + copy(out[:], resp.PrivateKey.Inner[:]) + return out +} + +// PrivateKeySign signs a message +func PrivateKeySign(privateKey PrivateKey, message Message) *Signature { + resp := generated.FilPrivateKeySign(string(privateKey[:]), string(message), uint(len(message))) + resp.Deref() + resp.Signature.Deref() + + defer generated.FilDestroyPrivateKeySignResponse(resp) + + var signature Signature + copy(signature[:], resp.Signature.Inner[:]) + return &signature +} + +// PrivateKeyPublicKey gets the public key for a private key +func PrivateKeyPublicKey(privateKey PrivateKey) PublicKey { + resp := generated.FilPrivateKeyPublicKey(string(privateKey[:])) + resp.Deref() + resp.PublicKey.Deref() + + defer generated.FilDestroyPrivateKeyPublicKeyResponse(resp) + + var publicKey PublicKey + copy(publicKey[:], resp.PublicKey.Inner[:]) + return publicKey +} diff --git a/chain/filecoin/filecoin-ffi/bls_test.go b/chain/filecoin/filecoin-ffi/bls_test.go new file mode 100644 index 00000000..21d1c2b3 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/bls_test.go @@ -0,0 +1,186 @@ +package ffi + +import ( + "fmt" + "math/rand" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestDeterministicPrivateKeyGeneration(t *testing.T) { + rand.Seed(time.Now().UnixNano()) + + for i := 0; i < 10000; i++ { + var xs [32]byte + n, err := rand.Read(xs[:]) + require.NoError(t, err) + require.Equal(t, len(xs), n) + + first := PrivateKeyGenerateWithSeed(xs) + secnd := PrivateKeyGenerateWithSeed(xs) + + assert.Equal(t, first, secnd) + } +} + +func TestBLSSigningAndVerification(t *testing.T) { + // generate private keys + fooPrivateKey := PrivateKeyGenerate() + barPrivateKey := PrivateKeyGenerate() + + // get the public keys for the private keys + fooPublicKey := PrivateKeyPublicKey(fooPrivateKey) + barPublicKey := PrivateKeyPublicKey(barPrivateKey) + + // make messages to sign with the keys + fooMessage := Message("hello foo") + barMessage := Message("hello bar!") + + // calculate the digests of the messages + fooDigest := Hash(fooMessage) + barDigest := Hash(barMessage) + + // get the signature when signing the messages with the private keys + fooSignature := PrivateKeySign(fooPrivateKey, fooMessage) + barSignature := PrivateKeySign(barPrivateKey, barMessage) + + // get the aggregateSign + aggregateSign := Aggregate([]Signature{*fooSignature, *barSignature}) + + // assert the foo message was signed with the foo key + assert.True(t, Verify(fooSignature, []Digest{fooDigest}, []PublicKey{fooPublicKey})) + + // assert the bar message was signed with the bar key + assert.True(t, Verify(barSignature, []Digest{barDigest}, []PublicKey{barPublicKey})) + + // assert the foo message was signed with the foo key + assert.True(t, HashVerify(fooSignature, []Message{fooMessage}, []PublicKey{fooPublicKey})) + + // assert the bar message was signed with the bar key + assert.True(t, HashVerify(barSignature, []Message{barMessage}, []PublicKey{barPublicKey})) + + // assert the foo message was not signed by the bar key + assert.False(t, Verify(fooSignature, []Digest{fooDigest}, []PublicKey{barPublicKey})) + + // assert the bar/foo message was not signed by the foo/bar key + assert.False(t, Verify(barSignature, []Digest{barDigest}, []PublicKey{fooPublicKey})) + assert.False(t, Verify(barSignature, []Digest{fooDigest}, []PublicKey{barPublicKey})) + assert.False(t, Verify(fooSignature, []Digest{barDigest}, []PublicKey{fooPublicKey})) + + //assert the foo and bar message was signed with the foo and bar key + assert.True(t, HashVerify(aggregateSign, []Message{fooMessage, barMessage}, []PublicKey{fooPublicKey, barPublicKey})) + + //assert the bar and foo message was not signed by the foo and bar key + assert.False(t, HashVerify(aggregateSign, []Message{fooMessage, barMessage}, []PublicKey{fooPublicKey})) +} + +func BenchmarkBLSVerify(b *testing.B) { + priv := PrivateKeyGenerate() + + msg := Message("this is a message that i will be signing") + digest := Hash(msg) + + sig := PrivateKeySign(priv, msg) + // fmt.Println("SIG SIZE: ", len(sig)) + // fmt.Println("SIG: ", sig) + pubk := PrivateKeyPublicKey(priv) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if !Verify(sig, []Digest{digest}, []PublicKey{pubk}) { + b.Fatal("failed to verify") + } + } +} + +func TestBlsAggregateErrors(t *testing.T) { + t.Run("no signatures", func(t *testing.T) { + var empty []Signature + out := Aggregate(empty) + require.Nil(t, out) + }) + + t.Run("nil signatures", func(t *testing.T) { + out := Aggregate(nil) + require.Nil(t, out) + }) +} + +func BenchmarkBLSVerifyBatch(b *testing.B) { + b.Run("10", benchmarkBLSVerifyBatchSize(10)) + b.Run("50", benchmarkBLSVerifyBatchSize(50)) + b.Run("100", benchmarkBLSVerifyBatchSize(100)) + b.Run("300", benchmarkBLSVerifyBatchSize(300)) + b.Run("1000", benchmarkBLSVerifyBatchSize(1000)) + b.Run("4000", benchmarkBLSVerifyBatchSize(4000)) +} + +func benchmarkBLSVerifyBatchSize(size int) func(b *testing.B) { + return func(b *testing.B) { + var digests []Digest + var msgs []Message + var sigs []Signature + var pubks []PublicKey + for i := 0; i < size; i++ { + msg := Message(fmt.Sprintf("cats cats cats cats %d %d %d dogs", i, i, i)) + msgs = append(msgs, msg) + digests = append(digests, Hash(msg)) + priv := PrivateKeyGenerate() + sig := PrivateKeySign(priv, msg) + sigs = append(sigs, *sig) + pubk := PrivateKeyPublicKey(priv) + pubks = append(pubks, pubk) + } + + t := time.Now() + agsig := Aggregate(sigs) + fmt.Println("Aggregate took: ", time.Since(t)) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if !Verify(agsig, digests, pubks) { + b.Fatal("failed to verify") + } + } + } +} + +func BenchmarkBLSHashAndVerify(b *testing.B) { + priv := PrivateKeyGenerate() + + msg := Message("this is a message that i will be signing") + sig := PrivateKeySign(priv, msg) + + // fmt.Println("SIG SIZE: ", len(sig)) + // fmt.Println("SIG: ", sig) + pubk := PrivateKeyPublicKey(priv) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + digest := Hash(msg) + if !Verify(sig, []Digest{digest}, []PublicKey{pubk}) { + b.Fatal("failed to verify") + } + } +} + +func BenchmarkBLSHashVerify(b *testing.B) { + priv := PrivateKeyGenerate() + + msg := Message("this is a message that i will be signing") + sig := PrivateKeySign(priv, msg) + + // fmt.Println("SIG SIZE: ", len(sig)) + // fmt.Println("SIG: ", sig) + pubk := PrivateKeyPublicKey(priv) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + if !HashVerify(sig, []Message{msg}, []PublicKey{pubk}) { + b.Fatal("failed to verify") + } + } +} diff --git a/chain/filecoin/filecoin-ffi/build.sh b/chain/filecoin/filecoin-ffi/build.sh new file mode 100755 index 00000000..9a7d0470 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +make clean +cd rust +rm Cargo.lock +cargo update -p "filecoin-proofs-api" +cargo install cbindgen +cbindgen --clean --config cbindgen.toml --crate filcrypto --output ../include/filcrypto.h +cd .. +FFI_BUILD_FROM_SOURCE=1 make +go mod tidy diff --git a/chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go b/chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go new file mode 100644 index 00000000..2bfc33b9 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go @@ -0,0 +1,63 @@ +//+build cgo + +package main + +import ( + "fmt" + "os" + + ffi "github.com/filecoin-project/filecoin-ffi" +) + +func main() { + os.Setenv("RUST_LOG", "info") + th := panicOnFailureTestHelper{} + ffi.WorkflowGetGPUDevicesDoesNotProduceAnError(&th) + ffi.WorkflowProofsLifecycle(&th) + ffi.WorkflowRegisteredPoStProofFunctions(&th) + ffi.WorkflowRegisteredSealProofFunctions(&th) +} + +type panicOnFailureTestHelper struct{} + +func (p panicOnFailureTestHelper) AssertEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool { + if expected != actual { + panic(fmt.Sprintf("not equal: %+v, %+v, %+v", expected, actual, msgAndArgs)) + } + + return true +} + +func (p panicOnFailureTestHelper) AssertNoError(err error, msgAndArgs ...interface{}) bool { + if err != nil { + panic(fmt.Sprintf("there was an error: %+v, %+v", err, msgAndArgs)) + } + + return true +} + +func (p panicOnFailureTestHelper) AssertTrue(value bool, msgAndArgs ...interface{}) bool { + if !value { + panic(fmt.Sprintf("not true: %+v, %+v", value, msgAndArgs)) + } + + return true +} + +func (p panicOnFailureTestHelper) RequireEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { + if expected != actual { + panic(fmt.Sprintf("not equal: %+v, %+v, %+v", expected, actual, msgAndArgs)) + } +} + +func (p panicOnFailureTestHelper) RequireNoError(err error, msgAndArgs ...interface{}) { + if err != nil { + panic(fmt.Sprintf("there was an error: %+v, %+v", err, msgAndArgs)) + } +} + +func (p panicOnFailureTestHelper) RequireTrue(value bool, msgAndArgs ...interface{}) { + if !value { + panic(fmt.Sprintf("not true: %+v, %+v", value, msgAndArgs)) + } +} diff --git a/chain/filecoin/filecoin-ffi/filcrypto.yml b/chain/filecoin/filecoin-ffi/filcrypto.yml new file mode 100644 index 00000000..81c675a5 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/filcrypto.yml @@ -0,0 +1,37 @@ +--- +GENERATOR: + PackageName: generated + PackageDescription: + PackageLicense: + Options: + SafeStrings: true + Includes: + - ../filcrypto.h + FlagGroups: + - {name: LDFLAGS, flags: ["-L${SRCDIR}/.. -lfilcrypto"]} + - {name: pkg-config, flags: ["${SRCDIR}/../filcrypto.pc"]} + +PARSER: + Defines: + IncludePaths: + - ./headerstubs/ + SourcesPaths: + - ./filcrypto.h + +TRANSLATOR: + ConstRules: + defines: expand + enum: cgo + PtrTips: + function: + - {target: "^fil_destroy", tips: [ref]} + Rules: + global: + - {action: accept, from: "^fil"} + - {action: accept, from: "^FCPResponseStatus"} + - {transform: export} + private: + - {transform: unexport} + post-global: + - {transform: export} + - {load: snakecase} diff --git a/chain/filecoin/filecoin-ffi/generated/cgo_helpers.go b/chain/filecoin/filecoin-ffi/generated/cgo_helpers.go new file mode 100644 index 00000000..a7ecf074 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/generated/cgo_helpers.go @@ -0,0 +1,3517 @@ +// WARNING: This file has automatically been generated +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +package generated + +/* +#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto +#cgo pkg-config: ${SRCDIR}/../filcrypto.pc +#include "../filcrypto.h" +#include +#include "cgo_helpers.h" +*/ +import "C" +import ( + "fmt" + "runtime" + "sync" + "unsafe" +) + +// cgoAllocMap stores pointers to C allocated memory for future reference. +type cgoAllocMap struct { + mux sync.RWMutex + m map[unsafe.Pointer]struct{} +} + +var cgoAllocsUnknown = new(cgoAllocMap) + +func (a *cgoAllocMap) Add(ptr unsafe.Pointer) { + a.mux.Lock() + if a.m == nil { + a.m = make(map[unsafe.Pointer]struct{}) + } + a.m[ptr] = struct{}{} + a.mux.Unlock() +} + +func (a *cgoAllocMap) IsEmpty() bool { + a.mux.RLock() + isEmpty := len(a.m) == 0 + a.mux.RUnlock() + return isEmpty +} + +func (a *cgoAllocMap) Borrow(b *cgoAllocMap) { + if b == nil || b.IsEmpty() { + return + } + b.mux.Lock() + a.mux.Lock() + for ptr := range b.m { + if a.m == nil { + a.m = make(map[unsafe.Pointer]struct{}) + } + a.m[ptr] = struct{}{} + delete(b.m, ptr) + } + a.mux.Unlock() + b.mux.Unlock() +} + +func (a *cgoAllocMap) Free() { + a.mux.Lock() + for ptr := range a.m { + C.free(ptr) + delete(a.m, ptr) + } + a.mux.Unlock() +} + +// allocFilBLSSignatureMemory allocates memory for type C.fil_BLSSignature in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilBLSSignatureMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSSignatureValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilBLSSignatureValue = unsafe.Sizeof([1]C.fil_BLSSignature{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilBLSSignature) Ref() *C.fil_BLSSignature { + if x == nil { + return nil + } + return x.refa2ac09ba +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilBLSSignature) Free() { + if x != nil && x.allocsa2ac09ba != nil { + x.allocsa2ac09ba.(*cgoAllocMap).Free() + x.refa2ac09ba = nil + } +} + +// NewFilBLSSignatureRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilBLSSignatureRef(ref unsafe.Pointer) *FilBLSSignature { + if ref == nil { + return nil + } + obj := new(FilBLSSignature) + obj.refa2ac09ba = (*C.fil_BLSSignature)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilBLSSignature) PassRef() (*C.fil_BLSSignature, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refa2ac09ba != nil { + return x.refa2ac09ba, nil + } + mema2ac09ba := allocFilBLSSignatureMemory(1) + refa2ac09ba := (*C.fil_BLSSignature)(mema2ac09ba) + allocsa2ac09ba := new(cgoAllocMap) + allocsa2ac09ba.Add(mema2ac09ba) + + var cinner_allocs *cgoAllocMap + refa2ac09ba.inner, cinner_allocs = *(*[96]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocsa2ac09ba.Borrow(cinner_allocs) + + x.refa2ac09ba = refa2ac09ba + x.allocsa2ac09ba = allocsa2ac09ba + return refa2ac09ba, allocsa2ac09ba + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilBLSSignature) PassValue() (C.fil_BLSSignature, *cgoAllocMap) { + if x.refa2ac09ba != nil { + return *x.refa2ac09ba, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilBLSSignature) Deref() { + if x.refa2ac09ba == nil { + return + } + x.Inner = *(*[96]byte)(unsafe.Pointer(&x.refa2ac09ba.inner)) +} + +// allocFilAggregateResponseMemory allocates memory for type C.fil_AggregateResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilAggregateResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilAggregateResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilAggregateResponseValue = unsafe.Sizeof([1]C.fil_AggregateResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilAggregateResponse) Ref() *C.fil_AggregateResponse { + if x == nil { + return nil + } + return x.refb3efa36d +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilAggregateResponse) Free() { + if x != nil && x.allocsb3efa36d != nil { + x.allocsb3efa36d.(*cgoAllocMap).Free() + x.refb3efa36d = nil + } +} + +// NewFilAggregateResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilAggregateResponseRef(ref unsafe.Pointer) *FilAggregateResponse { + if ref == nil { + return nil + } + obj := new(FilAggregateResponse) + obj.refb3efa36d = (*C.fil_AggregateResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilAggregateResponse) PassRef() (*C.fil_AggregateResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refb3efa36d != nil { + return x.refb3efa36d, nil + } + memb3efa36d := allocFilAggregateResponseMemory(1) + refb3efa36d := (*C.fil_AggregateResponse)(memb3efa36d) + allocsb3efa36d := new(cgoAllocMap) + allocsb3efa36d.Add(memb3efa36d) + + var csignature_allocs *cgoAllocMap + refb3efa36d.signature, csignature_allocs = x.Signature.PassValue() + allocsb3efa36d.Borrow(csignature_allocs) + + x.refb3efa36d = refb3efa36d + x.allocsb3efa36d = allocsb3efa36d + return refb3efa36d, allocsb3efa36d + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilAggregateResponse) PassValue() (C.fil_AggregateResponse, *cgoAllocMap) { + if x.refb3efa36d != nil { + return *x.refb3efa36d, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilAggregateResponse) Deref() { + if x.refb3efa36d == nil { + return + } + x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.refb3efa36d.signature)) +} + +// allocFilClearCacheResponseMemory allocates memory for type C.fil_ClearCacheResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilClearCacheResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilClearCacheResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilClearCacheResponseValue = unsafe.Sizeof([1]C.fil_ClearCacheResponse{}) + +// unpackPCharString represents the data from Go string as *C.char and avoids copying. +func unpackPCharString(str string) (*C.char, *cgoAllocMap) { + str = safeString(str) + h := (*stringHeader)(unsafe.Pointer(&str)) + return (*C.char)(h.Data), cgoAllocsUnknown +} + +type stringHeader struct { + Data unsafe.Pointer + Len int +} + +// safeString ensures that the string is NULL-terminated, a NULL-terminated copy is created otherwise. +func safeString(str string) string { + if len(str) > 0 && str[len(str)-1] != '\x00' { + str = str + "\x00" + } else if len(str) == 0 { + str = "\x00" + } + return str +} + +// packPCharString creates a Go string backed by *C.char and avoids copying. +func packPCharString(p *C.char) (raw string) { + if p != nil && *p != 0 { + h := (*stringHeader)(unsafe.Pointer(&raw)) + h.Data = unsafe.Pointer(p) + for *p != 0 { + p = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + 1)) // p++ + } + h.Len = int(uintptr(unsafe.Pointer(p)) - uintptr(h.Data)) + } + return +} + +// RawString reperesents a string backed by data on the C side. +type RawString string + +// Copy returns a Go-managed copy of raw string. +func (raw RawString) Copy() string { + if len(raw) == 0 { + return "" + } + h := (*stringHeader)(unsafe.Pointer(&raw)) + return C.GoStringN((*C.char)(h.Data), C.int(h.Len)) +} + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilClearCacheResponse) Ref() *C.fil_ClearCacheResponse { + if x == nil { + return nil + } + return x.refa9a80400 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilClearCacheResponse) Free() { + if x != nil && x.allocsa9a80400 != nil { + x.allocsa9a80400.(*cgoAllocMap).Free() + x.refa9a80400 = nil + } +} + +// NewFilClearCacheResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilClearCacheResponseRef(ref unsafe.Pointer) *FilClearCacheResponse { + if ref == nil { + return nil + } + obj := new(FilClearCacheResponse) + obj.refa9a80400 = (*C.fil_ClearCacheResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilClearCacheResponse) PassRef() (*C.fil_ClearCacheResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refa9a80400 != nil { + return x.refa9a80400, nil + } + mema9a80400 := allocFilClearCacheResponseMemory(1) + refa9a80400 := (*C.fil_ClearCacheResponse)(mema9a80400) + allocsa9a80400 := new(cgoAllocMap) + allocsa9a80400.Add(mema9a80400) + + var cerror_msg_allocs *cgoAllocMap + refa9a80400.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsa9a80400.Borrow(cerror_msg_allocs) + + var cstatus_code_allocs *cgoAllocMap + refa9a80400.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsa9a80400.Borrow(cstatus_code_allocs) + + x.refa9a80400 = refa9a80400 + x.allocsa9a80400 = allocsa9a80400 + return refa9a80400, allocsa9a80400 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilClearCacheResponse) PassValue() (C.fil_ClearCacheResponse, *cgoAllocMap) { + if x.refa9a80400 != nil { + return *x.refa9a80400, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilClearCacheResponse) Deref() { + if x.refa9a80400 == nil { + return + } + x.ErrorMsg = packPCharString(x.refa9a80400.error_msg) + x.StatusCode = (FCPResponseStatus)(x.refa9a80400.status_code) +} + +// allocFilFauxRepResponseMemory allocates memory for type C.fil_FauxRepResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilFauxRepResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFauxRepResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilFauxRepResponseValue = unsafe.Sizeof([1]C.fil_FauxRepResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilFauxRepResponse) Ref() *C.fil_FauxRepResponse { + if x == nil { + return nil + } + return x.refaa003f71 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilFauxRepResponse) Free() { + if x != nil && x.allocsaa003f71 != nil { + x.allocsaa003f71.(*cgoAllocMap).Free() + x.refaa003f71 = nil + } +} + +// NewFilFauxRepResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilFauxRepResponseRef(ref unsafe.Pointer) *FilFauxRepResponse { + if ref == nil { + return nil + } + obj := new(FilFauxRepResponse) + obj.refaa003f71 = (*C.fil_FauxRepResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilFauxRepResponse) PassRef() (*C.fil_FauxRepResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refaa003f71 != nil { + return x.refaa003f71, nil + } + memaa003f71 := allocFilFauxRepResponseMemory(1) + refaa003f71 := (*C.fil_FauxRepResponse)(memaa003f71) + allocsaa003f71 := new(cgoAllocMap) + allocsaa003f71.Add(memaa003f71) + + var cerror_msg_allocs *cgoAllocMap + refaa003f71.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsaa003f71.Borrow(cerror_msg_allocs) + + var cstatus_code_allocs *cgoAllocMap + refaa003f71.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsaa003f71.Borrow(cstatus_code_allocs) + + var ccommitment_allocs *cgoAllocMap + refaa003f71.commitment, ccommitment_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Commitment)), cgoAllocsUnknown + allocsaa003f71.Borrow(ccommitment_allocs) + + x.refaa003f71 = refaa003f71 + x.allocsaa003f71 = allocsaa003f71 + return refaa003f71, allocsaa003f71 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilFauxRepResponse) PassValue() (C.fil_FauxRepResponse, *cgoAllocMap) { + if x.refaa003f71 != nil { + return *x.refaa003f71, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilFauxRepResponse) Deref() { + if x.refaa003f71 == nil { + return + } + x.ErrorMsg = packPCharString(x.refaa003f71.error_msg) + x.StatusCode = (FCPResponseStatus)(x.refaa003f71.status_code) + x.Commitment = *(*[32]byte)(unsafe.Pointer(&x.refaa003f71.commitment)) +} + +// allocFilFinalizeTicketResponseMemory allocates memory for type C.fil_FinalizeTicketResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilFinalizeTicketResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFinalizeTicketResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilFinalizeTicketResponseValue = unsafe.Sizeof([1]C.fil_FinalizeTicketResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilFinalizeTicketResponse) Ref() *C.fil_FinalizeTicketResponse { + if x == nil { + return nil + } + return x.refb370fa86 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilFinalizeTicketResponse) Free() { + if x != nil && x.allocsb370fa86 != nil { + x.allocsb370fa86.(*cgoAllocMap).Free() + x.refb370fa86 = nil + } +} + +// NewFilFinalizeTicketResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilFinalizeTicketResponseRef(ref unsafe.Pointer) *FilFinalizeTicketResponse { + if ref == nil { + return nil + } + obj := new(FilFinalizeTicketResponse) + obj.refb370fa86 = (*C.fil_FinalizeTicketResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilFinalizeTicketResponse) PassRef() (*C.fil_FinalizeTicketResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refb370fa86 != nil { + return x.refb370fa86, nil + } + memb370fa86 := allocFilFinalizeTicketResponseMemory(1) + refb370fa86 := (*C.fil_FinalizeTicketResponse)(memb370fa86) + allocsb370fa86 := new(cgoAllocMap) + allocsb370fa86.Add(memb370fa86) + + var cstatus_code_allocs *cgoAllocMap + refb370fa86.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsb370fa86.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + refb370fa86.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsb370fa86.Borrow(cerror_msg_allocs) + + var cticket_allocs *cgoAllocMap + refb370fa86.ticket, cticket_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Ticket)), cgoAllocsUnknown + allocsb370fa86.Borrow(cticket_allocs) + + x.refb370fa86 = refb370fa86 + x.allocsb370fa86 = allocsb370fa86 + return refb370fa86, allocsb370fa86 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilFinalizeTicketResponse) PassValue() (C.fil_FinalizeTicketResponse, *cgoAllocMap) { + if x.refb370fa86 != nil { + return *x.refb370fa86, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilFinalizeTicketResponse) Deref() { + if x.refb370fa86 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.refb370fa86.status_code) + x.ErrorMsg = packPCharString(x.refb370fa86.error_msg) + x.Ticket = *(*[32]byte)(unsafe.Pointer(&x.refb370fa86.ticket)) +} + +// allocFilGenerateDataCommitmentResponseMemory allocates memory for type C.fil_GenerateDataCommitmentResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilGenerateDataCommitmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateDataCommitmentResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilGenerateDataCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GenerateDataCommitmentResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilGenerateDataCommitmentResponse) Ref() *C.fil_GenerateDataCommitmentResponse { + if x == nil { + return nil + } + return x.ref87da7dd9 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilGenerateDataCommitmentResponse) Free() { + if x != nil && x.allocs87da7dd9 != nil { + x.allocs87da7dd9.(*cgoAllocMap).Free() + x.ref87da7dd9 = nil + } +} + +// NewFilGenerateDataCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilGenerateDataCommitmentResponseRef(ref unsafe.Pointer) *FilGenerateDataCommitmentResponse { + if ref == nil { + return nil + } + obj := new(FilGenerateDataCommitmentResponse) + obj.ref87da7dd9 = (*C.fil_GenerateDataCommitmentResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilGenerateDataCommitmentResponse) PassRef() (*C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref87da7dd9 != nil { + return x.ref87da7dd9, nil + } + mem87da7dd9 := allocFilGenerateDataCommitmentResponseMemory(1) + ref87da7dd9 := (*C.fil_GenerateDataCommitmentResponse)(mem87da7dd9) + allocs87da7dd9 := new(cgoAllocMap) + allocs87da7dd9.Add(mem87da7dd9) + + var cstatus_code_allocs *cgoAllocMap + ref87da7dd9.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs87da7dd9.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref87da7dd9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs87da7dd9.Borrow(cerror_msg_allocs) + + var ccomm_d_allocs *cgoAllocMap + ref87da7dd9.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown + allocs87da7dd9.Borrow(ccomm_d_allocs) + + x.ref87da7dd9 = ref87da7dd9 + x.allocs87da7dd9 = allocs87da7dd9 + return ref87da7dd9, allocs87da7dd9 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilGenerateDataCommitmentResponse) PassValue() (C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { + if x.ref87da7dd9 != nil { + return *x.ref87da7dd9, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilGenerateDataCommitmentResponse) Deref() { + if x.ref87da7dd9 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref87da7dd9.status_code) + x.ErrorMsg = packPCharString(x.ref87da7dd9.error_msg) + x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref87da7dd9.comm_d)) +} + +// allocFilGeneratePieceCommitmentResponseMemory allocates memory for type C.fil_GeneratePieceCommitmentResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilGeneratePieceCommitmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGeneratePieceCommitmentResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilGeneratePieceCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GeneratePieceCommitmentResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilGeneratePieceCommitmentResponse) Ref() *C.fil_GeneratePieceCommitmentResponse { + if x == nil { + return nil + } + return x.ref4b00fda4 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilGeneratePieceCommitmentResponse) Free() { + if x != nil && x.allocs4b00fda4 != nil { + x.allocs4b00fda4.(*cgoAllocMap).Free() + x.ref4b00fda4 = nil + } +} + +// NewFilGeneratePieceCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilGeneratePieceCommitmentResponseRef(ref unsafe.Pointer) *FilGeneratePieceCommitmentResponse { + if ref == nil { + return nil + } + obj := new(FilGeneratePieceCommitmentResponse) + obj.ref4b00fda4 = (*C.fil_GeneratePieceCommitmentResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilGeneratePieceCommitmentResponse) PassRef() (*C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref4b00fda4 != nil { + return x.ref4b00fda4, nil + } + mem4b00fda4 := allocFilGeneratePieceCommitmentResponseMemory(1) + ref4b00fda4 := (*C.fil_GeneratePieceCommitmentResponse)(mem4b00fda4) + allocs4b00fda4 := new(cgoAllocMap) + allocs4b00fda4.Add(mem4b00fda4) + + var cstatus_code_allocs *cgoAllocMap + ref4b00fda4.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs4b00fda4.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref4b00fda4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs4b00fda4.Borrow(cerror_msg_allocs) + + var ccomm_p_allocs *cgoAllocMap + ref4b00fda4.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocs4b00fda4.Borrow(ccomm_p_allocs) + + var cnum_bytes_aligned_allocs *cgoAllocMap + ref4b00fda4.num_bytes_aligned, cnum_bytes_aligned_allocs = (C.uint64_t)(x.NumBytesAligned), cgoAllocsUnknown + allocs4b00fda4.Borrow(cnum_bytes_aligned_allocs) + + x.ref4b00fda4 = ref4b00fda4 + x.allocs4b00fda4 = allocs4b00fda4 + return ref4b00fda4, allocs4b00fda4 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilGeneratePieceCommitmentResponse) PassValue() (C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { + if x.ref4b00fda4 != nil { + return *x.ref4b00fda4, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilGeneratePieceCommitmentResponse) Deref() { + if x.ref4b00fda4 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref4b00fda4.status_code) + x.ErrorMsg = packPCharString(x.ref4b00fda4.error_msg) + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.ref4b00fda4.comm_p)) + x.NumBytesAligned = (uint64)(x.ref4b00fda4.num_bytes_aligned) +} + +// allocFilPoStProofMemory allocates memory for type C.fil_PoStProof in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPoStProofMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPoStProofValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPoStProofValue = unsafe.Sizeof([1]C.fil_PoStProof{}) + +// unpackPUint8TString represents the data from Go string as *C.uint8_t and avoids copying. +func unpackPUint8TString(str string) (*C.uint8_t, *cgoAllocMap) { + str = safeString(str) + h := (*stringHeader)(unsafe.Pointer(&str)) + return (*C.uint8_t)(h.Data), cgoAllocsUnknown +} + +// packPUint8TString creates a Go string backed by *C.uint8_t and avoids copying. +func packPUint8TString(p *C.uint8_t) (raw string) { + if p != nil && *p != 0 { + h := (*stringHeader)(unsafe.Pointer(&raw)) + h.Data = unsafe.Pointer(p) + for *p != 0 { + p = (*C.uint8_t)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + 1)) // p++ + } + h.Len = int(uintptr(unsafe.Pointer(p)) - uintptr(h.Data)) + } + return +} + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilPoStProof) Ref() *C.fil_PoStProof { + if x == nil { + return nil + } + return x.ref3451bfa +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilPoStProof) Free() { + if x != nil && x.allocs3451bfa != nil { + x.allocs3451bfa.(*cgoAllocMap).Free() + x.ref3451bfa = nil + } +} + +// NewFilPoStProofRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilPoStProofRef(ref unsafe.Pointer) *FilPoStProof { + if ref == nil { + return nil + } + obj := new(FilPoStProof) + obj.ref3451bfa = (*C.fil_PoStProof)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilPoStProof) PassRef() (*C.fil_PoStProof, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref3451bfa != nil { + return x.ref3451bfa, nil + } + mem3451bfa := allocFilPoStProofMemory(1) + ref3451bfa := (*C.fil_PoStProof)(mem3451bfa) + allocs3451bfa := new(cgoAllocMap) + allocs3451bfa.Add(mem3451bfa) + + var cregistered_proof_allocs *cgoAllocMap + ref3451bfa.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown + allocs3451bfa.Borrow(cregistered_proof_allocs) + + var cproof_len_allocs *cgoAllocMap + ref3451bfa.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs3451bfa.Borrow(cproof_len_allocs) + + var cproof_ptr_allocs *cgoAllocMap + ref3451bfa.proof_ptr, cproof_ptr_allocs = unpackPUint8TString(x.ProofPtr) + allocs3451bfa.Borrow(cproof_ptr_allocs) + + x.ref3451bfa = ref3451bfa + x.allocs3451bfa = allocs3451bfa + return ref3451bfa, allocs3451bfa + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilPoStProof) PassValue() (C.fil_PoStProof, *cgoAllocMap) { + if x.ref3451bfa != nil { + return *x.ref3451bfa, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilPoStProof) Deref() { + if x.ref3451bfa == nil { + return + } + x.RegisteredProof = (FilRegisteredPoStProof)(x.ref3451bfa.registered_proof) + x.ProofLen = (uint)(x.ref3451bfa.proof_len) + x.ProofPtr = packPUint8TString(x.ref3451bfa.proof_ptr) +} + +// allocFilGenerateWindowPoStResponseMemory allocates memory for type C.fil_GenerateWindowPoStResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilGenerateWindowPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWindowPoStResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilGenerateWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWindowPoStResponse{}) + +type sliceHeader struct { + Data unsafe.Pointer + Len int + Cap int +} + +const sizeOfPtr = unsafe.Sizeof(&struct{}{}) + +// unpackSFilPoStProof transforms a sliced Go data structure into plain C format. +func unpackSFilPoStProof(x []FilPoStProof) (unpacked *C.fil_PoStProof, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocFilPoStProofMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.fil_PoStProof)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.fil_PoStProof)(h.Data) + return +} + +// packSFilPoStProof reads sliced Go data structure out from plain C format. +func packSFilPoStProof(v []FilPoStProof, ptr0 *C.fil_PoStProof) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfFilPoStProofValue]C.fil_PoStProof)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPoStProofRef(unsafe.Pointer(&ptr1)) + } +} + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilGenerateWindowPoStResponse) Ref() *C.fil_GenerateWindowPoStResponse { + if x == nil { + return nil + } + return x.ref2a5f3ba8 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilGenerateWindowPoStResponse) Free() { + if x != nil && x.allocs2a5f3ba8 != nil { + x.allocs2a5f3ba8.(*cgoAllocMap).Free() + x.ref2a5f3ba8 = nil + } +} + +// NewFilGenerateWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilGenerateWindowPoStResponseRef(ref unsafe.Pointer) *FilGenerateWindowPoStResponse { + if ref == nil { + return nil + } + obj := new(FilGenerateWindowPoStResponse) + obj.ref2a5f3ba8 = (*C.fil_GenerateWindowPoStResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilGenerateWindowPoStResponse) PassRef() (*C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref2a5f3ba8 != nil { + return x.ref2a5f3ba8, nil + } + mem2a5f3ba8 := allocFilGenerateWindowPoStResponseMemory(1) + ref2a5f3ba8 := (*C.fil_GenerateWindowPoStResponse)(mem2a5f3ba8) + allocs2a5f3ba8 := new(cgoAllocMap) + allocs2a5f3ba8.Add(mem2a5f3ba8) + + var cerror_msg_allocs *cgoAllocMap + ref2a5f3ba8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs2a5f3ba8.Borrow(cerror_msg_allocs) + + var cproofs_len_allocs *cgoAllocMap + ref2a5f3ba8.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown + allocs2a5f3ba8.Borrow(cproofs_len_allocs) + + var cproofs_ptr_allocs *cgoAllocMap + ref2a5f3ba8.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) + allocs2a5f3ba8.Borrow(cproofs_ptr_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref2a5f3ba8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs2a5f3ba8.Borrow(cstatus_code_allocs) + + x.ref2a5f3ba8 = ref2a5f3ba8 + x.allocs2a5f3ba8 = allocs2a5f3ba8 + return ref2a5f3ba8, allocs2a5f3ba8 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilGenerateWindowPoStResponse) PassValue() (C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { + if x.ref2a5f3ba8 != nil { + return *x.ref2a5f3ba8, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilGenerateWindowPoStResponse) Deref() { + if x.ref2a5f3ba8 == nil { + return + } + x.ErrorMsg = packPCharString(x.ref2a5f3ba8.error_msg) + x.ProofsLen = (uint)(x.ref2a5f3ba8.proofs_len) + packSFilPoStProof(x.ProofsPtr, x.ref2a5f3ba8.proofs_ptr) + x.StatusCode = (FCPResponseStatus)(x.ref2a5f3ba8.status_code) +} + +// allocFilGenerateWinningPoStResponseMemory allocates memory for type C.fil_GenerateWinningPoStResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilGenerateWinningPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilGenerateWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilGenerateWinningPoStResponse) Ref() *C.fil_GenerateWinningPoStResponse { + if x == nil { + return nil + } + return x.ref1405b8ec +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilGenerateWinningPoStResponse) Free() { + if x != nil && x.allocs1405b8ec != nil { + x.allocs1405b8ec.(*cgoAllocMap).Free() + x.ref1405b8ec = nil + } +} + +// NewFilGenerateWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilGenerateWinningPoStResponseRef(ref unsafe.Pointer) *FilGenerateWinningPoStResponse { + if ref == nil { + return nil + } + obj := new(FilGenerateWinningPoStResponse) + obj.ref1405b8ec = (*C.fil_GenerateWinningPoStResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilGenerateWinningPoStResponse) PassRef() (*C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref1405b8ec != nil { + return x.ref1405b8ec, nil + } + mem1405b8ec := allocFilGenerateWinningPoStResponseMemory(1) + ref1405b8ec := (*C.fil_GenerateWinningPoStResponse)(mem1405b8ec) + allocs1405b8ec := new(cgoAllocMap) + allocs1405b8ec.Add(mem1405b8ec) + + var cerror_msg_allocs *cgoAllocMap + ref1405b8ec.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs1405b8ec.Borrow(cerror_msg_allocs) + + var cproofs_len_allocs *cgoAllocMap + ref1405b8ec.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown + allocs1405b8ec.Borrow(cproofs_len_allocs) + + var cproofs_ptr_allocs *cgoAllocMap + ref1405b8ec.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) + allocs1405b8ec.Borrow(cproofs_ptr_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref1405b8ec.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs1405b8ec.Borrow(cstatus_code_allocs) + + x.ref1405b8ec = ref1405b8ec + x.allocs1405b8ec = allocs1405b8ec + return ref1405b8ec, allocs1405b8ec + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilGenerateWinningPoStResponse) PassValue() (C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { + if x.ref1405b8ec != nil { + return *x.ref1405b8ec, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilGenerateWinningPoStResponse) Deref() { + if x.ref1405b8ec == nil { + return + } + x.ErrorMsg = packPCharString(x.ref1405b8ec.error_msg) + x.ProofsLen = (uint)(x.ref1405b8ec.proofs_len) + packSFilPoStProof(x.ProofsPtr, x.ref1405b8ec.proofs_ptr) + x.StatusCode = (FCPResponseStatus)(x.ref1405b8ec.status_code) +} + +// allocFilGenerateWinningPoStSectorChallengeMemory allocates memory for type C.fil_GenerateWinningPoStSectorChallenge in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilGenerateWinningPoStSectorChallengeMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStSectorChallengeValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilGenerateWinningPoStSectorChallengeValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStSectorChallenge{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilGenerateWinningPoStSectorChallenge) Ref() *C.fil_GenerateWinningPoStSectorChallenge { + if x == nil { + return nil + } + return x.ref69d2a405 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilGenerateWinningPoStSectorChallenge) Free() { + if x != nil && x.allocs69d2a405 != nil { + x.allocs69d2a405.(*cgoAllocMap).Free() + x.ref69d2a405 = nil + } +} + +// NewFilGenerateWinningPoStSectorChallengeRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilGenerateWinningPoStSectorChallengeRef(ref unsafe.Pointer) *FilGenerateWinningPoStSectorChallenge { + if ref == nil { + return nil + } + obj := new(FilGenerateWinningPoStSectorChallenge) + obj.ref69d2a405 = (*C.fil_GenerateWinningPoStSectorChallenge)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilGenerateWinningPoStSectorChallenge) PassRef() (*C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref69d2a405 != nil { + return x.ref69d2a405, nil + } + mem69d2a405 := allocFilGenerateWinningPoStSectorChallengeMemory(1) + ref69d2a405 := (*C.fil_GenerateWinningPoStSectorChallenge)(mem69d2a405) + allocs69d2a405 := new(cgoAllocMap) + allocs69d2a405.Add(mem69d2a405) + + var cerror_msg_allocs *cgoAllocMap + ref69d2a405.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs69d2a405.Borrow(cerror_msg_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref69d2a405.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs69d2a405.Borrow(cstatus_code_allocs) + + var cids_ptr_allocs *cgoAllocMap + ref69d2a405.ids_ptr, cids_ptr_allocs = (*C.uint64_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&x.IdsPtr)).Data)), cgoAllocsUnknown + allocs69d2a405.Borrow(cids_ptr_allocs) + + var cids_len_allocs *cgoAllocMap + ref69d2a405.ids_len, cids_len_allocs = (C.size_t)(x.IdsLen), cgoAllocsUnknown + allocs69d2a405.Borrow(cids_len_allocs) + + x.ref69d2a405 = ref69d2a405 + x.allocs69d2a405 = allocs69d2a405 + return ref69d2a405, allocs69d2a405 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilGenerateWinningPoStSectorChallenge) PassValue() (C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { + if x.ref69d2a405 != nil { + return *x.ref69d2a405, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilGenerateWinningPoStSectorChallenge) Deref() { + if x.ref69d2a405 == nil { + return + } + x.ErrorMsg = packPCharString(x.ref69d2a405.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref69d2a405.status_code) + hxfc4425b := (*sliceHeader)(unsafe.Pointer(&x.IdsPtr)) + hxfc4425b.Data = unsafe.Pointer(x.ref69d2a405.ids_ptr) + hxfc4425b.Cap = 0x7fffffff + // hxfc4425b.Len = ? + + x.IdsLen = (uint)(x.ref69d2a405.ids_len) +} + +// allocFilGpuDeviceResponseMemory allocates memory for type C.fil_GpuDeviceResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilGpuDeviceResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGpuDeviceResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilGpuDeviceResponseValue = unsafe.Sizeof([1]C.fil_GpuDeviceResponse{}) + +// allocPCharMemory allocates memory for type *C.char in C. +// The caller is responsible for freeing the this memory via C.free. +func allocPCharMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfPCharValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfPCharValue = unsafe.Sizeof([1]*C.char{}) + +// unpackSString transforms a sliced Go data structure into plain C format. +func unpackSString(x []string) (unpacked **C.char, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocPCharMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]*C.char)(unsafe.Pointer(h0)) + for i0 := range x { + v0[i0], _ = unpackPCharString(x[i0]) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (**C.char)(h.Data) + return +} + +// packSString reads sliced Go data structure out from plain C format. +func packSString(v []string, ptr0 **C.char) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfPtr]*C.char)(unsafe.Pointer(ptr0)))[i0] + v[i0] = packPCharString(ptr1) + } +} + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilGpuDeviceResponse) Ref() *C.fil_GpuDeviceResponse { + if x == nil { + return nil + } + return x.ref58f92915 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilGpuDeviceResponse) Free() { + if x != nil && x.allocs58f92915 != nil { + x.allocs58f92915.(*cgoAllocMap).Free() + x.ref58f92915 = nil + } +} + +// NewFilGpuDeviceResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilGpuDeviceResponseRef(ref unsafe.Pointer) *FilGpuDeviceResponse { + if ref == nil { + return nil + } + obj := new(FilGpuDeviceResponse) + obj.ref58f92915 = (*C.fil_GpuDeviceResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilGpuDeviceResponse) PassRef() (*C.fil_GpuDeviceResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref58f92915 != nil { + return x.ref58f92915, nil + } + mem58f92915 := allocFilGpuDeviceResponseMemory(1) + ref58f92915 := (*C.fil_GpuDeviceResponse)(mem58f92915) + allocs58f92915 := new(cgoAllocMap) + allocs58f92915.Add(mem58f92915) + + var cstatus_code_allocs *cgoAllocMap + ref58f92915.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs58f92915.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref58f92915.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs58f92915.Borrow(cerror_msg_allocs) + + var cdevices_len_allocs *cgoAllocMap + ref58f92915.devices_len, cdevices_len_allocs = (C.size_t)(x.DevicesLen), cgoAllocsUnknown + allocs58f92915.Borrow(cdevices_len_allocs) + + var cdevices_ptr_allocs *cgoAllocMap + ref58f92915.devices_ptr, cdevices_ptr_allocs = unpackSString(x.DevicesPtr) + allocs58f92915.Borrow(cdevices_ptr_allocs) + + x.ref58f92915 = ref58f92915 + x.allocs58f92915 = allocs58f92915 + return ref58f92915, allocs58f92915 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilGpuDeviceResponse) PassValue() (C.fil_GpuDeviceResponse, *cgoAllocMap) { + if x.ref58f92915 != nil { + return *x.ref58f92915, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilGpuDeviceResponse) Deref() { + if x.ref58f92915 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref58f92915.status_code) + x.ErrorMsg = packPCharString(x.ref58f92915.error_msg) + x.DevicesLen = (uint)(x.ref58f92915.devices_len) + packSString(x.DevicesPtr, x.ref58f92915.devices_ptr) +} + +// allocFilBLSDigestMemory allocates memory for type C.fil_BLSDigest in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilBLSDigestMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSDigestValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilBLSDigestValue = unsafe.Sizeof([1]C.fil_BLSDigest{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilBLSDigest) Ref() *C.fil_BLSDigest { + if x == nil { + return nil + } + return x.ref215fc78c +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilBLSDigest) Free() { + if x != nil && x.allocs215fc78c != nil { + x.allocs215fc78c.(*cgoAllocMap).Free() + x.ref215fc78c = nil + } +} + +// NewFilBLSDigestRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilBLSDigestRef(ref unsafe.Pointer) *FilBLSDigest { + if ref == nil { + return nil + } + obj := new(FilBLSDigest) + obj.ref215fc78c = (*C.fil_BLSDigest)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilBLSDigest) PassRef() (*C.fil_BLSDigest, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref215fc78c != nil { + return x.ref215fc78c, nil + } + mem215fc78c := allocFilBLSDigestMemory(1) + ref215fc78c := (*C.fil_BLSDigest)(mem215fc78c) + allocs215fc78c := new(cgoAllocMap) + allocs215fc78c.Add(mem215fc78c) + + var cinner_allocs *cgoAllocMap + ref215fc78c.inner, cinner_allocs = *(*[96]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocs215fc78c.Borrow(cinner_allocs) + + x.ref215fc78c = ref215fc78c + x.allocs215fc78c = allocs215fc78c + return ref215fc78c, allocs215fc78c + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilBLSDigest) PassValue() (C.fil_BLSDigest, *cgoAllocMap) { + if x.ref215fc78c != nil { + return *x.ref215fc78c, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilBLSDigest) Deref() { + if x.ref215fc78c == nil { + return + } + x.Inner = *(*[96]byte)(unsafe.Pointer(&x.ref215fc78c.inner)) +} + +// allocFilHashResponseMemory allocates memory for type C.fil_HashResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilHashResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilHashResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilHashResponseValue = unsafe.Sizeof([1]C.fil_HashResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilHashResponse) Ref() *C.fil_HashResponse { + if x == nil { + return nil + } + return x.refc52a22ef +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilHashResponse) Free() { + if x != nil && x.allocsc52a22ef != nil { + x.allocsc52a22ef.(*cgoAllocMap).Free() + x.refc52a22ef = nil + } +} + +// NewFilHashResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilHashResponseRef(ref unsafe.Pointer) *FilHashResponse { + if ref == nil { + return nil + } + obj := new(FilHashResponse) + obj.refc52a22ef = (*C.fil_HashResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilHashResponse) PassRef() (*C.fil_HashResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refc52a22ef != nil { + return x.refc52a22ef, nil + } + memc52a22ef := allocFilHashResponseMemory(1) + refc52a22ef := (*C.fil_HashResponse)(memc52a22ef) + allocsc52a22ef := new(cgoAllocMap) + allocsc52a22ef.Add(memc52a22ef) + + var cdigest_allocs *cgoAllocMap + refc52a22ef.digest, cdigest_allocs = x.Digest.PassValue() + allocsc52a22ef.Borrow(cdigest_allocs) + + x.refc52a22ef = refc52a22ef + x.allocsc52a22ef = allocsc52a22ef + return refc52a22ef, allocsc52a22ef + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilHashResponse) PassValue() (C.fil_HashResponse, *cgoAllocMap) { + if x.refc52a22ef != nil { + return *x.refc52a22ef, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilHashResponse) Deref() { + if x.refc52a22ef == nil { + return + } + x.Digest = *NewFilBLSDigestRef(unsafe.Pointer(&x.refc52a22ef.digest)) +} + +// allocFilInitLogFdResponseMemory allocates memory for type C.fil_InitLogFdResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilInitLogFdResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilInitLogFdResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilInitLogFdResponseValue = unsafe.Sizeof([1]C.fil_InitLogFdResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilInitLogFdResponse) Ref() *C.fil_InitLogFdResponse { + if x == nil { + return nil + } + return x.ref3c1a0a08 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilInitLogFdResponse) Free() { + if x != nil && x.allocs3c1a0a08 != nil { + x.allocs3c1a0a08.(*cgoAllocMap).Free() + x.ref3c1a0a08 = nil + } +} + +// NewFilInitLogFdResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilInitLogFdResponseRef(ref unsafe.Pointer) *FilInitLogFdResponse { + if ref == nil { + return nil + } + obj := new(FilInitLogFdResponse) + obj.ref3c1a0a08 = (*C.fil_InitLogFdResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilInitLogFdResponse) PassRef() (*C.fil_InitLogFdResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref3c1a0a08 != nil { + return x.ref3c1a0a08, nil + } + mem3c1a0a08 := allocFilInitLogFdResponseMemory(1) + ref3c1a0a08 := (*C.fil_InitLogFdResponse)(mem3c1a0a08) + allocs3c1a0a08 := new(cgoAllocMap) + allocs3c1a0a08.Add(mem3c1a0a08) + + var cstatus_code_allocs *cgoAllocMap + ref3c1a0a08.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs3c1a0a08.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref3c1a0a08.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs3c1a0a08.Borrow(cerror_msg_allocs) + + x.ref3c1a0a08 = ref3c1a0a08 + x.allocs3c1a0a08 = allocs3c1a0a08 + return ref3c1a0a08, allocs3c1a0a08 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilInitLogFdResponse) PassValue() (C.fil_InitLogFdResponse, *cgoAllocMap) { + if x.ref3c1a0a08 != nil { + return *x.ref3c1a0a08, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilInitLogFdResponse) Deref() { + if x.ref3c1a0a08 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref3c1a0a08.status_code) + x.ErrorMsg = packPCharString(x.ref3c1a0a08.error_msg) +} + +// allocFilBLSPrivateKeyMemory allocates memory for type C.fil_BLSPrivateKey in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilBLSPrivateKeyMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPrivateKeyValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilBLSPrivateKeyValue = unsafe.Sizeof([1]C.fil_BLSPrivateKey{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilBLSPrivateKey) Ref() *C.fil_BLSPrivateKey { + if x == nil { + return nil + } + return x.ref2f77fe3a +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilBLSPrivateKey) Free() { + if x != nil && x.allocs2f77fe3a != nil { + x.allocs2f77fe3a.(*cgoAllocMap).Free() + x.ref2f77fe3a = nil + } +} + +// NewFilBLSPrivateKeyRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilBLSPrivateKeyRef(ref unsafe.Pointer) *FilBLSPrivateKey { + if ref == nil { + return nil + } + obj := new(FilBLSPrivateKey) + obj.ref2f77fe3a = (*C.fil_BLSPrivateKey)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilBLSPrivateKey) PassRef() (*C.fil_BLSPrivateKey, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref2f77fe3a != nil { + return x.ref2f77fe3a, nil + } + mem2f77fe3a := allocFilBLSPrivateKeyMemory(1) + ref2f77fe3a := (*C.fil_BLSPrivateKey)(mem2f77fe3a) + allocs2f77fe3a := new(cgoAllocMap) + allocs2f77fe3a.Add(mem2f77fe3a) + + var cinner_allocs *cgoAllocMap + ref2f77fe3a.inner, cinner_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocs2f77fe3a.Borrow(cinner_allocs) + + x.ref2f77fe3a = ref2f77fe3a + x.allocs2f77fe3a = allocs2f77fe3a + return ref2f77fe3a, allocs2f77fe3a + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilBLSPrivateKey) PassValue() (C.fil_BLSPrivateKey, *cgoAllocMap) { + if x.ref2f77fe3a != nil { + return *x.ref2f77fe3a, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilBLSPrivateKey) Deref() { + if x.ref2f77fe3a == nil { + return + } + x.Inner = *(*[32]byte)(unsafe.Pointer(&x.ref2f77fe3a.inner)) +} + +// allocFilPrivateKeyGenerateResponseMemory allocates memory for type C.fil_PrivateKeyGenerateResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPrivateKeyGenerateResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyGenerateResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPrivateKeyGenerateResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyGenerateResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilPrivateKeyGenerateResponse) Ref() *C.fil_PrivateKeyGenerateResponse { + if x == nil { + return nil + } + return x.ref2dba09f +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilPrivateKeyGenerateResponse) Free() { + if x != nil && x.allocs2dba09f != nil { + x.allocs2dba09f.(*cgoAllocMap).Free() + x.ref2dba09f = nil + } +} + +// NewFilPrivateKeyGenerateResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilPrivateKeyGenerateResponseRef(ref unsafe.Pointer) *FilPrivateKeyGenerateResponse { + if ref == nil { + return nil + } + obj := new(FilPrivateKeyGenerateResponse) + obj.ref2dba09f = (*C.fil_PrivateKeyGenerateResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilPrivateKeyGenerateResponse) PassRef() (*C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref2dba09f != nil { + return x.ref2dba09f, nil + } + mem2dba09f := allocFilPrivateKeyGenerateResponseMemory(1) + ref2dba09f := (*C.fil_PrivateKeyGenerateResponse)(mem2dba09f) + allocs2dba09f := new(cgoAllocMap) + allocs2dba09f.Add(mem2dba09f) + + var cprivate_key_allocs *cgoAllocMap + ref2dba09f.private_key, cprivate_key_allocs = x.PrivateKey.PassValue() + allocs2dba09f.Borrow(cprivate_key_allocs) + + x.ref2dba09f = ref2dba09f + x.allocs2dba09f = allocs2dba09f + return ref2dba09f, allocs2dba09f + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilPrivateKeyGenerateResponse) PassValue() (C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { + if x.ref2dba09f != nil { + return *x.ref2dba09f, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilPrivateKeyGenerateResponse) Deref() { + if x.ref2dba09f == nil { + return + } + x.PrivateKey = *NewFilBLSPrivateKeyRef(unsafe.Pointer(&x.ref2dba09f.private_key)) +} + +// allocFilBLSPublicKeyMemory allocates memory for type C.fil_BLSPublicKey in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilBLSPublicKeyMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPublicKeyValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilBLSPublicKeyValue = unsafe.Sizeof([1]C.fil_BLSPublicKey{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilBLSPublicKey) Ref() *C.fil_BLSPublicKey { + if x == nil { + return nil + } + return x.ref6d0cab13 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilBLSPublicKey) Free() { + if x != nil && x.allocs6d0cab13 != nil { + x.allocs6d0cab13.(*cgoAllocMap).Free() + x.ref6d0cab13 = nil + } +} + +// NewFilBLSPublicKeyRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilBLSPublicKeyRef(ref unsafe.Pointer) *FilBLSPublicKey { + if ref == nil { + return nil + } + obj := new(FilBLSPublicKey) + obj.ref6d0cab13 = (*C.fil_BLSPublicKey)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilBLSPublicKey) PassRef() (*C.fil_BLSPublicKey, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref6d0cab13 != nil { + return x.ref6d0cab13, nil + } + mem6d0cab13 := allocFilBLSPublicKeyMemory(1) + ref6d0cab13 := (*C.fil_BLSPublicKey)(mem6d0cab13) + allocs6d0cab13 := new(cgoAllocMap) + allocs6d0cab13.Add(mem6d0cab13) + + var cinner_allocs *cgoAllocMap + ref6d0cab13.inner, cinner_allocs = *(*[48]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocs6d0cab13.Borrow(cinner_allocs) + + x.ref6d0cab13 = ref6d0cab13 + x.allocs6d0cab13 = allocs6d0cab13 + return ref6d0cab13, allocs6d0cab13 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilBLSPublicKey) PassValue() (C.fil_BLSPublicKey, *cgoAllocMap) { + if x.ref6d0cab13 != nil { + return *x.ref6d0cab13, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilBLSPublicKey) Deref() { + if x.ref6d0cab13 == nil { + return + } + x.Inner = *(*[48]byte)(unsafe.Pointer(&x.ref6d0cab13.inner)) +} + +// allocFilPrivateKeyPublicKeyResponseMemory allocates memory for type C.fil_PrivateKeyPublicKeyResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPrivateKeyPublicKeyResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyPublicKeyResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPrivateKeyPublicKeyResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyPublicKeyResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilPrivateKeyPublicKeyResponse) Ref() *C.fil_PrivateKeyPublicKeyResponse { + if x == nil { + return nil + } + return x.refee14e59d +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilPrivateKeyPublicKeyResponse) Free() { + if x != nil && x.allocsee14e59d != nil { + x.allocsee14e59d.(*cgoAllocMap).Free() + x.refee14e59d = nil + } +} + +// NewFilPrivateKeyPublicKeyResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilPrivateKeyPublicKeyResponseRef(ref unsafe.Pointer) *FilPrivateKeyPublicKeyResponse { + if ref == nil { + return nil + } + obj := new(FilPrivateKeyPublicKeyResponse) + obj.refee14e59d = (*C.fil_PrivateKeyPublicKeyResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilPrivateKeyPublicKeyResponse) PassRef() (*C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refee14e59d != nil { + return x.refee14e59d, nil + } + memee14e59d := allocFilPrivateKeyPublicKeyResponseMemory(1) + refee14e59d := (*C.fil_PrivateKeyPublicKeyResponse)(memee14e59d) + allocsee14e59d := new(cgoAllocMap) + allocsee14e59d.Add(memee14e59d) + + var cpublic_key_allocs *cgoAllocMap + refee14e59d.public_key, cpublic_key_allocs = x.PublicKey.PassValue() + allocsee14e59d.Borrow(cpublic_key_allocs) + + x.refee14e59d = refee14e59d + x.allocsee14e59d = allocsee14e59d + return refee14e59d, allocsee14e59d + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilPrivateKeyPublicKeyResponse) PassValue() (C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { + if x.refee14e59d != nil { + return *x.refee14e59d, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilPrivateKeyPublicKeyResponse) Deref() { + if x.refee14e59d == nil { + return + } + x.PublicKey = *NewFilBLSPublicKeyRef(unsafe.Pointer(&x.refee14e59d.public_key)) +} + +// allocFilPrivateKeySignResponseMemory allocates memory for type C.fil_PrivateKeySignResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPrivateKeySignResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeySignResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPrivateKeySignResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeySignResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilPrivateKeySignResponse) Ref() *C.fil_PrivateKeySignResponse { + if x == nil { + return nil + } + return x.refcdf97b28 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilPrivateKeySignResponse) Free() { + if x != nil && x.allocscdf97b28 != nil { + x.allocscdf97b28.(*cgoAllocMap).Free() + x.refcdf97b28 = nil + } +} + +// NewFilPrivateKeySignResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilPrivateKeySignResponseRef(ref unsafe.Pointer) *FilPrivateKeySignResponse { + if ref == nil { + return nil + } + obj := new(FilPrivateKeySignResponse) + obj.refcdf97b28 = (*C.fil_PrivateKeySignResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilPrivateKeySignResponse) PassRef() (*C.fil_PrivateKeySignResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refcdf97b28 != nil { + return x.refcdf97b28, nil + } + memcdf97b28 := allocFilPrivateKeySignResponseMemory(1) + refcdf97b28 := (*C.fil_PrivateKeySignResponse)(memcdf97b28) + allocscdf97b28 := new(cgoAllocMap) + allocscdf97b28.Add(memcdf97b28) + + var csignature_allocs *cgoAllocMap + refcdf97b28.signature, csignature_allocs = x.Signature.PassValue() + allocscdf97b28.Borrow(csignature_allocs) + + x.refcdf97b28 = refcdf97b28 + x.allocscdf97b28 = allocscdf97b28 + return refcdf97b28, allocscdf97b28 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilPrivateKeySignResponse) PassValue() (C.fil_PrivateKeySignResponse, *cgoAllocMap) { + if x.refcdf97b28 != nil { + return *x.refcdf97b28, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilPrivateKeySignResponse) Deref() { + if x.refcdf97b28 == nil { + return + } + x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.refcdf97b28.signature)) +} + +// allocFilSealCommitPhase1ResponseMemory allocates memory for type C.fil_SealCommitPhase1Response in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilSealCommitPhase1ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase1ResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilSealCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase1Response{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilSealCommitPhase1Response) Ref() *C.fil_SealCommitPhase1Response { + if x == nil { + return nil + } + return x.ref61ed8561 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilSealCommitPhase1Response) Free() { + if x != nil && x.allocs61ed8561 != nil { + x.allocs61ed8561.(*cgoAllocMap).Free() + x.ref61ed8561 = nil + } +} + +// NewFilSealCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilSealCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase1Response { + if ref == nil { + return nil + } + obj := new(FilSealCommitPhase1Response) + obj.ref61ed8561 = (*C.fil_SealCommitPhase1Response)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilSealCommitPhase1Response) PassRef() (*C.fil_SealCommitPhase1Response, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref61ed8561 != nil { + return x.ref61ed8561, nil + } + mem61ed8561 := allocFilSealCommitPhase1ResponseMemory(1) + ref61ed8561 := (*C.fil_SealCommitPhase1Response)(mem61ed8561) + allocs61ed8561 := new(cgoAllocMap) + allocs61ed8561.Add(mem61ed8561) + + var cstatus_code_allocs *cgoAllocMap + ref61ed8561.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs61ed8561.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref61ed8561.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs61ed8561.Borrow(cerror_msg_allocs) + + var cseal_commit_phase1_output_ptr_allocs *cgoAllocMap + ref61ed8561.seal_commit_phase1_output_ptr, cseal_commit_phase1_output_ptr_allocs = unpackPUint8TString(x.SealCommitPhase1OutputPtr) + allocs61ed8561.Borrow(cseal_commit_phase1_output_ptr_allocs) + + var cseal_commit_phase1_output_len_allocs *cgoAllocMap + ref61ed8561.seal_commit_phase1_output_len, cseal_commit_phase1_output_len_allocs = (C.size_t)(x.SealCommitPhase1OutputLen), cgoAllocsUnknown + allocs61ed8561.Borrow(cseal_commit_phase1_output_len_allocs) + + x.ref61ed8561 = ref61ed8561 + x.allocs61ed8561 = allocs61ed8561 + return ref61ed8561, allocs61ed8561 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilSealCommitPhase1Response) PassValue() (C.fil_SealCommitPhase1Response, *cgoAllocMap) { + if x.ref61ed8561 != nil { + return *x.ref61ed8561, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilSealCommitPhase1Response) Deref() { + if x.ref61ed8561 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref61ed8561.status_code) + x.ErrorMsg = packPCharString(x.ref61ed8561.error_msg) + x.SealCommitPhase1OutputPtr = packPUint8TString(x.ref61ed8561.seal_commit_phase1_output_ptr) + x.SealCommitPhase1OutputLen = (uint)(x.ref61ed8561.seal_commit_phase1_output_len) +} + +// allocFilSealCommitPhase2ResponseMemory allocates memory for type C.fil_SealCommitPhase2Response in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilSealCommitPhase2ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase2ResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilSealCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase2Response{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilSealCommitPhase2Response) Ref() *C.fil_SealCommitPhase2Response { + if x == nil { + return nil + } + return x.ref5860b9a4 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilSealCommitPhase2Response) Free() { + if x != nil && x.allocs5860b9a4 != nil { + x.allocs5860b9a4.(*cgoAllocMap).Free() + x.ref5860b9a4 = nil + } +} + +// NewFilSealCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilSealCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase2Response { + if ref == nil { + return nil + } + obj := new(FilSealCommitPhase2Response) + obj.ref5860b9a4 = (*C.fil_SealCommitPhase2Response)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilSealCommitPhase2Response) PassRef() (*C.fil_SealCommitPhase2Response, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref5860b9a4 != nil { + return x.ref5860b9a4, nil + } + mem5860b9a4 := allocFilSealCommitPhase2ResponseMemory(1) + ref5860b9a4 := (*C.fil_SealCommitPhase2Response)(mem5860b9a4) + allocs5860b9a4 := new(cgoAllocMap) + allocs5860b9a4.Add(mem5860b9a4) + + var cstatus_code_allocs *cgoAllocMap + ref5860b9a4.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs5860b9a4.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref5860b9a4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs5860b9a4.Borrow(cerror_msg_allocs) + + var cproof_ptr_allocs *cgoAllocMap + ref5860b9a4.proof_ptr, cproof_ptr_allocs = unpackPUint8TString(x.ProofPtr) + allocs5860b9a4.Borrow(cproof_ptr_allocs) + + var cproof_len_allocs *cgoAllocMap + ref5860b9a4.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown + allocs5860b9a4.Borrow(cproof_len_allocs) + + x.ref5860b9a4 = ref5860b9a4 + x.allocs5860b9a4 = allocs5860b9a4 + return ref5860b9a4, allocs5860b9a4 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilSealCommitPhase2Response) PassValue() (C.fil_SealCommitPhase2Response, *cgoAllocMap) { + if x.ref5860b9a4 != nil { + return *x.ref5860b9a4, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilSealCommitPhase2Response) Deref() { + if x.ref5860b9a4 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref5860b9a4.status_code) + x.ErrorMsg = packPCharString(x.ref5860b9a4.error_msg) + x.ProofPtr = packPUint8TString(x.ref5860b9a4.proof_ptr) + x.ProofLen = (uint)(x.ref5860b9a4.proof_len) +} + +// allocFilSealPreCommitPhase1ResponseMemory allocates memory for type C.fil_SealPreCommitPhase1Response in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilSealPreCommitPhase1ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase1ResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilSealPreCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase1Response{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilSealPreCommitPhase1Response) Ref() *C.fil_SealPreCommitPhase1Response { + if x == nil { + return nil + } + return x.ref132bbfd8 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilSealPreCommitPhase1Response) Free() { + if x != nil && x.allocs132bbfd8 != nil { + x.allocs132bbfd8.(*cgoAllocMap).Free() + x.ref132bbfd8 = nil + } +} + +// NewFilSealPreCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilSealPreCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase1Response { + if ref == nil { + return nil + } + obj := new(FilSealPreCommitPhase1Response) + obj.ref132bbfd8 = (*C.fil_SealPreCommitPhase1Response)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilSealPreCommitPhase1Response) PassRef() (*C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref132bbfd8 != nil { + return x.ref132bbfd8, nil + } + mem132bbfd8 := allocFilSealPreCommitPhase1ResponseMemory(1) + ref132bbfd8 := (*C.fil_SealPreCommitPhase1Response)(mem132bbfd8) + allocs132bbfd8 := new(cgoAllocMap) + allocs132bbfd8.Add(mem132bbfd8) + + var cerror_msg_allocs *cgoAllocMap + ref132bbfd8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs132bbfd8.Borrow(cerror_msg_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref132bbfd8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs132bbfd8.Borrow(cstatus_code_allocs) + + var cseal_pre_commit_phase1_output_ptr_allocs *cgoAllocMap + ref132bbfd8.seal_pre_commit_phase1_output_ptr, cseal_pre_commit_phase1_output_ptr_allocs = unpackPUint8TString(x.SealPreCommitPhase1OutputPtr) + allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_ptr_allocs) + + var cseal_pre_commit_phase1_output_len_allocs *cgoAllocMap + ref132bbfd8.seal_pre_commit_phase1_output_len, cseal_pre_commit_phase1_output_len_allocs = (C.size_t)(x.SealPreCommitPhase1OutputLen), cgoAllocsUnknown + allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_len_allocs) + + x.ref132bbfd8 = ref132bbfd8 + x.allocs132bbfd8 = allocs132bbfd8 + return ref132bbfd8, allocs132bbfd8 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilSealPreCommitPhase1Response) PassValue() (C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { + if x.ref132bbfd8 != nil { + return *x.ref132bbfd8, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilSealPreCommitPhase1Response) Deref() { + if x.ref132bbfd8 == nil { + return + } + x.ErrorMsg = packPCharString(x.ref132bbfd8.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref132bbfd8.status_code) + x.SealPreCommitPhase1OutputPtr = packPUint8TString(x.ref132bbfd8.seal_pre_commit_phase1_output_ptr) + x.SealPreCommitPhase1OutputLen = (uint)(x.ref132bbfd8.seal_pre_commit_phase1_output_len) +} + +// allocFilSealPreCommitPhase2ResponseMemory allocates memory for type C.fil_SealPreCommitPhase2Response in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilSealPreCommitPhase2ResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase2ResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilSealPreCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase2Response{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilSealPreCommitPhase2Response) Ref() *C.fil_SealPreCommitPhase2Response { + if x == nil { + return nil + } + return x.ref2aa6831d +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilSealPreCommitPhase2Response) Free() { + if x != nil && x.allocs2aa6831d != nil { + x.allocs2aa6831d.(*cgoAllocMap).Free() + x.ref2aa6831d = nil + } +} + +// NewFilSealPreCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilSealPreCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase2Response { + if ref == nil { + return nil + } + obj := new(FilSealPreCommitPhase2Response) + obj.ref2aa6831d = (*C.fil_SealPreCommitPhase2Response)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilSealPreCommitPhase2Response) PassRef() (*C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref2aa6831d != nil { + return x.ref2aa6831d, nil + } + mem2aa6831d := allocFilSealPreCommitPhase2ResponseMemory(1) + ref2aa6831d := (*C.fil_SealPreCommitPhase2Response)(mem2aa6831d) + allocs2aa6831d := new(cgoAllocMap) + allocs2aa6831d.Add(mem2aa6831d) + + var cerror_msg_allocs *cgoAllocMap + ref2aa6831d.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs2aa6831d.Borrow(cerror_msg_allocs) + + var cstatus_code_allocs *cgoAllocMap + ref2aa6831d.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs2aa6831d.Borrow(cstatus_code_allocs) + + var cregistered_proof_allocs *cgoAllocMap + ref2aa6831d.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredSealProof)(x.RegisteredProof), cgoAllocsUnknown + allocs2aa6831d.Borrow(cregistered_proof_allocs) + + var ccomm_d_allocs *cgoAllocMap + ref2aa6831d.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown + allocs2aa6831d.Borrow(ccomm_d_allocs) + + var ccomm_r_allocs *cgoAllocMap + ref2aa6831d.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown + allocs2aa6831d.Borrow(ccomm_r_allocs) + + x.ref2aa6831d = ref2aa6831d + x.allocs2aa6831d = allocs2aa6831d + return ref2aa6831d, allocs2aa6831d + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilSealPreCommitPhase2Response) PassValue() (C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { + if x.ref2aa6831d != nil { + return *x.ref2aa6831d, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilSealPreCommitPhase2Response) Deref() { + if x.ref2aa6831d == nil { + return + } + x.ErrorMsg = packPCharString(x.ref2aa6831d.error_msg) + x.StatusCode = (FCPResponseStatus)(x.ref2aa6831d.status_code) + x.RegisteredProof = (FilRegisteredSealProof)(x.ref2aa6831d.registered_proof) + x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_d)) + x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_r)) +} + +// allocFilStringResponseMemory allocates memory for type C.fil_StringResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilStringResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilStringResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilStringResponseValue = unsafe.Sizeof([1]C.fil_StringResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilStringResponse) Ref() *C.fil_StringResponse { + if x == nil { + return nil + } + return x.ref4f413043 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilStringResponse) Free() { + if x != nil && x.allocs4f413043 != nil { + x.allocs4f413043.(*cgoAllocMap).Free() + x.ref4f413043 = nil + } +} + +// NewFilStringResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilStringResponseRef(ref unsafe.Pointer) *FilStringResponse { + if ref == nil { + return nil + } + obj := new(FilStringResponse) + obj.ref4f413043 = (*C.fil_StringResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilStringResponse) PassRef() (*C.fil_StringResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref4f413043 != nil { + return x.ref4f413043, nil + } + mem4f413043 := allocFilStringResponseMemory(1) + ref4f413043 := (*C.fil_StringResponse)(mem4f413043) + allocs4f413043 := new(cgoAllocMap) + allocs4f413043.Add(mem4f413043) + + var cstatus_code_allocs *cgoAllocMap + ref4f413043.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs4f413043.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref4f413043.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs4f413043.Borrow(cerror_msg_allocs) + + var cstring_val_allocs *cgoAllocMap + ref4f413043.string_val, cstring_val_allocs = unpackPCharString(x.StringVal) + allocs4f413043.Borrow(cstring_val_allocs) + + x.ref4f413043 = ref4f413043 + x.allocs4f413043 = allocs4f413043 + return ref4f413043, allocs4f413043 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilStringResponse) PassValue() (C.fil_StringResponse, *cgoAllocMap) { + if x.ref4f413043 != nil { + return *x.ref4f413043, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilStringResponse) Deref() { + if x.ref4f413043 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref4f413043.status_code) + x.ErrorMsg = packPCharString(x.ref4f413043.error_msg) + x.StringVal = packPCharString(x.ref4f413043.string_val) +} + +// allocFilUnsealRangeResponseMemory allocates memory for type C.fil_UnsealRangeResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilUnsealRangeResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilUnsealRangeResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilUnsealRangeResponseValue = unsafe.Sizeof([1]C.fil_UnsealRangeResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilUnsealRangeResponse) Ref() *C.fil_UnsealRangeResponse { + if x == nil { + return nil + } + return x.ref61e219c9 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilUnsealRangeResponse) Free() { + if x != nil && x.allocs61e219c9 != nil { + x.allocs61e219c9.(*cgoAllocMap).Free() + x.ref61e219c9 = nil + } +} + +// NewFilUnsealRangeResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilUnsealRangeResponseRef(ref unsafe.Pointer) *FilUnsealRangeResponse { + if ref == nil { + return nil + } + obj := new(FilUnsealRangeResponse) + obj.ref61e219c9 = (*C.fil_UnsealRangeResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilUnsealRangeResponse) PassRef() (*C.fil_UnsealRangeResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref61e219c9 != nil { + return x.ref61e219c9, nil + } + mem61e219c9 := allocFilUnsealRangeResponseMemory(1) + ref61e219c9 := (*C.fil_UnsealRangeResponse)(mem61e219c9) + allocs61e219c9 := new(cgoAllocMap) + allocs61e219c9.Add(mem61e219c9) + + var cstatus_code_allocs *cgoAllocMap + ref61e219c9.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs61e219c9.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref61e219c9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs61e219c9.Borrow(cerror_msg_allocs) + + x.ref61e219c9 = ref61e219c9 + x.allocs61e219c9 = allocs61e219c9 + return ref61e219c9, allocs61e219c9 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilUnsealRangeResponse) PassValue() (C.fil_UnsealRangeResponse, *cgoAllocMap) { + if x.ref61e219c9 != nil { + return *x.ref61e219c9, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilUnsealRangeResponse) Deref() { + if x.ref61e219c9 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref61e219c9.status_code) + x.ErrorMsg = packPCharString(x.ref61e219c9.error_msg) +} + +// allocFilVerifySealResponseMemory allocates memory for type C.fil_VerifySealResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilVerifySealResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifySealResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilVerifySealResponseValue = unsafe.Sizeof([1]C.fil_VerifySealResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilVerifySealResponse) Ref() *C.fil_VerifySealResponse { + if x == nil { + return nil + } + return x.refd4397079 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilVerifySealResponse) Free() { + if x != nil && x.allocsd4397079 != nil { + x.allocsd4397079.(*cgoAllocMap).Free() + x.refd4397079 = nil + } +} + +// NewFilVerifySealResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilVerifySealResponseRef(ref unsafe.Pointer) *FilVerifySealResponse { + if ref == nil { + return nil + } + obj := new(FilVerifySealResponse) + obj.refd4397079 = (*C.fil_VerifySealResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilVerifySealResponse) PassRef() (*C.fil_VerifySealResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refd4397079 != nil { + return x.refd4397079, nil + } + memd4397079 := allocFilVerifySealResponseMemory(1) + refd4397079 := (*C.fil_VerifySealResponse)(memd4397079) + allocsd4397079 := new(cgoAllocMap) + allocsd4397079.Add(memd4397079) + + var cstatus_code_allocs *cgoAllocMap + refd4397079.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsd4397079.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + refd4397079.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsd4397079.Borrow(cerror_msg_allocs) + + var cis_valid_allocs *cgoAllocMap + refd4397079.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocsd4397079.Borrow(cis_valid_allocs) + + x.refd4397079 = refd4397079 + x.allocsd4397079 = allocsd4397079 + return refd4397079, allocsd4397079 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilVerifySealResponse) PassValue() (C.fil_VerifySealResponse, *cgoAllocMap) { + if x.refd4397079 != nil { + return *x.refd4397079, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilVerifySealResponse) Deref() { + if x.refd4397079 == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.refd4397079.status_code) + x.ErrorMsg = packPCharString(x.refd4397079.error_msg) + x.IsValid = (bool)(x.refd4397079.is_valid) +} + +// allocFilVerifyWindowPoStResponseMemory allocates memory for type C.fil_VerifyWindowPoStResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilVerifyWindowPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWindowPoStResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilVerifyWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWindowPoStResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilVerifyWindowPoStResponse) Ref() *C.fil_VerifyWindowPoStResponse { + if x == nil { + return nil + } + return x.ref34c4d49f +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilVerifyWindowPoStResponse) Free() { + if x != nil && x.allocs34c4d49f != nil { + x.allocs34c4d49f.(*cgoAllocMap).Free() + x.ref34c4d49f = nil + } +} + +// NewFilVerifyWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilVerifyWindowPoStResponseRef(ref unsafe.Pointer) *FilVerifyWindowPoStResponse { + if ref == nil { + return nil + } + obj := new(FilVerifyWindowPoStResponse) + obj.ref34c4d49f = (*C.fil_VerifyWindowPoStResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilVerifyWindowPoStResponse) PassRef() (*C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref34c4d49f != nil { + return x.ref34c4d49f, nil + } + mem34c4d49f := allocFilVerifyWindowPoStResponseMemory(1) + ref34c4d49f := (*C.fil_VerifyWindowPoStResponse)(mem34c4d49f) + allocs34c4d49f := new(cgoAllocMap) + allocs34c4d49f.Add(mem34c4d49f) + + var cstatus_code_allocs *cgoAllocMap + ref34c4d49f.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocs34c4d49f.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + ref34c4d49f.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocs34c4d49f.Borrow(cerror_msg_allocs) + + var cis_valid_allocs *cgoAllocMap + ref34c4d49f.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocs34c4d49f.Borrow(cis_valid_allocs) + + x.ref34c4d49f = ref34c4d49f + x.allocs34c4d49f = allocs34c4d49f + return ref34c4d49f, allocs34c4d49f + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilVerifyWindowPoStResponse) PassValue() (C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { + if x.ref34c4d49f != nil { + return *x.ref34c4d49f, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilVerifyWindowPoStResponse) Deref() { + if x.ref34c4d49f == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.ref34c4d49f.status_code) + x.ErrorMsg = packPCharString(x.ref34c4d49f.error_msg) + x.IsValid = (bool)(x.ref34c4d49f.is_valid) +} + +// allocFilVerifyWinningPoStResponseMemory allocates memory for type C.fil_VerifyWinningPoStResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilVerifyWinningPoStResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWinningPoStResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilVerifyWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWinningPoStResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilVerifyWinningPoStResponse) Ref() *C.fil_VerifyWinningPoStResponse { + if x == nil { + return nil + } + return x.refaca6860c +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilVerifyWinningPoStResponse) Free() { + if x != nil && x.allocsaca6860c != nil { + x.allocsaca6860c.(*cgoAllocMap).Free() + x.refaca6860c = nil + } +} + +// NewFilVerifyWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilVerifyWinningPoStResponseRef(ref unsafe.Pointer) *FilVerifyWinningPoStResponse { + if ref == nil { + return nil + } + obj := new(FilVerifyWinningPoStResponse) + obj.refaca6860c = (*C.fil_VerifyWinningPoStResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilVerifyWinningPoStResponse) PassRef() (*C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refaca6860c != nil { + return x.refaca6860c, nil + } + memaca6860c := allocFilVerifyWinningPoStResponseMemory(1) + refaca6860c := (*C.fil_VerifyWinningPoStResponse)(memaca6860c) + allocsaca6860c := new(cgoAllocMap) + allocsaca6860c.Add(memaca6860c) + + var cstatus_code_allocs *cgoAllocMap + refaca6860c.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsaca6860c.Borrow(cstatus_code_allocs) + + var cerror_msg_allocs *cgoAllocMap + refaca6860c.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsaca6860c.Borrow(cerror_msg_allocs) + + var cis_valid_allocs *cgoAllocMap + refaca6860c.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown + allocsaca6860c.Borrow(cis_valid_allocs) + + x.refaca6860c = refaca6860c + x.allocsaca6860c = allocsaca6860c + return refaca6860c, allocsaca6860c + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilVerifyWinningPoStResponse) PassValue() (C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { + if x.refaca6860c != nil { + return *x.refaca6860c, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilVerifyWinningPoStResponse) Deref() { + if x.refaca6860c == nil { + return + } + x.StatusCode = (FCPResponseStatus)(x.refaca6860c.status_code) + x.ErrorMsg = packPCharString(x.refaca6860c.error_msg) + x.IsValid = (bool)(x.refaca6860c.is_valid) +} + +// allocFilWriteWithAlignmentResponseMemory allocates memory for type C.fil_WriteWithAlignmentResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilWriteWithAlignmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithAlignmentResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilWriteWithAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithAlignmentResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilWriteWithAlignmentResponse) Ref() *C.fil_WriteWithAlignmentResponse { + if x == nil { + return nil + } + return x.refa330e79 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilWriteWithAlignmentResponse) Free() { + if x != nil && x.allocsa330e79 != nil { + x.allocsa330e79.(*cgoAllocMap).Free() + x.refa330e79 = nil + } +} + +// NewFilWriteWithAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilWriteWithAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithAlignmentResponse { + if ref == nil { + return nil + } + obj := new(FilWriteWithAlignmentResponse) + obj.refa330e79 = (*C.fil_WriteWithAlignmentResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilWriteWithAlignmentResponse) PassRef() (*C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refa330e79 != nil { + return x.refa330e79, nil + } + mema330e79 := allocFilWriteWithAlignmentResponseMemory(1) + refa330e79 := (*C.fil_WriteWithAlignmentResponse)(mema330e79) + allocsa330e79 := new(cgoAllocMap) + allocsa330e79.Add(mema330e79) + + var ccomm_p_allocs *cgoAllocMap + refa330e79.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocsa330e79.Borrow(ccomm_p_allocs) + + var cerror_msg_allocs *cgoAllocMap + refa330e79.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsa330e79.Borrow(cerror_msg_allocs) + + var cleft_alignment_unpadded_allocs *cgoAllocMap + refa330e79.left_alignment_unpadded, cleft_alignment_unpadded_allocs = (C.uint64_t)(x.LeftAlignmentUnpadded), cgoAllocsUnknown + allocsa330e79.Borrow(cleft_alignment_unpadded_allocs) + + var cstatus_code_allocs *cgoAllocMap + refa330e79.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsa330e79.Borrow(cstatus_code_allocs) + + var ctotal_write_unpadded_allocs *cgoAllocMap + refa330e79.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown + allocsa330e79.Borrow(ctotal_write_unpadded_allocs) + + x.refa330e79 = refa330e79 + x.allocsa330e79 = allocsa330e79 + return refa330e79, allocsa330e79 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilWriteWithAlignmentResponse) PassValue() (C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { + if x.refa330e79 != nil { + return *x.refa330e79, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilWriteWithAlignmentResponse) Deref() { + if x.refa330e79 == nil { + return + } + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refa330e79.comm_p)) + x.ErrorMsg = packPCharString(x.refa330e79.error_msg) + x.LeftAlignmentUnpadded = (uint64)(x.refa330e79.left_alignment_unpadded) + x.StatusCode = (FCPResponseStatus)(x.refa330e79.status_code) + x.TotalWriteUnpadded = (uint64)(x.refa330e79.total_write_unpadded) +} + +// allocFilWriteWithoutAlignmentResponseMemory allocates memory for type C.fil_WriteWithoutAlignmentResponse in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilWriteWithoutAlignmentResponseMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithoutAlignmentResponseValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilWriteWithoutAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithoutAlignmentResponse{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilWriteWithoutAlignmentResponse) Ref() *C.fil_WriteWithoutAlignmentResponse { + if x == nil { + return nil + } + return x.refc8e1ed8 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilWriteWithoutAlignmentResponse) Free() { + if x != nil && x.allocsc8e1ed8 != nil { + x.allocsc8e1ed8.(*cgoAllocMap).Free() + x.refc8e1ed8 = nil + } +} + +// NewFilWriteWithoutAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilWriteWithoutAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithoutAlignmentResponse { + if ref == nil { + return nil + } + obj := new(FilWriteWithoutAlignmentResponse) + obj.refc8e1ed8 = (*C.fil_WriteWithoutAlignmentResponse)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilWriteWithoutAlignmentResponse) PassRef() (*C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refc8e1ed8 != nil { + return x.refc8e1ed8, nil + } + memc8e1ed8 := allocFilWriteWithoutAlignmentResponseMemory(1) + refc8e1ed8 := (*C.fil_WriteWithoutAlignmentResponse)(memc8e1ed8) + allocsc8e1ed8 := new(cgoAllocMap) + allocsc8e1ed8.Add(memc8e1ed8) + + var ccomm_p_allocs *cgoAllocMap + refc8e1ed8.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocsc8e1ed8.Borrow(ccomm_p_allocs) + + var cerror_msg_allocs *cgoAllocMap + refc8e1ed8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) + allocsc8e1ed8.Borrow(cerror_msg_allocs) + + var cstatus_code_allocs *cgoAllocMap + refc8e1ed8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown + allocsc8e1ed8.Borrow(cstatus_code_allocs) + + var ctotal_write_unpadded_allocs *cgoAllocMap + refc8e1ed8.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown + allocsc8e1ed8.Borrow(ctotal_write_unpadded_allocs) + + x.refc8e1ed8 = refc8e1ed8 + x.allocsc8e1ed8 = allocsc8e1ed8 + return refc8e1ed8, allocsc8e1ed8 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilWriteWithoutAlignmentResponse) PassValue() (C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { + if x.refc8e1ed8 != nil { + return *x.refc8e1ed8, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilWriteWithoutAlignmentResponse) Deref() { + if x.refc8e1ed8 == nil { + return + } + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refc8e1ed8.comm_p)) + x.ErrorMsg = packPCharString(x.refc8e1ed8.error_msg) + x.StatusCode = (FCPResponseStatus)(x.refc8e1ed8.status_code) + x.TotalWriteUnpadded = (uint64)(x.refc8e1ed8.total_write_unpadded) +} + +// allocFilPublicPieceInfoMemory allocates memory for type C.fil_PublicPieceInfo in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPublicPieceInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicPieceInfoValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPublicPieceInfoValue = unsafe.Sizeof([1]C.fil_PublicPieceInfo{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilPublicPieceInfo) Ref() *C.fil_PublicPieceInfo { + if x == nil { + return nil + } + return x.refd00025ac +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilPublicPieceInfo) Free() { + if x != nil && x.allocsd00025ac != nil { + x.allocsd00025ac.(*cgoAllocMap).Free() + x.refd00025ac = nil + } +} + +// NewFilPublicPieceInfoRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilPublicPieceInfoRef(ref unsafe.Pointer) *FilPublicPieceInfo { + if ref == nil { + return nil + } + obj := new(FilPublicPieceInfo) + obj.refd00025ac = (*C.fil_PublicPieceInfo)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilPublicPieceInfo) PassRef() (*C.fil_PublicPieceInfo, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.refd00025ac != nil { + return x.refd00025ac, nil + } + memd00025ac := allocFilPublicPieceInfoMemory(1) + refd00025ac := (*C.fil_PublicPieceInfo)(memd00025ac) + allocsd00025ac := new(cgoAllocMap) + allocsd00025ac.Add(memd00025ac) + + var cnum_bytes_allocs *cgoAllocMap + refd00025ac.num_bytes, cnum_bytes_allocs = (C.uint64_t)(x.NumBytes), cgoAllocsUnknown + allocsd00025ac.Borrow(cnum_bytes_allocs) + + var ccomm_p_allocs *cgoAllocMap + refd00025ac.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown + allocsd00025ac.Borrow(ccomm_p_allocs) + + x.refd00025ac = refd00025ac + x.allocsd00025ac = allocsd00025ac + return refd00025ac, allocsd00025ac + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilPublicPieceInfo) PassValue() (C.fil_PublicPieceInfo, *cgoAllocMap) { + if x.refd00025ac != nil { + return *x.refd00025ac, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilPublicPieceInfo) Deref() { + if x.refd00025ac == nil { + return + } + x.NumBytes = (uint64)(x.refd00025ac.num_bytes) + x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refd00025ac.comm_p)) +} + +// allocFil32ByteArrayMemory allocates memory for type C.fil_32ByteArray in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFil32ByteArrayMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFil32ByteArrayValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFil32ByteArrayValue = unsafe.Sizeof([1]C.fil_32ByteArray{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *Fil32ByteArray) Ref() *C.fil_32ByteArray { + if x == nil { + return nil + } + return x.ref373ec61a +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *Fil32ByteArray) Free() { + if x != nil && x.allocs373ec61a != nil { + x.allocs373ec61a.(*cgoAllocMap).Free() + x.ref373ec61a = nil + } +} + +// NewFil32ByteArrayRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFil32ByteArrayRef(ref unsafe.Pointer) *Fil32ByteArray { + if ref == nil { + return nil + } + obj := new(Fil32ByteArray) + obj.ref373ec61a = (*C.fil_32ByteArray)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *Fil32ByteArray) PassRef() (*C.fil_32ByteArray, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref373ec61a != nil { + return x.ref373ec61a, nil + } + mem373ec61a := allocFil32ByteArrayMemory(1) + ref373ec61a := (*C.fil_32ByteArray)(mem373ec61a) + allocs373ec61a := new(cgoAllocMap) + allocs373ec61a.Add(mem373ec61a) + + var cinner_allocs *cgoAllocMap + ref373ec61a.inner, cinner_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown + allocs373ec61a.Borrow(cinner_allocs) + + x.ref373ec61a = ref373ec61a + x.allocs373ec61a = allocs373ec61a + return ref373ec61a, allocs373ec61a + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x Fil32ByteArray) PassValue() (C.fil_32ByteArray, *cgoAllocMap) { + if x.ref373ec61a != nil { + return *x.ref373ec61a, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *Fil32ByteArray) Deref() { + if x.ref373ec61a == nil { + return + } + x.Inner = *(*[32]byte)(unsafe.Pointer(&x.ref373ec61a.inner)) +} + +// allocFilPrivateReplicaInfoMemory allocates memory for type C.fil_PrivateReplicaInfo in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPrivateReplicaInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateReplicaInfoValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPrivateReplicaInfoValue = unsafe.Sizeof([1]C.fil_PrivateReplicaInfo{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilPrivateReplicaInfo) Ref() *C.fil_PrivateReplicaInfo { + if x == nil { + return nil + } + return x.ref81a31e9b +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilPrivateReplicaInfo) Free() { + if x != nil && x.allocs81a31e9b != nil { + x.allocs81a31e9b.(*cgoAllocMap).Free() + x.ref81a31e9b = nil + } +} + +// NewFilPrivateReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilPrivateReplicaInfoRef(ref unsafe.Pointer) *FilPrivateReplicaInfo { + if ref == nil { + return nil + } + obj := new(FilPrivateReplicaInfo) + obj.ref81a31e9b = (*C.fil_PrivateReplicaInfo)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilPrivateReplicaInfo) PassRef() (*C.fil_PrivateReplicaInfo, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref81a31e9b != nil { + return x.ref81a31e9b, nil + } + mem81a31e9b := allocFilPrivateReplicaInfoMemory(1) + ref81a31e9b := (*C.fil_PrivateReplicaInfo)(mem81a31e9b) + allocs81a31e9b := new(cgoAllocMap) + allocs81a31e9b.Add(mem81a31e9b) + + var cregistered_proof_allocs *cgoAllocMap + ref81a31e9b.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown + allocs81a31e9b.Borrow(cregistered_proof_allocs) + + var ccache_dir_path_allocs *cgoAllocMap + ref81a31e9b.cache_dir_path, ccache_dir_path_allocs = unpackPCharString(x.CacheDirPath) + allocs81a31e9b.Borrow(ccache_dir_path_allocs) + + var ccomm_r_allocs *cgoAllocMap + ref81a31e9b.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown + allocs81a31e9b.Borrow(ccomm_r_allocs) + + var creplica_path_allocs *cgoAllocMap + ref81a31e9b.replica_path, creplica_path_allocs = unpackPCharString(x.ReplicaPath) + allocs81a31e9b.Borrow(creplica_path_allocs) + + var csector_id_allocs *cgoAllocMap + ref81a31e9b.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown + allocs81a31e9b.Borrow(csector_id_allocs) + + x.ref81a31e9b = ref81a31e9b + x.allocs81a31e9b = allocs81a31e9b + return ref81a31e9b, allocs81a31e9b + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilPrivateReplicaInfo) PassValue() (C.fil_PrivateReplicaInfo, *cgoAllocMap) { + if x.ref81a31e9b != nil { + return *x.ref81a31e9b, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilPrivateReplicaInfo) Deref() { + if x.ref81a31e9b == nil { + return + } + x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81a31e9b.registered_proof) + x.CacheDirPath = packPCharString(x.ref81a31e9b.cache_dir_path) + x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81a31e9b.comm_r)) + x.ReplicaPath = packPCharString(x.ref81a31e9b.replica_path) + x.SectorId = (uint64)(x.ref81a31e9b.sector_id) +} + +// allocFilPublicReplicaInfoMemory allocates memory for type C.fil_PublicReplicaInfo in C. +// The caller is responsible for freeing the this memory via C.free. +func allocFilPublicReplicaInfoMemory(n int) unsafe.Pointer { + mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicReplicaInfoValue)) + if mem == nil { + panic(fmt.Sprintln("memory alloc error: ", err)) + } + return mem +} + +const sizeOfFilPublicReplicaInfoValue = unsafe.Sizeof([1]C.fil_PublicReplicaInfo{}) + +// Ref returns the underlying reference to C object or nil if struct is nil. +func (x *FilPublicReplicaInfo) Ref() *C.fil_PublicReplicaInfo { + if x == nil { + return nil + } + return x.ref81b617c2 +} + +// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. +// Does nothing if struct is nil or has no allocation map. +func (x *FilPublicReplicaInfo) Free() { + if x != nil && x.allocs81b617c2 != nil { + x.allocs81b617c2.(*cgoAllocMap).Free() + x.ref81b617c2 = nil + } +} + +// NewFilPublicReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. +// Returns nil if the provided pointer to C object is nil too. +func NewFilPublicReplicaInfoRef(ref unsafe.Pointer) *FilPublicReplicaInfo { + if ref == nil { + return nil + } + obj := new(FilPublicReplicaInfo) + obj.ref81b617c2 = (*C.fil_PublicReplicaInfo)(unsafe.Pointer(ref)) + return obj +} + +// PassRef returns the underlying C object, otherwise it will allocate one and set its values +// from this wrapping struct, counting allocations into an allocation map. +func (x *FilPublicReplicaInfo) PassRef() (*C.fil_PublicReplicaInfo, *cgoAllocMap) { + if x == nil { + return nil, nil + } else if x.ref81b617c2 != nil { + return x.ref81b617c2, nil + } + mem81b617c2 := allocFilPublicReplicaInfoMemory(1) + ref81b617c2 := (*C.fil_PublicReplicaInfo)(mem81b617c2) + allocs81b617c2 := new(cgoAllocMap) + allocs81b617c2.Add(mem81b617c2) + + var cregistered_proof_allocs *cgoAllocMap + ref81b617c2.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown + allocs81b617c2.Borrow(cregistered_proof_allocs) + + var ccomm_r_allocs *cgoAllocMap + ref81b617c2.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown + allocs81b617c2.Borrow(ccomm_r_allocs) + + var csector_id_allocs *cgoAllocMap + ref81b617c2.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown + allocs81b617c2.Borrow(csector_id_allocs) + + x.ref81b617c2 = ref81b617c2 + x.allocs81b617c2 = allocs81b617c2 + return ref81b617c2, allocs81b617c2 + +} + +// PassValue does the same as PassRef except that it will try to dereference the returned pointer. +func (x FilPublicReplicaInfo) PassValue() (C.fil_PublicReplicaInfo, *cgoAllocMap) { + if x.ref81b617c2 != nil { + return *x.ref81b617c2, nil + } + ref, allocs := x.PassRef() + return *ref, allocs +} + +// Deref uses the underlying reference to C object and fills the wrapping struct with values. +// Do not forget to call this method whether you get a struct for C object and want to read its values. +func (x *FilPublicReplicaInfo) Deref() { + if x.ref81b617c2 == nil { + return + } + x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81b617c2.registered_proof) + x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81b617c2.comm_r)) + x.SectorId = (uint64)(x.ref81b617c2.sector_id) +} + +// unpackArgSFilPublicPieceInfo transforms a sliced Go data structure into plain C format. +func unpackArgSFilPublicPieceInfo(x []FilPublicPieceInfo) (unpacked *C.fil_PublicPieceInfo, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocFilPublicPieceInfoMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.fil_PublicPieceInfo)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.fil_PublicPieceInfo)(h.Data) + return +} + +// packSFilPublicPieceInfo reads sliced Go data structure out from plain C format. +func packSFilPublicPieceInfo(v []FilPublicPieceInfo, ptr0 *C.fil_PublicPieceInfo) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfFilPublicPieceInfoValue]C.fil_PublicPieceInfo)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPublicPieceInfoRef(unsafe.Pointer(&ptr1)) + } +} + +// unpackArgSFilPrivateReplicaInfo transforms a sliced Go data structure into plain C format. +func unpackArgSFilPrivateReplicaInfo(x []FilPrivateReplicaInfo) (unpacked *C.fil_PrivateReplicaInfo, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocFilPrivateReplicaInfoMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.fil_PrivateReplicaInfo)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.fil_PrivateReplicaInfo)(h.Data) + return +} + +// packSFilPrivateReplicaInfo reads sliced Go data structure out from plain C format. +func packSFilPrivateReplicaInfo(v []FilPrivateReplicaInfo, ptr0 *C.fil_PrivateReplicaInfo) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfFilPrivateReplicaInfoValue]C.fil_PrivateReplicaInfo)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPrivateReplicaInfoRef(unsafe.Pointer(&ptr1)) + } +} + +// unpackArgSFilPublicReplicaInfo transforms a sliced Go data structure into plain C format. +func unpackArgSFilPublicReplicaInfo(x []FilPublicReplicaInfo) (unpacked *C.fil_PublicReplicaInfo, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocFilPublicReplicaInfoMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.fil_PublicReplicaInfo)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.fil_PublicReplicaInfo)(h.Data) + return +} + +// packSFilPublicReplicaInfo reads sliced Go data structure out from plain C format. +func packSFilPublicReplicaInfo(v []FilPublicReplicaInfo, ptr0 *C.fil_PublicReplicaInfo) { + const m = 0x7fffffff + for i0 := range v { + ptr1 := (*(*[m / sizeOfFilPublicReplicaInfoValue]C.fil_PublicReplicaInfo)(unsafe.Pointer(ptr0)))[i0] + v[i0] = *NewFilPublicReplicaInfoRef(unsafe.Pointer(&ptr1)) + } +} + +// unpackArgSFilPoStProof transforms a sliced Go data structure into plain C format. +func unpackArgSFilPoStProof(x []FilPoStProof) (unpacked *C.fil_PoStProof, allocs *cgoAllocMap) { + if x == nil { + return nil, nil + } + allocs = new(cgoAllocMap) + defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { + go a.Free() + }) + + len0 := len(x) + mem0 := allocFilPoStProofMemory(len0) + allocs.Add(mem0) + h0 := &sliceHeader{ + Data: mem0, + Cap: len0, + Len: len0, + } + v0 := *(*[]C.fil_PoStProof)(unsafe.Pointer(h0)) + for i0 := range x { + allocs0 := new(cgoAllocMap) + v0[i0], allocs0 = x[i0].PassValue() + allocs.Borrow(allocs0) + } + h := (*sliceHeader)(unsafe.Pointer(&v0)) + unpacked = (*C.fil_PoStProof)(h.Data) + return +} diff --git a/chain/filecoin/filecoin-ffi/generated/cgo_helpers.h b/chain/filecoin/filecoin-ffi/generated/cgo_helpers.h new file mode 100644 index 00000000..952ed279 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/generated/cgo_helpers.h @@ -0,0 +1,9 @@ +// WARNING: This file has automatically been generated +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +#include "../filcrypto.h" +#include +#pragma once + +#define __CGOGEN 1 + diff --git a/chain/filecoin/filecoin-ffi/generated/const.go b/chain/filecoin/filecoin-ffi/generated/const.go new file mode 100644 index 00000000..181aea88 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/generated/const.go @@ -0,0 +1,53 @@ +// WARNING: This file has automatically been generated +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +package generated + +/* +#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto +#cgo pkg-config: ${SRCDIR}/../filcrypto.pc +#include "../filcrypto.h" +#include +#include "cgo_helpers.h" +*/ +import "C" + +// FCPResponseStatus as declared in filecoin-ffi/filcrypto.h:31 +type FCPResponseStatus int32 + +// FCPResponseStatus enumeration from filecoin-ffi/filcrypto.h:31 +const ( + FCPResponseStatusFCPNoError FCPResponseStatus = C.FCPResponseStatus_FCPNoError + FCPResponseStatusFCPUnclassifiedError FCPResponseStatus = C.FCPResponseStatus_FCPUnclassifiedError + FCPResponseStatusFCPCallerError FCPResponseStatus = C.FCPResponseStatus_FCPCallerError + FCPResponseStatusFCPReceiverError FCPResponseStatus = C.FCPResponseStatus_FCPReceiverError +) + +// FilRegisteredPoStProof as declared in filecoin-ffi/filcrypto.h:44 +type FilRegisteredPoStProof int32 + +// FilRegisteredPoStProof enumeration from filecoin-ffi/filcrypto.h:44 +const ( + FilRegisteredPoStProofStackedDrgWinning2KiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning2KiBV1 + FilRegisteredPoStProofStackedDrgWinning8MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning8MiBV1 + FilRegisteredPoStProofStackedDrgWinning512MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning512MiBV1 + FilRegisteredPoStProofStackedDrgWinning32GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning32GiBV1 + FilRegisteredPoStProofStackedDrgWinning64GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning64GiBV1 + FilRegisteredPoStProofStackedDrgWindow2KiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow2KiBV1 + FilRegisteredPoStProofStackedDrgWindow8MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow8MiBV1 + FilRegisteredPoStProofStackedDrgWindow512MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow512MiBV1 + FilRegisteredPoStProofStackedDrgWindow32GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow32GiBV1 + FilRegisteredPoStProofStackedDrgWindow64GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow64GiBV1 +) + +// FilRegisteredSealProof as declared in filecoin-ffi/filcrypto.h:52 +type FilRegisteredSealProof int32 + +// FilRegisteredSealProof enumeration from filecoin-ffi/filcrypto.h:52 +const ( + FilRegisteredSealProofStackedDrg2KiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg2KiBV1 + FilRegisteredSealProofStackedDrg8MiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg8MiBV1 + FilRegisteredSealProofStackedDrg512MiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg512MiBV1 + FilRegisteredSealProofStackedDrg32GiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg32GiBV1 + FilRegisteredSealProofStackedDrg64GiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg64GiBV1 +) diff --git a/chain/filecoin/filecoin-ffi/generated/customallocs.go b/chain/filecoin/filecoin-ffi/generated/customallocs.go new file mode 100644 index 00000000..4c8d10dd --- /dev/null +++ b/chain/filecoin/filecoin-ffi/generated/customallocs.go @@ -0,0 +1,54 @@ +package generated + +/* +#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto +#cgo pkg-config: ${SRCDIR}/../filcrypto.pc +#include "../filcrypto.h" +#include +#include "cgo_helpers.h" +*/ +import "C" +import ( + "unsafe" +) + +// AllocateProxy allocates a FilPrivateReplicaInfo proxy object in the C heap, +// returning a function which, when called, frees the allocated memory. This +// method exists because the default c-for-go allocation strategy allocates a +// C struct with a field whose values is a pointer into the Go heap, which is +// not permitted by the most strict CGO check (cgocheck=2). +func (x *FilPrivateReplicaInfo) AllocateProxy() func() { + mem := allocFilPrivateReplicaInfoMemory(1) + proxy := (*C.fil_PrivateReplicaInfo)(mem) + proxy.cache_dir_path = C.CString(x.CacheDirPath) + proxy.comm_r = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)) + proxy.registered_proof = (C.fil_RegisteredPoStProof)(x.RegisteredProof) + proxy.replica_path = C.CString(x.ReplicaPath) + proxy.sector_id = (C.uint64_t)(x.SectorId) + + x.ref81a31e9b = proxy + + return func() { + C.free(unsafe.Pointer(proxy.cache_dir_path)) + C.free(unsafe.Pointer(proxy.replica_path)) + C.free(unsafe.Pointer(proxy)) + } +} + +// AllocateProxy allocates a FilPoStProof proxy object in the C heap, +// returning a function which, when called, frees the allocated memory. +func (x *FilPoStProof) AllocateProxy() func() { + mem := allocFilPoStProofMemory(1) + proxy := (*C.fil_PoStProof)(mem) + + proxy.registered_proof = (C.fil_RegisteredPoStProof)(x.RegisteredProof) + proxy.proof_len = (C.size_t)(x.ProofLen) + proxy.proof_ptr = (*C.uchar)(unsafe.Pointer(C.CString(x.ProofPtr))) + + x.ref3451bfa = proxy + + return func() { + C.free(unsafe.Pointer(proxy.proof_ptr)) + C.free(unsafe.Pointer(proxy)) + } +} diff --git a/chain/filecoin/filecoin-ffi/generated/generated.go b/chain/filecoin/filecoin-ffi/generated/generated.go new file mode 100644 index 00000000..18f4f36e --- /dev/null +++ b/chain/filecoin/filecoin-ffi/generated/generated.go @@ -0,0 +1,809 @@ +// WARNING: This file has automatically been generated +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +package generated + +/* +#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto +#cgo pkg-config: ${SRCDIR}/../filcrypto.pc +#include "../filcrypto.h" +#include +#include "cgo_helpers.h" +*/ +import "C" +import ( + "runtime" + "unsafe" +) + +// FilAggregate function as declared in filecoin-ffi/filcrypto.h:287 +func FilAggregate(flattenedSignaturesPtr string, flattenedSignaturesLen uint) *FilAggregateResponse { + flattenedSignaturesPtr = safeString(flattenedSignaturesPtr) + cflattenedSignaturesPtr, cflattenedSignaturesPtrAllocMap := unpackPUint8TString(flattenedSignaturesPtr) + cflattenedSignaturesLen, cflattenedSignaturesLenAllocMap := (C.size_t)(flattenedSignaturesLen), cgoAllocsUnknown + __ret := C.fil_aggregate(cflattenedSignaturesPtr, cflattenedSignaturesLen) + runtime.KeepAlive(cflattenedSignaturesLenAllocMap) + runtime.KeepAlive(flattenedSignaturesPtr) + runtime.KeepAlive(cflattenedSignaturesPtrAllocMap) + __v := NewFilAggregateResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilClearCache function as declared in filecoin-ffi/filcrypto.h:290 +func FilClearCache(sectorSize uint64, cacheDirPath string) *FilClearCacheResponse { + csectorSize, csectorSizeAllocMap := (C.uint64_t)(sectorSize), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + __ret := C.fil_clear_cache(csectorSize, ccacheDirPath) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(csectorSizeAllocMap) + __v := NewFilClearCacheResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilDestroyAggregateResponse function as declared in filecoin-ffi/filcrypto.h:292 +func FilDestroyAggregateResponse(ptr *FilAggregateResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_aggregate_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyClearCacheResponse function as declared in filecoin-ffi/filcrypto.h:294 +func FilDestroyClearCacheResponse(ptr *FilClearCacheResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_clear_cache_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyFauxrepResponse function as declared in filecoin-ffi/filcrypto.h:296 +func FilDestroyFauxrepResponse(ptr *FilFauxRepResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_fauxrep_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyFinalizeTicketResponse function as declared in filecoin-ffi/filcrypto.h:298 +func FilDestroyFinalizeTicketResponse(ptr *FilFinalizeTicketResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_finalize_ticket_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateDataCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:300 +func FilDestroyGenerateDataCommitmentResponse(ptr *FilGenerateDataCommitmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_data_commitment_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGeneratePieceCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:302 +func FilDestroyGeneratePieceCommitmentResponse(ptr *FilGeneratePieceCommitmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_piece_commitment_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:304 +func FilDestroyGenerateWindowPostResponse(ptr *FilGenerateWindowPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_window_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:306 +func FilDestroyGenerateWinningPostResponse(ptr *FilGenerateWinningPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_winning_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:308 +func FilDestroyGenerateWinningPostSectorChallenge(ptr *FilGenerateWinningPoStSectorChallenge) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_generate_winning_post_sector_challenge(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyGpuDeviceResponse function as declared in filecoin-ffi/filcrypto.h:310 +func FilDestroyGpuDeviceResponse(ptr *FilGpuDeviceResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_gpu_device_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyHashResponse function as declared in filecoin-ffi/filcrypto.h:312 +func FilDestroyHashResponse(ptr *FilHashResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_hash_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyInitLogFdResponse function as declared in filecoin-ffi/filcrypto.h:314 +func FilDestroyInitLogFdResponse(ptr *FilInitLogFdResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_init_log_fd_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyPrivateKeyGenerateResponse function as declared in filecoin-ffi/filcrypto.h:316 +func FilDestroyPrivateKeyGenerateResponse(ptr *FilPrivateKeyGenerateResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_private_key_generate_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyPrivateKeyPublicKeyResponse function as declared in filecoin-ffi/filcrypto.h:318 +func FilDestroyPrivateKeyPublicKeyResponse(ptr *FilPrivateKeyPublicKeyResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_private_key_public_key_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyPrivateKeySignResponse function as declared in filecoin-ffi/filcrypto.h:320 +func FilDestroyPrivateKeySignResponse(ptr *FilPrivateKeySignResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_private_key_sign_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:322 +func FilDestroySealCommitPhase1Response(ptr *FilSealCommitPhase1Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_commit_phase1_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:324 +func FilDestroySealCommitPhase2Response(ptr *FilSealCommitPhase2Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_commit_phase2_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealPreCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:326 +func FilDestroySealPreCommitPhase1Response(ptr *FilSealPreCommitPhase1Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_pre_commit_phase1_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroySealPreCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:328 +func FilDestroySealPreCommitPhase2Response(ptr *FilSealPreCommitPhase2Response) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_seal_pre_commit_phase2_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyStringResponse function as declared in filecoin-ffi/filcrypto.h:330 +func FilDestroyStringResponse(ptr *FilStringResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_string_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyUnsealRangeResponse function as declared in filecoin-ffi/filcrypto.h:332 +func FilDestroyUnsealRangeResponse(ptr *FilUnsealRangeResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_unseal_range_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyVerifySealResponse function as declared in filecoin-ffi/filcrypto.h:338 +func FilDestroyVerifySealResponse(ptr *FilVerifySealResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_seal_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyVerifyWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:340 +func FilDestroyVerifyWindowPostResponse(ptr *FilVerifyWindowPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_window_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyVerifyWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:346 +func FilDestroyVerifyWinningPostResponse(ptr *FilVerifyWinningPoStResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_verify_winning_post_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyWriteWithAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:348 +func FilDestroyWriteWithAlignmentResponse(ptr *FilWriteWithAlignmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_write_with_alignment_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilDestroyWriteWithoutAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:350 +func FilDestroyWriteWithoutAlignmentResponse(ptr *FilWriteWithoutAlignmentResponse) { + cptr, cptrAllocMap := ptr.PassRef() + C.fil_destroy_write_without_alignment_response(cptr) + runtime.KeepAlive(cptrAllocMap) +} + +// FilFauxrep function as declared in filecoin-ffi/filcrypto.h:352 +func FilFauxrep(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorPath string) *FilFauxRepResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + sealedSectorPath = safeString(sealedSectorPath) + csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) + __ret := C.fil_fauxrep(cregisteredProof, ccacheDirPath, csealedSectorPath) + runtime.KeepAlive(sealedSectorPath) + runtime.KeepAlive(csealedSectorPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilFauxrep2 function as declared in filecoin-ffi/filcrypto.h:356 +func FilFauxrep2(registeredProof FilRegisteredSealProof, cacheDirPath string, existingPAuxPath string) *FilFauxRepResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + existingPAuxPath = safeString(existingPAuxPath) + cexistingPAuxPath, cexistingPAuxPathAllocMap := unpackPCharString(existingPAuxPath) + __ret := C.fil_fauxrep2(cregisteredProof, ccacheDirPath, cexistingPAuxPath) + runtime.KeepAlive(existingPAuxPath) + runtime.KeepAlive(cexistingPAuxPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGenerateDataCommitment function as declared in filecoin-ffi/filcrypto.h:363 +func FilGenerateDataCommitment(registeredProof FilRegisteredSealProof, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilGenerateDataCommitmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) + cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown + __ret := C.fil_generate_data_commitment(cregisteredProof, cpiecesPtr, cpiecesLen) + runtime.KeepAlive(cpiecesLenAllocMap) + packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) + runtime.KeepAlive(cpiecesPtrAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilGenerateDataCommitmentResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGeneratePieceCommitment function as declared in filecoin-ffi/filcrypto.h:371 +func FilGeneratePieceCommitment(registeredProof FilRegisteredSealProof, pieceFdRaw int32, unpaddedPieceSize uint64) *FilGeneratePieceCommitmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cpieceFdRaw, cpieceFdRawAllocMap := (C.int)(pieceFdRaw), cgoAllocsUnknown + cunpaddedPieceSize, cunpaddedPieceSizeAllocMap := (C.uint64_t)(unpaddedPieceSize), cgoAllocsUnknown + __ret := C.fil_generate_piece_commitment(cregisteredProof, cpieceFdRaw, cunpaddedPieceSize) + runtime.KeepAlive(cunpaddedPieceSizeAllocMap) + runtime.KeepAlive(cpieceFdRawAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilGeneratePieceCommitmentResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGenerateWindowPost function as declared in filecoin-ffi/filcrypto.h:379 +func FilGenerateWindowPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWindowPoStResponse { + crandomness, crandomnessAllocMap := randomness.PassValue() + creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr) + creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_generate_window_post(crandomness, creplicasPtr, creplicasLen, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(creplicasLenAllocMap) + packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr) + runtime.KeepAlive(creplicasPtrAllocMap) + runtime.KeepAlive(crandomnessAllocMap) + __v := NewFilGenerateWindowPoStResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGenerateWinningPost function as declared in filecoin-ffi/filcrypto.h:388 +func FilGenerateWinningPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWinningPoStResponse { + crandomness, crandomnessAllocMap := randomness.PassValue() + creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr) + creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_generate_winning_post(crandomness, creplicasPtr, creplicasLen, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(creplicasLenAllocMap) + packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr) + runtime.KeepAlive(creplicasPtrAllocMap) + runtime.KeepAlive(crandomnessAllocMap) + __v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:397 +func FilGenerateWinningPostSectorChallenge(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, sectorSetLen uint64, proverId Fil32ByteArray) *FilGenerateWinningPoStSectorChallenge { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + crandomness, crandomnessAllocMap := randomness.PassValue() + csectorSetLen, csectorSetLenAllocMap := (C.uint64_t)(sectorSetLen), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_generate_winning_post_sector_challenge(cregisteredProof, crandomness, csectorSetLen, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorSetLenAllocMap) + runtime.KeepAlive(crandomnessAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilGenerateWinningPoStSectorChallengeRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetGpuDevices function as declared in filecoin-ffi/filcrypto.h:405 +func FilGetGpuDevices() *FilGpuDeviceResponse { + __ret := C.fil_get_gpu_devices() + __v := NewFilGpuDeviceResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetMaxUserBytesPerStagedSector function as declared in filecoin-ffi/filcrypto.h:411 +func FilGetMaxUserBytesPerStagedSector(registeredProof FilRegisteredSealProof) uint64 { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_max_user_bytes_per_staged_sector(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := (uint64)(__ret) + return __v +} + +// FilGetPostCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:417 +func FilGetPostCircuitIdentifier(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_circuit_identifier(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetPostParamsCid function as declared in filecoin-ffi/filcrypto.h:423 +func FilGetPostParamsCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_params_cid(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetPostParamsPath function as declared in filecoin-ffi/filcrypto.h:430 +func FilGetPostParamsPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_params_path(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetPostVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:436 +func FilGetPostVerifyingKeyCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_verifying_key_cid(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetPostVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:443 +func FilGetPostVerifyingKeyPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_verifying_key_path(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetPostVersion function as declared in filecoin-ffi/filcrypto.h:449 +func FilGetPostVersion(registeredProof FilRegisteredPoStProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_post_version(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetSealCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:455 +func FilGetSealCircuitIdentifier(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_circuit_identifier(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetSealParamsCid function as declared in filecoin-ffi/filcrypto.h:461 +func FilGetSealParamsCid(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_params_cid(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetSealParamsPath function as declared in filecoin-ffi/filcrypto.h:468 +func FilGetSealParamsPath(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_params_path(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetSealVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:474 +func FilGetSealVerifyingKeyCid(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_verifying_key_cid(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetSealVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:481 +func FilGetSealVerifyingKeyPath(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_verifying_key_path(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilGetSealVersion function as declared in filecoin-ffi/filcrypto.h:487 +func FilGetSealVersion(registeredProof FilRegisteredSealProof) *FilStringResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + __ret := C.fil_get_seal_version(cregisteredProof) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilHash function as declared in filecoin-ffi/filcrypto.h:497 +func FilHash(messagePtr string, messageLen uint) *FilHashResponse { + messagePtr = safeString(messagePtr) + cmessagePtr, cmessagePtrAllocMap := unpackPUint8TString(messagePtr) + cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown + __ret := C.fil_hash(cmessagePtr, cmessageLen) + runtime.KeepAlive(cmessageLenAllocMap) + runtime.KeepAlive(messagePtr) + runtime.KeepAlive(cmessagePtrAllocMap) + __v := NewFilHashResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilHashVerify function as declared in filecoin-ffi/filcrypto.h:511 +func FilHashVerify(signaturePtr string, flattenedMessagesPtr string, flattenedMessagesLen uint, messageSizesPtr []uint, messageSizesLen uint, flattenedPublicKeysPtr string, flattenedPublicKeysLen uint) int32 { + signaturePtr = safeString(signaturePtr) + csignaturePtr, csignaturePtrAllocMap := unpackPUint8TString(signaturePtr) + flattenedMessagesPtr = safeString(flattenedMessagesPtr) + cflattenedMessagesPtr, cflattenedMessagesPtrAllocMap := unpackPUint8TString(flattenedMessagesPtr) + cflattenedMessagesLen, cflattenedMessagesLenAllocMap := (C.size_t)(flattenedMessagesLen), cgoAllocsUnknown + cmessageSizesPtr, cmessageSizesPtrAllocMap := (*C.size_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&messageSizesPtr)).Data)), cgoAllocsUnknown + cmessageSizesLen, cmessageSizesLenAllocMap := (C.size_t)(messageSizesLen), cgoAllocsUnknown + flattenedPublicKeysPtr = safeString(flattenedPublicKeysPtr) + cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := unpackPUint8TString(flattenedPublicKeysPtr) + cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown + __ret := C.fil_hash_verify(csignaturePtr, cflattenedMessagesPtr, cflattenedMessagesLen, cmessageSizesPtr, cmessageSizesLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) + runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) + runtime.KeepAlive(flattenedPublicKeysPtr) + runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) + runtime.KeepAlive(cmessageSizesLenAllocMap) + runtime.KeepAlive(cmessageSizesPtrAllocMap) + runtime.KeepAlive(cflattenedMessagesLenAllocMap) + runtime.KeepAlive(flattenedMessagesPtr) + runtime.KeepAlive(cflattenedMessagesPtrAllocMap) + runtime.KeepAlive(signaturePtr) + runtime.KeepAlive(csignaturePtrAllocMap) + __v := (int32)(__ret) + return __v +} + +// FilInitLogFd function as declared in filecoin-ffi/filcrypto.h:528 +func FilInitLogFd(logFd int32) *FilInitLogFdResponse { + clogFd, clogFdAllocMap := (C.int)(logFd), cgoAllocsUnknown + __ret := C.fil_init_log_fd(clogFd) + runtime.KeepAlive(clogFdAllocMap) + __v := NewFilInitLogFdResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilPrivateKeyGenerate function as declared in filecoin-ffi/filcrypto.h:533 +func FilPrivateKeyGenerate() *FilPrivateKeyGenerateResponse { + __ret := C.fil_private_key_generate() + __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilPrivateKeyGenerateWithSeed function as declared in filecoin-ffi/filcrypto.h:546 +func FilPrivateKeyGenerateWithSeed(rawSeed Fil32ByteArray) *FilPrivateKeyGenerateResponse { + crawSeed, crawSeedAllocMap := rawSeed.PassValue() + __ret := C.fil_private_key_generate_with_seed(crawSeed) + runtime.KeepAlive(crawSeedAllocMap) + __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilPrivateKeyPublicKey function as declared in filecoin-ffi/filcrypto.h:557 +func FilPrivateKeyPublicKey(rawPrivateKeyPtr string) *FilPrivateKeyPublicKeyResponse { + rawPrivateKeyPtr = safeString(rawPrivateKeyPtr) + crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := unpackPUint8TString(rawPrivateKeyPtr) + __ret := C.fil_private_key_public_key(crawPrivateKeyPtr) + runtime.KeepAlive(rawPrivateKeyPtr) + runtime.KeepAlive(crawPrivateKeyPtrAllocMap) + __v := NewFilPrivateKeyPublicKeyResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilPrivateKeySign function as declared in filecoin-ffi/filcrypto.h:570 +func FilPrivateKeySign(rawPrivateKeyPtr string, messagePtr string, messageLen uint) *FilPrivateKeySignResponse { + rawPrivateKeyPtr = safeString(rawPrivateKeyPtr) + crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := unpackPUint8TString(rawPrivateKeyPtr) + messagePtr = safeString(messagePtr) + cmessagePtr, cmessagePtrAllocMap := unpackPUint8TString(messagePtr) + cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown + __ret := C.fil_private_key_sign(crawPrivateKeyPtr, cmessagePtr, cmessageLen) + runtime.KeepAlive(cmessageLenAllocMap) + runtime.KeepAlive(messagePtr) + runtime.KeepAlive(cmessagePtrAllocMap) + runtime.KeepAlive(rawPrivateKeyPtr) + runtime.KeepAlive(crawPrivateKeyPtrAllocMap) + __v := NewFilPrivateKeySignResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilSealCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:578 +func FilSealCommitPhase1(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, cacheDirPath string, replicaPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealCommitPhase1Response { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + ccommR, ccommRAllocMap := commR.PassValue() + ccommD, ccommDAllocMap := commD.PassValue() + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + replicaPath = safeString(replicaPath) + creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() + cseed, cseedAllocMap := seed.PassValue() + cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) + cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown + __ret := C.fil_seal_commit_phase1(cregisteredProof, ccommR, ccommD, ccacheDirPath, creplicaPath, csectorId, cproverId, cticket, cseed, cpiecesPtr, cpiecesLen) + runtime.KeepAlive(cpiecesLenAllocMap) + packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) + runtime.KeepAlive(cpiecesPtrAllocMap) + runtime.KeepAlive(cseedAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(replicaPath) + runtime.KeepAlive(creplicaPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(ccommDAllocMap) + runtime.KeepAlive(ccommRAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilSealCommitPhase1ResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilSealCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:590 +func FilSealCommitPhase2(sealCommitPhase1OutputPtr string, sealCommitPhase1OutputLen uint, sectorId uint64, proverId Fil32ByteArray) *FilSealCommitPhase2Response { + sealCommitPhase1OutputPtr = safeString(sealCommitPhase1OutputPtr) + csealCommitPhase1OutputPtr, csealCommitPhase1OutputPtrAllocMap := unpackPUint8TString(sealCommitPhase1OutputPtr) + csealCommitPhase1OutputLen, csealCommitPhase1OutputLenAllocMap := (C.size_t)(sealCommitPhase1OutputLen), cgoAllocsUnknown + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_seal_commit_phase2(csealCommitPhase1OutputPtr, csealCommitPhase1OutputLen, csectorId, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(csealCommitPhase1OutputLenAllocMap) + runtime.KeepAlive(sealCommitPhase1OutputPtr) + runtime.KeepAlive(csealCommitPhase1OutputPtrAllocMap) + __v := NewFilSealCommitPhase2ResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilSealPreCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:599 +func FilSealPreCommitPhase1(registeredProof FilRegisteredSealProof, cacheDirPath string, stagedSectorPath string, sealedSectorPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealPreCommitPhase1Response { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + stagedSectorPath = safeString(stagedSectorPath) + cstagedSectorPath, cstagedSectorPathAllocMap := unpackPCharString(stagedSectorPath) + sealedSectorPath = safeString(sealedSectorPath) + csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() + cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) + cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown + __ret := C.fil_seal_pre_commit_phase1(cregisteredProof, ccacheDirPath, cstagedSectorPath, csealedSectorPath, csectorId, cproverId, cticket, cpiecesPtr, cpiecesLen) + runtime.KeepAlive(cpiecesLenAllocMap) + packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) + runtime.KeepAlive(cpiecesPtrAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(sealedSectorPath) + runtime.KeepAlive(csealedSectorPathAllocMap) + runtime.KeepAlive(stagedSectorPath) + runtime.KeepAlive(cstagedSectorPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilSealPreCommitPhase1ResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilSealPreCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:613 +func FilSealPreCommitPhase2(sealPreCommitPhase1OutputPtr string, sealPreCommitPhase1OutputLen uint, cacheDirPath string, sealedSectorPath string) *FilSealPreCommitPhase2Response { + sealPreCommitPhase1OutputPtr = safeString(sealPreCommitPhase1OutputPtr) + csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputPtrAllocMap := unpackPUint8TString(sealPreCommitPhase1OutputPtr) + csealPreCommitPhase1OutputLen, csealPreCommitPhase1OutputLenAllocMap := (C.size_t)(sealPreCommitPhase1OutputLen), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + sealedSectorPath = safeString(sealedSectorPath) + csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) + __ret := C.fil_seal_pre_commit_phase2(csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputLen, ccacheDirPath, csealedSectorPath) + runtime.KeepAlive(sealedSectorPath) + runtime.KeepAlive(csealedSectorPathAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(csealPreCommitPhase1OutputLenAllocMap) + runtime.KeepAlive(sealPreCommitPhase1OutputPtr) + runtime.KeepAlive(csealPreCommitPhase1OutputPtrAllocMap) + __v := NewFilSealPreCommitPhase2ResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilUnsealRange function as declared in filecoin-ffi/filcrypto.h:621 +func FilUnsealRange(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorFdRaw int32, unsealOutputFdRaw int32, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, commD Fil32ByteArray, unpaddedByteIndex uint64, unpaddedBytesAmount uint64) *FilUnsealRangeResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + cacheDirPath = safeString(cacheDirPath) + ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) + csealedSectorFdRaw, csealedSectorFdRawAllocMap := (C.int)(sealedSectorFdRaw), cgoAllocsUnknown + cunsealOutputFdRaw, cunsealOutputFdRawAllocMap := (C.int)(unsealOutputFdRaw), cgoAllocsUnknown + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() + ccommD, ccommDAllocMap := commD.PassValue() + cunpaddedByteIndex, cunpaddedByteIndexAllocMap := (C.uint64_t)(unpaddedByteIndex), cgoAllocsUnknown + cunpaddedBytesAmount, cunpaddedBytesAmountAllocMap := (C.uint64_t)(unpaddedBytesAmount), cgoAllocsUnknown + __ret := C.fil_unseal_range(cregisteredProof, ccacheDirPath, csealedSectorFdRaw, cunsealOutputFdRaw, csectorId, cproverId, cticket, ccommD, cunpaddedByteIndex, cunpaddedBytesAmount) + runtime.KeepAlive(cunpaddedBytesAmountAllocMap) + runtime.KeepAlive(cunpaddedByteIndexAllocMap) + runtime.KeepAlive(ccommDAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(cunsealOutputFdRawAllocMap) + runtime.KeepAlive(csealedSectorFdRawAllocMap) + runtime.KeepAlive(cacheDirPath) + runtime.KeepAlive(ccacheDirPathAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilUnsealRangeResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilVerify function as declared in filecoin-ffi/filcrypto.h:643 +func FilVerify(signaturePtr string, flattenedDigestsPtr string, flattenedDigestsLen uint, flattenedPublicKeysPtr string, flattenedPublicKeysLen uint) int32 { + signaturePtr = safeString(signaturePtr) + csignaturePtr, csignaturePtrAllocMap := unpackPUint8TString(signaturePtr) + flattenedDigestsPtr = safeString(flattenedDigestsPtr) + cflattenedDigestsPtr, cflattenedDigestsPtrAllocMap := unpackPUint8TString(flattenedDigestsPtr) + cflattenedDigestsLen, cflattenedDigestsLenAllocMap := (C.size_t)(flattenedDigestsLen), cgoAllocsUnknown + flattenedPublicKeysPtr = safeString(flattenedPublicKeysPtr) + cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := unpackPUint8TString(flattenedPublicKeysPtr) + cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown + __ret := C.fil_verify(csignaturePtr, cflattenedDigestsPtr, cflattenedDigestsLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) + runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) + runtime.KeepAlive(flattenedPublicKeysPtr) + runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) + runtime.KeepAlive(cflattenedDigestsLenAllocMap) + runtime.KeepAlive(flattenedDigestsPtr) + runtime.KeepAlive(cflattenedDigestsPtrAllocMap) + runtime.KeepAlive(signaturePtr) + runtime.KeepAlive(csignaturePtrAllocMap) + __v := (int32)(__ret) + return __v +} + +// FilVerifySeal function as declared in filecoin-ffi/filcrypto.h:653 +func FilVerifySeal(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, sectorId uint64, proofPtr string, proofLen uint) *FilVerifySealResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + ccommR, ccommRAllocMap := commR.PassValue() + ccommD, ccommDAllocMap := commD.PassValue() + cproverId, cproverIdAllocMap := proverId.PassValue() + cticket, cticketAllocMap := ticket.PassValue() + cseed, cseedAllocMap := seed.PassValue() + csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown + proofPtr = safeString(proofPtr) + cproofPtr, cproofPtrAllocMap := unpackPUint8TString(proofPtr) + cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown + __ret := C.fil_verify_seal(cregisteredProof, ccommR, ccommD, cproverId, cticket, cseed, csectorId, cproofPtr, cproofLen) + runtime.KeepAlive(cproofLenAllocMap) + runtime.KeepAlive(proofPtr) + runtime.KeepAlive(cproofPtrAllocMap) + runtime.KeepAlive(csectorIdAllocMap) + runtime.KeepAlive(cseedAllocMap) + runtime.KeepAlive(cticketAllocMap) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(ccommDAllocMap) + runtime.KeepAlive(ccommRAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilVerifySealResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilVerifyWindowPost function as declared in filecoin-ffi/filcrypto.h:666 +func FilVerifyWindowPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWindowPoStResponse { + crandomness, crandomnessAllocMap := randomness.PassValue() + creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) + creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown + cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) + cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_verify_window_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(cproofsLenAllocMap) + packSFilPoStProof(proofsPtr, cproofsPtr) + runtime.KeepAlive(cproofsPtrAllocMap) + runtime.KeepAlive(creplicasLenAllocMap) + packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) + runtime.KeepAlive(creplicasPtrAllocMap) + runtime.KeepAlive(crandomnessAllocMap) + __v := NewFilVerifyWindowPoStResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilVerifyWinningPost function as declared in filecoin-ffi/filcrypto.h:676 +func FilVerifyWinningPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWinningPoStResponse { + crandomness, crandomnessAllocMap := randomness.PassValue() + creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) + creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown + cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) + cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown + cproverId, cproverIdAllocMap := proverId.PassValue() + __ret := C.fil_verify_winning_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) + runtime.KeepAlive(cproverIdAllocMap) + runtime.KeepAlive(cproofsLenAllocMap) + packSFilPoStProof(proofsPtr, cproofsPtr) + runtime.KeepAlive(cproofsPtrAllocMap) + runtime.KeepAlive(creplicasLenAllocMap) + packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) + runtime.KeepAlive(creplicasPtrAllocMap) + runtime.KeepAlive(crandomnessAllocMap) + __v := NewFilVerifyWinningPoStResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilWriteWithAlignment function as declared in filecoin-ffi/filcrypto.h:687 +func FilWriteWithAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32, existingPieceSizesPtr []uint64, existingPieceSizesLen uint) *FilWriteWithAlignmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown + csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown + cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown + cexistingPieceSizesPtr, cexistingPieceSizesPtrAllocMap := (*C.uint64_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&existingPieceSizesPtr)).Data)), cgoAllocsUnknown + cexistingPieceSizesLen, cexistingPieceSizesLenAllocMap := (C.size_t)(existingPieceSizesLen), cgoAllocsUnknown + __ret := C.fil_write_with_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd, cexistingPieceSizesPtr, cexistingPieceSizesLen) + runtime.KeepAlive(cexistingPieceSizesLenAllocMap) + runtime.KeepAlive(cexistingPieceSizesPtrAllocMap) + runtime.KeepAlive(cdstFdAllocMap) + runtime.KeepAlive(csrcSizeAllocMap) + runtime.KeepAlive(csrcFdAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilWriteWithAlignmentResponseRef(unsafe.Pointer(__ret)) + return __v +} + +// FilWriteWithoutAlignment function as declared in filecoin-ffi/filcrypto.h:698 +func FilWriteWithoutAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32) *FilWriteWithoutAlignmentResponse { + cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown + csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown + csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown + cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown + __ret := C.fil_write_without_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd) + runtime.KeepAlive(cdstFdAllocMap) + runtime.KeepAlive(csrcSizeAllocMap) + runtime.KeepAlive(csrcFdAllocMap) + runtime.KeepAlive(cregisteredProofAllocMap) + __v := NewFilWriteWithoutAlignmentResponseRef(unsafe.Pointer(__ret)) + return __v +} diff --git a/chain/filecoin/filecoin-ffi/generated/types.go b/chain/filecoin/filecoin-ffi/generated/types.go new file mode 100644 index 00000000..6e26e56e --- /dev/null +++ b/chain/filecoin/filecoin-ffi/generated/types.go @@ -0,0 +1,319 @@ +// WARNING: This file has automatically been generated +// Code generated by https://git.io/c-for-go. DO NOT EDIT. + +package generated + +/* +#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto +#cgo pkg-config: ${SRCDIR}/../filcrypto.pc +#include "../filcrypto.h" +#include +#include "cgo_helpers.h" +*/ +import "C" + +// FilBLSSignature as declared in filecoin-ffi/filcrypto.h:56 +type FilBLSSignature struct { + Inner [96]byte + refa2ac09ba *C.fil_BLSSignature + allocsa2ac09ba interface{} +} + +// FilAggregateResponse as declared in filecoin-ffi/filcrypto.h:63 +type FilAggregateResponse struct { + Signature FilBLSSignature + refb3efa36d *C.fil_AggregateResponse + allocsb3efa36d interface{} +} + +// FilClearCacheResponse as declared in filecoin-ffi/filcrypto.h:68 +type FilClearCacheResponse struct { + ErrorMsg string + StatusCode FCPResponseStatus + refa9a80400 *C.fil_ClearCacheResponse + allocsa9a80400 interface{} +} + +// FilFauxRepResponse as declared in filecoin-ffi/filcrypto.h:74 +type FilFauxRepResponse struct { + ErrorMsg string + StatusCode FCPResponseStatus + Commitment [32]byte + refaa003f71 *C.fil_FauxRepResponse + allocsaa003f71 interface{} +} + +// FilFinalizeTicketResponse as declared in filecoin-ffi/filcrypto.h:80 +type FilFinalizeTicketResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + Ticket [32]byte + refb370fa86 *C.fil_FinalizeTicketResponse + allocsb370fa86 interface{} +} + +// FilGenerateDataCommitmentResponse as declared in filecoin-ffi/filcrypto.h:86 +type FilGenerateDataCommitmentResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + CommD [32]byte + ref87da7dd9 *C.fil_GenerateDataCommitmentResponse + allocs87da7dd9 interface{} +} + +// FilGeneratePieceCommitmentResponse as declared in filecoin-ffi/filcrypto.h:97 +type FilGeneratePieceCommitmentResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + CommP [32]byte + NumBytesAligned uint64 + ref4b00fda4 *C.fil_GeneratePieceCommitmentResponse + allocs4b00fda4 interface{} +} + +// FilPoStProof as declared in filecoin-ffi/filcrypto.h:103 +type FilPoStProof struct { + RegisteredProof FilRegisteredPoStProof + ProofLen uint + ProofPtr string + ref3451bfa *C.fil_PoStProof + allocs3451bfa interface{} +} + +// FilGenerateWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:110 +type FilGenerateWindowPoStResponse struct { + ErrorMsg string + ProofsLen uint + ProofsPtr []FilPoStProof + StatusCode FCPResponseStatus + ref2a5f3ba8 *C.fil_GenerateWindowPoStResponse + allocs2a5f3ba8 interface{} +} + +// FilGenerateWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:117 +type FilGenerateWinningPoStResponse struct { + ErrorMsg string + ProofsLen uint + ProofsPtr []FilPoStProof + StatusCode FCPResponseStatus + ref1405b8ec *C.fil_GenerateWinningPoStResponse + allocs1405b8ec interface{} +} + +// FilGenerateWinningPoStSectorChallenge as declared in filecoin-ffi/filcrypto.h:124 +type FilGenerateWinningPoStSectorChallenge struct { + ErrorMsg string + StatusCode FCPResponseStatus + IdsPtr []uint64 + IdsLen uint + ref69d2a405 *C.fil_GenerateWinningPoStSectorChallenge + allocs69d2a405 interface{} +} + +// FilGpuDeviceResponse as declared in filecoin-ffi/filcrypto.h:131 +type FilGpuDeviceResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + DevicesLen uint + DevicesPtr []string + ref58f92915 *C.fil_GpuDeviceResponse + allocs58f92915 interface{} +} + +// FilBLSDigest as declared in filecoin-ffi/filcrypto.h:135 +type FilBLSDigest struct { + Inner [96]byte + ref215fc78c *C.fil_BLSDigest + allocs215fc78c interface{} +} + +// FilHashResponse as declared in filecoin-ffi/filcrypto.h:142 +type FilHashResponse struct { + Digest FilBLSDigest + refc52a22ef *C.fil_HashResponse + allocsc52a22ef interface{} +} + +// FilInitLogFdResponse as declared in filecoin-ffi/filcrypto.h:147 +type FilInitLogFdResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + ref3c1a0a08 *C.fil_InitLogFdResponse + allocs3c1a0a08 interface{} +} + +// FilBLSPrivateKey as declared in filecoin-ffi/filcrypto.h:151 +type FilBLSPrivateKey struct { + Inner [32]byte + ref2f77fe3a *C.fil_BLSPrivateKey + allocs2f77fe3a interface{} +} + +// FilPrivateKeyGenerateResponse as declared in filecoin-ffi/filcrypto.h:158 +type FilPrivateKeyGenerateResponse struct { + PrivateKey FilBLSPrivateKey + ref2dba09f *C.fil_PrivateKeyGenerateResponse + allocs2dba09f interface{} +} + +// FilBLSPublicKey as declared in filecoin-ffi/filcrypto.h:162 +type FilBLSPublicKey struct { + Inner [48]byte + ref6d0cab13 *C.fil_BLSPublicKey + allocs6d0cab13 interface{} +} + +// FilPrivateKeyPublicKeyResponse as declared in filecoin-ffi/filcrypto.h:169 +type FilPrivateKeyPublicKeyResponse struct { + PublicKey FilBLSPublicKey + refee14e59d *C.fil_PrivateKeyPublicKeyResponse + allocsee14e59d interface{} +} + +// FilPrivateKeySignResponse as declared in filecoin-ffi/filcrypto.h:176 +type FilPrivateKeySignResponse struct { + Signature FilBLSSignature + refcdf97b28 *C.fil_PrivateKeySignResponse + allocscdf97b28 interface{} +} + +// FilSealCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:183 +type FilSealCommitPhase1Response struct { + StatusCode FCPResponseStatus + ErrorMsg string + SealCommitPhase1OutputPtr string + SealCommitPhase1OutputLen uint + ref61ed8561 *C.fil_SealCommitPhase1Response + allocs61ed8561 interface{} +} + +// FilSealCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:190 +type FilSealCommitPhase2Response struct { + StatusCode FCPResponseStatus + ErrorMsg string + ProofPtr string + ProofLen uint + ref5860b9a4 *C.fil_SealCommitPhase2Response + allocs5860b9a4 interface{} +} + +// FilSealPreCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:197 +type FilSealPreCommitPhase1Response struct { + ErrorMsg string + StatusCode FCPResponseStatus + SealPreCommitPhase1OutputPtr string + SealPreCommitPhase1OutputLen uint + ref132bbfd8 *C.fil_SealPreCommitPhase1Response + allocs132bbfd8 interface{} +} + +// FilSealPreCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:205 +type FilSealPreCommitPhase2Response struct { + ErrorMsg string + StatusCode FCPResponseStatus + RegisteredProof FilRegisteredSealProof + CommD [32]byte + CommR [32]byte + ref2aa6831d *C.fil_SealPreCommitPhase2Response + allocs2aa6831d interface{} +} + +// FilStringResponse as declared in filecoin-ffi/filcrypto.h:214 +type FilStringResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + StringVal string + ref4f413043 *C.fil_StringResponse + allocs4f413043 interface{} +} + +// FilUnsealRangeResponse as declared in filecoin-ffi/filcrypto.h:219 +type FilUnsealRangeResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + ref61e219c9 *C.fil_UnsealRangeResponse + allocs61e219c9 interface{} +} + +// FilVerifySealResponse as declared in filecoin-ffi/filcrypto.h:225 +type FilVerifySealResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + IsValid bool + refd4397079 *C.fil_VerifySealResponse + allocsd4397079 interface{} +} + +// FilVerifyWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:231 +type FilVerifyWindowPoStResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + IsValid bool + ref34c4d49f *C.fil_VerifyWindowPoStResponse + allocs34c4d49f interface{} +} + +// FilVerifyWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:237 +type FilVerifyWinningPoStResponse struct { + StatusCode FCPResponseStatus + ErrorMsg string + IsValid bool + refaca6860c *C.fil_VerifyWinningPoStResponse + allocsaca6860c interface{} +} + +// FilWriteWithAlignmentResponse as declared in filecoin-ffi/filcrypto.h:245 +type FilWriteWithAlignmentResponse struct { + CommP [32]byte + ErrorMsg string + LeftAlignmentUnpadded uint64 + StatusCode FCPResponseStatus + TotalWriteUnpadded uint64 + refa330e79 *C.fil_WriteWithAlignmentResponse + allocsa330e79 interface{} +} + +// FilWriteWithoutAlignmentResponse as declared in filecoin-ffi/filcrypto.h:252 +type FilWriteWithoutAlignmentResponse struct { + CommP [32]byte + ErrorMsg string + StatusCode FCPResponseStatus + TotalWriteUnpadded uint64 + refc8e1ed8 *C.fil_WriteWithoutAlignmentResponse + allocsc8e1ed8 interface{} +} + +// FilPublicPieceInfo as declared in filecoin-ffi/filcrypto.h:257 +type FilPublicPieceInfo struct { + NumBytes uint64 + CommP [32]byte + refd00025ac *C.fil_PublicPieceInfo + allocsd00025ac interface{} +} + +// Fil32ByteArray as declared in filecoin-ffi/filcrypto.h:261 +type Fil32ByteArray struct { + Inner [32]byte + ref373ec61a *C.fil_32ByteArray + allocs373ec61a interface{} +} + +// FilPrivateReplicaInfo as declared in filecoin-ffi/filcrypto.h:269 +type FilPrivateReplicaInfo struct { + RegisteredProof FilRegisteredPoStProof + CacheDirPath string + CommR [32]byte + ReplicaPath string + SectorId uint64 + ref81a31e9b *C.fil_PrivateReplicaInfo + allocs81a31e9b interface{} +} + +// FilPublicReplicaInfo as declared in filecoin-ffi/filcrypto.h:275 +type FilPublicReplicaInfo struct { + RegisteredProof FilRegisteredPoStProof + CommR [32]byte + SectorId uint64 + ref81b617c2 *C.fil_PublicReplicaInfo + allocs81b617c2 interface{} +} diff --git a/chain/filecoin/filecoin-ffi/go.mod b/chain/filecoin/filecoin-ffi/go.mod new file mode 100644 index 00000000..f89b86b0 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/go.mod @@ -0,0 +1,15 @@ +module github.com/filecoin-project/filecoin-ffi + +go 1.13 + +require ( + github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be + github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f + github.com/filecoin-project/specs-actors v0.6.1 + github.com/ipfs/go-cid v0.0.6 + github.com/pkg/errors v0.9.1 + github.com/stretchr/testify v1.4.0 + github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829 +) + +replace github.com/xlab/c-for-go => github.com/Kubuxu/c-for-go v0.0.0-20200729154323-9d77fa534f6d diff --git a/chain/filecoin/filecoin-ffi/go.sum b/chain/filecoin/filecoin-ffi/go.sum new file mode 100644 index 00000000..7e0e350a --- /dev/null +++ b/chain/filecoin/filecoin-ffi/go.sum @@ -0,0 +1,190 @@ +github.com/Kubuxu/c-for-go v0.0.0-20200729154323-9d77fa534f6d h1:JghhdYRtonvueFGY1fvc5Nxj81abWk5D0dirvlo8OtQ= +github.com/Kubuxu/c-for-go v0.0.0-20200729154323-9d77fa534f6d/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:TooKBwR/g8jG0hZ3lqe9S5sy2vTUcLOZLlz3M5wGn2E= +github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= +github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= +github.com/filecoin-project/go-bitfield v0.0.1 h1:Xg/JnrqqE77aJVKdbEyR04n9FZQWhwrN+buDgQCVpZU= +github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= +github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= +github.com/filecoin-project/specs-actors v0.6.1 h1:rhHlEzqcuuQU6oKc4csuq+/kQBDZ4EXtSomoN2XApCA= +github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= +github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= +github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= +github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= +github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= +github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= +github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= +github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= +github.com/ipfs/go-cid v0.0.5 h1:o0Ix8e/ql7Zb5UVUJEUfjsWCIY8t48++9lR8qi6oiJU= +github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= +github.com/ipfs/go-cid v0.0.6 h1:go0y+GcDOGeJIV01FeBsta4FHngoA4Wz7KMeLkXAhMs= +github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= +github.com/ipfs/go-ipfs-util v0.0.1 h1:Wz9bL2wB2YBJqggkA4dD7oSmqB4cAnpNbGrlHJulv50= +github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= +github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= +github.com/ipfs/go-ipld-cbor v0.0.4 h1:Aw3KPOKXjvrm6VjwJvFf1F1ekR/BH3jdof3Bk7OTiSA= +github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= +github.com/ipfs/go-ipld-format v0.0.1 h1:HCu4eB/Gh+KD/Q0M8u888RFkorTWNIL3da4oc5dwc80= +github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= +github.com/ipfs/go-ipld-format v0.0.2 h1:OVAGlyYT6JPZ0pEfGntFPS40lfrDmaDbQwNHEY2G9Zs= +github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= +github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= +github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= +github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= +github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= +github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= +github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= +github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= +github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= +github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= +github.com/multiformats/go-multibase v0.0.1 h1:PN9/v21eLywrFWdFNsFKaU04kLJzuYzmrJR+ubhT9qA= +github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= +github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= +github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= +github.com/multiformats/go-multihash v0.0.10 h1:lMoNbh2Ssd9PUF74Nz008KGzGPlfeV6wH3rit5IIGCM= +github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= +github.com/multiformats/go-multihash v0.0.13 h1:06x+mk/zj1FoMsgNejLpy6QTvJqlSt/BhLEy87zidlc= +github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= +github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-varint v0.0.2 h1:6sUvyh2YHpJCb8RZ6eYzj6iJQ4+chWYmyIHxszqlPTA= +github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= +github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1 h1:CskT+S6Ay54OwxBGB0R3Rsx4Muto6UnEYTyKJbyRIAI= +github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= +github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= +github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa h1:E+gaaifzi2xF65PbDmuKI3PhLWY6G5opMLniFq8vmXA= +github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= +github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= +github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= +github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= +github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436 h1:qOpVTI+BrstcjTZLm2Yz/3sOnqkzj3FQoh0g+E5s3Gc= +github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= +github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830 h1:8kxMKmKzXXL4Ru1nyhvdms/JjWt+3YLpvRb/bAjO/y0= +github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= +github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= +github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= +github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e h1:JY8o/ebUUrCYetWmjRCNghxC59cOEaili83rxPRQCLw= +github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= +github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= +github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= +github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384 h1:TFlARGu6Czu1z7q93HTxcP1P+/ZFC/IKythI5RzrnRg= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d h1:F3OmlXCzYtG9YE6tXDnUOlJBzVzHF8EcmZ1yTJlcgIk= +golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= +modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE= +modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= +modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc= +modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU= +modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdarg.h b/chain/filecoin/filecoin-ffi/headerstubs/stdarg.h new file mode 100644 index 00000000..e69de29b diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdbool.h b/chain/filecoin/filecoin-ffi/headerstubs/stdbool.h new file mode 100644 index 00000000..e69de29b diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdint.h b/chain/filecoin/filecoin-ffi/headerstubs/stdint.h new file mode 100644 index 00000000..c48bf83c --- /dev/null +++ b/chain/filecoin/filecoin-ffi/headerstubs/stdint.h @@ -0,0 +1,4 @@ +typedef unsigned char uint8_t; +typedef unsigned long long uint64_t; +typedef unsigned long int size_t; +#define bool _Bool diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdlib.h b/chain/filecoin/filecoin-ffi/headerstubs/stdlib.h new file mode 100644 index 00000000..e69de29b diff --git a/chain/filecoin/filecoin-ffi/install-filcrypto b/chain/filecoin/filecoin-ffi/install-filcrypto new file mode 100755 index 00000000..f380de01 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/install-filcrypto @@ -0,0 +1,225 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2155 enable=require-variable-braces + +set -Exeo pipefail +auth_header=() +if [ -n "${GITHUB_TOKEN}" ]; then + auth_header=("-H" "Authorization: token ${GITHUB_TOKEN}") +fi + +# set CWD to the root of filecoin-ffi +# +cd "$(dirname "${BASH_SOURCE[0]}")" + +# tracks where the Rust sources are were we to build locally instead of +# downloading from GitHub Releases +# +rust_sources_dir="rust" + +# an array of values passed as 'target-feature' to the Rust compiler if we're +# building an optimized libfilcrypto (which takes advantage of some perf-boosting +# instruction sets) +# +#optimized_release_rustc_target_features=$(jq -r '.[].rustc_target_feature' < "${rust_sources_dir}/rustc-target-features-optimized.json") + +# each value in this area is checked against the "features" of the hosts CPU +# in order to determine if the host is suitable for an optimized release +# +cpu_features_required_for_optimized_release=$(jq -r '.[].check_cpu_for_feature | select(. != null)' < "${rust_sources_dir}/rustc-target-features-optimized.json") + +main() { + local __release_flags=$(get_release_flags) + if [ "${FFI_BUILD_FROM_SOURCE}" != "1" ] && download_release_tarball __tarball_path "${rust_sources_dir}" "filecoin-ffi" "${__release_flags}"; then + local __tmp_dir=$(mktemp -d) + + # silence shellcheck warning as the assignment happened in + # `download_release_tarball()` + # shellcheck disable=SC2154 + # extract downloaded tarball to temporary directory + # + tar -C "${__tmp_dir}" -xzf "${__tarball_path}" + + # copy build assets into root of filecoin-ffi + # + find -L "${__tmp_dir}" -type f -name filcrypto.h -exec cp -- "{}" . \; + find -L "${__tmp_dir}" -type f -name libfilcrypto.a -exec cp -- "{}" . \; + find -L "${__tmp_dir}" -type f -name filcrypto.pc -exec cp -- "{}" . \; + + check_installed_files + + (>&2 echo "[install-filcrypto/main] successfully installed prebuilt libfilcrypto") + else + (>&2 echo "[install-filcrypto/main] building libfilcrypto from local sources (dir = ${rust_sources_dir})") + + # build libfilcrypto (and corresponding header and pkg-config) + # + build_from_source "filcrypto" "${rust_sources_dir}" "${__release_flags}" + + # copy from Rust's build directory (target) to root of filecoin-ffi + # + find -L "${rust_sources_dir}/target/release" -type f -name filcrypto.h -exec cp -- "{}" . \; + find -L "${rust_sources_dir}/target/release" -type f -name libfilcrypto.a -exec cp -- "{}" . \; + find -L "${rust_sources_dir}" -type f -name filcrypto.pc -exec cp -- "{}" . \; + + check_installed_files + + (>&2 echo "[install-filcrypto/main] successfully built and installed libfilcrypto from source") + fi +} + +download_release_tarball() { + local __resultvar=$1 + local __rust_sources_path=$2 + local __repo_name=$3 + local __release_flags=$4 + local __release_sha1=$(git rev-parse HEAD) + local __release_tag="${__release_sha1:0:16}" + local __release_tag_url="https://api.github.com/repos/filecoin-project/${__repo_name}/releases/tags/${__release_tag}" + + # FIXME: Disable optimized release download, as it can't support properly support all native cpu flag detections + #if [ -z $release_flags ]; then + release_flag_name="standard" + #else + # release_flag_name="optimized" + #fi + + # TODO: This function shouldn't make assumptions about how these releases' + # names are constructed. Marginally less-bad would be to require that this + # function's caller provide the release name. + # + local __release_name="${__repo_name}-$(uname)-${release_flag_name}" + + (>&2 echo "[download_release_tarball] acquiring release @ ${__release_tag}") + + local __release_response=$(curl "${auth_header[@]}" \ + --retry 3 \ + --location "${__release_tag_url}") + + local __release_url=$(echo "${__release_response}" | jq -r ".assets[] | select(.name | contains(\"${__release_name}\")) | .url") + + local __tar_path="/tmp/${__release_name}_$(basename "${__release_url}").tar.gz" + + if [[ -z "${__release_url}" ]]; then + (>&2 echo "[download_release_tarball] failed to download release (tag URL: ${__release_tag_url}, response: ${__release_response})") + return 1 + fi + + local __asset_url=$(curl "${auth_header[@]}" \ + --head \ + --retry 3 \ + --header "Accept:application/octet-stream" \ + --location \ + --output /dev/null \ + -w "%{url_effective}" \ + "${__release_url}") + + if ! curl --retry 3 --output "${__tar_path}" "${__asset_url}"; then + (>&2 echo "[download_release_tarball] failed to download release asset (tag URL: ${__release_tag_url}, asset URL: ${__asset_url})") + return 1 + fi + + # set $__resultvar (which the caller provided as $1), which is the poor + # man's way of returning a value from a function in Bash + # + eval "${__resultvar}='${__tar_path}'" +} + +build_from_source() { + local __library_name=$1 + local __rust_sources_path=$2 + local __release_flags=$3 + local __repo_sha1=$(git rev-parse HEAD) + local __repo_sha1_truncated="${__repo_sha1:0:16}" + + (>&2 echo "building from source @ ${__repo_sha1_truncated}") + + if ! [ -x "$(command -v cargo)" ]; then + (>&2 echo '[build_from_source] Error: cargo is not installed.') + (>&2 echo '[build_from_source] install Rust toolchain to resolve this problem.') + exit 1 + fi + + if ! [ -x "$(command -v rustup)" ]; then + (>&2 echo '[build_from_source] Error: rustup is not installed.') + (>&2 echo '[build_from_source] install Rust toolchain installer to resolve this problem.') + exit 1 + fi + + pushd "${__rust_sources_path}" + + cargo --version + + if [ -n "${__release_flags}" ]; then + RUSTFLAGS="-C target-feature=${__release_flags}" ./scripts/build-release.sh "${__library_name}" "$(cat rust-toolchain)" + else + ./scripts/build-release.sh "${__library_name}" "$(cat rust-toolchain)" + fi + + popd +} + +get_release_flags() { + local __features="" + + # determine where to look for CPU features + # + if [[ ! -f "/proc/cpuinfo" ]]; then + (>&2 echo "[get_release_flags] no /proc/cpuinfo file; falling back to Darwin feature detection") + __features=$(sysctl -a | grep machdep.cpu | tr '[:upper:]' '[:lower:]' | grep features) + else + #aarch64_uname=$(uname -a | grep aarch64) + x86_64_uname=$(uname -a | grep x86_64) + # shellcheck disable=SC2002 + if [ -n "${x86_64_uname}" ]; then + __features=$(cat /proc/cpuinfo | grep flags | head -n 1) + else + # For now we assume aarch64. If another supported platform is added, explicitly check for it + __features=$(cat /proc/cpuinfo | grep Features | head -n 1) + fi + fi + + # Maps cpu flag to rust flags (related to entries in rust/rustc-target-features-optimized.json) + feature_map=("adx:+adx" "sha_ni:+sha" "sha2:+sha2" "sse2:+sse2" "avx2:+avx2" "avx:+avx" "sse4_2:+sse4.2" "sse4_1:+sse4.1") + + target_features="" + # check for the presence of each required CPU feature + # + # shellcheck disable=SC2068 # the splitting is intentional + for x in ${cpu_features_required_for_optimized_release[@]}; do + current_feature=$(echo "${__features}" | grep -c "${x}") + if [ "1" = "${current_feature}" ]; then + for feature in "${feature_map[@]}"; do + key=${feature%%:*} + if [ "${key}" == "${x}" ]; then + val=${feature#*:} + if [ -z "${target_features}" ]; then + target_features="${val}" + else + target_features="${target_features},${val}" + fi + fi + done + fi + done + + echo "${target_features}" +} + +check_installed_files() { + if [[ ! -f "./filcrypto.h" ]]; then + (>&2 echo "[check_installed_files] failed to install filcrypto.h") + exit 1 + fi + + if [[ ! -f "./libfilcrypto.a" ]]; then + (>&2 echo "[check_installed_files] failed to install libfilcrypto.a") + exit 1 + fi + + if [[ ! -f "./filcrypto.pc" ]]; then + (>&2 echo "[check_installed_files] failed to install filcrypto.pc") + exit 1 + fi +} + +main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/mkreleaselog b/chain/filecoin/filecoin-ffi/mkreleaselog new file mode 100755 index 00000000..c1086228 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/mkreleaselog @@ -0,0 +1,240 @@ +#!/bin/zsh + +# Note: This script is a modified version of the mkreleaselog script used by +# the go-ipfs team. +# +# Usage: ./mkreleaselog v0.25.0 v0.26.0 > /tmp/release.log + +set -euo pipefail +export GO111MODULE=on +export GOPATH="$(go env GOPATH)" + +alias jq="jq --unbuffered" + +REPO_SUFFIXES_TO_STRIP=( + "/v2" + "/v3" + "/v4" + "/v5" + "/v6" +) + +AUTHORS=( + # orgs + filecoin-project + + # Authors of personal repos used by filecoin-ffi that should be mentioned in the + # release notes. + xlab +) + +[[ -n "${REPO_FILTER+x}" ]] || REPO_FILTER="github.com/(${$(printf "|%s" "${AUTHORS[@]}"):1})" + +[[ -n "${IGNORED_FILES+x}" ]] || IGNORED_FILES='^\(\.gx\|package\.json\|\.travis\.yml\|go.mod\|go\.sum|\.github|\.circleci\)$' + +NL=$'\n' + +msg() { + echo "$*" >&2 +} + +statlog() { + rpath="$GOPATH/src/$1" + for s in $REPO_SUFFIXES_TO_STRIP; do + rpath=${rpath%$s} + done + + start="${2:-}" + end="${3:-HEAD}" + + git -C "$rpath" log --shortstat --no-merges --pretty="tformat:%H%n%aN%n%aE" "$start..$end" | while + read hash + read name + read email + read _ # empty line + read changes + do + changed=0 + insertions=0 + deletions=0 + while read count event; do + if [[ "$event" =~ ^file ]]; then + changed=$count + elif [[ "$event" =~ ^insertion ]]; then + insertions=$count + elif [[ "$event" =~ ^deletion ]]; then + deletions=$count + else + echo "unknown event $event" >&2 + exit 1 + fi + done<<<"${changes//,/$NL}" + + jq -n \ + --arg "hash" "$hash" \ + --arg "name" "$name" \ + --arg "email" "$email" \ + --argjson "changed" "$changed" \ + --argjson "insertions" "$insertions" \ + --argjson "deletions" "$deletions" \ + '{Commit: $hash, Author: $name, Email: $email, Files: $changed, Insertions: $insertions, Deletions: $deletions}' + done +} + +# Returns a stream of deps changed between $1 and $2. +dep_changes() { + { + <"$1" + <"$2" + } | jq -s 'JOIN(INDEX(.[0][]; .Path); .[1][]; .Path; {Path: .[0].Path, Old: (.[1] | del(.Path)), New: (.[0] | del(.Path))}) | select(.New.Version != .Old.Version)' +} + +# resolve_commits resolves a git ref for each version. +resolve_commits() { + jq '. + {Ref: (.Version|capture("^((?.*)\\+incompatible|v.*-(0\\.)?[0-9]{14}-(?[a-f0-9]{12})|(?v.*))$") | .ref1 // .ref2 // .ref3)}' +} + +pr_link() { + local repo="$1" + local prnum="$2" + local ghname="${repo##github.com/}" + printf -- "[%s#%s](https://%s/pull/%s)" "$ghname" "$prnum" "$repo" "$prnum" +} + +# Generate a release log for a range of commits in a single repo. +release_log() { + setopt local_options BASH_REMATCH + + local repo="$1" + local start="$2" + local end="${3:-HEAD}" + local dir="$GOPATH/src/$repo" + + local commit pr + git -C "$dir" log \ + --format='tformat:%H %s' \ + --first-parent \ + "$start..$end" | + while read commit subject; do + # Skip gx-only PRs. + git -C "$dir" diff-tree --no-commit-id --name-only "$commit^" "$commit" | + grep -v "${IGNORED_FILES}" >/dev/null || continue + + if [[ "$subject" =~ '^Merge pull request #([0-9]+) from' ]]; then + local prnum="${BASH_REMATCH[2]}" + local desc="$(git -C "$dir" show --summary --format='tformat:%b' "$commit" | head -1)" + printf -- "- %s (%s)\n" "$desc" "$(pr_link "$repo" "$prnum")" + elif [[ "$subject" =~ '\(#([0-9]+)\)$' ]]; then + local prnum="${BASH_REMATCH[2]}" + printf -- "- %s (%s)\n" "$subject" "$(pr_link "$repo" "$prnum")" + else + printf -- "- %s\n" "$subject" + fi + done +} + +indent() { + sed -e 's/^/ /' +} + +mod_deps() { + go list -json -m all | jq 'select(.Version != null)' +} + +ensure() { + local repo="$1" + for s in $REPO_SUFFIXES_TO_STRIP; do + repo=${repo%$s} + done + + local commit="$2" + + local rpath="$GOPATH/src/$repo" + if [[ ! -d "$rpath" ]]; then + msg "Cloning $repo..." + git clone "http://$repo" "$rpath" >&2 + fi + + if ! git -C "$rpath" rev-parse --verify "$commit" >/dev/null; then + msg "Fetching $repo..." + git -C "$rpath" fetch --all >&2 + fi + + git -C "$rpath" rev-parse --verify "$commit" >/dev/null || return 1 +} + +statsummary() { + jq -s 'group_by(.Author)[] | {Author: .[0].Author, Commits: (. | length), Insertions: (map(.Insertions) | add), Deletions: (map(.Deletions) | add), Files: (map(.Files) | add)}' | + jq '. + {Lines: (.Deletions + .Insertions)}' +} + +recursive_release_log() { + local start="${1:-$(git tag -l | sort -V | grep -v -- '-rc' | grep 'v'| tail -n1)}" + local end="${2:-$(git rev-parse HEAD)}" + local repo_root="$(git rev-parse --show-toplevel)" + local package="$(cd "$repo_root" && go list)" + + if ! [[ "${GOPATH}/${package}" != "${repo_root}" ]]; then + echo "This script requires the target package and all dependencies to live in a GOPATH." + return 1 + fi + + ( + local result=0 + local workspace="$(mktemp -d)" + trap "$(printf 'rm -rf "%q"' "$workspace")" INT TERM EXIT + cd "$workspace" + + echo "Computing old deps..." >&2 + git -C "$repo_root" show "$start:go.mod" >go.mod + mod_deps | resolve_commits | jq -s > old_deps.json + + echo "Computing new deps..." >&2 + git -C "$repo_root" show "$end:go.mod" >go.mod + mod_deps | resolve_commits | jq -s > new_deps.json + + rm -f go.mod go.sum + + printf -- "Generating Changelog for %s %s..%s\n" "$package" "$start" "$end" >&2 + + printf -- "- %s:\n" "$package" + release_log "$package" "$start" "$end" | indent + + statlog "$package" "$start" "$end" > statlog.json + + dep_changes old_deps.json new_deps.json | + jq --arg filter "$REPO_FILTER" 'select(.Path | match($filter))' | + # Compute changelogs + jq -r '"\(.Path) \(.New.Version) \(.New.Ref) \(.Old.Version) \(.Old.Ref // "")"' | + while read repo new new_ref old old_ref; do + for s in $REPO_SUFFIXES_TO_STRIP; do + repo=${repo%$s} + done + + if ! ensure "$repo" "$new_ref"; then + result=1 + local changelog="failed to fetch repo" + else + statlog "$repo" "$old_ref" "$new_ref" >> statlog.json + local changelog="$(release_log "$repo" "$old_ref" "$new_ref")" + fi + if [[ -n "$changelog" ]]; then + printf -- "- %s (%s -> %s):\n" "$repo" "$old" "$new" + echo "$changelog" | indent + fi + done + + echo + echo "Contributors" + echo + + echo "| Contributor | Commits | Lines ± | Files Changed |" + echo "|-------------|---------|---------|---------------|" + statsummary "] +license = "MIT OR Apache-2.0" +repository = "https://github.com/filecoin-project/filecoin-ffi" +readme = "README.md" +edition = "2018" +publish = false + +[lib] +crate-type = ["rlib", "staticlib"] + +[dependencies] +bls-signatures = "0.6.0" +byteorder = "1.2" +drop_struct_macro_derive = "0.4.0" +ff = { version = "0.2.1", package = "fff" } +ffi-toolkit = "0.4.0" +libc = "0.2.58" +log = "0.4.7" +paired = "0.20.0" +fil_logger = "0.1.0" +rand = "0.7" +rand_chacha = "0.2.1" +rayon = "1.2.1" +anyhow = "1.0.23" +bellperson = { version = "0.9.2", features = ["gpu"] } +serde_json = "1.0.46" + +neptune = "=1.1.1" +neptune-triton = "=1.0.0" + +[dependencies.filecoin-proofs-api] +package = "filecoin-proofs-api" +version = "5.0.0" + +[build-dependencies] +cbindgen = "= 0.14.0" + +[dev-dependencies] +tempfile = "3.0.8" + diff --git a/chain/filecoin/filecoin-ffi/rust/build.rs b/chain/filecoin/filecoin-ffi/rust/build.rs new file mode 100644 index 00000000..bb3cf601 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/build.rs @@ -0,0 +1,11 @@ +use std::env; +use std::path::Path; + +fn main() { + let out_dir = env::var("OUT_DIR").unwrap(); + let hdr_out = Path::new(&out_dir).join("include/filcrypto.h"); + + cbindgen::generate(std::env::var("CARGO_MANIFEST_DIR").unwrap()) + .expect("Could not generate header") + .write_to_file(hdr_out); +} diff --git a/chain/filecoin/filecoin-ffi/rust/cbindgen.toml b/chain/filecoin/filecoin-ffi/rust/cbindgen.toml new file mode 100644 index 00000000..b5e0fadd --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/cbindgen.toml @@ -0,0 +1,23 @@ +header = """ +/* filcrypto Header */ + +#ifdef __cplusplus +extern "C" { +#endif +""" +trailer = """ +#ifdef __cplusplus +} /* extern "C" */ +#endif +""" + +include_guard = "filcrypto_H" +include_version = true +language = "C" + +[parse] +parse_deps = true +include = ["ffi-toolkit"] + +[enum] +prefix_with_name = true diff --git a/chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template b/chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template new file mode 100644 index 00000000..56ab937d --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template @@ -0,0 +1,4 @@ +Name: filcrypto +Version: @VERSION@ +Description: C bindings for Filecoin Proofs +Libs: @PRIVATE_LIBS@ diff --git a/chain/filecoin/filecoin-ffi/rust/rust-toolchain b/chain/filecoin/filecoin-ffi/rust/rust-toolchain new file mode 100644 index 00000000..3987c472 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/rust-toolchain @@ -0,0 +1 @@ +1.43.1 diff --git a/chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json b/chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json new file mode 100644 index 00000000..3dd8a275 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json @@ -0,0 +1,34 @@ +[ + { + "rustc_target_feature": "+adx", + "check_cpu_for_feature": "adx" + }, + { + "rustc_target_feature": "+sha", + "check_cpu_for_feature": "sha_ni" + }, + { + "rustc_target_feature": "+sha2", + "check_cpu_for_feature": "sha2" + }, + { + "rustc_target_feature": "+sse2", + "check_cpu_for_feature": "sse2" + }, + { + "rustc_target_feature": "+avx2", + "check_cpu_for_feature": "avx2" + }, + { + "rustc_target_feature": "+avx", + "check_cpu_for_feature": "avx" + }, + { + "rustc_target_feature": "+sse4.2", + "check_cpu_for_feature": "sse4_2" + }, + { + "rustc_target_feature": "+sse4.1", + "check_cpu_for_feature": "sse4_1" + } +] diff --git a/chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh b/chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh new file mode 100755 index 00000000..14089fd6 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +set -Exeo pipefail + +main() { + if [[ -z "$1" ]] + then + (>&2 echo '[build-release/main] Error: script requires a library name, e.g. "filecoin" or "snark"') + exit 1 + fi + + if [[ -z "$2" ]] + then + (>&2 echo '[build-release/main] Error: script requires a toolchain, e.g. ./build-release.sh +nightly-2019-04-19') + exit 1 + fi + + # temporary place for storing build output (cannot use 'local', because + # 'trap' is not going to have access to variables scoped to this function) + # + __build_output_log_tmp=$(mktemp) + + # clean up temp file on exit + # + trap '{ rm -f $__build_output_log_tmp; }' EXIT + + # build with RUSTFLAGS configured to output linker flags for native libs + # + local __rust_flags="--print native-static-libs ${RUSTFLAGS}" + + RUSTFLAGS="${__rust_flags}" \ + cargo +$2 build \ + --release ${@:3} 2>&1 | tee ${__build_output_log_tmp} + + # parse build output for linker flags + # + local __linker_flags=$(cat ${__build_output_log_tmp} \ + | grep native-static-libs\: \ + | head -n 1 \ + | cut -d ':' -f 3) + + # generate pkg-config + # + sed -e "s;@VERSION@;$(git rev-parse HEAD);" \ + -e "s;@PRIVATE_LIBS@;${__linker_flags};" "$1.pc.template" > "$1.pc" + + # ensure header file was built + # + find -L . -type f -name "$1.h" | read + + # ensure the archive file was built + # + find -L . -type f -name "lib$1.a" | read +} + +main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh b/chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh new file mode 100755 index 00000000..bf1d085f --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -Exeuo pipefail + +main() { + if [[ -z "$1" ]] + then + (>&2 echo '[package-release/main] Error: script requires path to which it will write release (gzipped) tarball, e.g. "/tmp/filecoin-ffi-Darwin-standard.tar.tz"') + exit 1 + fi + + local __tarball_output_path=$1 + + # create temporary directory to hold build artifacts (must not be declared + # with 'local' because we will use 'trap' to clean it up) + # + __tmp_dir=$(mktemp -d) + + (>&2 echo "[package-release/main] preparing release files") + + # clean up temp directory on exit + # + trap '{ rm -rf $__tmp_dir; }' EXIT + + # copy assets into temporary directory + # + find -L . -type f -name filcrypto.h -exec cp -- "{}" $__tmp_dir/ \; + find -L . -type f -name libfilcrypto.a -exec cp -- "{}" $__tmp_dir/ \; + find -L . -type f -name filcrypto.pc -exec cp -- "{}" $__tmp_dir/ \; + + # create gzipped tarball from contents of temporary directory + # + tar -czf $__tarball_output_path $__tmp_dir/* + + (>&2 echo "[package-release/main] release file created: $__tarball_output_path") +} + +main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh b/chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh new file mode 100755 index 00000000..017040ef --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +set -Exeuo pipefail + +main() { + if [[ -z "$1" ]] + then + (>&2 echo '[publish-release/main] Error: script requires a release (gzipped) tarball path, e.g. "/tmp/filecoin-ffi-Darwin-standard.tar.tz"') + exit 1 + fi + + if [[ -z "$2" ]] + then + (>&2 echo '[publish-release/main] Error: script requires a release name, e.g. "filecoin-ffi-Darwin-standard" or "filecoin-ffi-Linux-optimized"') + exit 1 + fi + + local __release_file=$1 + local __release_name=$2 + local __release_tag="${CIRCLE_SHA1:0:16}" + + # make sure we have a token set, api requests won't work otherwise + if [ -z $GITHUB_TOKEN ]; then + (>&2 echo "[publish-release/main] \$GITHUB_TOKEN not set, publish failed") + exit 1 + fi + + # see if the release already exists by tag + local __release_response=` + curl \ + --header "Authorization: token $GITHUB_TOKEN" \ + "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/releases/tags/$__release_tag" + ` + + local __release_id=`echo $__release_response | jq '.id'` + + if [ "$__release_id" = "null" ]; then + (>&2 echo '[publish-release/main] creating release') + + RELEASE_DATA="{ + \"tag_name\": \"$__release_tag\", + \"target_commitish\": \"$CIRCLE_SHA1\", + \"name\": \"$__release_tag\", + \"body\": \"\" + }" + + # create it if it doesn't exist yet + # + __release_response=` + curl \ + --request POST \ + --header "Authorization: token $GITHUB_TOKEN" \ + --header "Content-Type: application/json" \ + --data "$RELEASE_DATA" \ + "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/releases" + ` + else + (>&2 echo '[publish-release/main] release already exists') + fi + + __release_upload_url=`echo $__release_response | jq -r '.upload_url' | cut -d'{' -f1` + + curl \ + --request POST \ + --header "Authorization: token $GITHUB_TOKEN" \ + --header "Content-Type: application/octet-stream" \ + --data-binary "@$__release_file" \ + "$__release_upload_url?name=$(basename $__release_file)" + + (>&2 echo '[publish-release/main] release file uploaded') +} + +main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/rust/src/bls/api.rs b/chain/filecoin/filecoin-ffi/rust/src/bls/api.rs new file mode 100644 index 00000000..b1f542df --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/bls/api.rs @@ -0,0 +1,437 @@ +use std::slice::from_raw_parts; + +use bls_signatures::{ + aggregate as aggregate_sig, + groupy::{CurveAffine, CurveProjective, EncodedPoint, GroupDecodingError}, + hash as hash_sig, + paired::bls12_381::{G2Affine, G2Compressed}, + verify as verify_sig, PrivateKey, PublicKey, Serialize, Signature, +}; +use rand::rngs::OsRng; +use rand::SeedableRng; +use rand_chacha::ChaChaRng; +use rayon::prelude::*; + +use crate::bls::types; +use crate::proofs::types::fil_32ByteArray; + +pub const SIGNATURE_BYTES: usize = 96; +pub const PRIVATE_KEY_BYTES: usize = 32; +pub const PUBLIC_KEY_BYTES: usize = 48; +pub const DIGEST_BYTES: usize = 96; + +#[repr(C)] +pub struct fil_BLSSignature { + pub inner: [u8; SIGNATURE_BYTES], +} + +#[repr(C)] +pub struct fil_BLSPrivateKey { + pub inner: [u8; PRIVATE_KEY_BYTES], +} + +#[repr(C)] +pub struct fil_BLSPublicKey { + pub inner: [u8; PUBLIC_KEY_BYTES], +} + +#[repr(C)] +pub struct fil_BLSDigest { + pub inner: [u8; DIGEST_BYTES], +} + +/// Unwraps or returns the passed in value. +macro_rules! try_ffi { + ($res:expr, $val:expr) => {{ + match $res { + Ok(res) => res, + Err(_) => return $val, + } + }}; +} + +/// Compute the digest of a message +/// +/// # Arguments +/// +/// * `message_ptr` - pointer to a message byte array +/// * `message_len` - length of the byte array +#[no_mangle] +pub unsafe extern "C" fn fil_hash( + message_ptr: *const u8, + message_len: libc::size_t, +) -> *mut types::fil_HashResponse { + // prep request + let message = from_raw_parts(message_ptr, message_len); + + // call method + let digest = hash_sig(message); + + // prep response + let mut raw_digest: [u8; DIGEST_BYTES] = [0; DIGEST_BYTES]; + raw_digest.copy_from_slice(digest.into_affine().into_compressed().as_ref()); + + let response = types::fil_HashResponse { + digest: fil_BLSDigest { inner: raw_digest }, + }; + + Box::into_raw(Box::new(response)) +} + +/// Aggregate signatures together into a new signature +/// +/// # Arguments +/// +/// * `flattened_signatures_ptr` - pointer to a byte array containing signatures +/// * `flattened_signatures_len` - length of the byte array (multiple of SIGNATURE_BYTES) +/// +/// Returns `NULL` on error. Result must be freed using `destroy_aggregate_response`. +#[no_mangle] +pub unsafe extern "C" fn fil_aggregate( + flattened_signatures_ptr: *const u8, + flattened_signatures_len: libc::size_t, +) -> *mut types::fil_AggregateResponse { + // prep request + let signatures = try_ffi!( + from_raw_parts(flattened_signatures_ptr, flattened_signatures_len) + .par_chunks(SIGNATURE_BYTES) + .map(|item| { Signature::from_bytes(item) }) + .collect::, _>>(), + std::ptr::null_mut() + ); + + let mut raw_signature: [u8; SIGNATURE_BYTES] = [0; SIGNATURE_BYTES]; + + let aggregated = try_ffi!(aggregate_sig(&signatures), std::ptr::null_mut()); + aggregated + .write_bytes(&mut raw_signature.as_mut()) + .expect("preallocated"); + + let response = types::fil_AggregateResponse { + signature: fil_BLSSignature { + inner: raw_signature, + }, + }; + + Box::into_raw(Box::new(response)) +} + +/// Verify that a signature is the aggregated signature of hashes - pubkeys +/// +/// # Arguments +/// +/// * `signature_ptr` - pointer to a signature byte array (SIGNATURE_BYTES long) +/// * `flattened_digests_ptr` - pointer to a byte array containing digests +/// * `flattened_digests_len` - length of the byte array (multiple of DIGEST_BYTES) +/// * `flattened_public_keys_ptr` - pointer to a byte array containing public keys +/// * `flattened_public_keys_len` - length of the array +#[no_mangle] +pub unsafe extern "C" fn fil_verify( + signature_ptr: *const u8, + flattened_digests_ptr: *const u8, + flattened_digests_len: libc::size_t, + flattened_public_keys_ptr: *const u8, + flattened_public_keys_len: libc::size_t, +) -> libc::c_int { + // prep request + let raw_signature = from_raw_parts(signature_ptr, SIGNATURE_BYTES); + let signature = try_ffi!(Signature::from_bytes(raw_signature), 0); + + let raw_digests = from_raw_parts(flattened_digests_ptr, flattened_digests_len); + let raw_public_keys = from_raw_parts(flattened_public_keys_ptr, flattened_public_keys_len); + + if raw_digests.len() % DIGEST_BYTES != 0 { + return 0; + } + if raw_public_keys.len() % PUBLIC_KEY_BYTES != 0 { + return 0; + } + + if raw_digests.len() / DIGEST_BYTES != raw_public_keys.len() / PUBLIC_KEY_BYTES { + return 0; + } + + let digests: Vec<_> = try_ffi!( + raw_digests + .par_chunks(DIGEST_BYTES) + .map(|item: &[u8]| { + let mut digest = G2Compressed::empty(); + digest.as_mut().copy_from_slice(item); + + let affine: G2Affine = digest.into_affine()?; + let projective = affine.into_projective(); + Ok(projective) + }) + .collect::, GroupDecodingError>>(), + 0 + ); + + let public_keys: Vec<_> = try_ffi!( + raw_public_keys + .par_chunks(PUBLIC_KEY_BYTES) + .map(|item| { PublicKey::from_bytes(item) }) + .collect::>(), + 0 + ); + + verify_sig(&signature, digests.as_slice(), public_keys.as_slice()) as libc::c_int +} + +/// Verify that a signature is the aggregated signature of the hhashed messages +/// +/// # Arguments +/// +/// * `signature_ptr` - pointer to a signature byte array (SIGNATURE_BYTES long) +/// * `messages_ptr` - pointer to an array containing the pointers to the messages +/// * `messages_sizes_ptr` - pointer to an array containing the lengths of the messages +/// * `messages_len` - length of the two messages arrays +/// * `flattened_public_keys_ptr` - pointer to a byte array containing public keys +/// * `flattened_public_keys_len` - length of the array +#[no_mangle] +pub unsafe extern "C" fn fil_hash_verify( + signature_ptr: *const u8, + flattened_messages_ptr: *const u8, + flattened_messages_len: libc::size_t, + message_sizes_ptr: *const libc::size_t, + message_sizes_len: libc::size_t, + flattened_public_keys_ptr: *const u8, + flattened_public_keys_len: libc::size_t, +) -> libc::c_int { + // prep request + let raw_signature = from_raw_parts(signature_ptr, SIGNATURE_BYTES); + let signature = try_ffi!(Signature::from_bytes(raw_signature), 0); + + let flattened = from_raw_parts(flattened_messages_ptr, flattened_messages_len); + let chunk_sizes = from_raw_parts(message_sizes_ptr, message_sizes_len); + + // split the flattened message array into slices of individual messages to + // be hashed + let mut messages: Vec<&[u8]> = Vec::with_capacity(message_sizes_len); + let mut offset = 0; + for chunk_size in chunk_sizes.iter() { + messages.push(&flattened[offset..offset + *chunk_size]); + offset += *chunk_size + } + + let raw_public_keys = from_raw_parts(flattened_public_keys_ptr, flattened_public_keys_len); + + if raw_public_keys.len() % PUBLIC_KEY_BYTES != 0 { + return 0; + } + + let digests: Vec<_> = messages + .into_par_iter() + .map(|message: &[u8]| hash_sig(message)) + .collect::>(); + + let public_keys: Vec<_> = try_ffi!( + raw_public_keys + .par_chunks(PUBLIC_KEY_BYTES) + .map(|item| { PublicKey::from_bytes(item) }) + .collect::>(), + 0 + ); + + verify_sig(&signature, &digests, &public_keys) as libc::c_int +} + +/// Generate a new private key +#[no_mangle] +pub unsafe extern "C" fn fil_private_key_generate() -> *mut types::fil_PrivateKeyGenerateResponse { + let mut raw_private_key: [u8; PRIVATE_KEY_BYTES] = [0; PRIVATE_KEY_BYTES]; + PrivateKey::generate(&mut OsRng) + .write_bytes(&mut raw_private_key.as_mut()) + .expect("preallocated"); + + let response = types::fil_PrivateKeyGenerateResponse { + private_key: fil_BLSPrivateKey { + inner: raw_private_key, + }, + }; + + Box::into_raw(Box::new(response)) +} + +/// Generate a new private key with seed +/// +/// **Warning**: Use this function only for testing or with very secure seeds +/// +/// # Arguments +/// +/// * `raw_seed` - a seed byte array with 32 bytes +/// +/// Returns `NULL` when passed a NULL pointer. +#[no_mangle] +pub unsafe extern "C" fn fil_private_key_generate_with_seed( + raw_seed: fil_32ByteArray, +) -> *mut types::fil_PrivateKeyGenerateResponse { + let rng = &mut ChaChaRng::from_seed(raw_seed.inner); + + let mut raw_private_key: [u8; PRIVATE_KEY_BYTES] = [0; PRIVATE_KEY_BYTES]; + PrivateKey::generate(rng) + .write_bytes(&mut raw_private_key.as_mut()) + .expect("preallocated"); + + let response = types::fil_PrivateKeyGenerateResponse { + private_key: fil_BLSPrivateKey { + inner: raw_private_key, + }, + }; + + Box::into_raw(Box::new(response)) +} + +/// Sign a message with a private key and return the signature +/// +/// # Arguments +/// +/// * `raw_private_key_ptr` - pointer to a private key byte array +/// * `message_ptr` - pointer to a message byte array +/// * `message_len` - length of the byte array +/// +/// Returns `NULL` when passed invalid arguments. +#[no_mangle] +pub unsafe extern "C" fn fil_private_key_sign( + raw_private_key_ptr: *const u8, + message_ptr: *const u8, + message_len: libc::size_t, +) -> *mut types::fil_PrivateKeySignResponse { + // prep request + let private_key_slice = from_raw_parts(raw_private_key_ptr, PRIVATE_KEY_BYTES); + let private_key = try_ffi!( + PrivateKey::from_bytes(private_key_slice), + std::ptr::null_mut() + ); + let message = from_raw_parts(message_ptr, message_len); + + let mut raw_signature: [u8; SIGNATURE_BYTES] = [0; SIGNATURE_BYTES]; + PrivateKey::sign(&private_key, message) + .write_bytes(&mut raw_signature.as_mut()) + .expect("preallocated"); + + let response = types::fil_PrivateKeySignResponse { + signature: fil_BLSSignature { + inner: raw_signature, + }, + }; + + Box::into_raw(Box::new(response)) +} + +/// Generate the public key for a private key +/// +/// # Arguments +/// +/// * `raw_private_key_ptr` - pointer to a private key byte array +/// +/// Returns `NULL` when passed invalid arguments. +#[no_mangle] +pub unsafe extern "C" fn fil_private_key_public_key( + raw_private_key_ptr: *const u8, +) -> *mut types::fil_PrivateKeyPublicKeyResponse { + let private_key_slice = from_raw_parts(raw_private_key_ptr, PRIVATE_KEY_BYTES); + let private_key = try_ffi!( + PrivateKey::from_bytes(private_key_slice), + std::ptr::null_mut() + ); + + let mut raw_public_key: [u8; PUBLIC_KEY_BYTES] = [0; PUBLIC_KEY_BYTES]; + private_key + .public_key() + .write_bytes(&mut raw_public_key.as_mut()) + .expect("preallocated"); + + let response = types::fil_PrivateKeyPublicKeyResponse { + public_key: fil_BLSPublicKey { + inner: raw_public_key, + }, + }; + + Box::into_raw(Box::new(response)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn key_verification() { + unsafe { + let private_key = (*fil_private_key_generate()).private_key.inner; + let public_key = (*fil_private_key_public_key(&private_key[0])) + .public_key + .inner; + let message = b"hello world"; + let digest = (*fil_hash(&message[0], message.len())).digest.inner; + let signature = (*fil_private_key_sign(&private_key[0], &message[0], message.len())) + .signature + .inner; + let verified = fil_verify( + &signature[0], + &digest[0], + digest.len(), + &public_key[0], + public_key.len(), + ); + + assert_eq!(1, verified); + + let flattened_messages = message; + let message_sizes = [message.len()]; + let verified = fil_hash_verify( + signature.as_ptr(), + flattened_messages.as_ptr(), + flattened_messages.len(), + message_sizes.as_ptr(), + message_sizes.len(), + public_key.as_ptr(), + public_key.len(), + ); + + assert_eq!(1, verified); + + let different_message = b"bye world"; + let different_digest = (*fil_hash(&different_message[0], different_message.len())) + .digest + .inner; + let not_verified = fil_verify( + &signature[0], + &different_digest[0], + different_digest.len(), + &public_key[0], + public_key.len(), + ); + + assert_eq!(0, not_verified); + + // garbage verification + let different_digest = vec![0, 1, 2, 3, 4]; + let not_verified = fil_verify( + &signature[0], + &different_digest[0], + different_digest.len(), + &public_key[0], + public_key.len(), + ); + + assert_eq!(0, not_verified); + } + } + + #[test] + fn private_key_with_seed() { + unsafe { + let seed = fil_32ByteArray { inner: [5u8; 32] }; + let private_key = (*fil_private_key_generate_with_seed(seed)) + .private_key + .inner; + assert_eq!( + [ + 115, 245, 77, 209, 4, 57, 40, 107, 10, 153, 141, 16, 153, 172, 85, 197, 125, + 163, 35, 217, 108, 241, 64, 235, 231, 220, 131, 1, 77, 253, 176, 19 + ], + private_key, + ); + } + } +} diff --git a/chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs b/chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs new file mode 100644 index 00000000..8389f117 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs @@ -0,0 +1,2 @@ +pub mod api; +pub mod types; diff --git a/chain/filecoin/filecoin-ffi/rust/src/bls/types.rs b/chain/filecoin/filecoin-ffi/rust/src/bls/types.rs new file mode 100644 index 00000000..53cb8b56 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/bls/types.rs @@ -0,0 +1,67 @@ +use crate::bls::api::{fil_BLSDigest, fil_BLSPrivateKey, fil_BLSPublicKey, fil_BLSSignature}; + +/// HashResponse + +#[repr(C)] +pub struct fil_HashResponse { + pub digest: fil_BLSDigest, +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_hash_response(ptr: *mut fil_HashResponse) { + let _ = Box::from_raw(ptr); +} + +/// AggregateResponse + +#[repr(C)] +pub struct fil_AggregateResponse { + pub signature: fil_BLSSignature, +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_aggregate_response(ptr: *mut fil_AggregateResponse) { + let _ = Box::from_raw(ptr); +} + +/// PrivateKeyGenerateResponse + +#[repr(C)] +pub struct fil_PrivateKeyGenerateResponse { + pub private_key: fil_BLSPrivateKey, +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_private_key_generate_response( + ptr: *mut fil_PrivateKeyGenerateResponse, +) { + let _ = Box::from_raw(ptr); +} + +/// PrivateKeySignResponse + +#[repr(C)] +pub struct fil_PrivateKeySignResponse { + pub signature: fil_BLSSignature, +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_private_key_sign_response( + ptr: *mut fil_PrivateKeySignResponse, +) { + let _ = Box::from_raw(ptr); +} + +/// PrivateKeyPublicKeyResponse + +#[repr(C)] +pub struct fil_PrivateKeyPublicKeyResponse { + pub public_key: fil_BLSPublicKey, +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_private_key_public_key_response( + ptr: *mut fil_PrivateKeyPublicKeyResponse, +) { + let _ = Box::from_raw(ptr); +} diff --git a/chain/filecoin/filecoin-ffi/rust/src/lib.rs b/chain/filecoin/filecoin-ffi/rust/src/lib.rs new file mode 100644 index 00000000..9d7ec544 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/lib.rs @@ -0,0 +1,6 @@ +#![deny(clippy::all)] +#![allow(clippy::missing_safety_doc)] + +pub mod bls; +pub mod proofs; +pub mod util; diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs new file mode 100644 index 00000000..8762bd80 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs @@ -0,0 +1,1725 @@ +use ffi_toolkit::{ + c_str_to_pbuf, catch_panic_response, raw_ptr, rust_str_to_c_str, FCPResponseStatus, +}; +use filecoin_proofs_api::seal::SealPreCommitPhase2Output; +use filecoin_proofs_api::{ + PieceInfo, RegisteredPoStProof, RegisteredSealProof, SectorId, UnpaddedByteIndex, + UnpaddedBytesAmount, +}; +use log::info; +use std::mem; +use std::path::PathBuf; +use std::slice::from_raw_parts; + +use super::helpers::{c_to_rust_post_proofs, to_private_replica_info_map}; +use super::types::*; +use crate::util::api::init_log; + +/// TODO: document +/// +#[no_mangle] +#[cfg(not(target_os = "windows"))] +pub unsafe extern "C" fn fil_write_with_alignment( + registered_proof: fil_RegisteredSealProof, + src_fd: libc::c_int, + src_size: u64, + dst_fd: libc::c_int, + existing_piece_sizes_ptr: *const u64, + existing_piece_sizes_len: libc::size_t, +) -> *mut fil_WriteWithAlignmentResponse { + catch_panic_response(|| { + init_log(); + + info!("write_with_alignment: start"); + + let mut response = fil_WriteWithAlignmentResponse::default(); + + let piece_sizes: Vec = + from_raw_parts(existing_piece_sizes_ptr, existing_piece_sizes_len) + .iter() + .map(|n| UnpaddedBytesAmount(*n)) + .collect(); + + let n = UnpaddedBytesAmount(src_size); + + match filecoin_proofs_api::seal::add_piece( + registered_proof.into(), + FileDescriptorRef::new(src_fd), + FileDescriptorRef::new(dst_fd), + n, + &piece_sizes, + ) { + Ok((info, written)) => { + response.comm_p = info.commitment; + response.left_alignment_unpadded = (written - n).into(); + response.status_code = FCPResponseStatus::FCPNoError; + response.total_write_unpadded = written.into(); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("write_with_alignment: finish"); + + raw_ptr(response) + }) +} + +/// TODO: document +/// +#[no_mangle] +#[cfg(not(target_os = "windows"))] +pub unsafe extern "C" fn fil_write_without_alignment( + registered_proof: fil_RegisteredSealProof, + src_fd: libc::c_int, + src_size: u64, + dst_fd: libc::c_int, +) -> *mut fil_WriteWithoutAlignmentResponse { + catch_panic_response(|| { + init_log(); + + info!("write_without_alignment: start"); + + let mut response = fil_WriteWithoutAlignmentResponse::default(); + + match filecoin_proofs_api::seal::write_and_preprocess( + registered_proof.into(), + FileDescriptorRef::new(src_fd), + FileDescriptorRef::new(dst_fd), + UnpaddedBytesAmount(src_size), + ) { + Ok((info, written)) => { + response.comm_p = info.commitment; + response.status_code = FCPResponseStatus::FCPNoError; + response.total_write_unpadded = written.into(); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("write_without_alignment: finish"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_fauxrep( + registered_proof: fil_RegisteredSealProof, + cache_dir_path: *const libc::c_char, + sealed_sector_path: *const libc::c_char, +) -> *mut fil_FauxRepResponse { + catch_panic_response(|| { + init_log(); + + info!("fauxrep: start"); + + let mut response: fil_FauxRepResponse = Default::default(); + + let result = filecoin_proofs_api::seal::fauxrep( + registered_proof.into(), + c_str_to_pbuf(cache_dir_path), + c_str_to_pbuf(sealed_sector_path), + ); + + match result { + Ok(output) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.commitment = output; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("fauxrep: finish"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_fauxrep2( + registered_proof: fil_RegisteredSealProof, + cache_dir_path: *const libc::c_char, + existing_p_aux_path: *const libc::c_char, +) -> *mut fil_FauxRepResponse { + catch_panic_response(|| { + init_log(); + + info!("fauxrep2: start"); + + let mut response: fil_FauxRepResponse = Default::default(); + + let result = filecoin_proofs_api::seal::fauxrep2( + registered_proof.into(), + c_str_to_pbuf(cache_dir_path), + c_str_to_pbuf(existing_p_aux_path), + ); + + match result { + Ok(output) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.commitment = output; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("fauxrep2: finish"); + + raw_ptr(response) + }) +} + +/// TODO: document +/// +#[no_mangle] +pub unsafe extern "C" fn fil_seal_pre_commit_phase1( + registered_proof: fil_RegisteredSealProof, + cache_dir_path: *const libc::c_char, + staged_sector_path: *const libc::c_char, + sealed_sector_path: *const libc::c_char, + sector_id: u64, + prover_id: fil_32ByteArray, + ticket: fil_32ByteArray, + pieces_ptr: *const fil_PublicPieceInfo, + pieces_len: libc::size_t, +) -> *mut fil_SealPreCommitPhase1Response { + catch_panic_response(|| { + init_log(); + + info!("seal_pre_commit_phase1: start"); + + let public_pieces: Vec = from_raw_parts(pieces_ptr, pieces_len) + .iter() + .cloned() + .map(Into::into) + .collect(); + + let mut response: fil_SealPreCommitPhase1Response = Default::default(); + + let result = filecoin_proofs_api::seal::seal_pre_commit_phase1( + registered_proof.into(), + c_str_to_pbuf(cache_dir_path), + c_str_to_pbuf(staged_sector_path), + c_str_to_pbuf(sealed_sector_path), + prover_id.inner, + SectorId::from(sector_id), + ticket.inner, + &public_pieces, + ) + .and_then(|output| serde_json::to_vec(&output).map_err(Into::into)); + + match result { + Ok(output) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.seal_pre_commit_phase1_output_ptr = output.as_ptr(); + response.seal_pre_commit_phase1_output_len = output.len(); + mem::forget(output); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("seal_pre_commit_phase1: finish"); + + raw_ptr(response) + }) +} + +/// TODO: document +/// +#[no_mangle] +pub unsafe extern "C" fn fil_seal_pre_commit_phase2( + seal_pre_commit_phase1_output_ptr: *const u8, + seal_pre_commit_phase1_output_len: libc::size_t, + cache_dir_path: *const libc::c_char, + sealed_sector_path: *const libc::c_char, +) -> *mut fil_SealPreCommitPhase2Response { + catch_panic_response(|| { + init_log(); + + info!("seal_pre_commit_phase2: start"); + + let mut response: fil_SealPreCommitPhase2Response = Default::default(); + + let phase_1_output = serde_json::from_slice(from_raw_parts( + seal_pre_commit_phase1_output_ptr, + seal_pre_commit_phase1_output_len, + )) + .map_err(Into::into); + + let result = phase_1_output.and_then(|o| { + filecoin_proofs_api::seal::seal_pre_commit_phase2::( + o, + c_str_to_pbuf(cache_dir_path), + c_str_to_pbuf(sealed_sector_path), + ) + }); + + match result { + Ok(output) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.comm_r = output.comm_r; + response.comm_d = output.comm_d; + response.registered_proof = output.registered_proof.into(); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("seal_pre_commit_phase2: finish"); + + raw_ptr(response) + }) +} + +/// TODO: document +/// +#[no_mangle] +pub unsafe extern "C" fn fil_seal_commit_phase1( + registered_proof: fil_RegisteredSealProof, + comm_r: fil_32ByteArray, + comm_d: fil_32ByteArray, + cache_dir_path: *const libc::c_char, + replica_path: *const libc::c_char, + sector_id: u64, + prover_id: fil_32ByteArray, + ticket: fil_32ByteArray, + seed: fil_32ByteArray, + pieces_ptr: *const fil_PublicPieceInfo, + pieces_len: libc::size_t, +) -> *mut fil_SealCommitPhase1Response { + catch_panic_response(|| { + init_log(); + + info!("seal_commit_phase1: start"); + + let mut response = fil_SealCommitPhase1Response::default(); + + let spcp2o = SealPreCommitPhase2Output { + registered_proof: registered_proof.into(), + comm_r: comm_r.inner, + comm_d: comm_d.inner, + }; + + let public_pieces: Vec = from_raw_parts(pieces_ptr, pieces_len) + .iter() + .cloned() + .map(Into::into) + .collect(); + + let result = filecoin_proofs_api::seal::seal_commit_phase1( + c_str_to_pbuf(cache_dir_path), + c_str_to_pbuf(replica_path), + prover_id.inner, + SectorId::from(sector_id), + ticket.inner, + seed.inner, + spcp2o, + &public_pieces, + ); + + match result.and_then(|output| serde_json::to_vec(&output).map_err(Into::into)) { + Ok(output) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.seal_commit_phase1_output_ptr = output.as_ptr(); + response.seal_commit_phase1_output_len = output.len(); + mem::forget(output); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("seal_commit_phase1: finish"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_seal_commit_phase2( + seal_commit_phase1_output_ptr: *const u8, + seal_commit_phase1_output_len: libc::size_t, + sector_id: u64, + prover_id: fil_32ByteArray, +) -> *mut fil_SealCommitPhase2Response { + catch_panic_response(|| { + init_log(); + + info!("seal_commit_phase2: start"); + + let mut response = fil_SealCommitPhase2Response::default(); + + let scp1o = serde_json::from_slice(from_raw_parts( + seal_commit_phase1_output_ptr, + seal_commit_phase1_output_len, + )) + .map_err(Into::into); + + let result = scp1o.and_then(|o| { + filecoin_proofs_api::seal::seal_commit_phase2( + o, + prover_id.inner, + SectorId::from(sector_id), + ) + }); + + match result { + Ok(output) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.proof_ptr = output.proof.as_ptr(); + response.proof_len = output.proof.len(); + mem::forget(output.proof); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("seal_commit_phase2: finish"); + + raw_ptr(response) + }) +} + +/// TODO: document +#[no_mangle] +pub unsafe extern "C" fn fil_unseal_range( + registered_proof: fil_RegisteredSealProof, + cache_dir_path: *const libc::c_char, + sealed_sector_fd_raw: libc::c_int, + unseal_output_fd_raw: libc::c_int, + sector_id: u64, + prover_id: fil_32ByteArray, + ticket: fil_32ByteArray, + comm_d: fil_32ByteArray, + unpadded_byte_index: u64, + unpadded_bytes_amount: u64, +) -> *mut fil_UnsealRangeResponse { + catch_panic_response(|| { + init_log(); + + info!("unseal_range: start"); + + use std::os::unix::io::{FromRawFd, IntoRawFd}; + + let mut sealed_sector = std::fs::File::from_raw_fd(sealed_sector_fd_raw); + let mut unseal_output = std::fs::File::from_raw_fd(unseal_output_fd_raw); + + let result = filecoin_proofs_api::seal::unseal_range( + registered_proof.into(), + c_str_to_pbuf(cache_dir_path), + &mut sealed_sector, + &mut unseal_output, + prover_id.inner, + SectorId::from(sector_id), + comm_d.inner, + ticket.inner, + UnpaddedByteIndex(unpadded_byte_index), + UnpaddedBytesAmount(unpadded_bytes_amount), + ); + + // keep all file descriptors alive until unseal_range returns + let _ = sealed_sector.into_raw_fd(); + let _ = unseal_output.into_raw_fd(); + + let mut response = fil_UnsealRangeResponse::default(); + + match result { + Ok(_) => { + response.status_code = FCPResponseStatus::FCPNoError; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + }; + + info!("unseal_range: finish"); + + raw_ptr(response) + }) +} + +/// Verifies the output of seal. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_verify_seal( + registered_proof: fil_RegisteredSealProof, + comm_r: fil_32ByteArray, + comm_d: fil_32ByteArray, + prover_id: fil_32ByteArray, + ticket: fil_32ByteArray, + seed: fil_32ByteArray, + sector_id: u64, + proof_ptr: *const u8, + proof_len: libc::size_t, +) -> *mut super::types::fil_VerifySealResponse { + catch_panic_response(|| { + init_log(); + + info!("verify_seal: start"); + + let mut proof_bytes: Vec = vec![0; proof_len]; + proof_bytes.clone_from_slice(from_raw_parts(proof_ptr, proof_len)); + + let result = filecoin_proofs_api::seal::verify_seal( + registered_proof.into(), + comm_r.inner, + comm_d.inner, + prover_id.inner, + SectorId::from(sector_id), + ticket.inner, + seed.inner, + &proof_bytes, + ); + + let mut response = fil_VerifySealResponse::default(); + + match result { + Ok(true) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.is_valid = true; + } + Ok(false) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.is_valid = false; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + }; + + info!("verify_seal: finish"); + + raw_ptr(response) + }) +} + +/// Verifies that a proof-of-spacetime is valid. +#[no_mangle] +pub unsafe extern "C" fn fil_verify_winning_post( + randomness: fil_32ByteArray, + replicas_ptr: *const fil_PublicReplicaInfo, + replicas_len: libc::size_t, + proofs_ptr: *const fil_PoStProof, + proofs_len: libc::size_t, + prover_id: fil_32ByteArray, +) -> *mut fil_VerifyWinningPoStResponse { + catch_panic_response(|| { + init_log(); + + info!("verify_winning_post: start"); + + let mut response = fil_VerifyWinningPoStResponse::default(); + + let convert = super::helpers::to_public_replica_info_map(replicas_ptr, replicas_len); + + let result = convert.and_then(|replicas| { + let post_proofs = c_to_rust_post_proofs(proofs_ptr, proofs_len)?; + let proofs: Vec = post_proofs.iter().flat_map(|pp| pp.clone().proof).collect(); + + filecoin_proofs_api::post::verify_winning_post( + &randomness.inner, + &proofs, + &replicas, + prover_id.inner, + ) + }); + + match result { + Ok(is_valid) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.is_valid = is_valid; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + }; + + info!("verify_winning_post: {}", "finish"); + raw_ptr(response) + }) +} + +/// TODO: document +/// +#[no_mangle] +pub unsafe extern "C" fn fil_generate_window_post( + randomness: fil_32ByteArray, + replicas_ptr: *const fil_PrivateReplicaInfo, + replicas_len: libc::size_t, + prover_id: fil_32ByteArray, +) -> *mut fil_GenerateWindowPoStResponse { + catch_panic_response(|| { + init_log(); + + info!("generate_window_post: start"); + + let mut response = fil_GenerateWindowPoStResponse::default(); + + let result = to_private_replica_info_map(replicas_ptr, replicas_len).and_then(|rs| { + filecoin_proofs_api::post::generate_window_post(&randomness.inner, &rs, prover_id.inner) + }); + + match result { + Ok(output) => { + let mapped: Vec = output + .iter() + .cloned() + .map(|(t, proof)| { + let out = fil_PoStProof { + registered_proof: (t).into(), + proof_len: proof.len(), + proof_ptr: proof.as_ptr(), + }; + + mem::forget(proof); + + out + }) + .collect(); + + response.status_code = FCPResponseStatus::FCPNoError; + response.proofs_ptr = mapped.as_ptr(); + response.proofs_len = mapped.len(); + mem::forget(mapped); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("generate_window_post: finish"); + + raw_ptr(response) + }) +} + +/// Verifies that a proof-of-spacetime is valid. +#[no_mangle] +pub unsafe extern "C" fn fil_verify_window_post( + randomness: fil_32ByteArray, + replicas_ptr: *const fil_PublicReplicaInfo, + replicas_len: libc::size_t, + proofs_ptr: *const fil_PoStProof, + proofs_len: libc::size_t, + prover_id: fil_32ByteArray, +) -> *mut fil_VerifyWindowPoStResponse { + catch_panic_response(|| { + init_log(); + + info!("verify_window_post: start"); + + let mut response = fil_VerifyWindowPoStResponse::default(); + + let convert = super::helpers::to_public_replica_info_map(replicas_ptr, replicas_len); + + let result = convert.and_then(|replicas| { + let post_proofs = c_to_rust_post_proofs(proofs_ptr, proofs_len)?; + + let proofs: Vec<(RegisteredPoStProof, &[u8])> = post_proofs + .iter() + .map(|x| (x.registered_proof, x.proof.as_ref())) + .collect(); + + filecoin_proofs_api::post::verify_window_post( + &randomness.inner, + &proofs, + &replicas, + prover_id.inner, + ) + }); + + match result { + Ok(is_valid) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.is_valid = is_valid; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + }; + + info!("verify_window_post: {}", "finish"); + raw_ptr(response) + }) +} + +/// Returns the merkle root for a piece after piece padding and alignment. +/// The caller is responsible for closing the passed in file descriptor. +#[no_mangle] +#[cfg(not(target_os = "windows"))] +pub unsafe extern "C" fn fil_generate_piece_commitment( + registered_proof: fil_RegisteredSealProof, + piece_fd_raw: libc::c_int, + unpadded_piece_size: u64, +) -> *mut fil_GeneratePieceCommitmentResponse { + catch_panic_response(|| { + init_log(); + + use std::os::unix::io::{FromRawFd, IntoRawFd}; + + let mut piece_file = std::fs::File::from_raw_fd(piece_fd_raw); + + let unpadded_piece_size = UnpaddedBytesAmount(unpadded_piece_size); + let result = filecoin_proofs_api::seal::generate_piece_commitment( + registered_proof.into(), + &mut piece_file, + unpadded_piece_size, + ); + + // avoid dropping the File which closes it + let _ = piece_file.into_raw_fd(); + + let mut response = fil_GeneratePieceCommitmentResponse::default(); + + match result { + Ok(meta) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.comm_p = meta.commitment; + response.num_bytes_aligned = meta.size.into(); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + raw_ptr(response) + }) +} + +/// Returns the merkle root for a sector containing the provided pieces. +#[no_mangle] +pub unsafe extern "C" fn fil_generate_data_commitment( + registered_proof: fil_RegisteredSealProof, + pieces_ptr: *const fil_PublicPieceInfo, + pieces_len: libc::size_t, +) -> *mut fil_GenerateDataCommitmentResponse { + catch_panic_response(|| { + init_log(); + + info!("generate_data_commitment: start"); + + let public_pieces: Vec = from_raw_parts(pieces_ptr, pieces_len) + .iter() + .cloned() + .map(Into::into) + .collect(); + + let result = + filecoin_proofs_api::seal::compute_comm_d(registered_proof.into(), &public_pieces); + + let mut response = fil_GenerateDataCommitmentResponse::default(); + + match result { + Ok(commitment) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.comm_d = commitment; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("generate_data_commitment: finish"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_clear_cache( + sector_size: u64, + cache_dir_path: *const libc::c_char, +) -> *mut fil_ClearCacheResponse { + catch_panic_response(|| { + init_log(); + + let result = + filecoin_proofs_api::seal::clear_cache(sector_size, &c_str_to_pbuf(cache_dir_path)); + + let mut response = fil_ClearCacheResponse::default(); + + match result { + Ok(_) => { + response.status_code = FCPResponseStatus::FCPNoError; + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + }; + + raw_ptr(response) + }) +} + +/// TODO: document +/// +#[no_mangle] +pub unsafe extern "C" fn fil_generate_winning_post_sector_challenge( + registered_proof: fil_RegisteredPoStProof, + randomness: fil_32ByteArray, + sector_set_len: u64, + prover_id: fil_32ByteArray, +) -> *mut fil_GenerateWinningPoStSectorChallenge { + catch_panic_response(|| { + init_log(); + + info!("generate_winning_post_sector_challenge: start"); + + let mut response = fil_GenerateWinningPoStSectorChallenge::default(); + + let result = filecoin_proofs_api::post::generate_winning_post_sector_challenge( + registered_proof.into(), + &randomness.inner, + sector_set_len, + prover_id.inner, + ); + + match result { + Ok(output) => { + let mapped: Vec = output.into_iter().map(u64::from).collect(); + + response.status_code = FCPResponseStatus::FCPNoError; + response.ids_ptr = mapped.as_ptr(); + response.ids_len = mapped.len(); + mem::forget(mapped); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("generate_winning_post_sector_challenge: finish"); + + raw_ptr(response) + }) +} + +/// TODO: document +/// +#[no_mangle] +pub unsafe extern "C" fn fil_generate_winning_post( + randomness: fil_32ByteArray, + replicas_ptr: *const fil_PrivateReplicaInfo, + replicas_len: libc::size_t, + prover_id: fil_32ByteArray, +) -> *mut fil_GenerateWinningPoStResponse { + catch_panic_response(|| { + init_log(); + + info!("generate_winning_post: start"); + + let mut response = fil_GenerateWinningPoStResponse::default(); + + let result = to_private_replica_info_map(replicas_ptr, replicas_len).and_then(|rs| { + filecoin_proofs_api::post::generate_winning_post( + &randomness.inner, + &rs, + prover_id.inner, + ) + }); + + match result { + Ok(output) => { + let mapped: Vec = output + .iter() + .cloned() + .map(|(t, proof)| { + let out = fil_PoStProof { + registered_proof: (t).into(), + proof_len: proof.len(), + proof_ptr: proof.as_ptr(), + }; + + mem::forget(proof); + + out + }) + .collect(); + + response.status_code = FCPResponseStatus::FCPNoError; + response.proofs_ptr = mapped.as_ptr(); + response.proofs_len = mapped.len(); + mem::forget(mapped); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + info!("generate_winning_post: finish"); + + raw_ptr(response) + }) +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_write_with_alignment_response( + ptr: *mut fil_WriteWithAlignmentResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_write_without_alignment_response( + ptr: *mut fil_WriteWithoutAlignmentResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_fauxrep_response(ptr: *mut fil_FauxRepResponse) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_seal_pre_commit_phase1_response( + ptr: *mut fil_SealPreCommitPhase1Response, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_seal_pre_commit_phase2_response( + ptr: *mut fil_SealPreCommitPhase2Response, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_seal_commit_phase1_response( + ptr: *mut fil_SealCommitPhase1Response, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_seal_commit_phase2_response( + ptr: *mut fil_SealCommitPhase2Response, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_unseal_range_response(ptr: *mut fil_UnsealRangeResponse) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_generate_piece_commitment_response( + ptr: *mut fil_GeneratePieceCommitmentResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_generate_data_commitment_response( + ptr: *mut fil_GenerateDataCommitmentResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_string_response(ptr: *mut fil_StringResponse) { + let _ = Box::from_raw(ptr); +} + +/// Returns the number of user bytes that will fit into a staged sector. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_max_user_bytes_per_staged_sector( + registered_proof: fil_RegisteredSealProof, +) -> u64 { + u64::from(UnpaddedBytesAmount::from( + RegisteredSealProof::from(registered_proof).sector_size(), + )) +} + +/// Returns the CID of the Groth parameter file for sealing. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_seal_params_cid( + registered_proof: fil_RegisteredSealProof, +) -> *mut fil_StringResponse { + registered_seal_proof_accessor(registered_proof, RegisteredSealProof::params_cid) +} + +/// Returns the CID of the verifying key-file for verifying a seal proof. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_seal_verifying_key_cid( + registered_proof: fil_RegisteredSealProof, +) -> *mut fil_StringResponse { + registered_seal_proof_accessor(registered_proof, RegisteredSealProof::verifying_key_cid) +} + +/// Returns the path from which the proofs library expects to find the Groth +/// parameter file used when sealing. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_seal_params_path( + registered_proof: fil_RegisteredSealProof, +) -> *mut fil_StringResponse { + registered_seal_proof_accessor(registered_proof, |p| { + p.cache_params_path() + .map(|pb| String::from(pb.to_string_lossy())) + }) +} + +/// Returns the path from which the proofs library expects to find the verifying +/// key-file used when verifying a seal proof. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_seal_verifying_key_path( + registered_proof: fil_RegisteredSealProof, +) -> *mut fil_StringResponse { + registered_seal_proof_accessor(registered_proof, |p| { + p.cache_verifying_key_path() + .map(|pb| String::from(pb.to_string_lossy())) + }) +} + +/// Returns the identity of the circuit for the provided seal proof. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_seal_circuit_identifier( + registered_proof: fil_RegisteredSealProof, +) -> *mut fil_StringResponse { + registered_seal_proof_accessor(registered_proof, RegisteredSealProof::circuit_identifier) +} + +/// Returns the version of the provided seal proof type. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_seal_version( + registered_proof: fil_RegisteredSealProof, +) -> *mut fil_StringResponse { + registered_seal_proof_accessor(registered_proof, |p| Ok(format!("{:?}", p))) +} + +/// Returns the CID of the Groth parameter file for generating a PoSt. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_post_params_cid( + registered_proof: fil_RegisteredPoStProof, +) -> *mut fil_StringResponse { + registered_post_proof_accessor(registered_proof, RegisteredPoStProof::params_cid) +} + +/// Returns the CID of the verifying key-file for verifying a PoSt proof. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_post_verifying_key_cid( + registered_proof: fil_RegisteredPoStProof, +) -> *mut fil_StringResponse { + registered_post_proof_accessor(registered_proof, RegisteredPoStProof::verifying_key_cid) +} + +/// Returns the path from which the proofs library expects to find the Groth +/// parameter file used when generating a PoSt. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_post_params_path( + registered_proof: fil_RegisteredPoStProof, +) -> *mut fil_StringResponse { + registered_post_proof_accessor(registered_proof, |p| { + p.cache_params_path() + .map(|pb| String::from(pb.to_string_lossy())) + }) +} + +/// Returns the path from which the proofs library expects to find the verifying +/// key-file used when verifying a PoSt proof. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_post_verifying_key_path( + registered_proof: fil_RegisteredPoStProof, +) -> *mut fil_StringResponse { + registered_post_proof_accessor(registered_proof, |p| { + p.cache_verifying_key_path() + .map(|pb| String::from(pb.to_string_lossy())) + }) +} + +/// Returns the identity of the circuit for the provided PoSt proof type. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_post_circuit_identifier( + registered_proof: fil_RegisteredPoStProof, +) -> *mut fil_StringResponse { + registered_post_proof_accessor(registered_proof, RegisteredPoStProof::circuit_identifier) +} + +/// Returns the version of the provided seal proof. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_get_post_version( + registered_proof: fil_RegisteredPoStProof, +) -> *mut fil_StringResponse { + registered_post_proof_accessor(registered_proof, |p| Ok(format!("{:?}", p))) +} + +unsafe fn registered_seal_proof_accessor( + registered_proof: fil_RegisteredSealProof, + op: fn(RegisteredSealProof) -> anyhow::Result, +) -> *mut fil_StringResponse { + let mut response = fil_StringResponse::default(); + + let rsp: RegisteredSealProof = registered_proof.into(); + + match op(rsp) { + Ok(s) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.string_val = rust_str_to_c_str(s); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + raw_ptr(response) +} + +unsafe fn registered_post_proof_accessor( + registered_proof: fil_RegisteredPoStProof, + op: fn(RegisteredPoStProof) -> anyhow::Result, +) -> *mut fil_StringResponse { + let mut response = fil_StringResponse::default(); + + let rsp: RegisteredPoStProof = registered_proof.into(); + + match op(rsp) { + Ok(s) => { + response.status_code = FCPResponseStatus::FCPNoError; + response.string_val = rust_str_to_c_str(s); + } + Err(err) => { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str(format!("{:?}", err)); + } + } + + raw_ptr(response) +} + +/// Deallocates a VerifySealResponse. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_verify_seal_response(ptr: *mut fil_VerifySealResponse) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_finalize_ticket_response( + ptr: *mut fil_FinalizeTicketResponse, +) { + let _ = Box::from_raw(ptr); +} + +/// Deallocates a VerifyPoStResponse. +/// +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_verify_winning_post_response( + ptr: *mut fil_VerifyWinningPoStResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_verify_window_post_response( + ptr: *mut fil_VerifyWindowPoStResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_generate_winning_post_response( + ptr: *mut fil_GenerateWinningPoStResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_generate_window_post_response( + ptr: *mut fil_GenerateWindowPoStResponse, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_generate_winning_post_sector_challenge( + ptr: *mut fil_GenerateWinningPoStSectorChallenge, +) { + let _ = Box::from_raw(ptr); +} + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_clear_cache_response(ptr: *mut fil_ClearCacheResponse) { + let _ = Box::from_raw(ptr); +} + +#[cfg(test)] +pub mod tests { + use std::io::{Read, Seek, SeekFrom, Write}; + use std::os::unix::io::IntoRawFd; + + use anyhow::Result; + use ffi_toolkit::{c_str_to_rust_str, FCPResponseStatus}; + use rand::{thread_rng, Rng}; + + use super::*; + use std::ffi::CStr; + + #[test] + fn test_write_with_and_without_alignment() -> Result<()> { + let registered_proof = fil_RegisteredSealProof::StackedDrg2KiBV1; + + // write some bytes to a temp file to be used as the byte source + let mut rng = thread_rng(); + let buf: Vec = (0..508).map(|_| rng.gen()).collect(); + + // first temp file occupies 4 nodes in a merkle tree built over the + // destination (after preprocessing) + let mut src_file_a = tempfile::tempfile()?; + src_file_a.write_all(&buf[0..127])?; + src_file_a.seek(SeekFrom::Start(0))?; + + // second occupies 16 nodes + let mut src_file_b = tempfile::tempfile()?; + src_file_b.write_all(&buf[0..508])?; + src_file_b.seek(SeekFrom::Start(0))?; + + // create a temp file to be used as the byte destination + let dest = tempfile::tempfile()?; + + // transmute temp files to file descriptors + let src_fd_a = src_file_a.into_raw_fd(); + let src_fd_b = src_file_b.into_raw_fd(); + let dst_fd = dest.into_raw_fd(); + + // write the first file + unsafe { + let resp = fil_write_without_alignment(registered_proof, src_fd_a, 127, dst_fd); + + if (*resp).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp).error_msg); + panic!("write_without_alignment failed: {:?}", msg); + } + + assert_eq!( + (*resp).total_write_unpadded, + 127, + "should have added 127 bytes of (unpadded) left alignment" + ); + } + + // write the second + unsafe { + let existing = vec![127u64]; + + let resp = fil_write_with_alignment( + registered_proof, + src_fd_b, + 508, + dst_fd, + existing.as_ptr(), + existing.len(), + ); + + if (*resp).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp).error_msg); + panic!("write_with_alignment failed: {:?}", msg); + } + + assert_eq!( + (*resp).left_alignment_unpadded, + 381, + "should have added 381 bytes of (unpadded) left alignment" + ); + } + + Ok(()) + } + + #[test] + fn test_proof_types() -> Result<()> { + let seal_types = vec![ + fil_RegisteredSealProof::StackedDrg2KiBV1, + fil_RegisteredSealProof::StackedDrg8MiBV1, + fil_RegisteredSealProof::StackedDrg512MiBV1, + fil_RegisteredSealProof::StackedDrg32GiBV1, + ]; + + let post_types = vec![ + fil_RegisteredPoStProof::StackedDrgWinning2KiBV1, + fil_RegisteredPoStProof::StackedDrgWinning8MiBV1, + fil_RegisteredPoStProof::StackedDrgWinning512MiBV1, + fil_RegisteredPoStProof::StackedDrgWinning32GiBV1, + fil_RegisteredPoStProof::StackedDrgWindow2KiBV1, + fil_RegisteredPoStProof::StackedDrgWindow8MiBV1, + fil_RegisteredPoStProof::StackedDrgWindow512MiBV1, + fil_RegisteredPoStProof::StackedDrgWindow32GiBV1, + ]; + + let num_ops = (seal_types.len() + post_types.len()) * 6; + + let mut pairs: Vec<(&str, *mut fil_StringResponse)> = Vec::with_capacity(num_ops); + + unsafe { + for st in seal_types { + pairs.push(("get_seal_params_cid", fil_get_seal_params_cid(st))); + pairs.push(( + "get_seal_verify_key_cid", + fil_get_seal_verifying_key_cid(st), + )); + pairs.push(("get_seal_verify_key_cid", fil_get_seal_params_path(st))); + pairs.push(( + "get_seal_verify_key_cid", + fil_get_seal_verifying_key_path(st), + )); + pairs.push(( + "get_seal_circuit_identifier", + fil_get_seal_circuit_identifier(st), + )); + pairs.push(("get_seal_version", fil_get_seal_version(st))); + } + + for pt in post_types { + pairs.push(("get_post_params_cid", fil_get_post_params_cid(pt))); + pairs.push(( + "get_post_verify_key_cid", + fil_get_post_verifying_key_cid(pt), + )); + pairs.push(("get_post_params_path", fil_get_post_params_path(pt))); + pairs.push(( + "get_post_verifying_key_path", + fil_get_post_verifying_key_path(pt), + )); + pairs.push(( + "get_post_circuit_identifier", + fil_get_post_circuit_identifier(pt), + )); + pairs.push(("get_post_version", fil_get_post_version(pt))); + } + } + + for (label, r) in pairs { + unsafe { + assert_eq!( + (*r).status_code, + FCPResponseStatus::FCPNoError, + "non-success exit code from {:?}: {:?}", + label, + c_str_to_rust_str((*r).error_msg) + ); + + let x = CStr::from_ptr((*r).string_val); + let y = x.to_str().unwrap(); + + assert!(!y.is_empty()); + + fil_destroy_string_response(r); + } + } + + Ok(()) + } + + #[test] + fn test_sealing() -> Result<()> { + let wrap = |x| fil_32ByteArray { inner: x }; + + // miscellaneous setup and shared values + let registered_proof_seal = fil_RegisteredSealProof::StackedDrg2KiBV1; + let registered_proof_winning_post = fil_RegisteredPoStProof::StackedDrgWinning2KiBV1; + let registered_proof_window_post = fil_RegisteredPoStProof::StackedDrgWindow2KiBV1; + + let cache_dir = tempfile::tempdir()?; + let cache_dir_path = cache_dir.into_path(); + + let prover_id = fil_32ByteArray { inner: [1u8; 32] }; + let randomness = fil_32ByteArray { inner: [7u8; 32] }; + let sector_id = 42; + let seed = fil_32ByteArray { inner: [5u8; 32] }; + let ticket = fil_32ByteArray { inner: [6u8; 32] }; + + // create a byte source (a user's piece) + let mut rng = thread_rng(); + let buf_a: Vec = (0..2032).map(|_| rng.gen()).collect(); + + let mut piece_file_a = tempfile::tempfile()?; + piece_file_a.write_all(&buf_a[0..127])?; + piece_file_a.seek(SeekFrom::Start(0))?; + + let mut piece_file_b = tempfile::tempfile()?; + piece_file_b.write_all(&buf_a[0..1016])?; + piece_file_b.seek(SeekFrom::Start(0))?; + + // create the staged sector (the byte destination) + let (staged_file, staged_path) = tempfile::NamedTempFile::new()?.keep()?; + + // create a temp file to be used as the byte destination + let (sealed_file, sealed_path) = tempfile::NamedTempFile::new()?.keep()?; + + // last temp file is used to output unsealed bytes + let (unseal_file, unseal_path) = tempfile::NamedTempFile::new()?.keep()?; + + // transmute temp files to file descriptors + let piece_file_a_fd = piece_file_a.into_raw_fd(); + let piece_file_b_fd = piece_file_b.into_raw_fd(); + let staged_sector_fd = staged_file.into_raw_fd(); + + unsafe { + let resp_a1 = fil_write_without_alignment( + registered_proof_seal, + piece_file_a_fd, + 127, + staged_sector_fd, + ); + + if (*resp_a1).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_a1).error_msg); + panic!("write_without_alignment failed: {:?}", msg); + } + + let existing_piece_sizes = vec![127]; + + let resp_a2 = fil_write_with_alignment( + registered_proof_seal, + piece_file_b_fd, + 1016, + staged_sector_fd, + existing_piece_sizes.as_ptr(), + existing_piece_sizes.len(), + ); + + if (*resp_a2).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_a2).error_msg); + panic!("write_with_alignment failed: {:?}", msg); + } + + let pieces = vec![ + fil_PublicPieceInfo { + num_bytes: 127, + comm_p: (*resp_a1).comm_p, + }, + fil_PublicPieceInfo { + num_bytes: 1016, + comm_p: (*resp_a2).comm_p, + }, + ]; + + let resp_x = + fil_generate_data_commitment(registered_proof_seal, pieces.as_ptr(), pieces.len()); + + if (*resp_x).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_x).error_msg); + panic!("generate_data_commitment failed: {:?}", msg); + } + + let cache_dir_path_c_str = rust_str_to_c_str(cache_dir_path.to_str().unwrap()); + let staged_path_c_str = rust_str_to_c_str(staged_path.to_str().unwrap()); + let replica_path_c_str = rust_str_to_c_str(sealed_path.to_str().unwrap()); + let unseal_path_c_str = rust_str_to_c_str(unseal_path.to_str().unwrap()); + + let resp_b1 = fil_seal_pre_commit_phase1( + registered_proof_seal, + cache_dir_path_c_str, + staged_path_c_str, + replica_path_c_str, + sector_id, + prover_id, + ticket, + pieces.as_ptr(), + pieces.len(), + ); + + if (*resp_b1).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_b1).error_msg); + panic!("seal_pre_commit_phase1 failed: {:?}", msg); + } + + let resp_b2 = fil_seal_pre_commit_phase2( + (*resp_b1).seal_pre_commit_phase1_output_ptr, + (*resp_b1).seal_pre_commit_phase1_output_len, + cache_dir_path_c_str, + replica_path_c_str, + ); + + if (*resp_b2).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_b2).error_msg); + panic!("seal_pre_commit_phase2 failed: {:?}", msg); + } + + let pre_computed_comm_d = &(*resp_x).comm_d; + let pre_commit_comm_d = &(*resp_b2).comm_d; + + assert_eq!( + format!("{:x?}", &pre_computed_comm_d), + format!("{:x?}", &pre_commit_comm_d), + "pre-computed CommD and pre-commit CommD don't match" + ); + + let resp_c1 = fil_seal_commit_phase1( + registered_proof_seal, + wrap((*resp_b2).comm_r), + wrap((*resp_b2).comm_d), + cache_dir_path_c_str, + replica_path_c_str, + sector_id, + prover_id, + ticket, + seed, + pieces.as_ptr(), + pieces.len(), + ); + + if (*resp_c1).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_c1).error_msg); + panic!("seal_commit_phase1 failed: {:?}", msg); + } + + let resp_c2 = fil_seal_commit_phase2( + (*resp_c1).seal_commit_phase1_output_ptr, + (*resp_c1).seal_commit_phase1_output_len, + sector_id, + prover_id, + ); + + if (*resp_c2).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_c2).error_msg); + panic!("seal_commit_phase2 failed: {:?}", msg); + } + + let resp_d = fil_verify_seal( + registered_proof_seal, + wrap((*resp_b2).comm_r), + wrap((*resp_b2).comm_d), + prover_id, + ticket, + seed, + sector_id, + (*resp_c2).proof_ptr, + (*resp_c2).proof_len, + ); + + if (*resp_d).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_d).error_msg); + panic!("seal_commit failed: {:?}", msg); + } + + assert!((*resp_d).is_valid, "proof was not valid"); + + let resp_e = fil_unseal_range( + registered_proof_seal, + cache_dir_path_c_str, + sealed_file.into_raw_fd(), + unseal_file.into_raw_fd(), + sector_id, + prover_id, + ticket, + wrap((*resp_b2).comm_d), + 0, + 2032, + ); + + if (*resp_e).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_e).error_msg); + panic!("unseal failed: {:?}", msg); + } + + // ensure unsealed bytes match what we had in our piece + let mut buf_b = Vec::with_capacity(2032); + let mut f = std::fs::File::open(unseal_path)?; + + let _ = f.read_to_end(&mut buf_b)?; + + let piece_a_len = (*resp_a1).total_write_unpadded as usize; + let piece_b_len = (*resp_a2).total_write_unpadded as usize; + let piece_b_prefix_len = (*resp_a2).left_alignment_unpadded as usize; + + let alignment = vec![0; piece_b_prefix_len]; + + let expected = [ + &buf_a[0..piece_a_len], + &alignment[..], + &buf_a[0..(piece_b_len - piece_b_prefix_len)], + ] + .concat(); + + assert_eq!( + format!("{:x?}", &expected), + format!("{:x?}", &buf_b), + "original bytes don't match unsealed bytes" + ); + + // generate a PoSt + + let sectors = vec![sector_id]; + let resp_f = fil_generate_winning_post_sector_challenge( + registered_proof_winning_post, + randomness, + sectors.len() as u64, + prover_id, + ); + + if (*resp_f).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_f).error_msg); + panic!("generate_candidates failed: {:?}", msg); + } + + // exercise the ticket-finalizing code path (but don't do anything + // with the results + let result: &[u64] = from_raw_parts((*resp_f).ids_ptr, (*resp_f).ids_len); + + if result.is_empty() { + panic!("generate_candidates produced no results"); + } + + let private_replicas = vec![fil_PrivateReplicaInfo { + registered_proof: registered_proof_winning_post, + cache_dir_path: cache_dir_path_c_str, + comm_r: (*resp_b2).comm_r, + replica_path: replica_path_c_str, + sector_id, + }]; + + // winning post + + let resp_h = fil_generate_winning_post( + randomness, + private_replicas.as_ptr(), + private_replicas.len(), + prover_id, + ); + + if (*resp_h).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_h).error_msg); + panic!("generate_winning_post failed: {:?}", msg); + } + let public_replicas = vec![fil_PublicReplicaInfo { + registered_proof: registered_proof_winning_post, + sector_id, + comm_r: (*resp_b2).comm_r, + }]; + + let resp_i = fil_verify_winning_post( + randomness, + public_replicas.as_ptr(), + public_replicas.len(), + (*resp_h).proofs_ptr, + (*resp_h).proofs_len, + prover_id, + ); + + if (*resp_i).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_i).error_msg); + panic!("verify_winning_post failed: {:?}", msg); + } + + if !(*resp_i).is_valid { + panic!("verify_winning_post rejected the provided proof as invalid"); + } + + // window post + + let private_replicas = vec![fil_PrivateReplicaInfo { + registered_proof: registered_proof_window_post, + cache_dir_path: cache_dir_path_c_str, + comm_r: (*resp_b2).comm_r, + replica_path: replica_path_c_str, + sector_id, + }]; + + let resp_j = fil_generate_window_post( + randomness, + private_replicas.as_ptr(), + private_replicas.len(), + prover_id, + ); + + if (*resp_j).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_j).error_msg); + panic!("generate_window_post failed: {:?}", msg); + } + + let public_replicas = vec![fil_PublicReplicaInfo { + registered_proof: registered_proof_window_post, + sector_id, + comm_r: (*resp_b2).comm_r, + }]; + + let resp_k = fil_verify_window_post( + randomness, + public_replicas.as_ptr(), + public_replicas.len(), + (*resp_j).proofs_ptr, + (*resp_j).proofs_len, + prover_id, + ); + + if (*resp_k).status_code != FCPResponseStatus::FCPNoError { + let msg = c_str_to_rust_str((*resp_k).error_msg); + panic!("verify_window_post failed: {:?}", msg); + } + + if !(*resp_k).is_valid { + panic!("verify_window_post rejected the provided proof as invalid"); + } + + fil_destroy_write_without_alignment_response(resp_a1); + fil_destroy_write_with_alignment_response(resp_a2); + fil_destroy_generate_data_commitment_response(resp_x); + + fil_destroy_seal_pre_commit_phase1_response(resp_b1); + fil_destroy_seal_pre_commit_phase2_response(resp_b2); + fil_destroy_seal_commit_phase1_response(resp_c1); + fil_destroy_seal_commit_phase2_response(resp_c2); + + fil_destroy_verify_seal_response(resp_d); + fil_destroy_unseal_range_response(resp_e); + + fil_destroy_generate_winning_post_sector_challenge(resp_f); + fil_destroy_generate_winning_post_response(resp_h); + fil_destroy_verify_winning_post_response(resp_i); + + fil_destroy_generate_window_post_response(resp_j); + fil_destroy_verify_window_post_response(resp_k); + + c_str_to_rust_str(cache_dir_path_c_str); + c_str_to_rust_str(staged_path_c_str); + c_str_to_rust_str(replica_path_c_str); + c_str_to_rust_str(unseal_path_c_str); + } + + Ok(()) + } +} diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs new file mode 100644 index 00000000..132666a4 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs @@ -0,0 +1,134 @@ +use std::collections::btree_map::BTreeMap; +use std::path::PathBuf; +use std::slice::from_raw_parts; + +use anyhow::{ensure, Result}; +use ffi_toolkit::{c_str_to_pbuf, c_str_to_rust_str}; +use filecoin_proofs_api::{PrivateReplicaInfo, PublicReplicaInfo, SectorId}; + +use super::types::{fil_PrivateReplicaInfo, fil_PublicReplicaInfo, fil_RegisteredPoStProof}; +use crate::proofs::types::{fil_PoStProof, PoStProof}; + +#[derive(Debug, Clone)] +struct PublicReplicaInfoTmp { + pub registered_proof: fil_RegisteredPoStProof, + pub comm_r: [u8; 32], + pub sector_id: u64, +} + +#[allow(clippy::type_complexity)] +pub unsafe fn to_public_replica_info_map( + replicas_ptr: *const fil_PublicReplicaInfo, + replicas_len: libc::size_t, +) -> Result> { + use rayon::prelude::*; + + ensure!(!replicas_ptr.is_null(), "replicas_ptr must not be null"); + + let mut replicas = Vec::new(); + + for ffi_info in from_raw_parts(replicas_ptr, replicas_len) { + replicas.push(PublicReplicaInfoTmp { + sector_id: ffi_info.sector_id, + registered_proof: ffi_info.registered_proof, + comm_r: ffi_info.comm_r, + }); + } + + let map = replicas + .into_par_iter() + .map(|info| { + let PublicReplicaInfoTmp { + registered_proof, + comm_r, + sector_id, + } = info; + + ( + SectorId::from(sector_id), + PublicReplicaInfo::new(registered_proof.into(), comm_r), + ) + }) + .collect(); + + Ok(map) +} + +#[derive(Debug, Clone)] +struct PrivateReplicaInfoTmp { + pub registered_proof: fil_RegisteredPoStProof, + pub cache_dir_path: std::path::PathBuf, + pub comm_r: [u8; 32], + pub replica_path: std::path::PathBuf, + pub sector_id: u64, +} + +pub unsafe fn to_private_replica_info_map( + replicas_ptr: *const fil_PrivateReplicaInfo, + replicas_len: libc::size_t, +) -> Result> { + use rayon::prelude::*; + + ensure!(!replicas_ptr.is_null(), "replicas_ptr must not be null"); + + let replicas: Vec<_> = from_raw_parts(replicas_ptr, replicas_len) + .iter() + .map(|ffi_info| { + let cache_dir_path = c_str_to_pbuf(ffi_info.cache_dir_path); + let replica_path = c_str_to_rust_str(ffi_info.replica_path).to_string(); + + PrivateReplicaInfoTmp { + registered_proof: ffi_info.registered_proof, + cache_dir_path, + comm_r: ffi_info.comm_r, + replica_path: PathBuf::from(replica_path), + sector_id: ffi_info.sector_id, + } + }) + .collect(); + + let map = replicas + .into_par_iter() + .map(|info| { + let PrivateReplicaInfoTmp { + registered_proof, + cache_dir_path, + comm_r, + replica_path, + sector_id, + } = info; + + ( + SectorId::from(sector_id), + PrivateReplicaInfo::new( + registered_proof.into(), + comm_r, + cache_dir_path, + replica_path, + ), + ) + }) + .collect(); + + Ok(map) +} + +pub unsafe fn c_to_rust_post_proofs( + post_proofs_ptr: *const fil_PoStProof, + post_proofs_len: libc::size_t, +) -> Result> { + ensure!( + !post_proofs_ptr.is_null(), + "post_proofs_ptr must not be null" + ); + + let out = from_raw_parts(post_proofs_ptr, post_proofs_len) + .iter() + .map(|fpp| PoStProof { + registered_proof: fpp.registered_proof.into(), + proof: from_raw_parts(fpp.proof_ptr, fpp.proof_len).to_vec(), + }) + .collect(); + + Ok(out) +} diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs new file mode 100644 index 00000000..1a67a192 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs @@ -0,0 +1,4 @@ +mod helpers; + +pub mod api; +pub mod types; diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs new file mode 100644 index 00000000..6ae0f852 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs @@ -0,0 +1,609 @@ +use std::io::{Error, SeekFrom}; +use std::ptr; +use std::slice::from_raw_parts; + +use anyhow::Result; +use drop_struct_macro_derive::DropStructMacro; +use ffi_toolkit::{code_and_message_impl, free_c_str, CodeAndMessage, FCPResponseStatus}; +use filecoin_proofs_api::{ + PieceInfo, RegisteredPoStProof, RegisteredSealProof, UnpaddedBytesAmount, +}; + +#[repr(C)] +#[derive(Debug, Clone, Copy)] +pub struct fil_32ByteArray { + pub inner: [u8; 32], +} + +/// FileDescriptorRef does not drop its file descriptor when it is dropped. Its +/// owner must manage the lifecycle of the file descriptor. +pub struct FileDescriptorRef(std::mem::ManuallyDrop); + +impl FileDescriptorRef { + #[cfg(not(target_os = "windows"))] + pub unsafe fn new(raw: std::os::unix::io::RawFd) -> Self { + use std::os::unix::io::FromRawFd; + FileDescriptorRef(std::mem::ManuallyDrop::new(std::fs::File::from_raw_fd(raw))) + } +} + +impl std::io::Read for FileDescriptorRef { + fn read(&mut self, buf: &mut [u8]) -> std::io::Result { + self.0.read(buf) + } +} + +impl std::io::Write for FileDescriptorRef { + fn write(&mut self, buf: &[u8]) -> Result { + self.0.write(buf) + } + + fn flush(&mut self) -> Result<(), Error> { + self.0.flush() + } +} + +impl std::io::Seek for FileDescriptorRef { + fn seek(&mut self, pos: SeekFrom) -> Result { + self.0.seek(pos) + } +} + +#[repr(C)] +#[derive(Debug, Clone, Copy)] +pub enum fil_RegisteredSealProof { + StackedDrg2KiBV1, + StackedDrg8MiBV1, + StackedDrg512MiBV1, + StackedDrg32GiBV1, + StackedDrg64GiBV1, +} + +impl From for fil_RegisteredSealProof { + fn from(other: RegisteredSealProof) -> Self { + match other { + RegisteredSealProof::StackedDrg2KiBV1 => fil_RegisteredSealProof::StackedDrg2KiBV1, + RegisteredSealProof::StackedDrg8MiBV1 => fil_RegisteredSealProof::StackedDrg8MiBV1, + RegisteredSealProof::StackedDrg512MiBV1 => fil_RegisteredSealProof::StackedDrg512MiBV1, + RegisteredSealProof::StackedDrg32GiBV1 => fil_RegisteredSealProof::StackedDrg32GiBV1, + RegisteredSealProof::StackedDrg64GiBV1 => fil_RegisteredSealProof::StackedDrg64GiBV1, + } + } +} + +impl From for RegisteredSealProof { + fn from(other: fil_RegisteredSealProof) -> Self { + match other { + fil_RegisteredSealProof::StackedDrg2KiBV1 => RegisteredSealProof::StackedDrg2KiBV1, + fil_RegisteredSealProof::StackedDrg8MiBV1 => RegisteredSealProof::StackedDrg8MiBV1, + fil_RegisteredSealProof::StackedDrg512MiBV1 => RegisteredSealProof::StackedDrg512MiBV1, + fil_RegisteredSealProof::StackedDrg32GiBV1 => RegisteredSealProof::StackedDrg32GiBV1, + fil_RegisteredSealProof::StackedDrg64GiBV1 => RegisteredSealProof::StackedDrg64GiBV1, + } + } +} + +#[repr(C)] +#[derive(Debug, Clone, Copy)] +pub enum fil_RegisteredPoStProof { + StackedDrgWinning2KiBV1, + StackedDrgWinning8MiBV1, + StackedDrgWinning512MiBV1, + StackedDrgWinning32GiBV1, + StackedDrgWinning64GiBV1, + StackedDrgWindow2KiBV1, + StackedDrgWindow8MiBV1, + StackedDrgWindow512MiBV1, + StackedDrgWindow32GiBV1, + StackedDrgWindow64GiBV1, +} + +impl From for fil_RegisteredPoStProof { + fn from(other: RegisteredPoStProof) -> Self { + use RegisteredPoStProof::*; + + match other { + StackedDrgWinning2KiBV1 => fil_RegisteredPoStProof::StackedDrgWinning2KiBV1, + StackedDrgWinning8MiBV1 => fil_RegisteredPoStProof::StackedDrgWinning8MiBV1, + StackedDrgWinning512MiBV1 => fil_RegisteredPoStProof::StackedDrgWinning512MiBV1, + StackedDrgWinning32GiBV1 => fil_RegisteredPoStProof::StackedDrgWinning32GiBV1, + StackedDrgWinning64GiBV1 => fil_RegisteredPoStProof::StackedDrgWinning64GiBV1, + StackedDrgWindow2KiBV1 => fil_RegisteredPoStProof::StackedDrgWindow2KiBV1, + StackedDrgWindow8MiBV1 => fil_RegisteredPoStProof::StackedDrgWindow8MiBV1, + StackedDrgWindow512MiBV1 => fil_RegisteredPoStProof::StackedDrgWindow512MiBV1, + StackedDrgWindow32GiBV1 => fil_RegisteredPoStProof::StackedDrgWindow32GiBV1, + StackedDrgWindow64GiBV1 => fil_RegisteredPoStProof::StackedDrgWindow64GiBV1, + } + } +} + +impl From for RegisteredPoStProof { + fn from(other: fil_RegisteredPoStProof) -> Self { + use RegisteredPoStProof::*; + + match other { + fil_RegisteredPoStProof::StackedDrgWinning2KiBV1 => StackedDrgWinning2KiBV1, + fil_RegisteredPoStProof::StackedDrgWinning8MiBV1 => StackedDrgWinning8MiBV1, + fil_RegisteredPoStProof::StackedDrgWinning512MiBV1 => StackedDrgWinning512MiBV1, + fil_RegisteredPoStProof::StackedDrgWinning32GiBV1 => StackedDrgWinning32GiBV1, + fil_RegisteredPoStProof::StackedDrgWinning64GiBV1 => StackedDrgWinning64GiBV1, + fil_RegisteredPoStProof::StackedDrgWindow2KiBV1 => StackedDrgWindow2KiBV1, + fil_RegisteredPoStProof::StackedDrgWindow8MiBV1 => StackedDrgWindow8MiBV1, + fil_RegisteredPoStProof::StackedDrgWindow512MiBV1 => StackedDrgWindow512MiBV1, + fil_RegisteredPoStProof::StackedDrgWindow32GiBV1 => StackedDrgWindow32GiBV1, + fil_RegisteredPoStProof::StackedDrgWindow64GiBV1 => StackedDrgWindow64GiBV1, + } + } +} + +#[repr(C)] +#[derive(Clone)] +pub struct fil_PublicPieceInfo { + pub num_bytes: u64, + pub comm_p: [u8; 32], +} + +impl From for PieceInfo { + fn from(x: fil_PublicPieceInfo) -> Self { + let fil_PublicPieceInfo { num_bytes, comm_p } = x; + PieceInfo { + commitment: comm_p, + size: UnpaddedBytesAmount(num_bytes), + } + } +} + +#[repr(C)] +#[derive(Clone)] +pub struct fil_PoStProof { + pub registered_proof: fil_RegisteredPoStProof, + pub proof_len: libc::size_t, + pub proof_ptr: *const u8, +} + +impl Drop for fil_PoStProof { + fn drop(&mut self) { + let _ = unsafe { + Vec::from_raw_parts(self.proof_ptr as *mut u8, self.proof_len, self.proof_len) + }; + } +} + +#[derive(Clone, Debug)] +pub struct PoStProof { + pub registered_proof: RegisteredPoStProof, + pub proof: Vec, +} + +impl From for PoStProof { + fn from(other: fil_PoStProof) -> Self { + let proof = unsafe { from_raw_parts(other.proof_ptr, other.proof_len).to_vec() }; + + PoStProof { + registered_proof: other.registered_proof.into(), + proof, + } + } +} + +#[repr(C)] +#[derive(Clone)] +pub struct fil_PrivateReplicaInfo { + pub registered_proof: fil_RegisteredPoStProof, + pub cache_dir_path: *const libc::c_char, + pub comm_r: [u8; 32], + pub replica_path: *const libc::c_char, + pub sector_id: u64, +} + +#[repr(C)] +#[derive(Clone)] +pub struct fil_PublicReplicaInfo { + pub registered_proof: fil_RegisteredPoStProof, + pub comm_r: [u8; 32], + pub sector_id: u64, +} + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_GenerateWinningPoStSectorChallenge { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub ids_ptr: *const u64, + pub ids_len: libc::size_t, +} + +impl Default for fil_GenerateWinningPoStSectorChallenge { + fn default() -> fil_GenerateWinningPoStSectorChallenge { + fil_GenerateWinningPoStSectorChallenge { + ids_len: 0, + ids_ptr: ptr::null(), + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + } + } +} + +code_and_message_impl!(fil_GenerateWinningPoStSectorChallenge); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_GenerateWinningPoStResponse { + pub error_msg: *const libc::c_char, + pub proofs_len: libc::size_t, + pub proofs_ptr: *const fil_PoStProof, + pub status_code: FCPResponseStatus, +} + +impl Default for fil_GenerateWinningPoStResponse { + fn default() -> fil_GenerateWinningPoStResponse { + fil_GenerateWinningPoStResponse { + error_msg: ptr::null(), + proofs_len: 0, + proofs_ptr: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + } + } +} + +code_and_message_impl!(fil_GenerateWinningPoStResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_GenerateWindowPoStResponse { + pub error_msg: *const libc::c_char, + pub proofs_len: libc::size_t, + pub proofs_ptr: *const fil_PoStProof, + pub status_code: FCPResponseStatus, +} + +impl Default for fil_GenerateWindowPoStResponse { + fn default() -> fil_GenerateWindowPoStResponse { + fil_GenerateWindowPoStResponse { + error_msg: ptr::null(), + proofs_len: 0, + proofs_ptr: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + } + } +} + +code_and_message_impl!(fil_GenerateWindowPoStResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_WriteWithAlignmentResponse { + pub comm_p: [u8; 32], + pub error_msg: *const libc::c_char, + pub left_alignment_unpadded: u64, + pub status_code: FCPResponseStatus, + pub total_write_unpadded: u64, +} + +impl Default for fil_WriteWithAlignmentResponse { + fn default() -> fil_WriteWithAlignmentResponse { + fil_WriteWithAlignmentResponse { + comm_p: Default::default(), + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + left_alignment_unpadded: 0, + total_write_unpadded: 0, + } + } +} + +code_and_message_impl!(fil_WriteWithAlignmentResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_WriteWithoutAlignmentResponse { + pub comm_p: [u8; 32], + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub total_write_unpadded: u64, +} + +impl Default for fil_WriteWithoutAlignmentResponse { + fn default() -> fil_WriteWithoutAlignmentResponse { + fil_WriteWithoutAlignmentResponse { + comm_p: Default::default(), + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + total_write_unpadded: 0, + } + } +} + +code_and_message_impl!(fil_WriteWithoutAlignmentResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_SealPreCommitPhase1Response { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub seal_pre_commit_phase1_output_ptr: *const u8, + pub seal_pre_commit_phase1_output_len: libc::size_t, +} + +impl Default for fil_SealPreCommitPhase1Response { + fn default() -> fil_SealPreCommitPhase1Response { + fil_SealPreCommitPhase1Response { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + seal_pre_commit_phase1_output_ptr: ptr::null(), + seal_pre_commit_phase1_output_len: 0, + } + } +} + +code_and_message_impl!(fil_SealPreCommitPhase1Response); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_FauxRepResponse { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub commitment: [u8; 32], +} + +impl Default for fil_FauxRepResponse { + fn default() -> fil_FauxRepResponse { + fil_FauxRepResponse { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + commitment: Default::default(), + } + } +} + +code_and_message_impl!(fil_FauxRepResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_SealPreCommitPhase2Response { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, + pub registered_proof: fil_RegisteredSealProof, + pub comm_d: [u8; 32], + pub comm_r: [u8; 32], +} + +impl Default for fil_SealPreCommitPhase2Response { + fn default() -> fil_SealPreCommitPhase2Response { + fil_SealPreCommitPhase2Response { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + registered_proof: fil_RegisteredSealProof::StackedDrg2KiBV1, + comm_d: Default::default(), + comm_r: Default::default(), + } + } +} + +code_and_message_impl!(fil_SealPreCommitPhase2Response); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_SealCommitPhase1Response { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub seal_commit_phase1_output_ptr: *const u8, + pub seal_commit_phase1_output_len: libc::size_t, +} + +impl Default for fil_SealCommitPhase1Response { + fn default() -> fil_SealCommitPhase1Response { + fil_SealCommitPhase1Response { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + seal_commit_phase1_output_ptr: ptr::null(), + seal_commit_phase1_output_len: 0, + } + } +} + +code_and_message_impl!(fil_SealCommitPhase1Response); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_SealCommitPhase2Response { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub proof_ptr: *const u8, + pub proof_len: libc::size_t, +} + +impl Default for fil_SealCommitPhase2Response { + fn default() -> fil_SealCommitPhase2Response { + fil_SealCommitPhase2Response { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + proof_ptr: ptr::null(), + proof_len: 0, + } + } +} + +code_and_message_impl!(fil_SealCommitPhase2Response); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_UnsealRangeResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, +} + +impl Default for fil_UnsealRangeResponse { + fn default() -> fil_UnsealRangeResponse { + fil_UnsealRangeResponse { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + } + } +} + +code_and_message_impl!(fil_UnsealRangeResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_VerifySealResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub is_valid: bool, +} + +impl Default for fil_VerifySealResponse { + fn default() -> fil_VerifySealResponse { + fil_VerifySealResponse { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + is_valid: false, + } + } +} + +code_and_message_impl!(fil_VerifySealResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_VerifyWinningPoStResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub is_valid: bool, +} + +impl Default for fil_VerifyWinningPoStResponse { + fn default() -> fil_VerifyWinningPoStResponse { + fil_VerifyWinningPoStResponse { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + is_valid: false, + } + } +} + +code_and_message_impl!(fil_VerifyWinningPoStResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_VerifyWindowPoStResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub is_valid: bool, +} + +impl Default for fil_VerifyWindowPoStResponse { + fn default() -> fil_VerifyWindowPoStResponse { + fil_VerifyWindowPoStResponse { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + is_valid: false, + } + } +} + +code_and_message_impl!(fil_VerifyWindowPoStResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_FinalizeTicketResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub ticket: [u8; 32], +} + +impl Default for fil_FinalizeTicketResponse { + fn default() -> Self { + fil_FinalizeTicketResponse { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + ticket: [0u8; 32], + } + } +} + +code_and_message_impl!(fil_FinalizeTicketResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_GeneratePieceCommitmentResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub comm_p: [u8; 32], + /// The number of unpadded bytes in the original piece plus any (unpadded) + /// alignment bytes added to create a whole merkle tree. + pub num_bytes_aligned: u64, +} + +impl Default for fil_GeneratePieceCommitmentResponse { + fn default() -> fil_GeneratePieceCommitmentResponse { + fil_GeneratePieceCommitmentResponse { + status_code: FCPResponseStatus::FCPNoError, + comm_p: Default::default(), + error_msg: ptr::null(), + num_bytes_aligned: 0, + } + } +} + +code_and_message_impl!(fil_GeneratePieceCommitmentResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_GenerateDataCommitmentResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub comm_d: [u8; 32], +} + +impl Default for fil_GenerateDataCommitmentResponse { + fn default() -> fil_GenerateDataCommitmentResponse { + fil_GenerateDataCommitmentResponse { + status_code: FCPResponseStatus::FCPNoError, + comm_d: Default::default(), + error_msg: ptr::null(), + } + } +} + +code_and_message_impl!(fil_GenerateDataCommitmentResponse); + +/// + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_StringResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub string_val: *const libc::c_char, +} + +impl Default for fil_StringResponse { + fn default() -> fil_StringResponse { + fil_StringResponse { + status_code: FCPResponseStatus::FCPNoError, + error_msg: ptr::null(), + string_val: ptr::null(), + } + } +} + +code_and_message_impl!(fil_StringResponse); + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_ClearCacheResponse { + pub error_msg: *const libc::c_char, + pub status_code: FCPResponseStatus, +} + +impl Default for fil_ClearCacheResponse { + fn default() -> fil_ClearCacheResponse { + fil_ClearCacheResponse { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + } + } +} + +code_and_message_impl!(fil_ClearCacheResponse); diff --git a/chain/filecoin/filecoin-ffi/rust/src/util/api.rs b/chain/filecoin/filecoin-ffi/rust/src/util/api.rs new file mode 100644 index 00000000..9ddb017f --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/util/api.rs @@ -0,0 +1,168 @@ +use std::ffi::CString; +use std::fs::File; +use std::os::unix::io::FromRawFd; +use std::sync::Once; + +use bellperson::GPU_NVIDIA_DEVICES; +use ffi_toolkit::{catch_panic_response, raw_ptr, rust_str_to_c_str, FCPResponseStatus}; + +use super::types::{fil_GpuDeviceResponse, fil_InitLogFdResponse}; + +/// Protects the init off the logger. +static LOG_INIT: Once = Once::new(); + +/// Ensures the logger is initialized. +pub fn init_log() { + LOG_INIT.call_once(|| { + fil_logger::init(); + }); +} +/// Initialize the logger with a file to log into +/// +/// Returns `None` if there is already an active logger +pub fn init_log_with_file(file: File) -> Option<()> { + if LOG_INIT.is_completed() { + None + } else { + LOG_INIT.call_once(|| { + fil_logger::init_with_file(file); + }); + Some(()) + } +} + +/// Returns an array of strings containing the device names that can be used. +#[no_mangle] +pub unsafe extern "C" fn fil_get_gpu_devices() -> *mut fil_GpuDeviceResponse { + catch_panic_response(|| { + let n = GPU_NVIDIA_DEVICES.len(); + + let devices: Vec<*const libc::c_char> = GPU_NVIDIA_DEVICES + .iter() + .map(|d| d.name().unwrap_or_else(|_| "Unknown".to_string())) + .map(|d| { + CString::new(d) + .unwrap_or_else(|_| CString::new("Unknown").unwrap()) + .into_raw() as *const libc::c_char + }) + .collect(); + + let dyn_array = Box::into_raw(devices.into_boxed_slice()); + + let mut response = fil_GpuDeviceResponse::default(); + response.devices_len = n; + response.devices_ptr = dyn_array as *const *const libc::c_char; + + raw_ptr(response) + }) +} + +/// Initializes the logger with a file descriptor where logs will be logged into. +/// +/// This is usually a pipe that was opened on the receiving side of the logs. The logger is +/// initialized on the invocation, subsequent calls won't have any effect. +/// +/// This function must be called right at the start, before any other call. Else the logger will +/// be initializes implicitely and log to stderr. +#[no_mangle] +#[cfg(not(target_os = "windows"))] +pub unsafe extern "C" fn fil_init_log_fd(log_fd: libc::c_int) -> *mut fil_InitLogFdResponse { + catch_panic_response(|| { + let file = File::from_raw_fd(log_fd); + let mut response = fil_InitLogFdResponse::default(); + if init_log_with_file(file).is_none() { + response.status_code = FCPResponseStatus::FCPUnclassifiedError; + response.error_msg = rust_str_to_c_str("There is already an active logger. `fil_init_log_fd()` needs to be called before any other FFI function is called."); + } + raw_ptr(response) + }) +} + +#[cfg(test)] +mod tests { + + use crate::util::api::fil_get_gpu_devices; + use crate::util::types::fil_destroy_gpu_device_response; + + #[test] + fn test_get_gpu_devices() { + unsafe { + let resp = fil_get_gpu_devices(); + + let strings = std::slice::from_raw_parts_mut( + (*resp).devices_ptr as *mut *mut libc::c_char, + (*resp).devices_len as usize, + ); + + let devices: Vec = strings + .iter_mut() + .map(|s| { + std::ffi::CStr::from_ptr(*s) + .to_str() + .unwrap_or("Unknown") + .to_owned() + }) + .collect(); + + assert_eq!(devices.len(), (*resp).devices_len); + fil_destroy_gpu_device_response(resp); + } + } + + #[test] + #[ignore] + #[cfg(target_os = "linux")] + fn test_init_log_fd() { + /* + + Warning: This test is leaky. When run alongside other (Rust) tests in + this project, `[flexi_logger] writing log line failed` lines will be + observed in stderr, and various unrelated tests will fail. + + - @laser 20200725 + + */ + use std::env; + use std::fs::File; + use std::io::{BufRead, BufReader, Write}; + use std::os::unix::io::FromRawFd; + + use ffi_toolkit::FCPResponseStatus; + + use crate::util::api::fil_init_log_fd; + use crate::util::types::fil_destroy_init_log_fd_response; + + let mut fds: [libc::c_int; 2] = [0; 2]; + let res = unsafe { libc::pipe2(fds.as_mut_ptr(), libc::O_CLOEXEC) }; + if res != 0 { + panic!("Cannot create pipe"); + } + let [read_fd, write_fd] = fds; + + unsafe { + let mut reader = BufReader::new(File::from_raw_fd(read_fd)); + let mut writer = File::from_raw_fd(write_fd); + + // Without setting this env variable there won't be any log output + env::set_var("RUST_LOG", "debug"); + + let resp = fil_init_log_fd(write_fd); + fil_destroy_init_log_fd_response(resp); + + log::info!("a log message"); + + // Write a newline so that things don't block even if the logging doesn't work + writer.write_all(b"\n").unwrap(); + + let mut log_message = String::new(); + reader.read_line(&mut log_message).unwrap(); + + assert!(log_message.ends_with("a log message\n")); + + // Now test that there is an error when we try to init it again + let resp_error = fil_init_log_fd(write_fd); + assert_ne!((*resp_error).status_code, FCPResponseStatus::FCPNoError); + fil_destroy_init_log_fd_response(resp_error); + } + } +} diff --git a/chain/filecoin/filecoin-ffi/rust/src/util/mod.rs b/chain/filecoin/filecoin-ffi/rust/src/util/mod.rs new file mode 100644 index 00000000..8389f117 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/util/mod.rs @@ -0,0 +1,2 @@ +pub mod api; +pub mod types; diff --git a/chain/filecoin/filecoin-ffi/rust/src/util/types.rs b/chain/filecoin/filecoin-ffi/rust/src/util/types.rs new file mode 100644 index 00000000..732e22a1 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/rust/src/util/types.rs @@ -0,0 +1,55 @@ +use std::ptr; + +use drop_struct_macro_derive::DropStructMacro; +// `CodeAndMessage` is the trait implemented by `code_and_message_impl +use ffi_toolkit::{code_and_message_impl, free_c_str, CodeAndMessage, FCPResponseStatus}; + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_GpuDeviceResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, + pub devices_len: libc::size_t, + pub devices_ptr: *const *const libc::c_char, +} + +impl Default for fil_GpuDeviceResponse { + fn default() -> Self { + Self { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + devices_len: 0, + devices_ptr: ptr::null(), + } + } +} + +code_and_message_impl!(fil_GpuDeviceResponse); + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_gpu_device_response(ptr: *mut fil_GpuDeviceResponse) { + let _ = Box::from_raw(ptr); +} + +#[repr(C)] +#[derive(DropStructMacro)] +pub struct fil_InitLogFdResponse { + pub status_code: FCPResponseStatus, + pub error_msg: *const libc::c_char, +} + +impl Default for fil_InitLogFdResponse { + fn default() -> Self { + Self { + error_msg: ptr::null(), + status_code: FCPResponseStatus::FCPNoError, + } + } +} + +code_and_message_impl!(fil_InitLogFdResponse); + +#[no_mangle] +pub unsafe extern "C" fn fil_destroy_init_log_fd_response(ptr: *mut fil_InitLogFdResponse) { + let _ = Box::from_raw(ptr); +} diff --git a/chain/filecoin/filecoin-ffi/tools.go b/chain/filecoin/filecoin-ffi/tools.go new file mode 100644 index 00000000..60b36fbc --- /dev/null +++ b/chain/filecoin/filecoin-ffi/tools.go @@ -0,0 +1,7 @@ +//+build tools + +package ffi + +import ( + _ "github.com/xlab/c-for-go" +) diff --git a/chain/filecoin/filecoin-ffi/types.go b/chain/filecoin/filecoin-ffi/types.go new file mode 100644 index 00000000..5a810ed4 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/types.go @@ -0,0 +1,127 @@ +package ffi + +import ( + "bytes" + "encoding/json" + "sort" + + "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/ipfs/go-cid" +) + +// BLS + +// SignatureBytes is the length of a BLS signature +const SignatureBytes = 96 + +// PrivateKeyBytes is the length of a BLS private key +const PrivateKeyBytes = 32 + +// PublicKeyBytes is the length of a BLS public key +const PublicKeyBytes = 48 + +// DigestBytes is the length of a BLS message hash/digest +const DigestBytes = 96 + +// Signature is a compressed affine +type Signature [SignatureBytes]byte + +// PrivateKey is a compressed affine +type PrivateKey [PrivateKeyBytes]byte + +// PublicKey is a compressed affine +type PublicKey [PublicKeyBytes]byte + +// Message is a byte slice +type Message []byte + +// Digest is a compressed affine +type Digest [DigestBytes]byte + +// Used when generating a private key deterministically +type PrivateKeyGenSeed [32]byte + +// Proofs + +// SortedPublicSectorInfo is a slice of publicSectorInfo sorted +// (lexicographically, ascending) by sealed (replica) CID. +type SortedPublicSectorInfo struct { + f []publicSectorInfo +} + +// SortedPrivateSectorInfo is a slice of PrivateSectorInfo sorted +// (lexicographically, ascending) by sealed (replica) CID. +type SortedPrivateSectorInfo struct { + f []PrivateSectorInfo +} + +func newSortedPublicSectorInfo(sectorInfo ...publicSectorInfo) SortedPublicSectorInfo { + fn := func(i, j int) bool { + return bytes.Compare(sectorInfo[i].SealedCID.Bytes(), sectorInfo[j].SealedCID.Bytes()) == -1 + } + + sort.Slice(sectorInfo[:], fn) + + return SortedPublicSectorInfo{ + f: sectorInfo, + } +} + +// Values returns the sorted publicSectorInfo as a slice +func (s *SortedPublicSectorInfo) Values() []publicSectorInfo { + return s.f +} + +// MarshalJSON JSON-encodes and serializes the SortedPublicSectorInfo. +func (s SortedPublicSectorInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(s.f) +} + +// UnmarshalJSON parses the JSON-encoded byte slice and stores the result in the +// value pointed to by s.f. Note that this method allows for construction of a +// SortedPublicSectorInfo which violates its invariant (that its publicSectorInfo are sorted +// in some defined way). Callers should take care to never provide a byte slice +// which would violate this invariant. +func (s *SortedPublicSectorInfo) UnmarshalJSON(b []byte) error { + return json.Unmarshal(b, &s.f) +} + +// NewSortedPrivateSectorInfo returns a SortedPrivateSectorInfo +func NewSortedPrivateSectorInfo(sectorInfo ...PrivateSectorInfo) SortedPrivateSectorInfo { + fn := func(i, j int) bool { + return bytes.Compare(sectorInfo[i].SealedCID.Bytes(), sectorInfo[j].SealedCID.Bytes()) == -1 + } + + sort.Slice(sectorInfo[:], fn) + + return SortedPrivateSectorInfo{ + f: sectorInfo, + } +} + +// Values returns the sorted PrivateSectorInfo as a slice +func (s *SortedPrivateSectorInfo) Values() []PrivateSectorInfo { + return s.f +} + +// MarshalJSON JSON-encodes and serializes the SortedPrivateSectorInfo. +func (s SortedPrivateSectorInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(s.f) +} + +func (s *SortedPrivateSectorInfo) UnmarshalJSON(b []byte) error { + return json.Unmarshal(b, &s.f) +} + +type publicSectorInfo struct { + PoStProofType abi.RegisteredPoStProof + SealedCID cid.Cid + SectorNum abi.SectorNumber +} + +type PrivateSectorInfo struct { + abi.SectorInfo + CacheDirPath string + PoStProofType abi.RegisteredPoStProof + SealedSectorPath string +} diff --git a/chain/filecoin/filecoin-ffi/workflows.go b/chain/filecoin/filecoin-ffi/workflows.go new file mode 100644 index 00000000..47bd5636 --- /dev/null +++ b/chain/filecoin/filecoin-ffi/workflows.go @@ -0,0 +1,393 @@ +//+build cgo + +package ffi + +import ( + "bytes" + "crypto/rand" + "encoding/binary" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + + "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/ipfs/go-cid" +) + +func WorkflowProofsLifecycle(t TestHelper) { + minerID := abi.ActorID(42) + randomness := [32]byte{9, 9, 9} + sealProofType := abi.RegisteredSealProof_StackedDrg2KiBV1 + winningPostProofType := abi.RegisteredPoStProof_StackedDrgWinning2KiBV1 + sectorNum := abi.SectorNumber(42) + + ticket := abi.SealRandomness{5, 4, 2} + + seed := abi.InteractiveSealRandomness{7, 4, 2} + + // initialize a sector builder + metadataDir := requireTempDirPath(t, "metadata") + defer os.RemoveAll(metadataDir) + + sealedSectorsDir := requireTempDirPath(t, "sealed-sectors") + defer os.RemoveAll(sealedSectorsDir) + + stagedSectorsDir := requireTempDirPath(t, "staged-sectors") + defer os.RemoveAll(stagedSectorsDir) + + sectorCacheRootDir := requireTempDirPath(t, "sector-cache-root-dir") + defer os.RemoveAll(sectorCacheRootDir) + + sectorCacheDirPath := requireTempDirPath(t, "sector-cache-dir") + defer os.RemoveAll(sectorCacheDirPath) + + fauxSectorCacheDirPath := requireTempDirPath(t, "faux-sector-cache-dir") + defer os.RemoveAll(fauxSectorCacheDirPath) + + stagedSectorFile := requireTempFile(t, bytes.NewReader([]byte{}), 0) + defer stagedSectorFile.Close() + + sealedSectorFile := requireTempFile(t, bytes.NewReader([]byte{}), 0) + defer sealedSectorFile.Close() + + fauxSealedSectorFile := requireTempFile(t, bytes.NewReader([]byte{}), 0) + defer fauxSealedSectorFile.Close() + + unsealOutputFileA := requireTempFile(t, bytes.NewReader([]byte{}), 0) + defer unsealOutputFileA.Close() + + unsealOutputFileB := requireTempFile(t, bytes.NewReader([]byte{}), 0) + defer unsealOutputFileB.Close() + + unsealOutputFileC := requireTempFile(t, bytes.NewReader([]byte{}), 0) + defer unsealOutputFileC.Close() + + unsealOutputFileD := requireTempFile(t, bytes.NewReader([]byte{}), 0) + defer unsealOutputFileD.Close() + + // some rando bytes + someBytes := make([]byte, abi.PaddedPieceSize(2048).Unpadded()) + _, err := io.ReadFull(rand.Reader, someBytes) + t.RequireNoError(err) + + // write first piece + pieceFileA := requireTempFile(t, bytes.NewReader(someBytes[0:127]), 127) + + pieceCIDA, err := GeneratePieceCIDFromFile(sealProofType, pieceFileA, 127) + t.RequireNoError(err) + + // seek back to head (generating piece commitment moves offset) + _, err = pieceFileA.Seek(0, 0) + t.RequireNoError(err) + + // write the first piece using the alignment-free function + n, pieceCID, err := WriteWithoutAlignment(sealProofType, pieceFileA, 127, stagedSectorFile) + t.RequireNoError(err) + t.AssertEqual(int(n), 127) + t.AssertTrue(pieceCID.Equals(pieceCIDA)) + + // write second piece + alignment + t.RequireNoError(err) + pieceFileB := requireTempFile(t, bytes.NewReader(someBytes[0:1016]), 1016) + + pieceCIDB, err := GeneratePieceCIDFromFile(sealProofType, pieceFileB, 1016) + t.RequireNoError(err) + + // seek back to head + _, err = pieceFileB.Seek(0, 0) + t.RequireNoError(err) + + // second piece relies on the alignment-computing version + left, tot, pieceCID, err := WriteWithAlignment(sealProofType, pieceFileB, 1016, stagedSectorFile, []abi.UnpaddedPieceSize{127}) + t.RequireNoError(err) + t.AssertEqual(889, int(left)) + t.AssertEqual(1905, int(tot)) + t.AssertTrue(pieceCID.Equals(pieceCIDB)) + + publicPieces := []abi.PieceInfo{{ + Size: abi.UnpaddedPieceSize(127).Padded(), + PieceCID: pieceCIDA, + }, { + Size: abi.UnpaddedPieceSize(1016).Padded(), + PieceCID: pieceCIDB, + }} + + preGeneratedUnsealedCID, err := GenerateUnsealedCID(sealProofType, publicPieces) + t.RequireNoError(err) + + // pre-commit the sector + sealPreCommitPhase1Output, err := SealPreCommitPhase1(sealProofType, sectorCacheDirPath, stagedSectorFile.Name(), sealedSectorFile.Name(), sectorNum, minerID, ticket, publicPieces) + t.RequireNoError(err) + + sealedCID, unsealedCID, err := SealPreCommitPhase2(sealPreCommitPhase1Output, sectorCacheDirPath, sealedSectorFile.Name()) + t.RequireNoError(err) + + t.AssertTrue(unsealedCID.Equals(preGeneratedUnsealedCID), "prover and verifier should agree on data commitment") + + // commit the sector + sealCommitPhase1Output, err := SealCommitPhase1(sealProofType, sealedCID, unsealedCID, sectorCacheDirPath, sealedSectorFile.Name(), sectorNum, minerID, ticket, seed, publicPieces) + t.RequireNoError(err) + + proof, err := SealCommitPhase2(sealCommitPhase1Output, sectorNum, minerID) + t.RequireNoError(err) + + // verify the 'ole proofy + isValid, err := VerifySeal(abi.SealVerifyInfo{ + SectorID: abi.SectorID{ + Miner: minerID, + Number: sectorNum, + }, + SealedCID: sealedCID, + SealProof: sealProofType, + Proof: proof, + DealIDs: []abi.DealID{}, + Randomness: ticket, + InteractiveRandomness: seed, + UnsealedCID: unsealedCID, + }) + t.RequireNoError(err) + t.RequireTrue(isValid, "proof wasn't valid") + + // unseal the entire sector and verify that things went as we planned + _, err = sealedSectorFile.Seek(0, 0) + t.RequireNoError(err) + t.RequireNoError(Unseal(sealProofType, sectorCacheDirPath, sealedSectorFile, unsealOutputFileA, sectorNum, minerID, ticket, unsealedCID)) + _, err = unsealOutputFileA.Seek(0, 0) + t.RequireNoError(err) + contents, err := ioutil.ReadFile(unsealOutputFileA.Name()) + t.RequireNoError(err) + + // unsealed sector includes a bunch of alignment NUL-bytes + alignment := make([]byte, 889) + + // verify that we unsealed what we expected to unseal + t.AssertTrue(bytes.Equal(someBytes[0:127], contents[0:127]), "bytes aren't equal") + t.AssertTrue(bytes.Equal(alignment, contents[127:1016]), "bytes aren't equal") + t.AssertTrue(bytes.Equal(someBytes[0:1016], contents[1016:2032]), "bytes aren't equal") + + // unseal just the first piece + _, err = sealedSectorFile.Seek(0, 0) + t.RequireNoError(err) + err = UnsealRange(sealProofType, sectorCacheDirPath, sealedSectorFile, unsealOutputFileB, sectorNum, minerID, ticket, unsealedCID, 0, 127) + t.RequireNoError(err) + _, err = unsealOutputFileB.Seek(0, 0) + t.RequireNoError(err) + contentsB, err := ioutil.ReadFile(unsealOutputFileB.Name()) + t.RequireNoError(err) + t.AssertEqual(127, len(contentsB)) + t.AssertTrue(bytes.Equal(someBytes[0:127], contentsB[0:127]), "bytes aren't equal") + + // unseal just the second piece + _, err = sealedSectorFile.Seek(0, 0) + t.RequireNoError(err) + err = UnsealRange(sealProofType, sectorCacheDirPath, sealedSectorFile, unsealOutputFileC, sectorNum, minerID, ticket, unsealedCID, 1016, 1016) + t.RequireNoError(err) + _, err = unsealOutputFileC.Seek(0, 0) + t.RequireNoError(err) + contentsC, err := ioutil.ReadFile(unsealOutputFileC.Name()) + t.RequireNoError(err) + t.AssertEqual(1016, len(contentsC)) + t.AssertTrue(bytes.Equal(someBytes[0:1016], contentsC[0:1016]), "bytes aren't equal") + + // verify that the sector builder owns no sealed sectors + var sealedSectorPaths []string + t.RequireNoError(filepath.Walk(sealedSectorsDir, visit(&sealedSectorPaths))) + t.AssertEqual(1, len(sealedSectorPaths), sealedSectorPaths) + + // no sector cache dirs, either + var sectorCacheDirPaths []string + t.RequireNoError(filepath.Walk(sectorCacheRootDir, visit(§orCacheDirPaths))) + t.AssertEqual(1, len(sectorCacheDirPaths), sectorCacheDirPaths) + + // run the FauxRep routine, for good measure + fauxSectorCID, err := FauxRep(sealProofType, fauxSectorCacheDirPath, fauxSealedSectorFile.Name()) + t.RequireNoError(err, "FauxRep produced an error") + t.RequireTrue(!cid.Undef.Equals(fauxSectorCID), "faux sector CID shouldn't be undefined") + + // run the FauxRep2 routine, for good measure + fauxSectorCID2, err := FauxRep2(sealProofType, fauxSectorCacheDirPath, fauxSealedSectorFile.Name()) + t.RequireNoError(err, "FauxRep2 produced an error") + t.RequireTrue(!cid.Undef.Equals(fauxSectorCID2), "faux sector CID 2 shouldn't be undefined") + + // generate a PoSt over the proving set before importing, just to exercise + // the new API + privateInfo := NewSortedPrivateSectorInfo(PrivateSectorInfo{ + SectorInfo: abi.SectorInfo{ + SectorNumber: sectorNum, + SealedCID: sealedCID, + }, + CacheDirPath: sectorCacheDirPath, + PoStProofType: winningPostProofType, + SealedSectorPath: sealedSectorFile.Name(), + }) + + provingSet := []abi.SectorInfo{{ + SealProof: sealProofType, + SectorNumber: sectorNum, + SealedCID: sealedCID, + }} + + // figure out which sectors have been challenged + indicesInProvingSet, err := GenerateWinningPoStSectorChallenge(winningPostProofType, minerID, randomness[:], uint64(len(provingSet))) + t.RequireNoError(err) + + var challengedSectors []abi.SectorInfo + for idx := range indicesInProvingSet { + challengedSectors = append(challengedSectors, provingSet[indicesInProvingSet[idx]]) + } + + proofs, err := GenerateWinningPoSt(minerID, privateInfo, randomness[:]) + t.RequireNoError(err) + + isValid, err = VerifyWinningPoSt(abi.WinningPoStVerifyInfo{ + Randomness: randomness[:], + Proofs: proofs, + ChallengedSectors: challengedSectors, + Prover: minerID, + }) + t.RequireNoError(err) + t.AssertTrue(isValid, "VerifyWinningPoSt rejected the (standalone) proof as invalid") +} + +func WorkflowGetGPUDevicesDoesNotProduceAnError(t TestHelper) { + devices, err := GetGPUDevices() + t.RequireNoError(err) + fmt.Printf("devices: %+v\n", devices) // clutters up test output, but useful +} + +func WorkflowRegisteredSealProofFunctions(t TestHelper) { + sealTypes := []abi.RegisteredSealProof{ + abi.RegisteredSealProof_StackedDrg2KiBV1, + abi.RegisteredSealProof_StackedDrg8MiBV1, + abi.RegisteredSealProof_StackedDrg512MiBV1, + abi.RegisteredSealProof_StackedDrg32GiBV1, + abi.RegisteredSealProof_StackedDrg64GiBV1, + } + + for _, st := range sealTypes { + v, err := GetSealVersion(st) + t.AssertNoError(err) + t.AssertTrue(len(v) > 0) + } +} + +func WorkflowRegisteredPoStProofFunctions(t TestHelper) { + postTypes := []abi.RegisteredPoStProof{ + abi.RegisteredPoStProof_StackedDrgWinning2KiBV1, + abi.RegisteredPoStProof_StackedDrgWinning8MiBV1, + abi.RegisteredPoStProof_StackedDrgWinning512MiBV1, + abi.RegisteredPoStProof_StackedDrgWinning32GiBV1, + abi.RegisteredPoStProof_StackedDrgWinning64GiBV1, + abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, + abi.RegisteredPoStProof_StackedDrgWindow8MiBV1, + abi.RegisteredPoStProof_StackedDrgWindow512MiBV1, + abi.RegisteredPoStProof_StackedDrgWindow32GiBV1, + abi.RegisteredPoStProof_StackedDrgWindow64GiBV1, + } + + for _, pt := range postTypes { + v, err := GetPoStVersion(pt) + t.AssertNoError(err) + t.AssertTrue(len(v) > 0) + } +} + +func WorkflowGenerateWinningPoStSectorChallengeEdgeCase(t TestHelper) { + for i := 0; i < 10000; i++ { + var randomnessFr32 [32]byte + _, err := io.ReadFull(rand.Reader, randomnessFr32[0:31]) // last byte of the 32 is always NUL + t.RequireNoError(err) + + minerID := abi.ActorID(randUInt64()) + eligibleSectorsLen := uint64(1) + + indices2, err := GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof_StackedDrgWinning2KiBV1, minerID, randomnessFr32[:], eligibleSectorsLen) + t.RequireNoError(err) + t.AssertEqual(1, len(indices2)) + t.AssertEqual(0, int(indices2[0])) + } +} + +func WorkflowGenerateWinningPoStSectorChallenge(t TestHelper) { + for i := 0; i < 10000; i++ { + var randomnessFr32 [32]byte + _, err := io.ReadFull(rand.Reader, randomnessFr32[0:31]) // last byte of the 32 is always NUL + t.RequireNoError(err) + + minerID := abi.ActorID(randUInt64()) + eligibleSectorsLen := randUInt64() + + if eligibleSectorsLen == 0 { + continue // no fun + } + + indices, err := GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof_StackedDrgWinning2KiBV1, minerID, randomnessFr32[:], eligibleSectorsLen) + t.AssertNoError(err) + + max := uint64(0) + for idx := range indices { + if indices[idx] > max { + max = indices[idx] + } + } + + t.AssertTrue(max < eligibleSectorsLen, "out of range value - max: ", max, "eligibleSectorsLen: ", eligibleSectorsLen) + t.AssertTrue(uint64(len(indices)) <= eligibleSectorsLen, "should never generate more indices than number of eligible sectors") + } +} + +func randUInt64() uint64 { + buf := make([]byte, 8) + _, err := rand.Read(buf) + if err != nil { + panic(err) + } + + return binary.LittleEndian.Uint64(buf) +} + +func requireTempFile(t TestHelper, fileContentsReader io.Reader, size uint64) *os.File { + file, err := ioutil.TempFile("", "") + t.RequireNoError(err) + + written, err := io.Copy(file, fileContentsReader) + t.RequireNoError(err) + // check that we wrote everything + t.RequireEqual(int(size), int(written)) + + t.RequireNoError(file.Sync()) + + // seek to the beginning + _, err = file.Seek(0, 0) + t.RequireNoError(err) + + return file +} + +func requireTempDirPath(t TestHelper, prefix string) string { + dir, err := ioutil.TempDir("", prefix) + t.RequireNoError(err) + + return dir +} + +func visit(paths *[]string) filepath.WalkFunc { + return func(path string, info os.FileInfo, err error) error { + if err != nil { + panic(err) + } + *paths = append(*paths, path) + return nil + } +} + +type TestHelper interface { + AssertEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool + AssertNoError(err error, msgAndArgs ...interface{}) bool + AssertTrue(value bool, msgAndArgs ...interface{}) bool + RequireEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) + RequireNoError(err error, msgAndArgs ...interface{}) + RequireTrue(value bool, msgAndArgs ...interface{}) +} From b612660e36208861b4ba9aae21b7a19040dd2b90 Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 31 Aug 2020 14:47:51 +1000 Subject: [PATCH 017/335] remove filecoin-ffi and rely only on submodules --- .../filecoin-ffi/.circleci/config.yml | 341 -- chain/filecoin/filecoin-ffi/.gitignore | 11 - chain/filecoin/filecoin-ffi/CHANGELOG.md | 292 -- chain/filecoin/filecoin-ffi/LICENSE-APACHE | 7 - chain/filecoin/filecoin-ffi/LICENSE-MIT | 23 - chain/filecoin/filecoin-ffi/Makefile | 40 - chain/filecoin/filecoin-ffi/README.md | 74 - chain/filecoin/filecoin-ffi/bls.go | 140 - chain/filecoin/filecoin-ffi/bls_test.go | 186 - chain/filecoin/filecoin-ffi/build.sh | 13 - .../filecoin-ffi/cgoleakdetect/runner.go | 63 - chain/filecoin/filecoin-ffi/filcrypto.yml | 37 - .../filecoin-ffi/generated/cgo_helpers.go | 3517 ----------------- .../filecoin-ffi/generated/cgo_helpers.h | 9 - .../filecoin/filecoin-ffi/generated/const.go | 53 - .../filecoin-ffi/generated/customallocs.go | 54 - .../filecoin-ffi/generated/generated.go | 809 ---- .../filecoin/filecoin-ffi/generated/types.go | 319 -- chain/filecoin/filecoin-ffi/go.mod | 15 - chain/filecoin/filecoin-ffi/go.sum | 190 - .../filecoin-ffi/headerstubs/stdarg.h | 0 .../filecoin-ffi/headerstubs/stdbool.h | 0 .../filecoin-ffi/headerstubs/stdint.h | 4 - .../filecoin-ffi/headerstubs/stdlib.h | 0 chain/filecoin/filecoin-ffi/install-filcrypto | 225 -- chain/filecoin/filecoin-ffi/mkreleaselog | 240 -- chain/filecoin/filecoin-ffi/parameters.json | 152 - chain/filecoin/filecoin-ffi/proofs.go | 966 ----- chain/filecoin/filecoin-ffi/proofs_test.go | 164 - chain/filecoin/filecoin-ffi/run_tests.sh | 3 - chain/filecoin/filecoin-ffi/rust/Cargo.lock | 3023 -------------- chain/filecoin/filecoin-ffi/rust/Cargo.toml | 44 - chain/filecoin/filecoin-ffi/rust/build.rs | 11 - .../filecoin/filecoin-ffi/rust/cbindgen.toml | 23 - .../filecoin-ffi/rust/filcrypto.pc.template | 4 - .../filecoin/filecoin-ffi/rust/rust-toolchain | 1 - .../rust/rustc-target-features-optimized.json | 34 - .../rust/scripts/build-release.sh | 56 - .../rust/scripts/package-release.sh | 38 - .../rust/scripts/publish-release.sh | 73 - .../filecoin/filecoin-ffi/rust/src/bls/api.rs | 437 -- .../filecoin/filecoin-ffi/rust/src/bls/mod.rs | 2 - .../filecoin-ffi/rust/src/bls/types.rs | 67 - chain/filecoin/filecoin-ffi/rust/src/lib.rs | 6 - .../filecoin-ffi/rust/src/proofs/api.rs | 1725 -------- .../filecoin-ffi/rust/src/proofs/helpers.rs | 134 - .../filecoin-ffi/rust/src/proofs/mod.rs | 4 - .../filecoin-ffi/rust/src/proofs/types.rs | 609 --- .../filecoin-ffi/rust/src/util/api.rs | 168 - .../filecoin-ffi/rust/src/util/mod.rs | 2 - .../filecoin-ffi/rust/src/util/types.rs | 55 - chain/filecoin/filecoin-ffi/tools.go | 7 - chain/filecoin/filecoin-ffi/types.go | 127 - chain/filecoin/filecoin-ffi/workflows.go | 393 -- 54 files changed, 14990 deletions(-) delete mode 100644 chain/filecoin/filecoin-ffi/.circleci/config.yml delete mode 100644 chain/filecoin/filecoin-ffi/.gitignore delete mode 100644 chain/filecoin/filecoin-ffi/CHANGELOG.md delete mode 100644 chain/filecoin/filecoin-ffi/LICENSE-APACHE delete mode 100644 chain/filecoin/filecoin-ffi/LICENSE-MIT delete mode 100644 chain/filecoin/filecoin-ffi/Makefile delete mode 100644 chain/filecoin/filecoin-ffi/README.md delete mode 100644 chain/filecoin/filecoin-ffi/bls.go delete mode 100644 chain/filecoin/filecoin-ffi/bls_test.go delete mode 100755 chain/filecoin/filecoin-ffi/build.sh delete mode 100644 chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go delete mode 100644 chain/filecoin/filecoin-ffi/filcrypto.yml delete mode 100644 chain/filecoin/filecoin-ffi/generated/cgo_helpers.go delete mode 100644 chain/filecoin/filecoin-ffi/generated/cgo_helpers.h delete mode 100644 chain/filecoin/filecoin-ffi/generated/const.go delete mode 100644 chain/filecoin/filecoin-ffi/generated/customallocs.go delete mode 100644 chain/filecoin/filecoin-ffi/generated/generated.go delete mode 100644 chain/filecoin/filecoin-ffi/generated/types.go delete mode 100644 chain/filecoin/filecoin-ffi/go.mod delete mode 100644 chain/filecoin/filecoin-ffi/go.sum delete mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdarg.h delete mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdbool.h delete mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdint.h delete mode 100644 chain/filecoin/filecoin-ffi/headerstubs/stdlib.h delete mode 100755 chain/filecoin/filecoin-ffi/install-filcrypto delete mode 100755 chain/filecoin/filecoin-ffi/mkreleaselog delete mode 100644 chain/filecoin/filecoin-ffi/parameters.json delete mode 100644 chain/filecoin/filecoin-ffi/proofs.go delete mode 100644 chain/filecoin/filecoin-ffi/proofs_test.go delete mode 100755 chain/filecoin/filecoin-ffi/run_tests.sh delete mode 100644 chain/filecoin/filecoin-ffi/rust/Cargo.lock delete mode 100644 chain/filecoin/filecoin-ffi/rust/Cargo.toml delete mode 100644 chain/filecoin/filecoin-ffi/rust/build.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/cbindgen.toml delete mode 100644 chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template delete mode 100644 chain/filecoin/filecoin-ffi/rust/rust-toolchain delete mode 100644 chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json delete mode 100755 chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh delete mode 100755 chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh delete mode 100755 chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/bls/api.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/bls/types.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/lib.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/util/api.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/util/mod.rs delete mode 100644 chain/filecoin/filecoin-ffi/rust/src/util/types.rs delete mode 100644 chain/filecoin/filecoin-ffi/tools.go delete mode 100644 chain/filecoin/filecoin-ffi/types.go delete mode 100644 chain/filecoin/filecoin-ffi/workflows.go diff --git a/chain/filecoin/filecoin-ffi/.circleci/config.yml b/chain/filecoin/filecoin-ffi/.circleci/config.yml deleted file mode 100644 index dab1e6b9..00000000 --- a/chain/filecoin/filecoin-ffi/.circleci/config.yml +++ /dev/null @@ -1,341 +0,0 @@ -version: 2.1 - -orbs: - go: gotest/tools@0.0.9 - shellcheck: circleci/shellcheck@1.3.15 - -executors: - golang: - docker: - - image: circleci/golang:1.13 - resource_class: 2xlarge - rust: - docker: - - image: filecoin/rust:latest - resource_class: 2xlarge - -jobs: - gofmt: - executor: golang - steps: - - configure_environment_variables - - prepare - - go/mod-download - - run: - command: "! go fmt ./... 2>&1 | read" - go_lint: - description: Run various linters - executor: golang - steps: - - configure_environment_variables - - prepare - - go/mod-download - - go/install-golangci-lint: - gobin: $HOME/.local/bin - version: 1.23.8 - - run: - command: make go-lint - build_and_test_linux_cgo_bindings: - parameters: - run_leak_detector: - type: boolean - default: false - executor: golang - working_directory: ~/go/src/github.com/filecoin-project/filecoin-ffi - steps: - - configure_environment_variables - - prepare - - build_project - - restore_parameter_cache - - obtain_filecoin_parameters - - save_parameter_cache - - run_tests: - run_leak_detector: << parameters.run_leak_detector >> - build_darwin_cgo_bindings: - macos: - xcode: "10.0.0" - working_directory: ~/go/src/github.com/filecoin-project/filecoin-ffi - resource_class: large - steps: - - configure_environment_variables: - linux: false - darwin: true - - prepare: - linux: false - darwin: true - - build_project - - compile_tests - - ensure_generated_cgo_up_to_date - publish_linux_staticlib: - executor: golang - steps: - - configure_environment_variables - - prepare - - publish_release - publish_darwin_staticlib: - macos: - xcode: "10.0.0" - working_directory: ~/crate - steps: - - configure_environment_variables: - linux: false - darwin: true - - prepare: - linux: false - darwin: true - - run: cd rust && rustup install $(cat rust-toolchain) - - run: cd rust && rustup default $(cat rust-toolchain) - - run: cd rust && cargo fetch - - publish_release - cargo_fetch: - executor: rust - working_directory: /mnt/crate - steps: - - configure_environment_variables - - checkout - - restore_cache: - keys: - - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} - - run: cd rust && rustup install $(cat rust-toolchain) - - run: cd rust && rustup default $(cat rust-toolchain) - - run: cd rust && rustup component add rustfmt - - run: cd rust && rustup component add clippy - - run: cd rust && cargo fetch - - run: cd rust && rustc +$(cat rust-toolchain) --version - - persist_to_workspace: - root: "." - paths: - - rust/Cargo.lock - - save_cache: - key: cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} - paths: - - /root/.cargo - - /root/.rustup - rustfmt: - executor: rust - working_directory: /mnt/crate - steps: - - configure_environment_variables - - checkout - - restore_cache: - keys: - - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} - - run: - name: Run cargo fmt - command: cargo fmt --manifest-path ./rust/Cargo.toml --all -- --check - clippy: - executor: rust - working_directory: /mnt/crate - steps: - - configure_environment_variables - - checkout - - restore_cache: - keys: - - cargo-v0-{{ checksum "rust/rust-toolchain" }}-{{ checksum "rust/Cargo.toml" }}-{{ checksum "rust/Cargo.lock" }}-{{ arch }} - - run: cd rust && rustup install $(cat rust-toolchain) - - run: cd rust && rustup default $(cat rust-toolchain) - - run: cd rust && rustup component add rustfmt - - run: cd rust && rustup component add clippy - - run: cd rust && cargo fetch - - run: - name: Run cargo clippy - command: cd rust && cargo +$(cat rust-toolchain) clippy --all-targets --all-features -- -D warnings - -workflows: - version: 2 - test_all: - jobs: - # Lint the install Bash script - - shellcheck/check: - pattern: 'install-filcrypto' - - cargo_fetch - - rustfmt: - requires: - - cargo_fetch - - clippy: - requires: - - cargo_fetch - - gofmt - - go_lint - - build_and_test_linux_cgo_bindings: - filters: - branches: - only: - - master - run_leak_detector: true - - build_and_test_linux_cgo_bindings: - filters: - branches: - ignore: - - master - run_leak_detector: false - - publish_linux_staticlib: - filters: - branches: - only: - - master - - build_darwin_cgo_bindings - - publish_darwin_staticlib: - filters: - branches: - only: - - master - -commands: - prepare: - parameters: - linux: - default: true - description: is a linux build environment? - type: boolean - darwin: - default: false - description: is a darwin build environment? - type: boolean - steps: - - checkout - - when: - condition: << parameters.linux >> - steps: - - go/install-ssh - - go/install: {package: git} - - run: sudo apt-get update - - run: sudo apt-get install -y jq valgrind ocl-icd-opencl-dev clang libssl-dev - - run: curl https://sh.rustup.rs -sSf | sh -s -- -y - - when: - condition: << parameters.darwin >> - steps: - - run: - name: Install Go - command: | - curl https://dl.google.com/go/go1.13.7.darwin-amd64.pkg -o /tmp/go.pkg && \ - sudo installer -pkg /tmp/go.pkg -target / - go version - - run: - name: Install other dependencies with Homebrew - command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config md5sha1sum jq - - run: - name: Install Rust toolchain - command: | - curl https://sh.rustup.rs -sSf | sh -s -- -y - rustc --version - - run: - name: Ensure appropriate toolchain is installed - command: | - rustup install $(cat ./rust/rust-toolchain) - - run: git submodule sync - - run: git submodule update --init - - publish_release: - steps: - - run: - name: Build and publish the standard release - command: | - cd rust - - TARBALL_PATH="/tmp/${CIRCLE_PROJECT_REPONAME}-$(uname)-standard.tar.gz" - RELEASE_NAME="${CIRCLE_PROJECT_REPONAME}-$(uname)-standard" - - ./scripts/build-release.sh filcrypto $(cat ./rust-toolchain) --verbose --locked --all - ./scripts/package-release.sh $TARBALL_PATH - ./scripts/publish-release.sh $TARBALL_PATH $RELEASE_NAME - - run: - name: Build and publish the optimized release - command: | - cd rust - - TARBALL_PATH="/tmp/${CIRCLE_PROJECT_REPONAME}-$(uname)-optimized.tar.gz" - RELEASE_NAME="${CIRCLE_PROJECT_REPONAME}-$(uname)-optimized" - RUSTFLAGS="-C target-feature=$(cat rustc-target-features-optimized.json | jq -r '.[].rustc_target_feature' | tr '\n' ',')" - - ./scripts/build-release.sh filcrypto $(cat ./rust-toolchain) --verbose --locked --all - ./scripts/package-release.sh $TARBALL_PATH - ./scripts/publish-release.sh $TARBALL_PATH $RELEASE_NAME - configure_environment_variables: - parameters: - linux: - default: true - description: is a Linux build environment? - type: boolean - darwin: - default: false - description: is a Darwin build environment? - type: boolean - steps: - - run: - name: Configure environment variables - command: | - echo 'export FIL_PROOFS_PARAMETER_CACHE="${HOME}/filecoin-proof-parameters/"' >> $BASH_ENV - echo 'export GO111MODULE=on' >> $BASH_ENV - echo 'export GOPATH="${HOME}/go"' >> $BASH_ENV - echo 'export PATH="/usr/local/go/bin:${HOME}/.cargo/bin:${PATH}:${HOME}/go/bin:${HOME}/.bin"' >> $BASH_ENV - echo 'export RUST_LOG=info' >> $BASH_ENV - echo 'export CIRCLE_ARTIFACTS="/tmp"' >> $BASH_ENV - - when: - condition: << parameters.darwin >> - steps: - - run: - name: Add a few more environment variables - command: | - echo 'export PATH="${HOME}/.cargo/bin:${HOME}/.bin:${PATH}"' >> $BASH_ENV - obtain_filecoin_parameters: - steps: - - run: | - DIR=$(pwd) - cd $(mktemp -d) - GOPATH=/tmp GO111MODULE=off go get github.com/filecoin-project/go-paramfetch/paramfetch - GOPATH=/tmp GO111MODULE=off go build -o go-paramfetch github.com/filecoin-project/go-paramfetch/paramfetch - ./go-paramfetch 2048 "${DIR}/parameters.json" - build_project: - steps: - - run: - name: Build project - command: make - - run: - name: Build project without CGO - command: env CGO_ENABLED=0 go build . - ensure_generated_cgo_up_to_date: - steps: - - run: - name: Generate CGO bindings (using forked c-for-go) and compare with what's tracked by Git - command: | - make cgo-gen - git diff --exit-code ./generated/ - run_tests: - parameters: - run_leak_detector: - type: boolean - default: false - steps: - - when: - condition: <> - steps: - - run: - name: Run leak detector - command: make cgo-leakdetect - no_output_timeout: 60m - - - run: - name: Run the Rust tests - command: cd rust && FIL_PROOFS_PARAMETER_CACHE="${HOME}/filecoin-proof-parameters/" RUST_LOG=info cargo test --all --release && cd .. - no_output_timeout: 60m - - run: - name: Run the Go tests - command: GODEBUG=cgocheck=2 RUST_LOG=info go test -p 1 -timeout 60m - no_output_timeout: 60m - compile_tests: - steps: - - run: - name: Build project and tests, but don't actually run the tests (used to verify that build/link works with Darwin) - command: GODEBUG=cgocheck=2 RUST_LOG=info go test -run=^$ - restore_parameter_cache: - steps: - - restore_cache: - keys: - - v28-proof-params-{{ arch }} - save_parameter_cache: - steps: - - save_cache: - key: v28-proof-params-{{ arch }} - paths: - - "~/filecoin-proof-parameters/" diff --git a/chain/filecoin/filecoin-ffi/.gitignore b/chain/filecoin/filecoin-ffi/.gitignore deleted file mode 100644 index f35581b9..00000000 --- a/chain/filecoin/filecoin-ffi/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -**/*.rs.bk -**/include -**/paramcache -**/target -.install-filcrypto -filcrypto.h -filcrypto.pc -filecoin.h -filecoin.pc -*.a -simulator diff --git a/chain/filecoin/filecoin-ffi/CHANGELOG.md b/chain/filecoin/filecoin-ffi/CHANGELOG.md deleted file mode 100644 index 34c6d2fa..00000000 --- a/chain/filecoin/filecoin-ffi/CHANGELOG.md +++ /dev/null @@ -1,292 +0,0 @@ -# filecoin-ffi changelog - -## 0.30.3 - -This release adds `FauxRep` to the `ffi` package, and a few other -rust-fil-proofs improvements, which you can read about [here](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#403---2020-07-01). - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - add FauxRep to ffi package (#118) ([filecoin-project/filecoin-ffi#118](https://github.com/filecoin-project/filecoin-ffi/pull/118)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Erin Swenson-Healey | 1 | +370/-143 | 9 | - -## 0.30.2 - -This release fixed a bug in the `ffi.Aggregate` function, which did not properly -handle a NUL byte (representing an error) returned from the `fil_aggregate` Rust -function. - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - handle null pointer returned from fil_aggregate (#116) ([filecoin-project/filecoin-ffi#116](https://github.com/filecoin-project/filecoin-ffi/pull/116)) - - 0.30.1 changelog (#114) ([filecoin-project/filecoin-ffi#114](https://github.com/filecoin-project/filecoin-ffi/pull/114)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Erin Swenson-Healey | 2 | +45/-1 | 3 | - -## 0.30.1 - -This release wil include Window PoSt speedups (2x measured for 32GiB sectors), -RAM reduction of 56GiB for 32GiB sectors (mmap'd parent cache with windows for -access, rather than all in RAM at once), and some phase2/trusted setup related -updates (for the trusted setup participants). - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - update to rust-fil-proofs 4.0.2 (#113) ([filecoin-project/filecoin-ffi#113](https://github.com/filecoin-project/filecoin-ffi/pull/113)) - - run the Rust tests before running the Go tests (#112) ([filecoin-project/filecoin-ffi#112](https://github.com/filecoin-project/filecoin-ffi/pull/112)) - - Update master dependencies ([filecoin-project/filecoin-ffi#111](https://github.com/filecoin-project/filecoin-ffi/pull/111)) - - update changelog for 0.30.0 release ([filecoin-project/filecoin-ffi#109](https://github.com/filecoin-project/filecoin-ffi/pull/109)) -- github.com/filecoin-project/specs-actors (v0.6.0 -> v0.6.1) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| nemo | 3 | +1463/-1782 | 17 | -| Alex North | 2 | +139/-116 | 3 | -| Erin Swenson-Healey | 2 | +90/-68 | 7 | -| laser | 1 | +31/-0 | 1 | - -## 0.30.0 - -This release includes an update specs-actors (splits abi.RegisteredProof into -two new types - one for seal and one for PoSt) and an update to rust-fil-proofs -4.0.0, which you can read about [here](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#400---2020-06-15). - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - update to rust-fil-proofs 4.0.0 (#108) ([filecoin-project/filecoin-ffi#108](https://github.com/filecoin-project/filecoin-ffi/pull/108)) - - specs-actors v0.6 ([filecoin-project/filecoin-ffi#107](https://github.com/filecoin-project/filecoin-ffi/pull/107)) - - changelog for 0.28.0, 0.28.1, and 0.29.0 (#106) ([filecoin-project/filecoin-ffi#106](https://github.com/filecoin-project/filecoin-ffi/pull/106)) -- github.com/filecoin-project/specs-actors (v0.5.4-0.20200521014528-0df536f7e461 -> v0.6.0) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Frrist | 3 | +454/-239 | 22 | -| Whyrusleeping | 2 | +485/-119 | 19 | -| Alex North | 7 | +424/-151 | 15 | -| Łukasz Magiera | 4 | +227/-154 | 13 | -| Alex Cruikshank | 4 | +262/-85 | 10 | -| porcuquine | 1 | +172/-171 | 15 | -| Erin Swenson-Healey | 3 | +153/-30 | 5 | -| ZenGround0 | 3 | +42/-17 | 16 | -| ZX | 2 | +16/-19 | 4 | -| WEI YANG | 1 | +6/-2 | 1 | -| Henri | 1 | +2/-2 | 1 | - - -## 0.29.0 - -Big changes here! We moved off of the nightly Rust channel, fixed a nasty file -descriptor-leak, and (most importantly) updated to [v27 parameters and keys](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#300---2020-06-08). - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - fix: update to filecoin-proofs-api v3.0.0 ([filecoin-project/filecoin-ffi#105](https://github.com/filecoin-project/filecoin-ffi/pull/105)) - - explicitly close os.File to force release of file descriptor (#97) ([filecoin-project/filecoin-ffi#97](https://github.com/filecoin-project/filecoin-ffi/pull/97)) - - fix: use stable 1.43.1 release ([filecoin-project/filecoin-ffi#102](https://github.com/filecoin-project/filecoin-ffi/pull/102)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| nemo | 2 | +133/-132 | 4 | -| Erin Swenson-Healey | 1 | +47/-1 | 2 | -| Volker Mische | 1 | +1/-3 | 3 | - - -## 0.28.1 - -This release modifies the rust-filecoin-proofs-api dependency, downloading it -from crates.io instead of GitHub. No behavior changes. - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - fix: point to published filecoin-proofs-api crate ([filecoin-project/filecoin-ffi#104](https://github.com/filecoin-project/filecoin-ffi/pull/104)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| nemo | 1 | +6/-5 | 3 | - - -## 0.28.0 - -This release adds unseal-to-a-file-descriptor functionality to the API, improves -merkle tree cache usage, [and more](https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md#200---2020-05-27). - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - integrate rust-fil-proofs 2.0.0 release (#98) ([filecoin-project/filecoin-ffi#98](https://github.com/filecoin-project/filecoin-ffi/pull/98)) - - release notes for 0.27.0 (#96) ([filecoin-project/filecoin-ffi#96](https://github.com/filecoin-project/filecoin-ffi/pull/96)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Erin Swenson-Healey | 2 | +245/-371 | 9 | - - -## 0.27.0 - -This release migrates from specs-actors 0.4.1 to 0.5.4. - -### Breaking Changes - -- The `VerifySeal` function has been modified to accept the revamped `abi.SealVerifyInfo` type. - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - consume new abi.SealVerifyInfo structure (#89) ([filecoin-project/filecoin-ffi#89](https://github.com/filecoin-project/filecoin-ffi/pull/89)) - - add changelog and changelog generator (#95) ([filecoin-project/filecoin-ffi#95](https://github.com/filecoin-project/filecoin-ffi/pull/95)) -- github.com/filecoin-project/go-bitfield (v0.0.0-20200416002808-b3ee67ec9060 -> v0.0.1): - - zero out bitfields during subtraction when they end up empty ([filecoin-project/go-bitfield#4](https://github.com/filecoin-project/go-bitfield/pull/4)) - - Create go.yml -- github.com/filecoin-project/specs-actors (v0.4.1-0.20200509020627-3c96f54f3d7d -> v0.5.4-0.20200521014528-0df536f7e461): - - decouple SealVerifyInfo from OnChainSealVerifyInfo (and rename to SealVerifyParams) (#378) ([filecoin-project/specs-actors#378](https://github.com/filecoin-project/specs-actors/pull/378)) - - add Unencodable Return method to puppet actor (#384) ([filecoin-project/specs-actors#384](https://github.com/filecoin-project/specs-actors/pull/384)) - - call validate caller (#379) ([filecoin-project/specs-actors#379](https://github.com/filecoin-project/specs-actors/pull/379)) - - handle last cron tick in market actor properly (#376) ([filecoin-project/specs-actors#376](https://github.com/filecoin-project/specs-actors/pull/376)) - - stop puppet actor panic when sendreturn is nil (#375) ([filecoin-project/specs-actors#375](https://github.com/filecoin-project/specs-actors/pull/375)) - - Change window post deadline duration to 1hr. (#373) ([filecoin-project/specs-actors#373](https://github.com/filecoin-project/specs-actors/pull/373)) - - cbor-gen for reward actor state (#372) ([filecoin-project/specs-actors#372](https://github.com/filecoin-project/specs-actors/pull/372)) - - Fractional network time (#367) ([filecoin-project/specs-actors#367](https://github.com/filecoin-project/specs-actors/pull/367)) - - deps: go-bitfield v0.0.1 (#369) ([filecoin-project/specs-actors#369](https://github.com/filecoin-project/specs-actors/pull/369)) - - update block reward target from KPI event, use that value to pay block rewards (#366) ([filecoin-project/specs-actors#366](https://github.com/filecoin-project/specs-actors/pull/366)) - - Helpers and mocks for miner window post unit tests. (#354) ([filecoin-project/specs-actors#354](https://github.com/filecoin-project/specs-actors/pull/354)) - - Change min miner power from 10TiB to 1TiB for testnet-2 (#368) ([filecoin-project/specs-actors#368](https://github.com/filecoin-project/specs-actors/pull/368)) - - Remove incorrect assumption about window post proof slice (#361) ([filecoin-project/specs-actors#361](https://github.com/filecoin-project/specs-actors/pull/361)) - - miner: Restrict supported proof types in miner ctor (#363) ([filecoin-project/specs-actors#363](https://github.com/filecoin-project/specs-actors/pull/363)) - - dont include value in the error message for set errors (#365) ([filecoin-project/specs-actors#365](https://github.com/filecoin-project/specs-actors/pull/365)) - - Fix nil verified deal weight (#360) ([filecoin-project/specs-actors#360](https://github.com/filecoin-project/specs-actors/pull/360)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Erin Swenson-Healey | 3 | +501/-293 | 12 | -| Łukasz Magiera | 4 | +388/-181 | 21 | -| Alex North | 5 | +346/-71 | 9 | -| Jakub Sztandera | 3 | +94/-9 | 5 | -| Whyrusleeping | 4 | +66/-36 | 9 | -| ZX | 1 | +21/-42 | 3 | -| Jeromy | 1 | +62/-0 | 2 | -| Frrist | 2 | +27/-8 | 2 | -| cerasusland | 1 | +2/-5 | 1 | - -## 0.26.2 - -This release contains a fix for a bug which prevented unmodified miners from -generating Winning PoSts for 64GiB sectors. It also contains a fix for a bug -which was an occasional source of `bad file descriptor` errors observed during -CommP generation (our hypothesis is that the `*os.File` was being GC'ed before -the CGO call returned). - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - don't let Go garbage collect FD until FFI call returns ([filecoin-project/filecoin-ffi#84](https://github.com/filecoin-project/filecoin-ffi/pull/84)) - - fix: error if there is already a logger - - add winning PoSt for 64 GiB (#93) ([filecoin-project/filecoin-ffi#93](https://github.com/filecoin-project/filecoin-ffi/pull/93)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Volker Mische | 1 | +24/-7 | 1 | -| laser | 1 | +5/-5 | 1 | -| shannon-6block | 1 | +2/-0 | 1 | - -## 0.26.1 - -This release updates to version 0.4.1 of specs-actors, which (among other -things) extends the `RegisteredProof` types to include 64GiB sector sizes. It -also includes a fix for Window PoSt (multiple proofs were being flattened into -a single byte array) and various fixes for bellperson and neptune Rust crates. - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - Update deps revisited ([filecoin-project/filecoin-ffi#91](https://github.com/filecoin-project/filecoin-ffi/pull/91)) - - newest upstream (#88) ([filecoin-project/filecoin-ffi#88](https://github.com/filecoin-project/filecoin-ffi/pull/88)) - - update rust-filecoin-proofs-api to include PoSt fix (#87) ([filecoin-project/filecoin-ffi#87](https://github.com/filecoin-project/filecoin-ffi/pull/87)) - - upgrade to specs-actors 0.4.1 (64GiB sector support) ([filecoin-project/filecoin-ffi#85](https://github.com/filecoin-project/filecoin-ffi/pull/85)) - - Upgrade to specs-actors v0.3.0 (#81) ([filecoin-project/filecoin-ffi#81](https://github.com/filecoin-project/filecoin-ffi/pull/81)) -- github.com/filecoin-project/go-amt-ipld (v2.0.1-0.20200131012142-05d80eeccc5e -> v2.0.1-0.20200424220931-6263827e49f2): - - implement method to get first index in amt ([filecoin-project/go-amt-ipld#11](https://github.com/filecoin-project/go-amt-ipld/pull/11)) - - implement ForEachAt method to support iteration starting at a given i… ([filecoin-project/go-amt-ipld#10](https://github.com/filecoin-project/go-amt-ipld/pull/10)) -- github.com/filecoin-project/specs-actors (v0.2.0 -> v0.4.1-0.20200509020627-3c96f54f3d7d): - - Minting function maintainability (#356) ([filecoin-project/specs-actors#356](https://github.com/filecoin-project/specs-actors/pull/356)) - - support for 64GiB sectors (#355) ([filecoin-project/specs-actors#355](https://github.com/filecoin-project/specs-actors/pull/355)) - - Temporary param update (#352) ([filecoin-project/specs-actors#352](https://github.com/filecoin-project/specs-actors/pull/352)) - - document reward minting function tests (#348) ([filecoin-project/specs-actors#348](https://github.com/filecoin-project/specs-actors/pull/348)) - - puppet type and method for failed marshal to cbor (#347) ([filecoin-project/specs-actors#347](https://github.com/filecoin-project/specs-actors/pull/347)) - - Unit tests for prove commit sector (#351) ([filecoin-project/specs-actors#351](https://github.com/filecoin-project/specs-actors/pull/351)) - - Fix failure to detect faults of exactly-full top partition (#350) ([filecoin-project/specs-actors#350](https://github.com/filecoin-project/specs-actors/pull/350)) - - Fix checking of fault/recovery declaration deadlines (#349) ([filecoin-project/specs-actors#349](https://github.com/filecoin-project/specs-actors/pull/349)) - - Set ConsensusMinerMinPower to 10TiB (#344) ([filecoin-project/specs-actors#344](https://github.com/filecoin-project/specs-actors/pull/344)) - - improve deal accounting performance (#309) ([filecoin-project/specs-actors#309](https://github.com/filecoin-project/specs-actors/pull/309)) - - DeadlineInfo handles expired proving period (#343) ([filecoin-project/specs-actors#343](https://github.com/filecoin-project/specs-actors/pull/343)) - - document reward-minting taylorSeriesExpansion (#338) ([filecoin-project/specs-actors#338](https://github.com/filecoin-project/specs-actors/pull/338)) - - implement puppet actor (#290) ([filecoin-project/specs-actors#290](https://github.com/filecoin-project/specs-actors/pull/290)) - - Fix the 32GiB Window PoSt partition size again (#337) ([filecoin-project/specs-actors#337](https://github.com/filecoin-project/specs-actors/pull/337)) - - Fix seal proof type in miner actor and parameterize WPoSt partition size by it (#336) ([filecoin-project/specs-actors#336](https://github.com/filecoin-project/specs-actors/pull/336)) - - Change WPoStPartitionSectors to 2349 (#332) ([filecoin-project/specs-actors#332](https://github.com/filecoin-project/specs-actors/pull/332)) - - Remove unused SectorSize from VerifyDealsOnSectorProveCommitParams (#328) ([filecoin-project/specs-actors#328](https://github.com/filecoin-project/specs-actors/pull/328)) - - require success in reward actor send reward (#331) ([filecoin-project/specs-actors#331](https://github.com/filecoin-project/specs-actors/pull/331)) - - Power actor CreateMiner passes on value received to new actor (#327) ([filecoin-project/specs-actors#327](https://github.com/filecoin-project/specs-actors/pull/327)) - - Specify cron genesis entries (#326) ([filecoin-project/specs-actors#326](https://github.com/filecoin-project/specs-actors/pull/326)) - - Remove SysErrInternal definition, use of which is always a bug (#304) ([filecoin-project/specs-actors#304](https://github.com/filecoin-project/specs-actors/pull/304)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Alex North | 13 | +654/-280 | 35 | -| Whyrusleeping | 2 | +273/-437 | 13 | -| Frrist | 3 | +455/-6 | 7 | -| davidad (David A. Dalrymple) | 3 | +245/-46 | 5 | -| Jeromy | 2 | +166/-4 | 4 | -| laser | 4 | +110/-48 | 6 | -| Erin Swenson-Healey | 3 | +50/-30 | 5 | -| ZX | 1 | +48/-20 | 5 | -| nemo | 1 | +4/-56 | 2 | - -## 0.26.0 - -This release migrates from v25 to v26 Groth parameters, which allows us to use -64GiB sectors. It also adds some safety to the CGO bindings, which were -previously sharing Go memory with C, resulting in some errors when running with -`cgocheck=2`. - -### Changelog - -- github.com/filecoin-project/filecoin-ffi: - - update to v26 Groth parameters (#83) ([filecoin-project/filecoin-ffi#83](https://github.com/filecoin-project/filecoin-ffi/pull/83)) - - handle allocations for problematic structs to avoid sharing pointers-to-pointers with C (from Go) (#82) ([filecoin-project/filecoin-ffi#82](https://github.com/filecoin-project/filecoin-ffi/pull/82)) - -### Contributors - -| Contributor | Commits | Lines ± | Files Changed | -|-------------|---------|---------|---------------| -| Erin Swenson-Healey | 2 | +514/-375 | 15 | diff --git a/chain/filecoin/filecoin-ffi/LICENSE-APACHE b/chain/filecoin/filecoin-ffi/LICENSE-APACHE deleted file mode 100644 index 25d5a005..00000000 --- a/chain/filecoin/filecoin-ffi/LICENSE-APACHE +++ /dev/null @@ -1,7 +0,0 @@ - Copyright (c) 2018 Filecoin Project - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/chain/filecoin/filecoin-ffi/LICENSE-MIT b/chain/filecoin/filecoin-ffi/LICENSE-MIT deleted file mode 100644 index 468cd79a..00000000 --- a/chain/filecoin/filecoin-ffi/LICENSE-MIT +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/chain/filecoin/filecoin-ffi/Makefile b/chain/filecoin/filecoin-ffi/Makefile deleted file mode 100644 index 7d207b2d..00000000 --- a/chain/filecoin/filecoin-ffi/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -DEPS:=filcrypto.h filcrypto.pc libfilcrypto.a - -all: $(DEPS) -.PHONY: all - -# Create a file so that parallel make doesn't call `./install-filcrypto` for -# each of the deps -$(DEPS): .install-filcrypto ; - -.install-filcrypto: rust - ./install-filcrypto - @touch $@ - -clean: - rm -rf $(DEPS) .install-filcrypto - rm -f ./runner - cd rust && cargo clean && cd .. -.PHONY: clean - -go-lint: $(DEPS) - golangci-lint run -v --concurrency 2 --new-from-rev origin/master -.PHONY: go-lint - -shellcheck: - shellcheck install-filcrypto - -lint: shellcheck go-lint - -cgo-leakdetect: runner - valgrind --leak-check=full --show-leak-kinds=definite ./runner -.PHONY: cgo-leakdetect - -cgo-gen: $(DEPS) - go run github.com/xlab/c-for-go --nostamp filcrypto.yml -.PHONY: cgo-gen - -runner: $(DEPS) - rm -f ./runner - go build -o ./runner ./cgoleakdetect/ -.PHONY: runner diff --git a/chain/filecoin/filecoin-ffi/README.md b/chain/filecoin/filecoin-ffi/README.md deleted file mode 100644 index 678ccd96..00000000 --- a/chain/filecoin/filecoin-ffi/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Filecoin Proofs FFI - -> C and CGO bindings for Filecoin's Rust libraries - -## Building - -To build and install libfilcrypto, its header file and pkg-config manifest, run: - -```shell -make -``` - -To optionally authenticate with GitHub for assets download (to increase API limits) -set `GITHUB_TOKEN` to personal access token. - -If no precompiled static library is available for your operating system, the -build tooling will attempt to compile a static library from local Rust sources. - -### Forcing Local Build - -To opt out of downloading precompiled assets, set `FFI_BUILD_FROM_SOURCE=1`: - -```shell -rm .install-filcrypto \ - ; make clean \ - ; FFI_BUILD_FROM_SOURCE=1 make -``` - -## Updating rust-fil-proofs (via rust-filecoin-proofs-api) - -If rust-fil-proofs has changed from commit X to Y and you wish to get Y into -the filecoin-ffi project, you need to do a few things: - -1. Update the rust-filecoin-proofs-api [Cargo.toml][1] file to point to Y -2. Run `cd rust && cargo update -p "filecoin-proofs-api"` from the root of the filecoin-ffi project -3. After the previous step alters your Cargo.lock file, commit and push - -## go get - -`go get` needs some additional steps in order to work as expected. - -Get the source, add this repo as a submodule to your repo, build it and point to it: - -```shell -$ go get github.com/filecoin-project/filecoin-ffi -$ git submodule add https://github.com/filecoin-project/filecoin-ffi.git extern/filecoin-ffi -$ make -C extern/filecoin-ffi -$ go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./extern/filecoin-ffi -``` - -## Updating CGO Bindings - -The CGO bindings are generated using [c-for-go](https://github.com/xlab/c-for-go) -and committed to Git. To generate bindings yourself, install the c-for-go -binary, ensure that it's on your path, and then run `make cgo-gen`. CI builds -will fail if generated CGO diverges from what's checked into Git. - -## Updating the Changelog - -The `mkreleaselog` script (in the project root) can be used to generate a good -portion of the filecoin-ffi changelog. For historical reasons, the script must -be run from the root of a filecoin-ffi checkout which is in your `$GOPATH`. - -Run it like so: - -```shell -./mkreleaselog v0.25.0 v0.26.0 > /tmp/v0.26.0.notes.txt -``` - -## License - -MIT or Apache 2.0 - -[1]: https://github.com/filecoin-project/rust-filecoin-proofs-api/commit/61fde0e581cc38abc4e13dbe96145c9ad2f1f0f5 diff --git a/chain/filecoin/filecoin-ffi/bls.go b/chain/filecoin/filecoin-ffi/bls.go deleted file mode 100644 index 3fce99b2..00000000 --- a/chain/filecoin/filecoin-ffi/bls.go +++ /dev/null @@ -1,140 +0,0 @@ -//+build cgo - -package ffi - -import ( - "github.com/filecoin-project/filecoin-ffi/generated" -) - -// #cgo LDFLAGS: ${SRCDIR}/libfilcrypto.a -// #cgo pkg-config: ${SRCDIR}/filcrypto.pc -// #include "./filcrypto.h" -import "C" - -// Hash computes the digest of a message -func Hash(message Message) Digest { - resp := generated.FilHash(string(message), uint(len(message))) - resp.Deref() - resp.Digest.Deref() - - defer generated.FilDestroyHashResponse(resp) - - var out Digest - copy(out[:], resp.Digest.Inner[:]) - return out -} - -// Verify verifies that a signature is the aggregated signature of digests - pubkeys -func Verify(signature *Signature, digests []Digest, publicKeys []PublicKey) bool { - // prep data - flattenedDigests := make([]byte, DigestBytes*len(digests)) - for idx, digest := range digests { - copy(flattenedDigests[(DigestBytes*idx):(DigestBytes*(1+idx))], digest[:]) - } - - flattenedPublicKeys := make([]byte, PublicKeyBytes*len(publicKeys)) - for idx, publicKey := range publicKeys { - copy(flattenedPublicKeys[(PublicKeyBytes*idx):(PublicKeyBytes*(1+idx))], publicKey[:]) - } - - isValid := generated.FilVerify(string(signature[:]), string(flattenedDigests), uint(len(flattenedDigests)), string(flattenedPublicKeys), uint(len(flattenedPublicKeys))) - - return isValid > 0 -} - -// HashVerify verifies that a signature is the aggregated signature of hashed messages. -func HashVerify(signature *Signature, messages []Message, publicKeys []PublicKey) bool { - var flattenedMessages string - messagesSizes := make([]uint, len(messages)) - for idx := range messages { - flattenedMessages = flattenedMessages + string(messages[idx]) - messagesSizes[idx] = uint(len(messages[idx])) - } - - flattenedPublicKeys := make([]byte, PublicKeyBytes*len(publicKeys)) - for idx, publicKey := range publicKeys { - copy(flattenedPublicKeys[(PublicKeyBytes*idx):(PublicKeyBytes*(1+idx))], publicKey[:]) - } - - isValid := generated.FilHashVerify(string(signature[:]), flattenedMessages, uint(len(flattenedMessages)), messagesSizes, uint(len(messagesSizes)), string(flattenedPublicKeys), uint(len(flattenedPublicKeys))) - - return isValid > 0 -} - -// Aggregate aggregates signatures together into a new signature. If the -// provided signatures cannot be aggregated (due to invalid input or an -// an operational error), Aggregate will return nil. -func Aggregate(signatures []Signature) *Signature { - // prep data - flattenedSignatures := make([]byte, SignatureBytes*len(signatures)) - for idx, sig := range signatures { - copy(flattenedSignatures[(SignatureBytes*idx):(SignatureBytes*(1+idx))], sig[:]) - } - - resp := generated.FilAggregate(string(flattenedSignatures), uint(len(flattenedSignatures))) - if resp == nil { - return nil - } - - defer generated.FilDestroyAggregateResponse(resp) - - resp.Deref() - resp.Signature.Deref() - - var out Signature - copy(out[:], resp.Signature.Inner[:]) - return &out -} - -// PrivateKeyGenerate generates a private key -func PrivateKeyGenerate() PrivateKey { - resp := generated.FilPrivateKeyGenerate() - resp.Deref() - resp.PrivateKey.Deref() - defer generated.FilDestroyPrivateKeyGenerateResponse(resp) - - var out PrivateKey - copy(out[:], resp.PrivateKey.Inner[:]) - return out -} - -// PrivateKeyGenerate generates a private key in a predictable manner -func PrivateKeyGenerateWithSeed(seed PrivateKeyGenSeed) PrivateKey { - var ary generated.Fil32ByteArray - copy(ary.Inner[:], seed[:]) - - resp := generated.FilPrivateKeyGenerateWithSeed(ary) - resp.Deref() - resp.PrivateKey.Deref() - defer generated.FilDestroyPrivateKeyGenerateResponse(resp) - - var out PrivateKey - copy(out[:], resp.PrivateKey.Inner[:]) - return out -} - -// PrivateKeySign signs a message -func PrivateKeySign(privateKey PrivateKey, message Message) *Signature { - resp := generated.FilPrivateKeySign(string(privateKey[:]), string(message), uint(len(message))) - resp.Deref() - resp.Signature.Deref() - - defer generated.FilDestroyPrivateKeySignResponse(resp) - - var signature Signature - copy(signature[:], resp.Signature.Inner[:]) - return &signature -} - -// PrivateKeyPublicKey gets the public key for a private key -func PrivateKeyPublicKey(privateKey PrivateKey) PublicKey { - resp := generated.FilPrivateKeyPublicKey(string(privateKey[:])) - resp.Deref() - resp.PublicKey.Deref() - - defer generated.FilDestroyPrivateKeyPublicKeyResponse(resp) - - var publicKey PublicKey - copy(publicKey[:], resp.PublicKey.Inner[:]) - return publicKey -} diff --git a/chain/filecoin/filecoin-ffi/bls_test.go b/chain/filecoin/filecoin-ffi/bls_test.go deleted file mode 100644 index 21d1c2b3..00000000 --- a/chain/filecoin/filecoin-ffi/bls_test.go +++ /dev/null @@ -1,186 +0,0 @@ -package ffi - -import ( - "fmt" - "math/rand" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestDeterministicPrivateKeyGeneration(t *testing.T) { - rand.Seed(time.Now().UnixNano()) - - for i := 0; i < 10000; i++ { - var xs [32]byte - n, err := rand.Read(xs[:]) - require.NoError(t, err) - require.Equal(t, len(xs), n) - - first := PrivateKeyGenerateWithSeed(xs) - secnd := PrivateKeyGenerateWithSeed(xs) - - assert.Equal(t, first, secnd) - } -} - -func TestBLSSigningAndVerification(t *testing.T) { - // generate private keys - fooPrivateKey := PrivateKeyGenerate() - barPrivateKey := PrivateKeyGenerate() - - // get the public keys for the private keys - fooPublicKey := PrivateKeyPublicKey(fooPrivateKey) - barPublicKey := PrivateKeyPublicKey(barPrivateKey) - - // make messages to sign with the keys - fooMessage := Message("hello foo") - barMessage := Message("hello bar!") - - // calculate the digests of the messages - fooDigest := Hash(fooMessage) - barDigest := Hash(barMessage) - - // get the signature when signing the messages with the private keys - fooSignature := PrivateKeySign(fooPrivateKey, fooMessage) - barSignature := PrivateKeySign(barPrivateKey, barMessage) - - // get the aggregateSign - aggregateSign := Aggregate([]Signature{*fooSignature, *barSignature}) - - // assert the foo message was signed with the foo key - assert.True(t, Verify(fooSignature, []Digest{fooDigest}, []PublicKey{fooPublicKey})) - - // assert the bar message was signed with the bar key - assert.True(t, Verify(barSignature, []Digest{barDigest}, []PublicKey{barPublicKey})) - - // assert the foo message was signed with the foo key - assert.True(t, HashVerify(fooSignature, []Message{fooMessage}, []PublicKey{fooPublicKey})) - - // assert the bar message was signed with the bar key - assert.True(t, HashVerify(barSignature, []Message{barMessage}, []PublicKey{barPublicKey})) - - // assert the foo message was not signed by the bar key - assert.False(t, Verify(fooSignature, []Digest{fooDigest}, []PublicKey{barPublicKey})) - - // assert the bar/foo message was not signed by the foo/bar key - assert.False(t, Verify(barSignature, []Digest{barDigest}, []PublicKey{fooPublicKey})) - assert.False(t, Verify(barSignature, []Digest{fooDigest}, []PublicKey{barPublicKey})) - assert.False(t, Verify(fooSignature, []Digest{barDigest}, []PublicKey{fooPublicKey})) - - //assert the foo and bar message was signed with the foo and bar key - assert.True(t, HashVerify(aggregateSign, []Message{fooMessage, barMessage}, []PublicKey{fooPublicKey, barPublicKey})) - - //assert the bar and foo message was not signed by the foo and bar key - assert.False(t, HashVerify(aggregateSign, []Message{fooMessage, barMessage}, []PublicKey{fooPublicKey})) -} - -func BenchmarkBLSVerify(b *testing.B) { - priv := PrivateKeyGenerate() - - msg := Message("this is a message that i will be signing") - digest := Hash(msg) - - sig := PrivateKeySign(priv, msg) - // fmt.Println("SIG SIZE: ", len(sig)) - // fmt.Println("SIG: ", sig) - pubk := PrivateKeyPublicKey(priv) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - if !Verify(sig, []Digest{digest}, []PublicKey{pubk}) { - b.Fatal("failed to verify") - } - } -} - -func TestBlsAggregateErrors(t *testing.T) { - t.Run("no signatures", func(t *testing.T) { - var empty []Signature - out := Aggregate(empty) - require.Nil(t, out) - }) - - t.Run("nil signatures", func(t *testing.T) { - out := Aggregate(nil) - require.Nil(t, out) - }) -} - -func BenchmarkBLSVerifyBatch(b *testing.B) { - b.Run("10", benchmarkBLSVerifyBatchSize(10)) - b.Run("50", benchmarkBLSVerifyBatchSize(50)) - b.Run("100", benchmarkBLSVerifyBatchSize(100)) - b.Run("300", benchmarkBLSVerifyBatchSize(300)) - b.Run("1000", benchmarkBLSVerifyBatchSize(1000)) - b.Run("4000", benchmarkBLSVerifyBatchSize(4000)) -} - -func benchmarkBLSVerifyBatchSize(size int) func(b *testing.B) { - return func(b *testing.B) { - var digests []Digest - var msgs []Message - var sigs []Signature - var pubks []PublicKey - for i := 0; i < size; i++ { - msg := Message(fmt.Sprintf("cats cats cats cats %d %d %d dogs", i, i, i)) - msgs = append(msgs, msg) - digests = append(digests, Hash(msg)) - priv := PrivateKeyGenerate() - sig := PrivateKeySign(priv, msg) - sigs = append(sigs, *sig) - pubk := PrivateKeyPublicKey(priv) - pubks = append(pubks, pubk) - } - - t := time.Now() - agsig := Aggregate(sigs) - fmt.Println("Aggregate took: ", time.Since(t)) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - if !Verify(agsig, digests, pubks) { - b.Fatal("failed to verify") - } - } - } -} - -func BenchmarkBLSHashAndVerify(b *testing.B) { - priv := PrivateKeyGenerate() - - msg := Message("this is a message that i will be signing") - sig := PrivateKeySign(priv, msg) - - // fmt.Println("SIG SIZE: ", len(sig)) - // fmt.Println("SIG: ", sig) - pubk := PrivateKeyPublicKey(priv) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - digest := Hash(msg) - if !Verify(sig, []Digest{digest}, []PublicKey{pubk}) { - b.Fatal("failed to verify") - } - } -} - -func BenchmarkBLSHashVerify(b *testing.B) { - priv := PrivateKeyGenerate() - - msg := Message("this is a message that i will be signing") - sig := PrivateKeySign(priv, msg) - - // fmt.Println("SIG SIZE: ", len(sig)) - // fmt.Println("SIG: ", sig) - pubk := PrivateKeyPublicKey(priv) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - if !HashVerify(sig, []Message{msg}, []PublicKey{pubk}) { - b.Fatal("failed to verify") - } - } -} diff --git a/chain/filecoin/filecoin-ffi/build.sh b/chain/filecoin/filecoin-ffi/build.sh deleted file mode 100755 index 9a7d0470..00000000 --- a/chain/filecoin/filecoin-ffi/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -make clean -cd rust -rm Cargo.lock -cargo update -p "filecoin-proofs-api" -cargo install cbindgen -cbindgen --clean --config cbindgen.toml --crate filcrypto --output ../include/filcrypto.h -cd .. -FFI_BUILD_FROM_SOURCE=1 make -go mod tidy diff --git a/chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go b/chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go deleted file mode 100644 index 2bfc33b9..00000000 --- a/chain/filecoin/filecoin-ffi/cgoleakdetect/runner.go +++ /dev/null @@ -1,63 +0,0 @@ -//+build cgo - -package main - -import ( - "fmt" - "os" - - ffi "github.com/filecoin-project/filecoin-ffi" -) - -func main() { - os.Setenv("RUST_LOG", "info") - th := panicOnFailureTestHelper{} - ffi.WorkflowGetGPUDevicesDoesNotProduceAnError(&th) - ffi.WorkflowProofsLifecycle(&th) - ffi.WorkflowRegisteredPoStProofFunctions(&th) - ffi.WorkflowRegisteredSealProofFunctions(&th) -} - -type panicOnFailureTestHelper struct{} - -func (p panicOnFailureTestHelper) AssertEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool { - if expected != actual { - panic(fmt.Sprintf("not equal: %+v, %+v, %+v", expected, actual, msgAndArgs)) - } - - return true -} - -func (p panicOnFailureTestHelper) AssertNoError(err error, msgAndArgs ...interface{}) bool { - if err != nil { - panic(fmt.Sprintf("there was an error: %+v, %+v", err, msgAndArgs)) - } - - return true -} - -func (p panicOnFailureTestHelper) AssertTrue(value bool, msgAndArgs ...interface{}) bool { - if !value { - panic(fmt.Sprintf("not true: %+v, %+v", value, msgAndArgs)) - } - - return true -} - -func (p panicOnFailureTestHelper) RequireEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if expected != actual { - panic(fmt.Sprintf("not equal: %+v, %+v, %+v", expected, actual, msgAndArgs)) - } -} - -func (p panicOnFailureTestHelper) RequireNoError(err error, msgAndArgs ...interface{}) { - if err != nil { - panic(fmt.Sprintf("there was an error: %+v, %+v", err, msgAndArgs)) - } -} - -func (p panicOnFailureTestHelper) RequireTrue(value bool, msgAndArgs ...interface{}) { - if !value { - panic(fmt.Sprintf("not true: %+v, %+v", value, msgAndArgs)) - } -} diff --git a/chain/filecoin/filecoin-ffi/filcrypto.yml b/chain/filecoin/filecoin-ffi/filcrypto.yml deleted file mode 100644 index 81c675a5..00000000 --- a/chain/filecoin/filecoin-ffi/filcrypto.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -GENERATOR: - PackageName: generated - PackageDescription: - PackageLicense: - Options: - SafeStrings: true - Includes: - - ../filcrypto.h - FlagGroups: - - {name: LDFLAGS, flags: ["-L${SRCDIR}/.. -lfilcrypto"]} - - {name: pkg-config, flags: ["${SRCDIR}/../filcrypto.pc"]} - -PARSER: - Defines: - IncludePaths: - - ./headerstubs/ - SourcesPaths: - - ./filcrypto.h - -TRANSLATOR: - ConstRules: - defines: expand - enum: cgo - PtrTips: - function: - - {target: "^fil_destroy", tips: [ref]} - Rules: - global: - - {action: accept, from: "^fil"} - - {action: accept, from: "^FCPResponseStatus"} - - {transform: export} - private: - - {transform: unexport} - post-global: - - {transform: export} - - {load: snakecase} diff --git a/chain/filecoin/filecoin-ffi/generated/cgo_helpers.go b/chain/filecoin/filecoin-ffi/generated/cgo_helpers.go deleted file mode 100644 index a7ecf074..00000000 --- a/chain/filecoin/filecoin-ffi/generated/cgo_helpers.go +++ /dev/null @@ -1,3517 +0,0 @@ -// WARNING: This file has automatically been generated -// Code generated by https://git.io/c-for-go. DO NOT EDIT. - -package generated - -/* -#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto -#cgo pkg-config: ${SRCDIR}/../filcrypto.pc -#include "../filcrypto.h" -#include -#include "cgo_helpers.h" -*/ -import "C" -import ( - "fmt" - "runtime" - "sync" - "unsafe" -) - -// cgoAllocMap stores pointers to C allocated memory for future reference. -type cgoAllocMap struct { - mux sync.RWMutex - m map[unsafe.Pointer]struct{} -} - -var cgoAllocsUnknown = new(cgoAllocMap) - -func (a *cgoAllocMap) Add(ptr unsafe.Pointer) { - a.mux.Lock() - if a.m == nil { - a.m = make(map[unsafe.Pointer]struct{}) - } - a.m[ptr] = struct{}{} - a.mux.Unlock() -} - -func (a *cgoAllocMap) IsEmpty() bool { - a.mux.RLock() - isEmpty := len(a.m) == 0 - a.mux.RUnlock() - return isEmpty -} - -func (a *cgoAllocMap) Borrow(b *cgoAllocMap) { - if b == nil || b.IsEmpty() { - return - } - b.mux.Lock() - a.mux.Lock() - for ptr := range b.m { - if a.m == nil { - a.m = make(map[unsafe.Pointer]struct{}) - } - a.m[ptr] = struct{}{} - delete(b.m, ptr) - } - a.mux.Unlock() - b.mux.Unlock() -} - -func (a *cgoAllocMap) Free() { - a.mux.Lock() - for ptr := range a.m { - C.free(ptr) - delete(a.m, ptr) - } - a.mux.Unlock() -} - -// allocFilBLSSignatureMemory allocates memory for type C.fil_BLSSignature in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilBLSSignatureMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSSignatureValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilBLSSignatureValue = unsafe.Sizeof([1]C.fil_BLSSignature{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilBLSSignature) Ref() *C.fil_BLSSignature { - if x == nil { - return nil - } - return x.refa2ac09ba -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilBLSSignature) Free() { - if x != nil && x.allocsa2ac09ba != nil { - x.allocsa2ac09ba.(*cgoAllocMap).Free() - x.refa2ac09ba = nil - } -} - -// NewFilBLSSignatureRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilBLSSignatureRef(ref unsafe.Pointer) *FilBLSSignature { - if ref == nil { - return nil - } - obj := new(FilBLSSignature) - obj.refa2ac09ba = (*C.fil_BLSSignature)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilBLSSignature) PassRef() (*C.fil_BLSSignature, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refa2ac09ba != nil { - return x.refa2ac09ba, nil - } - mema2ac09ba := allocFilBLSSignatureMemory(1) - refa2ac09ba := (*C.fil_BLSSignature)(mema2ac09ba) - allocsa2ac09ba := new(cgoAllocMap) - allocsa2ac09ba.Add(mema2ac09ba) - - var cinner_allocs *cgoAllocMap - refa2ac09ba.inner, cinner_allocs = *(*[96]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocsa2ac09ba.Borrow(cinner_allocs) - - x.refa2ac09ba = refa2ac09ba - x.allocsa2ac09ba = allocsa2ac09ba - return refa2ac09ba, allocsa2ac09ba - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilBLSSignature) PassValue() (C.fil_BLSSignature, *cgoAllocMap) { - if x.refa2ac09ba != nil { - return *x.refa2ac09ba, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilBLSSignature) Deref() { - if x.refa2ac09ba == nil { - return - } - x.Inner = *(*[96]byte)(unsafe.Pointer(&x.refa2ac09ba.inner)) -} - -// allocFilAggregateResponseMemory allocates memory for type C.fil_AggregateResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilAggregateResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilAggregateResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilAggregateResponseValue = unsafe.Sizeof([1]C.fil_AggregateResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilAggregateResponse) Ref() *C.fil_AggregateResponse { - if x == nil { - return nil - } - return x.refb3efa36d -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilAggregateResponse) Free() { - if x != nil && x.allocsb3efa36d != nil { - x.allocsb3efa36d.(*cgoAllocMap).Free() - x.refb3efa36d = nil - } -} - -// NewFilAggregateResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilAggregateResponseRef(ref unsafe.Pointer) *FilAggregateResponse { - if ref == nil { - return nil - } - obj := new(FilAggregateResponse) - obj.refb3efa36d = (*C.fil_AggregateResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilAggregateResponse) PassRef() (*C.fil_AggregateResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refb3efa36d != nil { - return x.refb3efa36d, nil - } - memb3efa36d := allocFilAggregateResponseMemory(1) - refb3efa36d := (*C.fil_AggregateResponse)(memb3efa36d) - allocsb3efa36d := new(cgoAllocMap) - allocsb3efa36d.Add(memb3efa36d) - - var csignature_allocs *cgoAllocMap - refb3efa36d.signature, csignature_allocs = x.Signature.PassValue() - allocsb3efa36d.Borrow(csignature_allocs) - - x.refb3efa36d = refb3efa36d - x.allocsb3efa36d = allocsb3efa36d - return refb3efa36d, allocsb3efa36d - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilAggregateResponse) PassValue() (C.fil_AggregateResponse, *cgoAllocMap) { - if x.refb3efa36d != nil { - return *x.refb3efa36d, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilAggregateResponse) Deref() { - if x.refb3efa36d == nil { - return - } - x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.refb3efa36d.signature)) -} - -// allocFilClearCacheResponseMemory allocates memory for type C.fil_ClearCacheResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilClearCacheResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilClearCacheResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilClearCacheResponseValue = unsafe.Sizeof([1]C.fil_ClearCacheResponse{}) - -// unpackPCharString represents the data from Go string as *C.char and avoids copying. -func unpackPCharString(str string) (*C.char, *cgoAllocMap) { - str = safeString(str) - h := (*stringHeader)(unsafe.Pointer(&str)) - return (*C.char)(h.Data), cgoAllocsUnknown -} - -type stringHeader struct { - Data unsafe.Pointer - Len int -} - -// safeString ensures that the string is NULL-terminated, a NULL-terminated copy is created otherwise. -func safeString(str string) string { - if len(str) > 0 && str[len(str)-1] != '\x00' { - str = str + "\x00" - } else if len(str) == 0 { - str = "\x00" - } - return str -} - -// packPCharString creates a Go string backed by *C.char and avoids copying. -func packPCharString(p *C.char) (raw string) { - if p != nil && *p != 0 { - h := (*stringHeader)(unsafe.Pointer(&raw)) - h.Data = unsafe.Pointer(p) - for *p != 0 { - p = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + 1)) // p++ - } - h.Len = int(uintptr(unsafe.Pointer(p)) - uintptr(h.Data)) - } - return -} - -// RawString reperesents a string backed by data on the C side. -type RawString string - -// Copy returns a Go-managed copy of raw string. -func (raw RawString) Copy() string { - if len(raw) == 0 { - return "" - } - h := (*stringHeader)(unsafe.Pointer(&raw)) - return C.GoStringN((*C.char)(h.Data), C.int(h.Len)) -} - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilClearCacheResponse) Ref() *C.fil_ClearCacheResponse { - if x == nil { - return nil - } - return x.refa9a80400 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilClearCacheResponse) Free() { - if x != nil && x.allocsa9a80400 != nil { - x.allocsa9a80400.(*cgoAllocMap).Free() - x.refa9a80400 = nil - } -} - -// NewFilClearCacheResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilClearCacheResponseRef(ref unsafe.Pointer) *FilClearCacheResponse { - if ref == nil { - return nil - } - obj := new(FilClearCacheResponse) - obj.refa9a80400 = (*C.fil_ClearCacheResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilClearCacheResponse) PassRef() (*C.fil_ClearCacheResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refa9a80400 != nil { - return x.refa9a80400, nil - } - mema9a80400 := allocFilClearCacheResponseMemory(1) - refa9a80400 := (*C.fil_ClearCacheResponse)(mema9a80400) - allocsa9a80400 := new(cgoAllocMap) - allocsa9a80400.Add(mema9a80400) - - var cerror_msg_allocs *cgoAllocMap - refa9a80400.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsa9a80400.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - refa9a80400.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsa9a80400.Borrow(cstatus_code_allocs) - - x.refa9a80400 = refa9a80400 - x.allocsa9a80400 = allocsa9a80400 - return refa9a80400, allocsa9a80400 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilClearCacheResponse) PassValue() (C.fil_ClearCacheResponse, *cgoAllocMap) { - if x.refa9a80400 != nil { - return *x.refa9a80400, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilClearCacheResponse) Deref() { - if x.refa9a80400 == nil { - return - } - x.ErrorMsg = packPCharString(x.refa9a80400.error_msg) - x.StatusCode = (FCPResponseStatus)(x.refa9a80400.status_code) -} - -// allocFilFauxRepResponseMemory allocates memory for type C.fil_FauxRepResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilFauxRepResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFauxRepResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilFauxRepResponseValue = unsafe.Sizeof([1]C.fil_FauxRepResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilFauxRepResponse) Ref() *C.fil_FauxRepResponse { - if x == nil { - return nil - } - return x.refaa003f71 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilFauxRepResponse) Free() { - if x != nil && x.allocsaa003f71 != nil { - x.allocsaa003f71.(*cgoAllocMap).Free() - x.refaa003f71 = nil - } -} - -// NewFilFauxRepResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilFauxRepResponseRef(ref unsafe.Pointer) *FilFauxRepResponse { - if ref == nil { - return nil - } - obj := new(FilFauxRepResponse) - obj.refaa003f71 = (*C.fil_FauxRepResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilFauxRepResponse) PassRef() (*C.fil_FauxRepResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refaa003f71 != nil { - return x.refaa003f71, nil - } - memaa003f71 := allocFilFauxRepResponseMemory(1) - refaa003f71 := (*C.fil_FauxRepResponse)(memaa003f71) - allocsaa003f71 := new(cgoAllocMap) - allocsaa003f71.Add(memaa003f71) - - var cerror_msg_allocs *cgoAllocMap - refaa003f71.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsaa003f71.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - refaa003f71.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsaa003f71.Borrow(cstatus_code_allocs) - - var ccommitment_allocs *cgoAllocMap - refaa003f71.commitment, ccommitment_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Commitment)), cgoAllocsUnknown - allocsaa003f71.Borrow(ccommitment_allocs) - - x.refaa003f71 = refaa003f71 - x.allocsaa003f71 = allocsaa003f71 - return refaa003f71, allocsaa003f71 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilFauxRepResponse) PassValue() (C.fil_FauxRepResponse, *cgoAllocMap) { - if x.refaa003f71 != nil { - return *x.refaa003f71, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilFauxRepResponse) Deref() { - if x.refaa003f71 == nil { - return - } - x.ErrorMsg = packPCharString(x.refaa003f71.error_msg) - x.StatusCode = (FCPResponseStatus)(x.refaa003f71.status_code) - x.Commitment = *(*[32]byte)(unsafe.Pointer(&x.refaa003f71.commitment)) -} - -// allocFilFinalizeTicketResponseMemory allocates memory for type C.fil_FinalizeTicketResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilFinalizeTicketResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilFinalizeTicketResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilFinalizeTicketResponseValue = unsafe.Sizeof([1]C.fil_FinalizeTicketResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilFinalizeTicketResponse) Ref() *C.fil_FinalizeTicketResponse { - if x == nil { - return nil - } - return x.refb370fa86 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilFinalizeTicketResponse) Free() { - if x != nil && x.allocsb370fa86 != nil { - x.allocsb370fa86.(*cgoAllocMap).Free() - x.refb370fa86 = nil - } -} - -// NewFilFinalizeTicketResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilFinalizeTicketResponseRef(ref unsafe.Pointer) *FilFinalizeTicketResponse { - if ref == nil { - return nil - } - obj := new(FilFinalizeTicketResponse) - obj.refb370fa86 = (*C.fil_FinalizeTicketResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilFinalizeTicketResponse) PassRef() (*C.fil_FinalizeTicketResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refb370fa86 != nil { - return x.refb370fa86, nil - } - memb370fa86 := allocFilFinalizeTicketResponseMemory(1) - refb370fa86 := (*C.fil_FinalizeTicketResponse)(memb370fa86) - allocsb370fa86 := new(cgoAllocMap) - allocsb370fa86.Add(memb370fa86) - - var cstatus_code_allocs *cgoAllocMap - refb370fa86.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsb370fa86.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - refb370fa86.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsb370fa86.Borrow(cerror_msg_allocs) - - var cticket_allocs *cgoAllocMap - refb370fa86.ticket, cticket_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Ticket)), cgoAllocsUnknown - allocsb370fa86.Borrow(cticket_allocs) - - x.refb370fa86 = refb370fa86 - x.allocsb370fa86 = allocsb370fa86 - return refb370fa86, allocsb370fa86 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilFinalizeTicketResponse) PassValue() (C.fil_FinalizeTicketResponse, *cgoAllocMap) { - if x.refb370fa86 != nil { - return *x.refb370fa86, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilFinalizeTicketResponse) Deref() { - if x.refb370fa86 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.refb370fa86.status_code) - x.ErrorMsg = packPCharString(x.refb370fa86.error_msg) - x.Ticket = *(*[32]byte)(unsafe.Pointer(&x.refb370fa86.ticket)) -} - -// allocFilGenerateDataCommitmentResponseMemory allocates memory for type C.fil_GenerateDataCommitmentResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateDataCommitmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateDataCommitmentResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilGenerateDataCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GenerateDataCommitmentResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateDataCommitmentResponse) Ref() *C.fil_GenerateDataCommitmentResponse { - if x == nil { - return nil - } - return x.ref87da7dd9 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateDataCommitmentResponse) Free() { - if x != nil && x.allocs87da7dd9 != nil { - x.allocs87da7dd9.(*cgoAllocMap).Free() - x.ref87da7dd9 = nil - } -} - -// NewFilGenerateDataCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateDataCommitmentResponseRef(ref unsafe.Pointer) *FilGenerateDataCommitmentResponse { - if ref == nil { - return nil - } - obj := new(FilGenerateDataCommitmentResponse) - obj.ref87da7dd9 = (*C.fil_GenerateDataCommitmentResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateDataCommitmentResponse) PassRef() (*C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref87da7dd9 != nil { - return x.ref87da7dd9, nil - } - mem87da7dd9 := allocFilGenerateDataCommitmentResponseMemory(1) - ref87da7dd9 := (*C.fil_GenerateDataCommitmentResponse)(mem87da7dd9) - allocs87da7dd9 := new(cgoAllocMap) - allocs87da7dd9.Add(mem87da7dd9) - - var cstatus_code_allocs *cgoAllocMap - ref87da7dd9.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs87da7dd9.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref87da7dd9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs87da7dd9.Borrow(cerror_msg_allocs) - - var ccomm_d_allocs *cgoAllocMap - ref87da7dd9.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown - allocs87da7dd9.Borrow(ccomm_d_allocs) - - x.ref87da7dd9 = ref87da7dd9 - x.allocs87da7dd9 = allocs87da7dd9 - return ref87da7dd9, allocs87da7dd9 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateDataCommitmentResponse) PassValue() (C.fil_GenerateDataCommitmentResponse, *cgoAllocMap) { - if x.ref87da7dd9 != nil { - return *x.ref87da7dd9, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateDataCommitmentResponse) Deref() { - if x.ref87da7dd9 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref87da7dd9.status_code) - x.ErrorMsg = packPCharString(x.ref87da7dd9.error_msg) - x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref87da7dd9.comm_d)) -} - -// allocFilGeneratePieceCommitmentResponseMemory allocates memory for type C.fil_GeneratePieceCommitmentResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGeneratePieceCommitmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGeneratePieceCommitmentResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilGeneratePieceCommitmentResponseValue = unsafe.Sizeof([1]C.fil_GeneratePieceCommitmentResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGeneratePieceCommitmentResponse) Ref() *C.fil_GeneratePieceCommitmentResponse { - if x == nil { - return nil - } - return x.ref4b00fda4 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilGeneratePieceCommitmentResponse) Free() { - if x != nil && x.allocs4b00fda4 != nil { - x.allocs4b00fda4.(*cgoAllocMap).Free() - x.ref4b00fda4 = nil - } -} - -// NewFilGeneratePieceCommitmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilGeneratePieceCommitmentResponseRef(ref unsafe.Pointer) *FilGeneratePieceCommitmentResponse { - if ref == nil { - return nil - } - obj := new(FilGeneratePieceCommitmentResponse) - obj.ref4b00fda4 = (*C.fil_GeneratePieceCommitmentResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilGeneratePieceCommitmentResponse) PassRef() (*C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref4b00fda4 != nil { - return x.ref4b00fda4, nil - } - mem4b00fda4 := allocFilGeneratePieceCommitmentResponseMemory(1) - ref4b00fda4 := (*C.fil_GeneratePieceCommitmentResponse)(mem4b00fda4) - allocs4b00fda4 := new(cgoAllocMap) - allocs4b00fda4.Add(mem4b00fda4) - - var cstatus_code_allocs *cgoAllocMap - ref4b00fda4.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs4b00fda4.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref4b00fda4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs4b00fda4.Borrow(cerror_msg_allocs) - - var ccomm_p_allocs *cgoAllocMap - ref4b00fda4.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocs4b00fda4.Borrow(ccomm_p_allocs) - - var cnum_bytes_aligned_allocs *cgoAllocMap - ref4b00fda4.num_bytes_aligned, cnum_bytes_aligned_allocs = (C.uint64_t)(x.NumBytesAligned), cgoAllocsUnknown - allocs4b00fda4.Borrow(cnum_bytes_aligned_allocs) - - x.ref4b00fda4 = ref4b00fda4 - x.allocs4b00fda4 = allocs4b00fda4 - return ref4b00fda4, allocs4b00fda4 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGeneratePieceCommitmentResponse) PassValue() (C.fil_GeneratePieceCommitmentResponse, *cgoAllocMap) { - if x.ref4b00fda4 != nil { - return *x.ref4b00fda4, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGeneratePieceCommitmentResponse) Deref() { - if x.ref4b00fda4 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref4b00fda4.status_code) - x.ErrorMsg = packPCharString(x.ref4b00fda4.error_msg) - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.ref4b00fda4.comm_p)) - x.NumBytesAligned = (uint64)(x.ref4b00fda4.num_bytes_aligned) -} - -// allocFilPoStProofMemory allocates memory for type C.fil_PoStProof in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPoStProofMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPoStProofValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPoStProofValue = unsafe.Sizeof([1]C.fil_PoStProof{}) - -// unpackPUint8TString represents the data from Go string as *C.uint8_t and avoids copying. -func unpackPUint8TString(str string) (*C.uint8_t, *cgoAllocMap) { - str = safeString(str) - h := (*stringHeader)(unsafe.Pointer(&str)) - return (*C.uint8_t)(h.Data), cgoAllocsUnknown -} - -// packPUint8TString creates a Go string backed by *C.uint8_t and avoids copying. -func packPUint8TString(p *C.uint8_t) (raw string) { - if p != nil && *p != 0 { - h := (*stringHeader)(unsafe.Pointer(&raw)) - h.Data = unsafe.Pointer(p) - for *p != 0 { - p = (*C.uint8_t)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + 1)) // p++ - } - h.Len = int(uintptr(unsafe.Pointer(p)) - uintptr(h.Data)) - } - return -} - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPoStProof) Ref() *C.fil_PoStProof { - if x == nil { - return nil - } - return x.ref3451bfa -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPoStProof) Free() { - if x != nil && x.allocs3451bfa != nil { - x.allocs3451bfa.(*cgoAllocMap).Free() - x.ref3451bfa = nil - } -} - -// NewFilPoStProofRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPoStProofRef(ref unsafe.Pointer) *FilPoStProof { - if ref == nil { - return nil - } - obj := new(FilPoStProof) - obj.ref3451bfa = (*C.fil_PoStProof)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPoStProof) PassRef() (*C.fil_PoStProof, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref3451bfa != nil { - return x.ref3451bfa, nil - } - mem3451bfa := allocFilPoStProofMemory(1) - ref3451bfa := (*C.fil_PoStProof)(mem3451bfa) - allocs3451bfa := new(cgoAllocMap) - allocs3451bfa.Add(mem3451bfa) - - var cregistered_proof_allocs *cgoAllocMap - ref3451bfa.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown - allocs3451bfa.Borrow(cregistered_proof_allocs) - - var cproof_len_allocs *cgoAllocMap - ref3451bfa.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs3451bfa.Borrow(cproof_len_allocs) - - var cproof_ptr_allocs *cgoAllocMap - ref3451bfa.proof_ptr, cproof_ptr_allocs = unpackPUint8TString(x.ProofPtr) - allocs3451bfa.Borrow(cproof_ptr_allocs) - - x.ref3451bfa = ref3451bfa - x.allocs3451bfa = allocs3451bfa - return ref3451bfa, allocs3451bfa - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPoStProof) PassValue() (C.fil_PoStProof, *cgoAllocMap) { - if x.ref3451bfa != nil { - return *x.ref3451bfa, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPoStProof) Deref() { - if x.ref3451bfa == nil { - return - } - x.RegisteredProof = (FilRegisteredPoStProof)(x.ref3451bfa.registered_proof) - x.ProofLen = (uint)(x.ref3451bfa.proof_len) - x.ProofPtr = packPUint8TString(x.ref3451bfa.proof_ptr) -} - -// allocFilGenerateWindowPoStResponseMemory allocates memory for type C.fil_GenerateWindowPoStResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateWindowPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWindowPoStResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilGenerateWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWindowPoStResponse{}) - -type sliceHeader struct { - Data unsafe.Pointer - Len int - Cap int -} - -const sizeOfPtr = unsafe.Sizeof(&struct{}{}) - -// unpackSFilPoStProof transforms a sliced Go data structure into plain C format. -func unpackSFilPoStProof(x []FilPoStProof) (unpacked *C.fil_PoStProof, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocFilPoStProofMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_PoStProof)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PoStProof)(h.Data) - return -} - -// packSFilPoStProof reads sliced Go data structure out from plain C format. -func packSFilPoStProof(v []FilPoStProof, ptr0 *C.fil_PoStProof) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPoStProofValue]C.fil_PoStProof)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPoStProofRef(unsafe.Pointer(&ptr1)) - } -} - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateWindowPoStResponse) Ref() *C.fil_GenerateWindowPoStResponse { - if x == nil { - return nil - } - return x.ref2a5f3ba8 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateWindowPoStResponse) Free() { - if x != nil && x.allocs2a5f3ba8 != nil { - x.allocs2a5f3ba8.(*cgoAllocMap).Free() - x.ref2a5f3ba8 = nil - } -} - -// NewFilGenerateWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateWindowPoStResponseRef(ref unsafe.Pointer) *FilGenerateWindowPoStResponse { - if ref == nil { - return nil - } - obj := new(FilGenerateWindowPoStResponse) - obj.ref2a5f3ba8 = (*C.fil_GenerateWindowPoStResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateWindowPoStResponse) PassRef() (*C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref2a5f3ba8 != nil { - return x.ref2a5f3ba8, nil - } - mem2a5f3ba8 := allocFilGenerateWindowPoStResponseMemory(1) - ref2a5f3ba8 := (*C.fil_GenerateWindowPoStResponse)(mem2a5f3ba8) - allocs2a5f3ba8 := new(cgoAllocMap) - allocs2a5f3ba8.Add(mem2a5f3ba8) - - var cerror_msg_allocs *cgoAllocMap - ref2a5f3ba8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs2a5f3ba8.Borrow(cerror_msg_allocs) - - var cproofs_len_allocs *cgoAllocMap - ref2a5f3ba8.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown - allocs2a5f3ba8.Borrow(cproofs_len_allocs) - - var cproofs_ptr_allocs *cgoAllocMap - ref2a5f3ba8.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) - allocs2a5f3ba8.Borrow(cproofs_ptr_allocs) - - var cstatus_code_allocs *cgoAllocMap - ref2a5f3ba8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs2a5f3ba8.Borrow(cstatus_code_allocs) - - x.ref2a5f3ba8 = ref2a5f3ba8 - x.allocs2a5f3ba8 = allocs2a5f3ba8 - return ref2a5f3ba8, allocs2a5f3ba8 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateWindowPoStResponse) PassValue() (C.fil_GenerateWindowPoStResponse, *cgoAllocMap) { - if x.ref2a5f3ba8 != nil { - return *x.ref2a5f3ba8, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateWindowPoStResponse) Deref() { - if x.ref2a5f3ba8 == nil { - return - } - x.ErrorMsg = packPCharString(x.ref2a5f3ba8.error_msg) - x.ProofsLen = (uint)(x.ref2a5f3ba8.proofs_len) - packSFilPoStProof(x.ProofsPtr, x.ref2a5f3ba8.proofs_ptr) - x.StatusCode = (FCPResponseStatus)(x.ref2a5f3ba8.status_code) -} - -// allocFilGenerateWinningPoStResponseMemory allocates memory for type C.fil_GenerateWinningPoStResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateWinningPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilGenerateWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateWinningPoStResponse) Ref() *C.fil_GenerateWinningPoStResponse { - if x == nil { - return nil - } - return x.ref1405b8ec -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateWinningPoStResponse) Free() { - if x != nil && x.allocs1405b8ec != nil { - x.allocs1405b8ec.(*cgoAllocMap).Free() - x.ref1405b8ec = nil - } -} - -// NewFilGenerateWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateWinningPoStResponseRef(ref unsafe.Pointer) *FilGenerateWinningPoStResponse { - if ref == nil { - return nil - } - obj := new(FilGenerateWinningPoStResponse) - obj.ref1405b8ec = (*C.fil_GenerateWinningPoStResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateWinningPoStResponse) PassRef() (*C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref1405b8ec != nil { - return x.ref1405b8ec, nil - } - mem1405b8ec := allocFilGenerateWinningPoStResponseMemory(1) - ref1405b8ec := (*C.fil_GenerateWinningPoStResponse)(mem1405b8ec) - allocs1405b8ec := new(cgoAllocMap) - allocs1405b8ec.Add(mem1405b8ec) - - var cerror_msg_allocs *cgoAllocMap - ref1405b8ec.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs1405b8ec.Borrow(cerror_msg_allocs) - - var cproofs_len_allocs *cgoAllocMap - ref1405b8ec.proofs_len, cproofs_len_allocs = (C.size_t)(x.ProofsLen), cgoAllocsUnknown - allocs1405b8ec.Borrow(cproofs_len_allocs) - - var cproofs_ptr_allocs *cgoAllocMap - ref1405b8ec.proofs_ptr, cproofs_ptr_allocs = unpackSFilPoStProof(x.ProofsPtr) - allocs1405b8ec.Borrow(cproofs_ptr_allocs) - - var cstatus_code_allocs *cgoAllocMap - ref1405b8ec.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs1405b8ec.Borrow(cstatus_code_allocs) - - x.ref1405b8ec = ref1405b8ec - x.allocs1405b8ec = allocs1405b8ec - return ref1405b8ec, allocs1405b8ec - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateWinningPoStResponse) PassValue() (C.fil_GenerateWinningPoStResponse, *cgoAllocMap) { - if x.ref1405b8ec != nil { - return *x.ref1405b8ec, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateWinningPoStResponse) Deref() { - if x.ref1405b8ec == nil { - return - } - x.ErrorMsg = packPCharString(x.ref1405b8ec.error_msg) - x.ProofsLen = (uint)(x.ref1405b8ec.proofs_len) - packSFilPoStProof(x.ProofsPtr, x.ref1405b8ec.proofs_ptr) - x.StatusCode = (FCPResponseStatus)(x.ref1405b8ec.status_code) -} - -// allocFilGenerateWinningPoStSectorChallengeMemory allocates memory for type C.fil_GenerateWinningPoStSectorChallenge in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGenerateWinningPoStSectorChallengeMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGenerateWinningPoStSectorChallengeValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilGenerateWinningPoStSectorChallengeValue = unsafe.Sizeof([1]C.fil_GenerateWinningPoStSectorChallenge{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGenerateWinningPoStSectorChallenge) Ref() *C.fil_GenerateWinningPoStSectorChallenge { - if x == nil { - return nil - } - return x.ref69d2a405 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilGenerateWinningPoStSectorChallenge) Free() { - if x != nil && x.allocs69d2a405 != nil { - x.allocs69d2a405.(*cgoAllocMap).Free() - x.ref69d2a405 = nil - } -} - -// NewFilGenerateWinningPoStSectorChallengeRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilGenerateWinningPoStSectorChallengeRef(ref unsafe.Pointer) *FilGenerateWinningPoStSectorChallenge { - if ref == nil { - return nil - } - obj := new(FilGenerateWinningPoStSectorChallenge) - obj.ref69d2a405 = (*C.fil_GenerateWinningPoStSectorChallenge)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilGenerateWinningPoStSectorChallenge) PassRef() (*C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref69d2a405 != nil { - return x.ref69d2a405, nil - } - mem69d2a405 := allocFilGenerateWinningPoStSectorChallengeMemory(1) - ref69d2a405 := (*C.fil_GenerateWinningPoStSectorChallenge)(mem69d2a405) - allocs69d2a405 := new(cgoAllocMap) - allocs69d2a405.Add(mem69d2a405) - - var cerror_msg_allocs *cgoAllocMap - ref69d2a405.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs69d2a405.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - ref69d2a405.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs69d2a405.Borrow(cstatus_code_allocs) - - var cids_ptr_allocs *cgoAllocMap - ref69d2a405.ids_ptr, cids_ptr_allocs = (*C.uint64_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&x.IdsPtr)).Data)), cgoAllocsUnknown - allocs69d2a405.Borrow(cids_ptr_allocs) - - var cids_len_allocs *cgoAllocMap - ref69d2a405.ids_len, cids_len_allocs = (C.size_t)(x.IdsLen), cgoAllocsUnknown - allocs69d2a405.Borrow(cids_len_allocs) - - x.ref69d2a405 = ref69d2a405 - x.allocs69d2a405 = allocs69d2a405 - return ref69d2a405, allocs69d2a405 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGenerateWinningPoStSectorChallenge) PassValue() (C.fil_GenerateWinningPoStSectorChallenge, *cgoAllocMap) { - if x.ref69d2a405 != nil { - return *x.ref69d2a405, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGenerateWinningPoStSectorChallenge) Deref() { - if x.ref69d2a405 == nil { - return - } - x.ErrorMsg = packPCharString(x.ref69d2a405.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref69d2a405.status_code) - hxfc4425b := (*sliceHeader)(unsafe.Pointer(&x.IdsPtr)) - hxfc4425b.Data = unsafe.Pointer(x.ref69d2a405.ids_ptr) - hxfc4425b.Cap = 0x7fffffff - // hxfc4425b.Len = ? - - x.IdsLen = (uint)(x.ref69d2a405.ids_len) -} - -// allocFilGpuDeviceResponseMemory allocates memory for type C.fil_GpuDeviceResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilGpuDeviceResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilGpuDeviceResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilGpuDeviceResponseValue = unsafe.Sizeof([1]C.fil_GpuDeviceResponse{}) - -// allocPCharMemory allocates memory for type *C.char in C. -// The caller is responsible for freeing the this memory via C.free. -func allocPCharMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfPCharValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfPCharValue = unsafe.Sizeof([1]*C.char{}) - -// unpackSString transforms a sliced Go data structure into plain C format. -func unpackSString(x []string) (unpacked **C.char, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocPCharMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]*C.char)(unsafe.Pointer(h0)) - for i0 := range x { - v0[i0], _ = unpackPCharString(x[i0]) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (**C.char)(h.Data) - return -} - -// packSString reads sliced Go data structure out from plain C format. -func packSString(v []string, ptr0 **C.char) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfPtr]*C.char)(unsafe.Pointer(ptr0)))[i0] - v[i0] = packPCharString(ptr1) - } -} - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilGpuDeviceResponse) Ref() *C.fil_GpuDeviceResponse { - if x == nil { - return nil - } - return x.ref58f92915 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilGpuDeviceResponse) Free() { - if x != nil && x.allocs58f92915 != nil { - x.allocs58f92915.(*cgoAllocMap).Free() - x.ref58f92915 = nil - } -} - -// NewFilGpuDeviceResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilGpuDeviceResponseRef(ref unsafe.Pointer) *FilGpuDeviceResponse { - if ref == nil { - return nil - } - obj := new(FilGpuDeviceResponse) - obj.ref58f92915 = (*C.fil_GpuDeviceResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilGpuDeviceResponse) PassRef() (*C.fil_GpuDeviceResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref58f92915 != nil { - return x.ref58f92915, nil - } - mem58f92915 := allocFilGpuDeviceResponseMemory(1) - ref58f92915 := (*C.fil_GpuDeviceResponse)(mem58f92915) - allocs58f92915 := new(cgoAllocMap) - allocs58f92915.Add(mem58f92915) - - var cstatus_code_allocs *cgoAllocMap - ref58f92915.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs58f92915.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref58f92915.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs58f92915.Borrow(cerror_msg_allocs) - - var cdevices_len_allocs *cgoAllocMap - ref58f92915.devices_len, cdevices_len_allocs = (C.size_t)(x.DevicesLen), cgoAllocsUnknown - allocs58f92915.Borrow(cdevices_len_allocs) - - var cdevices_ptr_allocs *cgoAllocMap - ref58f92915.devices_ptr, cdevices_ptr_allocs = unpackSString(x.DevicesPtr) - allocs58f92915.Borrow(cdevices_ptr_allocs) - - x.ref58f92915 = ref58f92915 - x.allocs58f92915 = allocs58f92915 - return ref58f92915, allocs58f92915 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilGpuDeviceResponse) PassValue() (C.fil_GpuDeviceResponse, *cgoAllocMap) { - if x.ref58f92915 != nil { - return *x.ref58f92915, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilGpuDeviceResponse) Deref() { - if x.ref58f92915 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref58f92915.status_code) - x.ErrorMsg = packPCharString(x.ref58f92915.error_msg) - x.DevicesLen = (uint)(x.ref58f92915.devices_len) - packSString(x.DevicesPtr, x.ref58f92915.devices_ptr) -} - -// allocFilBLSDigestMemory allocates memory for type C.fil_BLSDigest in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilBLSDigestMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSDigestValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilBLSDigestValue = unsafe.Sizeof([1]C.fil_BLSDigest{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilBLSDigest) Ref() *C.fil_BLSDigest { - if x == nil { - return nil - } - return x.ref215fc78c -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilBLSDigest) Free() { - if x != nil && x.allocs215fc78c != nil { - x.allocs215fc78c.(*cgoAllocMap).Free() - x.ref215fc78c = nil - } -} - -// NewFilBLSDigestRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilBLSDigestRef(ref unsafe.Pointer) *FilBLSDigest { - if ref == nil { - return nil - } - obj := new(FilBLSDigest) - obj.ref215fc78c = (*C.fil_BLSDigest)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilBLSDigest) PassRef() (*C.fil_BLSDigest, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref215fc78c != nil { - return x.ref215fc78c, nil - } - mem215fc78c := allocFilBLSDigestMemory(1) - ref215fc78c := (*C.fil_BLSDigest)(mem215fc78c) - allocs215fc78c := new(cgoAllocMap) - allocs215fc78c.Add(mem215fc78c) - - var cinner_allocs *cgoAllocMap - ref215fc78c.inner, cinner_allocs = *(*[96]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocs215fc78c.Borrow(cinner_allocs) - - x.ref215fc78c = ref215fc78c - x.allocs215fc78c = allocs215fc78c - return ref215fc78c, allocs215fc78c - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilBLSDigest) PassValue() (C.fil_BLSDigest, *cgoAllocMap) { - if x.ref215fc78c != nil { - return *x.ref215fc78c, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilBLSDigest) Deref() { - if x.ref215fc78c == nil { - return - } - x.Inner = *(*[96]byte)(unsafe.Pointer(&x.ref215fc78c.inner)) -} - -// allocFilHashResponseMemory allocates memory for type C.fil_HashResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilHashResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilHashResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilHashResponseValue = unsafe.Sizeof([1]C.fil_HashResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilHashResponse) Ref() *C.fil_HashResponse { - if x == nil { - return nil - } - return x.refc52a22ef -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilHashResponse) Free() { - if x != nil && x.allocsc52a22ef != nil { - x.allocsc52a22ef.(*cgoAllocMap).Free() - x.refc52a22ef = nil - } -} - -// NewFilHashResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilHashResponseRef(ref unsafe.Pointer) *FilHashResponse { - if ref == nil { - return nil - } - obj := new(FilHashResponse) - obj.refc52a22ef = (*C.fil_HashResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilHashResponse) PassRef() (*C.fil_HashResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refc52a22ef != nil { - return x.refc52a22ef, nil - } - memc52a22ef := allocFilHashResponseMemory(1) - refc52a22ef := (*C.fil_HashResponse)(memc52a22ef) - allocsc52a22ef := new(cgoAllocMap) - allocsc52a22ef.Add(memc52a22ef) - - var cdigest_allocs *cgoAllocMap - refc52a22ef.digest, cdigest_allocs = x.Digest.PassValue() - allocsc52a22ef.Borrow(cdigest_allocs) - - x.refc52a22ef = refc52a22ef - x.allocsc52a22ef = allocsc52a22ef - return refc52a22ef, allocsc52a22ef - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilHashResponse) PassValue() (C.fil_HashResponse, *cgoAllocMap) { - if x.refc52a22ef != nil { - return *x.refc52a22ef, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilHashResponse) Deref() { - if x.refc52a22ef == nil { - return - } - x.Digest = *NewFilBLSDigestRef(unsafe.Pointer(&x.refc52a22ef.digest)) -} - -// allocFilInitLogFdResponseMemory allocates memory for type C.fil_InitLogFdResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilInitLogFdResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilInitLogFdResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilInitLogFdResponseValue = unsafe.Sizeof([1]C.fil_InitLogFdResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilInitLogFdResponse) Ref() *C.fil_InitLogFdResponse { - if x == nil { - return nil - } - return x.ref3c1a0a08 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilInitLogFdResponse) Free() { - if x != nil && x.allocs3c1a0a08 != nil { - x.allocs3c1a0a08.(*cgoAllocMap).Free() - x.ref3c1a0a08 = nil - } -} - -// NewFilInitLogFdResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilInitLogFdResponseRef(ref unsafe.Pointer) *FilInitLogFdResponse { - if ref == nil { - return nil - } - obj := new(FilInitLogFdResponse) - obj.ref3c1a0a08 = (*C.fil_InitLogFdResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilInitLogFdResponse) PassRef() (*C.fil_InitLogFdResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref3c1a0a08 != nil { - return x.ref3c1a0a08, nil - } - mem3c1a0a08 := allocFilInitLogFdResponseMemory(1) - ref3c1a0a08 := (*C.fil_InitLogFdResponse)(mem3c1a0a08) - allocs3c1a0a08 := new(cgoAllocMap) - allocs3c1a0a08.Add(mem3c1a0a08) - - var cstatus_code_allocs *cgoAllocMap - ref3c1a0a08.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs3c1a0a08.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref3c1a0a08.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs3c1a0a08.Borrow(cerror_msg_allocs) - - x.ref3c1a0a08 = ref3c1a0a08 - x.allocs3c1a0a08 = allocs3c1a0a08 - return ref3c1a0a08, allocs3c1a0a08 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilInitLogFdResponse) PassValue() (C.fil_InitLogFdResponse, *cgoAllocMap) { - if x.ref3c1a0a08 != nil { - return *x.ref3c1a0a08, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilInitLogFdResponse) Deref() { - if x.ref3c1a0a08 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref3c1a0a08.status_code) - x.ErrorMsg = packPCharString(x.ref3c1a0a08.error_msg) -} - -// allocFilBLSPrivateKeyMemory allocates memory for type C.fil_BLSPrivateKey in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilBLSPrivateKeyMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPrivateKeyValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilBLSPrivateKeyValue = unsafe.Sizeof([1]C.fil_BLSPrivateKey{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilBLSPrivateKey) Ref() *C.fil_BLSPrivateKey { - if x == nil { - return nil - } - return x.ref2f77fe3a -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilBLSPrivateKey) Free() { - if x != nil && x.allocs2f77fe3a != nil { - x.allocs2f77fe3a.(*cgoAllocMap).Free() - x.ref2f77fe3a = nil - } -} - -// NewFilBLSPrivateKeyRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilBLSPrivateKeyRef(ref unsafe.Pointer) *FilBLSPrivateKey { - if ref == nil { - return nil - } - obj := new(FilBLSPrivateKey) - obj.ref2f77fe3a = (*C.fil_BLSPrivateKey)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilBLSPrivateKey) PassRef() (*C.fil_BLSPrivateKey, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref2f77fe3a != nil { - return x.ref2f77fe3a, nil - } - mem2f77fe3a := allocFilBLSPrivateKeyMemory(1) - ref2f77fe3a := (*C.fil_BLSPrivateKey)(mem2f77fe3a) - allocs2f77fe3a := new(cgoAllocMap) - allocs2f77fe3a.Add(mem2f77fe3a) - - var cinner_allocs *cgoAllocMap - ref2f77fe3a.inner, cinner_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocs2f77fe3a.Borrow(cinner_allocs) - - x.ref2f77fe3a = ref2f77fe3a - x.allocs2f77fe3a = allocs2f77fe3a - return ref2f77fe3a, allocs2f77fe3a - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilBLSPrivateKey) PassValue() (C.fil_BLSPrivateKey, *cgoAllocMap) { - if x.ref2f77fe3a != nil { - return *x.ref2f77fe3a, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilBLSPrivateKey) Deref() { - if x.ref2f77fe3a == nil { - return - } - x.Inner = *(*[32]byte)(unsafe.Pointer(&x.ref2f77fe3a.inner)) -} - -// allocFilPrivateKeyGenerateResponseMemory allocates memory for type C.fil_PrivateKeyGenerateResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateKeyGenerateResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyGenerateResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPrivateKeyGenerateResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyGenerateResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateKeyGenerateResponse) Ref() *C.fil_PrivateKeyGenerateResponse { - if x == nil { - return nil - } - return x.ref2dba09f -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateKeyGenerateResponse) Free() { - if x != nil && x.allocs2dba09f != nil { - x.allocs2dba09f.(*cgoAllocMap).Free() - x.ref2dba09f = nil - } -} - -// NewFilPrivateKeyGenerateResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateKeyGenerateResponseRef(ref unsafe.Pointer) *FilPrivateKeyGenerateResponse { - if ref == nil { - return nil - } - obj := new(FilPrivateKeyGenerateResponse) - obj.ref2dba09f = (*C.fil_PrivateKeyGenerateResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateKeyGenerateResponse) PassRef() (*C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref2dba09f != nil { - return x.ref2dba09f, nil - } - mem2dba09f := allocFilPrivateKeyGenerateResponseMemory(1) - ref2dba09f := (*C.fil_PrivateKeyGenerateResponse)(mem2dba09f) - allocs2dba09f := new(cgoAllocMap) - allocs2dba09f.Add(mem2dba09f) - - var cprivate_key_allocs *cgoAllocMap - ref2dba09f.private_key, cprivate_key_allocs = x.PrivateKey.PassValue() - allocs2dba09f.Borrow(cprivate_key_allocs) - - x.ref2dba09f = ref2dba09f - x.allocs2dba09f = allocs2dba09f - return ref2dba09f, allocs2dba09f - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateKeyGenerateResponse) PassValue() (C.fil_PrivateKeyGenerateResponse, *cgoAllocMap) { - if x.ref2dba09f != nil { - return *x.ref2dba09f, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateKeyGenerateResponse) Deref() { - if x.ref2dba09f == nil { - return - } - x.PrivateKey = *NewFilBLSPrivateKeyRef(unsafe.Pointer(&x.ref2dba09f.private_key)) -} - -// allocFilBLSPublicKeyMemory allocates memory for type C.fil_BLSPublicKey in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilBLSPublicKeyMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilBLSPublicKeyValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilBLSPublicKeyValue = unsafe.Sizeof([1]C.fil_BLSPublicKey{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilBLSPublicKey) Ref() *C.fil_BLSPublicKey { - if x == nil { - return nil - } - return x.ref6d0cab13 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilBLSPublicKey) Free() { - if x != nil && x.allocs6d0cab13 != nil { - x.allocs6d0cab13.(*cgoAllocMap).Free() - x.ref6d0cab13 = nil - } -} - -// NewFilBLSPublicKeyRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilBLSPublicKeyRef(ref unsafe.Pointer) *FilBLSPublicKey { - if ref == nil { - return nil - } - obj := new(FilBLSPublicKey) - obj.ref6d0cab13 = (*C.fil_BLSPublicKey)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilBLSPublicKey) PassRef() (*C.fil_BLSPublicKey, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref6d0cab13 != nil { - return x.ref6d0cab13, nil - } - mem6d0cab13 := allocFilBLSPublicKeyMemory(1) - ref6d0cab13 := (*C.fil_BLSPublicKey)(mem6d0cab13) - allocs6d0cab13 := new(cgoAllocMap) - allocs6d0cab13.Add(mem6d0cab13) - - var cinner_allocs *cgoAllocMap - ref6d0cab13.inner, cinner_allocs = *(*[48]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocs6d0cab13.Borrow(cinner_allocs) - - x.ref6d0cab13 = ref6d0cab13 - x.allocs6d0cab13 = allocs6d0cab13 - return ref6d0cab13, allocs6d0cab13 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilBLSPublicKey) PassValue() (C.fil_BLSPublicKey, *cgoAllocMap) { - if x.ref6d0cab13 != nil { - return *x.ref6d0cab13, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilBLSPublicKey) Deref() { - if x.ref6d0cab13 == nil { - return - } - x.Inner = *(*[48]byte)(unsafe.Pointer(&x.ref6d0cab13.inner)) -} - -// allocFilPrivateKeyPublicKeyResponseMemory allocates memory for type C.fil_PrivateKeyPublicKeyResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateKeyPublicKeyResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeyPublicKeyResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPrivateKeyPublicKeyResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeyPublicKeyResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateKeyPublicKeyResponse) Ref() *C.fil_PrivateKeyPublicKeyResponse { - if x == nil { - return nil - } - return x.refee14e59d -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateKeyPublicKeyResponse) Free() { - if x != nil && x.allocsee14e59d != nil { - x.allocsee14e59d.(*cgoAllocMap).Free() - x.refee14e59d = nil - } -} - -// NewFilPrivateKeyPublicKeyResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateKeyPublicKeyResponseRef(ref unsafe.Pointer) *FilPrivateKeyPublicKeyResponse { - if ref == nil { - return nil - } - obj := new(FilPrivateKeyPublicKeyResponse) - obj.refee14e59d = (*C.fil_PrivateKeyPublicKeyResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateKeyPublicKeyResponse) PassRef() (*C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refee14e59d != nil { - return x.refee14e59d, nil - } - memee14e59d := allocFilPrivateKeyPublicKeyResponseMemory(1) - refee14e59d := (*C.fil_PrivateKeyPublicKeyResponse)(memee14e59d) - allocsee14e59d := new(cgoAllocMap) - allocsee14e59d.Add(memee14e59d) - - var cpublic_key_allocs *cgoAllocMap - refee14e59d.public_key, cpublic_key_allocs = x.PublicKey.PassValue() - allocsee14e59d.Borrow(cpublic_key_allocs) - - x.refee14e59d = refee14e59d - x.allocsee14e59d = allocsee14e59d - return refee14e59d, allocsee14e59d - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateKeyPublicKeyResponse) PassValue() (C.fil_PrivateKeyPublicKeyResponse, *cgoAllocMap) { - if x.refee14e59d != nil { - return *x.refee14e59d, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateKeyPublicKeyResponse) Deref() { - if x.refee14e59d == nil { - return - } - x.PublicKey = *NewFilBLSPublicKeyRef(unsafe.Pointer(&x.refee14e59d.public_key)) -} - -// allocFilPrivateKeySignResponseMemory allocates memory for type C.fil_PrivateKeySignResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateKeySignResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateKeySignResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPrivateKeySignResponseValue = unsafe.Sizeof([1]C.fil_PrivateKeySignResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateKeySignResponse) Ref() *C.fil_PrivateKeySignResponse { - if x == nil { - return nil - } - return x.refcdf97b28 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateKeySignResponse) Free() { - if x != nil && x.allocscdf97b28 != nil { - x.allocscdf97b28.(*cgoAllocMap).Free() - x.refcdf97b28 = nil - } -} - -// NewFilPrivateKeySignResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateKeySignResponseRef(ref unsafe.Pointer) *FilPrivateKeySignResponse { - if ref == nil { - return nil - } - obj := new(FilPrivateKeySignResponse) - obj.refcdf97b28 = (*C.fil_PrivateKeySignResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateKeySignResponse) PassRef() (*C.fil_PrivateKeySignResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refcdf97b28 != nil { - return x.refcdf97b28, nil - } - memcdf97b28 := allocFilPrivateKeySignResponseMemory(1) - refcdf97b28 := (*C.fil_PrivateKeySignResponse)(memcdf97b28) - allocscdf97b28 := new(cgoAllocMap) - allocscdf97b28.Add(memcdf97b28) - - var csignature_allocs *cgoAllocMap - refcdf97b28.signature, csignature_allocs = x.Signature.PassValue() - allocscdf97b28.Borrow(csignature_allocs) - - x.refcdf97b28 = refcdf97b28 - x.allocscdf97b28 = allocscdf97b28 - return refcdf97b28, allocscdf97b28 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateKeySignResponse) PassValue() (C.fil_PrivateKeySignResponse, *cgoAllocMap) { - if x.refcdf97b28 != nil { - return *x.refcdf97b28, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateKeySignResponse) Deref() { - if x.refcdf97b28 == nil { - return - } - x.Signature = *NewFilBLSSignatureRef(unsafe.Pointer(&x.refcdf97b28.signature)) -} - -// allocFilSealCommitPhase1ResponseMemory allocates memory for type C.fil_SealCommitPhase1Response in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilSealCommitPhase1ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase1ResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilSealCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase1Response{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealCommitPhase1Response) Ref() *C.fil_SealCommitPhase1Response { - if x == nil { - return nil - } - return x.ref61ed8561 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilSealCommitPhase1Response) Free() { - if x != nil && x.allocs61ed8561 != nil { - x.allocs61ed8561.(*cgoAllocMap).Free() - x.ref61ed8561 = nil - } -} - -// NewFilSealCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilSealCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase1Response { - if ref == nil { - return nil - } - obj := new(FilSealCommitPhase1Response) - obj.ref61ed8561 = (*C.fil_SealCommitPhase1Response)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealCommitPhase1Response) PassRef() (*C.fil_SealCommitPhase1Response, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref61ed8561 != nil { - return x.ref61ed8561, nil - } - mem61ed8561 := allocFilSealCommitPhase1ResponseMemory(1) - ref61ed8561 := (*C.fil_SealCommitPhase1Response)(mem61ed8561) - allocs61ed8561 := new(cgoAllocMap) - allocs61ed8561.Add(mem61ed8561) - - var cstatus_code_allocs *cgoAllocMap - ref61ed8561.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs61ed8561.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref61ed8561.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs61ed8561.Borrow(cerror_msg_allocs) - - var cseal_commit_phase1_output_ptr_allocs *cgoAllocMap - ref61ed8561.seal_commit_phase1_output_ptr, cseal_commit_phase1_output_ptr_allocs = unpackPUint8TString(x.SealCommitPhase1OutputPtr) - allocs61ed8561.Borrow(cseal_commit_phase1_output_ptr_allocs) - - var cseal_commit_phase1_output_len_allocs *cgoAllocMap - ref61ed8561.seal_commit_phase1_output_len, cseal_commit_phase1_output_len_allocs = (C.size_t)(x.SealCommitPhase1OutputLen), cgoAllocsUnknown - allocs61ed8561.Borrow(cseal_commit_phase1_output_len_allocs) - - x.ref61ed8561 = ref61ed8561 - x.allocs61ed8561 = allocs61ed8561 - return ref61ed8561, allocs61ed8561 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealCommitPhase1Response) PassValue() (C.fil_SealCommitPhase1Response, *cgoAllocMap) { - if x.ref61ed8561 != nil { - return *x.ref61ed8561, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealCommitPhase1Response) Deref() { - if x.ref61ed8561 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref61ed8561.status_code) - x.ErrorMsg = packPCharString(x.ref61ed8561.error_msg) - x.SealCommitPhase1OutputPtr = packPUint8TString(x.ref61ed8561.seal_commit_phase1_output_ptr) - x.SealCommitPhase1OutputLen = (uint)(x.ref61ed8561.seal_commit_phase1_output_len) -} - -// allocFilSealCommitPhase2ResponseMemory allocates memory for type C.fil_SealCommitPhase2Response in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilSealCommitPhase2ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealCommitPhase2ResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilSealCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealCommitPhase2Response{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealCommitPhase2Response) Ref() *C.fil_SealCommitPhase2Response { - if x == nil { - return nil - } - return x.ref5860b9a4 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilSealCommitPhase2Response) Free() { - if x != nil && x.allocs5860b9a4 != nil { - x.allocs5860b9a4.(*cgoAllocMap).Free() - x.ref5860b9a4 = nil - } -} - -// NewFilSealCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilSealCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealCommitPhase2Response { - if ref == nil { - return nil - } - obj := new(FilSealCommitPhase2Response) - obj.ref5860b9a4 = (*C.fil_SealCommitPhase2Response)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealCommitPhase2Response) PassRef() (*C.fil_SealCommitPhase2Response, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref5860b9a4 != nil { - return x.ref5860b9a4, nil - } - mem5860b9a4 := allocFilSealCommitPhase2ResponseMemory(1) - ref5860b9a4 := (*C.fil_SealCommitPhase2Response)(mem5860b9a4) - allocs5860b9a4 := new(cgoAllocMap) - allocs5860b9a4.Add(mem5860b9a4) - - var cstatus_code_allocs *cgoAllocMap - ref5860b9a4.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs5860b9a4.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref5860b9a4.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs5860b9a4.Borrow(cerror_msg_allocs) - - var cproof_ptr_allocs *cgoAllocMap - ref5860b9a4.proof_ptr, cproof_ptr_allocs = unpackPUint8TString(x.ProofPtr) - allocs5860b9a4.Borrow(cproof_ptr_allocs) - - var cproof_len_allocs *cgoAllocMap - ref5860b9a4.proof_len, cproof_len_allocs = (C.size_t)(x.ProofLen), cgoAllocsUnknown - allocs5860b9a4.Borrow(cproof_len_allocs) - - x.ref5860b9a4 = ref5860b9a4 - x.allocs5860b9a4 = allocs5860b9a4 - return ref5860b9a4, allocs5860b9a4 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealCommitPhase2Response) PassValue() (C.fil_SealCommitPhase2Response, *cgoAllocMap) { - if x.ref5860b9a4 != nil { - return *x.ref5860b9a4, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealCommitPhase2Response) Deref() { - if x.ref5860b9a4 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref5860b9a4.status_code) - x.ErrorMsg = packPCharString(x.ref5860b9a4.error_msg) - x.ProofPtr = packPUint8TString(x.ref5860b9a4.proof_ptr) - x.ProofLen = (uint)(x.ref5860b9a4.proof_len) -} - -// allocFilSealPreCommitPhase1ResponseMemory allocates memory for type C.fil_SealPreCommitPhase1Response in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilSealPreCommitPhase1ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase1ResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilSealPreCommitPhase1ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase1Response{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealPreCommitPhase1Response) Ref() *C.fil_SealPreCommitPhase1Response { - if x == nil { - return nil - } - return x.ref132bbfd8 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilSealPreCommitPhase1Response) Free() { - if x != nil && x.allocs132bbfd8 != nil { - x.allocs132bbfd8.(*cgoAllocMap).Free() - x.ref132bbfd8 = nil - } -} - -// NewFilSealPreCommitPhase1ResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilSealPreCommitPhase1ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase1Response { - if ref == nil { - return nil - } - obj := new(FilSealPreCommitPhase1Response) - obj.ref132bbfd8 = (*C.fil_SealPreCommitPhase1Response)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealPreCommitPhase1Response) PassRef() (*C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref132bbfd8 != nil { - return x.ref132bbfd8, nil - } - mem132bbfd8 := allocFilSealPreCommitPhase1ResponseMemory(1) - ref132bbfd8 := (*C.fil_SealPreCommitPhase1Response)(mem132bbfd8) - allocs132bbfd8 := new(cgoAllocMap) - allocs132bbfd8.Add(mem132bbfd8) - - var cerror_msg_allocs *cgoAllocMap - ref132bbfd8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs132bbfd8.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - ref132bbfd8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs132bbfd8.Borrow(cstatus_code_allocs) - - var cseal_pre_commit_phase1_output_ptr_allocs *cgoAllocMap - ref132bbfd8.seal_pre_commit_phase1_output_ptr, cseal_pre_commit_phase1_output_ptr_allocs = unpackPUint8TString(x.SealPreCommitPhase1OutputPtr) - allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_ptr_allocs) - - var cseal_pre_commit_phase1_output_len_allocs *cgoAllocMap - ref132bbfd8.seal_pre_commit_phase1_output_len, cseal_pre_commit_phase1_output_len_allocs = (C.size_t)(x.SealPreCommitPhase1OutputLen), cgoAllocsUnknown - allocs132bbfd8.Borrow(cseal_pre_commit_phase1_output_len_allocs) - - x.ref132bbfd8 = ref132bbfd8 - x.allocs132bbfd8 = allocs132bbfd8 - return ref132bbfd8, allocs132bbfd8 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealPreCommitPhase1Response) PassValue() (C.fil_SealPreCommitPhase1Response, *cgoAllocMap) { - if x.ref132bbfd8 != nil { - return *x.ref132bbfd8, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealPreCommitPhase1Response) Deref() { - if x.ref132bbfd8 == nil { - return - } - x.ErrorMsg = packPCharString(x.ref132bbfd8.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref132bbfd8.status_code) - x.SealPreCommitPhase1OutputPtr = packPUint8TString(x.ref132bbfd8.seal_pre_commit_phase1_output_ptr) - x.SealPreCommitPhase1OutputLen = (uint)(x.ref132bbfd8.seal_pre_commit_phase1_output_len) -} - -// allocFilSealPreCommitPhase2ResponseMemory allocates memory for type C.fil_SealPreCommitPhase2Response in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilSealPreCommitPhase2ResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilSealPreCommitPhase2ResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilSealPreCommitPhase2ResponseValue = unsafe.Sizeof([1]C.fil_SealPreCommitPhase2Response{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilSealPreCommitPhase2Response) Ref() *C.fil_SealPreCommitPhase2Response { - if x == nil { - return nil - } - return x.ref2aa6831d -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilSealPreCommitPhase2Response) Free() { - if x != nil && x.allocs2aa6831d != nil { - x.allocs2aa6831d.(*cgoAllocMap).Free() - x.ref2aa6831d = nil - } -} - -// NewFilSealPreCommitPhase2ResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilSealPreCommitPhase2ResponseRef(ref unsafe.Pointer) *FilSealPreCommitPhase2Response { - if ref == nil { - return nil - } - obj := new(FilSealPreCommitPhase2Response) - obj.ref2aa6831d = (*C.fil_SealPreCommitPhase2Response)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilSealPreCommitPhase2Response) PassRef() (*C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref2aa6831d != nil { - return x.ref2aa6831d, nil - } - mem2aa6831d := allocFilSealPreCommitPhase2ResponseMemory(1) - ref2aa6831d := (*C.fil_SealPreCommitPhase2Response)(mem2aa6831d) - allocs2aa6831d := new(cgoAllocMap) - allocs2aa6831d.Add(mem2aa6831d) - - var cerror_msg_allocs *cgoAllocMap - ref2aa6831d.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs2aa6831d.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - ref2aa6831d.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs2aa6831d.Borrow(cstatus_code_allocs) - - var cregistered_proof_allocs *cgoAllocMap - ref2aa6831d.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredSealProof)(x.RegisteredProof), cgoAllocsUnknown - allocs2aa6831d.Borrow(cregistered_proof_allocs) - - var ccomm_d_allocs *cgoAllocMap - ref2aa6831d.comm_d, ccomm_d_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommD)), cgoAllocsUnknown - allocs2aa6831d.Borrow(ccomm_d_allocs) - - var ccomm_r_allocs *cgoAllocMap - ref2aa6831d.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown - allocs2aa6831d.Borrow(ccomm_r_allocs) - - x.ref2aa6831d = ref2aa6831d - x.allocs2aa6831d = allocs2aa6831d - return ref2aa6831d, allocs2aa6831d - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilSealPreCommitPhase2Response) PassValue() (C.fil_SealPreCommitPhase2Response, *cgoAllocMap) { - if x.ref2aa6831d != nil { - return *x.ref2aa6831d, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilSealPreCommitPhase2Response) Deref() { - if x.ref2aa6831d == nil { - return - } - x.ErrorMsg = packPCharString(x.ref2aa6831d.error_msg) - x.StatusCode = (FCPResponseStatus)(x.ref2aa6831d.status_code) - x.RegisteredProof = (FilRegisteredSealProof)(x.ref2aa6831d.registered_proof) - x.CommD = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_d)) - x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref2aa6831d.comm_r)) -} - -// allocFilStringResponseMemory allocates memory for type C.fil_StringResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilStringResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilStringResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilStringResponseValue = unsafe.Sizeof([1]C.fil_StringResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilStringResponse) Ref() *C.fil_StringResponse { - if x == nil { - return nil - } - return x.ref4f413043 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilStringResponse) Free() { - if x != nil && x.allocs4f413043 != nil { - x.allocs4f413043.(*cgoAllocMap).Free() - x.ref4f413043 = nil - } -} - -// NewFilStringResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilStringResponseRef(ref unsafe.Pointer) *FilStringResponse { - if ref == nil { - return nil - } - obj := new(FilStringResponse) - obj.ref4f413043 = (*C.fil_StringResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilStringResponse) PassRef() (*C.fil_StringResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref4f413043 != nil { - return x.ref4f413043, nil - } - mem4f413043 := allocFilStringResponseMemory(1) - ref4f413043 := (*C.fil_StringResponse)(mem4f413043) - allocs4f413043 := new(cgoAllocMap) - allocs4f413043.Add(mem4f413043) - - var cstatus_code_allocs *cgoAllocMap - ref4f413043.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs4f413043.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref4f413043.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs4f413043.Borrow(cerror_msg_allocs) - - var cstring_val_allocs *cgoAllocMap - ref4f413043.string_val, cstring_val_allocs = unpackPCharString(x.StringVal) - allocs4f413043.Borrow(cstring_val_allocs) - - x.ref4f413043 = ref4f413043 - x.allocs4f413043 = allocs4f413043 - return ref4f413043, allocs4f413043 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilStringResponse) PassValue() (C.fil_StringResponse, *cgoAllocMap) { - if x.ref4f413043 != nil { - return *x.ref4f413043, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilStringResponse) Deref() { - if x.ref4f413043 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref4f413043.status_code) - x.ErrorMsg = packPCharString(x.ref4f413043.error_msg) - x.StringVal = packPCharString(x.ref4f413043.string_val) -} - -// allocFilUnsealRangeResponseMemory allocates memory for type C.fil_UnsealRangeResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilUnsealRangeResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilUnsealRangeResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilUnsealRangeResponseValue = unsafe.Sizeof([1]C.fil_UnsealRangeResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilUnsealRangeResponse) Ref() *C.fil_UnsealRangeResponse { - if x == nil { - return nil - } - return x.ref61e219c9 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilUnsealRangeResponse) Free() { - if x != nil && x.allocs61e219c9 != nil { - x.allocs61e219c9.(*cgoAllocMap).Free() - x.ref61e219c9 = nil - } -} - -// NewFilUnsealRangeResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilUnsealRangeResponseRef(ref unsafe.Pointer) *FilUnsealRangeResponse { - if ref == nil { - return nil - } - obj := new(FilUnsealRangeResponse) - obj.ref61e219c9 = (*C.fil_UnsealRangeResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilUnsealRangeResponse) PassRef() (*C.fil_UnsealRangeResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref61e219c9 != nil { - return x.ref61e219c9, nil - } - mem61e219c9 := allocFilUnsealRangeResponseMemory(1) - ref61e219c9 := (*C.fil_UnsealRangeResponse)(mem61e219c9) - allocs61e219c9 := new(cgoAllocMap) - allocs61e219c9.Add(mem61e219c9) - - var cstatus_code_allocs *cgoAllocMap - ref61e219c9.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs61e219c9.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref61e219c9.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs61e219c9.Borrow(cerror_msg_allocs) - - x.ref61e219c9 = ref61e219c9 - x.allocs61e219c9 = allocs61e219c9 - return ref61e219c9, allocs61e219c9 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilUnsealRangeResponse) PassValue() (C.fil_UnsealRangeResponse, *cgoAllocMap) { - if x.ref61e219c9 != nil { - return *x.ref61e219c9, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilUnsealRangeResponse) Deref() { - if x.ref61e219c9 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref61e219c9.status_code) - x.ErrorMsg = packPCharString(x.ref61e219c9.error_msg) -} - -// allocFilVerifySealResponseMemory allocates memory for type C.fil_VerifySealResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilVerifySealResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifySealResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilVerifySealResponseValue = unsafe.Sizeof([1]C.fil_VerifySealResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifySealResponse) Ref() *C.fil_VerifySealResponse { - if x == nil { - return nil - } - return x.refd4397079 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilVerifySealResponse) Free() { - if x != nil && x.allocsd4397079 != nil { - x.allocsd4397079.(*cgoAllocMap).Free() - x.refd4397079 = nil - } -} - -// NewFilVerifySealResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilVerifySealResponseRef(ref unsafe.Pointer) *FilVerifySealResponse { - if ref == nil { - return nil - } - obj := new(FilVerifySealResponse) - obj.refd4397079 = (*C.fil_VerifySealResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifySealResponse) PassRef() (*C.fil_VerifySealResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refd4397079 != nil { - return x.refd4397079, nil - } - memd4397079 := allocFilVerifySealResponseMemory(1) - refd4397079 := (*C.fil_VerifySealResponse)(memd4397079) - allocsd4397079 := new(cgoAllocMap) - allocsd4397079.Add(memd4397079) - - var cstatus_code_allocs *cgoAllocMap - refd4397079.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsd4397079.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - refd4397079.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsd4397079.Borrow(cerror_msg_allocs) - - var cis_valid_allocs *cgoAllocMap - refd4397079.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocsd4397079.Borrow(cis_valid_allocs) - - x.refd4397079 = refd4397079 - x.allocsd4397079 = allocsd4397079 - return refd4397079, allocsd4397079 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifySealResponse) PassValue() (C.fil_VerifySealResponse, *cgoAllocMap) { - if x.refd4397079 != nil { - return *x.refd4397079, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifySealResponse) Deref() { - if x.refd4397079 == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.refd4397079.status_code) - x.ErrorMsg = packPCharString(x.refd4397079.error_msg) - x.IsValid = (bool)(x.refd4397079.is_valid) -} - -// allocFilVerifyWindowPoStResponseMemory allocates memory for type C.fil_VerifyWindowPoStResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilVerifyWindowPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWindowPoStResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilVerifyWindowPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWindowPoStResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifyWindowPoStResponse) Ref() *C.fil_VerifyWindowPoStResponse { - if x == nil { - return nil - } - return x.ref34c4d49f -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilVerifyWindowPoStResponse) Free() { - if x != nil && x.allocs34c4d49f != nil { - x.allocs34c4d49f.(*cgoAllocMap).Free() - x.ref34c4d49f = nil - } -} - -// NewFilVerifyWindowPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilVerifyWindowPoStResponseRef(ref unsafe.Pointer) *FilVerifyWindowPoStResponse { - if ref == nil { - return nil - } - obj := new(FilVerifyWindowPoStResponse) - obj.ref34c4d49f = (*C.fil_VerifyWindowPoStResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifyWindowPoStResponse) PassRef() (*C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref34c4d49f != nil { - return x.ref34c4d49f, nil - } - mem34c4d49f := allocFilVerifyWindowPoStResponseMemory(1) - ref34c4d49f := (*C.fil_VerifyWindowPoStResponse)(mem34c4d49f) - allocs34c4d49f := new(cgoAllocMap) - allocs34c4d49f.Add(mem34c4d49f) - - var cstatus_code_allocs *cgoAllocMap - ref34c4d49f.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocs34c4d49f.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - ref34c4d49f.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocs34c4d49f.Borrow(cerror_msg_allocs) - - var cis_valid_allocs *cgoAllocMap - ref34c4d49f.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocs34c4d49f.Borrow(cis_valid_allocs) - - x.ref34c4d49f = ref34c4d49f - x.allocs34c4d49f = allocs34c4d49f - return ref34c4d49f, allocs34c4d49f - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifyWindowPoStResponse) PassValue() (C.fil_VerifyWindowPoStResponse, *cgoAllocMap) { - if x.ref34c4d49f != nil { - return *x.ref34c4d49f, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifyWindowPoStResponse) Deref() { - if x.ref34c4d49f == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.ref34c4d49f.status_code) - x.ErrorMsg = packPCharString(x.ref34c4d49f.error_msg) - x.IsValid = (bool)(x.ref34c4d49f.is_valid) -} - -// allocFilVerifyWinningPoStResponseMemory allocates memory for type C.fil_VerifyWinningPoStResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilVerifyWinningPoStResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilVerifyWinningPoStResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilVerifyWinningPoStResponseValue = unsafe.Sizeof([1]C.fil_VerifyWinningPoStResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilVerifyWinningPoStResponse) Ref() *C.fil_VerifyWinningPoStResponse { - if x == nil { - return nil - } - return x.refaca6860c -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilVerifyWinningPoStResponse) Free() { - if x != nil && x.allocsaca6860c != nil { - x.allocsaca6860c.(*cgoAllocMap).Free() - x.refaca6860c = nil - } -} - -// NewFilVerifyWinningPoStResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilVerifyWinningPoStResponseRef(ref unsafe.Pointer) *FilVerifyWinningPoStResponse { - if ref == nil { - return nil - } - obj := new(FilVerifyWinningPoStResponse) - obj.refaca6860c = (*C.fil_VerifyWinningPoStResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilVerifyWinningPoStResponse) PassRef() (*C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refaca6860c != nil { - return x.refaca6860c, nil - } - memaca6860c := allocFilVerifyWinningPoStResponseMemory(1) - refaca6860c := (*C.fil_VerifyWinningPoStResponse)(memaca6860c) - allocsaca6860c := new(cgoAllocMap) - allocsaca6860c.Add(memaca6860c) - - var cstatus_code_allocs *cgoAllocMap - refaca6860c.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsaca6860c.Borrow(cstatus_code_allocs) - - var cerror_msg_allocs *cgoAllocMap - refaca6860c.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsaca6860c.Borrow(cerror_msg_allocs) - - var cis_valid_allocs *cgoAllocMap - refaca6860c.is_valid, cis_valid_allocs = (C._Bool)(x.IsValid), cgoAllocsUnknown - allocsaca6860c.Borrow(cis_valid_allocs) - - x.refaca6860c = refaca6860c - x.allocsaca6860c = allocsaca6860c - return refaca6860c, allocsaca6860c - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilVerifyWinningPoStResponse) PassValue() (C.fil_VerifyWinningPoStResponse, *cgoAllocMap) { - if x.refaca6860c != nil { - return *x.refaca6860c, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilVerifyWinningPoStResponse) Deref() { - if x.refaca6860c == nil { - return - } - x.StatusCode = (FCPResponseStatus)(x.refaca6860c.status_code) - x.ErrorMsg = packPCharString(x.refaca6860c.error_msg) - x.IsValid = (bool)(x.refaca6860c.is_valid) -} - -// allocFilWriteWithAlignmentResponseMemory allocates memory for type C.fil_WriteWithAlignmentResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilWriteWithAlignmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithAlignmentResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilWriteWithAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithAlignmentResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilWriteWithAlignmentResponse) Ref() *C.fil_WriteWithAlignmentResponse { - if x == nil { - return nil - } - return x.refa330e79 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilWriteWithAlignmentResponse) Free() { - if x != nil && x.allocsa330e79 != nil { - x.allocsa330e79.(*cgoAllocMap).Free() - x.refa330e79 = nil - } -} - -// NewFilWriteWithAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilWriteWithAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithAlignmentResponse { - if ref == nil { - return nil - } - obj := new(FilWriteWithAlignmentResponse) - obj.refa330e79 = (*C.fil_WriteWithAlignmentResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilWriteWithAlignmentResponse) PassRef() (*C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refa330e79 != nil { - return x.refa330e79, nil - } - mema330e79 := allocFilWriteWithAlignmentResponseMemory(1) - refa330e79 := (*C.fil_WriteWithAlignmentResponse)(mema330e79) - allocsa330e79 := new(cgoAllocMap) - allocsa330e79.Add(mema330e79) - - var ccomm_p_allocs *cgoAllocMap - refa330e79.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocsa330e79.Borrow(ccomm_p_allocs) - - var cerror_msg_allocs *cgoAllocMap - refa330e79.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsa330e79.Borrow(cerror_msg_allocs) - - var cleft_alignment_unpadded_allocs *cgoAllocMap - refa330e79.left_alignment_unpadded, cleft_alignment_unpadded_allocs = (C.uint64_t)(x.LeftAlignmentUnpadded), cgoAllocsUnknown - allocsa330e79.Borrow(cleft_alignment_unpadded_allocs) - - var cstatus_code_allocs *cgoAllocMap - refa330e79.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsa330e79.Borrow(cstatus_code_allocs) - - var ctotal_write_unpadded_allocs *cgoAllocMap - refa330e79.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown - allocsa330e79.Borrow(ctotal_write_unpadded_allocs) - - x.refa330e79 = refa330e79 - x.allocsa330e79 = allocsa330e79 - return refa330e79, allocsa330e79 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilWriteWithAlignmentResponse) PassValue() (C.fil_WriteWithAlignmentResponse, *cgoAllocMap) { - if x.refa330e79 != nil { - return *x.refa330e79, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilWriteWithAlignmentResponse) Deref() { - if x.refa330e79 == nil { - return - } - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refa330e79.comm_p)) - x.ErrorMsg = packPCharString(x.refa330e79.error_msg) - x.LeftAlignmentUnpadded = (uint64)(x.refa330e79.left_alignment_unpadded) - x.StatusCode = (FCPResponseStatus)(x.refa330e79.status_code) - x.TotalWriteUnpadded = (uint64)(x.refa330e79.total_write_unpadded) -} - -// allocFilWriteWithoutAlignmentResponseMemory allocates memory for type C.fil_WriteWithoutAlignmentResponse in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilWriteWithoutAlignmentResponseMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilWriteWithoutAlignmentResponseValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilWriteWithoutAlignmentResponseValue = unsafe.Sizeof([1]C.fil_WriteWithoutAlignmentResponse{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilWriteWithoutAlignmentResponse) Ref() *C.fil_WriteWithoutAlignmentResponse { - if x == nil { - return nil - } - return x.refc8e1ed8 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilWriteWithoutAlignmentResponse) Free() { - if x != nil && x.allocsc8e1ed8 != nil { - x.allocsc8e1ed8.(*cgoAllocMap).Free() - x.refc8e1ed8 = nil - } -} - -// NewFilWriteWithoutAlignmentResponseRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilWriteWithoutAlignmentResponseRef(ref unsafe.Pointer) *FilWriteWithoutAlignmentResponse { - if ref == nil { - return nil - } - obj := new(FilWriteWithoutAlignmentResponse) - obj.refc8e1ed8 = (*C.fil_WriteWithoutAlignmentResponse)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilWriteWithoutAlignmentResponse) PassRef() (*C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refc8e1ed8 != nil { - return x.refc8e1ed8, nil - } - memc8e1ed8 := allocFilWriteWithoutAlignmentResponseMemory(1) - refc8e1ed8 := (*C.fil_WriteWithoutAlignmentResponse)(memc8e1ed8) - allocsc8e1ed8 := new(cgoAllocMap) - allocsc8e1ed8.Add(memc8e1ed8) - - var ccomm_p_allocs *cgoAllocMap - refc8e1ed8.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocsc8e1ed8.Borrow(ccomm_p_allocs) - - var cerror_msg_allocs *cgoAllocMap - refc8e1ed8.error_msg, cerror_msg_allocs = unpackPCharString(x.ErrorMsg) - allocsc8e1ed8.Borrow(cerror_msg_allocs) - - var cstatus_code_allocs *cgoAllocMap - refc8e1ed8.status_code, cstatus_code_allocs = (C.FCPResponseStatus)(x.StatusCode), cgoAllocsUnknown - allocsc8e1ed8.Borrow(cstatus_code_allocs) - - var ctotal_write_unpadded_allocs *cgoAllocMap - refc8e1ed8.total_write_unpadded, ctotal_write_unpadded_allocs = (C.uint64_t)(x.TotalWriteUnpadded), cgoAllocsUnknown - allocsc8e1ed8.Borrow(ctotal_write_unpadded_allocs) - - x.refc8e1ed8 = refc8e1ed8 - x.allocsc8e1ed8 = allocsc8e1ed8 - return refc8e1ed8, allocsc8e1ed8 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilWriteWithoutAlignmentResponse) PassValue() (C.fil_WriteWithoutAlignmentResponse, *cgoAllocMap) { - if x.refc8e1ed8 != nil { - return *x.refc8e1ed8, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilWriteWithoutAlignmentResponse) Deref() { - if x.refc8e1ed8 == nil { - return - } - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refc8e1ed8.comm_p)) - x.ErrorMsg = packPCharString(x.refc8e1ed8.error_msg) - x.StatusCode = (FCPResponseStatus)(x.refc8e1ed8.status_code) - x.TotalWriteUnpadded = (uint64)(x.refc8e1ed8.total_write_unpadded) -} - -// allocFilPublicPieceInfoMemory allocates memory for type C.fil_PublicPieceInfo in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPublicPieceInfoMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicPieceInfoValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPublicPieceInfoValue = unsafe.Sizeof([1]C.fil_PublicPieceInfo{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPublicPieceInfo) Ref() *C.fil_PublicPieceInfo { - if x == nil { - return nil - } - return x.refd00025ac -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPublicPieceInfo) Free() { - if x != nil && x.allocsd00025ac != nil { - x.allocsd00025ac.(*cgoAllocMap).Free() - x.refd00025ac = nil - } -} - -// NewFilPublicPieceInfoRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPublicPieceInfoRef(ref unsafe.Pointer) *FilPublicPieceInfo { - if ref == nil { - return nil - } - obj := new(FilPublicPieceInfo) - obj.refd00025ac = (*C.fil_PublicPieceInfo)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPublicPieceInfo) PassRef() (*C.fil_PublicPieceInfo, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.refd00025ac != nil { - return x.refd00025ac, nil - } - memd00025ac := allocFilPublicPieceInfoMemory(1) - refd00025ac := (*C.fil_PublicPieceInfo)(memd00025ac) - allocsd00025ac := new(cgoAllocMap) - allocsd00025ac.Add(memd00025ac) - - var cnum_bytes_allocs *cgoAllocMap - refd00025ac.num_bytes, cnum_bytes_allocs = (C.uint64_t)(x.NumBytes), cgoAllocsUnknown - allocsd00025ac.Borrow(cnum_bytes_allocs) - - var ccomm_p_allocs *cgoAllocMap - refd00025ac.comm_p, ccomm_p_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommP)), cgoAllocsUnknown - allocsd00025ac.Borrow(ccomm_p_allocs) - - x.refd00025ac = refd00025ac - x.allocsd00025ac = allocsd00025ac - return refd00025ac, allocsd00025ac - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPublicPieceInfo) PassValue() (C.fil_PublicPieceInfo, *cgoAllocMap) { - if x.refd00025ac != nil { - return *x.refd00025ac, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPublicPieceInfo) Deref() { - if x.refd00025ac == nil { - return - } - x.NumBytes = (uint64)(x.refd00025ac.num_bytes) - x.CommP = *(*[32]byte)(unsafe.Pointer(&x.refd00025ac.comm_p)) -} - -// allocFil32ByteArrayMemory allocates memory for type C.fil_32ByteArray in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFil32ByteArrayMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFil32ByteArrayValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFil32ByteArrayValue = unsafe.Sizeof([1]C.fil_32ByteArray{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *Fil32ByteArray) Ref() *C.fil_32ByteArray { - if x == nil { - return nil - } - return x.ref373ec61a -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *Fil32ByteArray) Free() { - if x != nil && x.allocs373ec61a != nil { - x.allocs373ec61a.(*cgoAllocMap).Free() - x.ref373ec61a = nil - } -} - -// NewFil32ByteArrayRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFil32ByteArrayRef(ref unsafe.Pointer) *Fil32ByteArray { - if ref == nil { - return nil - } - obj := new(Fil32ByteArray) - obj.ref373ec61a = (*C.fil_32ByteArray)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *Fil32ByteArray) PassRef() (*C.fil_32ByteArray, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref373ec61a != nil { - return x.ref373ec61a, nil - } - mem373ec61a := allocFil32ByteArrayMemory(1) - ref373ec61a := (*C.fil_32ByteArray)(mem373ec61a) - allocs373ec61a := new(cgoAllocMap) - allocs373ec61a.Add(mem373ec61a) - - var cinner_allocs *cgoAllocMap - ref373ec61a.inner, cinner_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.Inner)), cgoAllocsUnknown - allocs373ec61a.Borrow(cinner_allocs) - - x.ref373ec61a = ref373ec61a - x.allocs373ec61a = allocs373ec61a - return ref373ec61a, allocs373ec61a - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x Fil32ByteArray) PassValue() (C.fil_32ByteArray, *cgoAllocMap) { - if x.ref373ec61a != nil { - return *x.ref373ec61a, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *Fil32ByteArray) Deref() { - if x.ref373ec61a == nil { - return - } - x.Inner = *(*[32]byte)(unsafe.Pointer(&x.ref373ec61a.inner)) -} - -// allocFilPrivateReplicaInfoMemory allocates memory for type C.fil_PrivateReplicaInfo in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPrivateReplicaInfoMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPrivateReplicaInfoValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPrivateReplicaInfoValue = unsafe.Sizeof([1]C.fil_PrivateReplicaInfo{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPrivateReplicaInfo) Ref() *C.fil_PrivateReplicaInfo { - if x == nil { - return nil - } - return x.ref81a31e9b -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPrivateReplicaInfo) Free() { - if x != nil && x.allocs81a31e9b != nil { - x.allocs81a31e9b.(*cgoAllocMap).Free() - x.ref81a31e9b = nil - } -} - -// NewFilPrivateReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPrivateReplicaInfoRef(ref unsafe.Pointer) *FilPrivateReplicaInfo { - if ref == nil { - return nil - } - obj := new(FilPrivateReplicaInfo) - obj.ref81a31e9b = (*C.fil_PrivateReplicaInfo)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPrivateReplicaInfo) PassRef() (*C.fil_PrivateReplicaInfo, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref81a31e9b != nil { - return x.ref81a31e9b, nil - } - mem81a31e9b := allocFilPrivateReplicaInfoMemory(1) - ref81a31e9b := (*C.fil_PrivateReplicaInfo)(mem81a31e9b) - allocs81a31e9b := new(cgoAllocMap) - allocs81a31e9b.Add(mem81a31e9b) - - var cregistered_proof_allocs *cgoAllocMap - ref81a31e9b.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown - allocs81a31e9b.Borrow(cregistered_proof_allocs) - - var ccache_dir_path_allocs *cgoAllocMap - ref81a31e9b.cache_dir_path, ccache_dir_path_allocs = unpackPCharString(x.CacheDirPath) - allocs81a31e9b.Borrow(ccache_dir_path_allocs) - - var ccomm_r_allocs *cgoAllocMap - ref81a31e9b.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown - allocs81a31e9b.Borrow(ccomm_r_allocs) - - var creplica_path_allocs *cgoAllocMap - ref81a31e9b.replica_path, creplica_path_allocs = unpackPCharString(x.ReplicaPath) - allocs81a31e9b.Borrow(creplica_path_allocs) - - var csector_id_allocs *cgoAllocMap - ref81a31e9b.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown - allocs81a31e9b.Borrow(csector_id_allocs) - - x.ref81a31e9b = ref81a31e9b - x.allocs81a31e9b = allocs81a31e9b - return ref81a31e9b, allocs81a31e9b - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPrivateReplicaInfo) PassValue() (C.fil_PrivateReplicaInfo, *cgoAllocMap) { - if x.ref81a31e9b != nil { - return *x.ref81a31e9b, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPrivateReplicaInfo) Deref() { - if x.ref81a31e9b == nil { - return - } - x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81a31e9b.registered_proof) - x.CacheDirPath = packPCharString(x.ref81a31e9b.cache_dir_path) - x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81a31e9b.comm_r)) - x.ReplicaPath = packPCharString(x.ref81a31e9b.replica_path) - x.SectorId = (uint64)(x.ref81a31e9b.sector_id) -} - -// allocFilPublicReplicaInfoMemory allocates memory for type C.fil_PublicReplicaInfo in C. -// The caller is responsible for freeing the this memory via C.free. -func allocFilPublicReplicaInfoMemory(n int) unsafe.Pointer { - mem, err := C.calloc(C.size_t(n), (C.size_t)(sizeOfFilPublicReplicaInfoValue)) - if mem == nil { - panic(fmt.Sprintln("memory alloc error: ", err)) - } - return mem -} - -const sizeOfFilPublicReplicaInfoValue = unsafe.Sizeof([1]C.fil_PublicReplicaInfo{}) - -// Ref returns the underlying reference to C object or nil if struct is nil. -func (x *FilPublicReplicaInfo) Ref() *C.fil_PublicReplicaInfo { - if x == nil { - return nil - } - return x.ref81b617c2 -} - -// Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. -// Does nothing if struct is nil or has no allocation map. -func (x *FilPublicReplicaInfo) Free() { - if x != nil && x.allocs81b617c2 != nil { - x.allocs81b617c2.(*cgoAllocMap).Free() - x.ref81b617c2 = nil - } -} - -// NewFilPublicReplicaInfoRef creates a new wrapper struct with underlying reference set to the original C object. -// Returns nil if the provided pointer to C object is nil too. -func NewFilPublicReplicaInfoRef(ref unsafe.Pointer) *FilPublicReplicaInfo { - if ref == nil { - return nil - } - obj := new(FilPublicReplicaInfo) - obj.ref81b617c2 = (*C.fil_PublicReplicaInfo)(unsafe.Pointer(ref)) - return obj -} - -// PassRef returns the underlying C object, otherwise it will allocate one and set its values -// from this wrapping struct, counting allocations into an allocation map. -func (x *FilPublicReplicaInfo) PassRef() (*C.fil_PublicReplicaInfo, *cgoAllocMap) { - if x == nil { - return nil, nil - } else if x.ref81b617c2 != nil { - return x.ref81b617c2, nil - } - mem81b617c2 := allocFilPublicReplicaInfoMemory(1) - ref81b617c2 := (*C.fil_PublicReplicaInfo)(mem81b617c2) - allocs81b617c2 := new(cgoAllocMap) - allocs81b617c2.Add(mem81b617c2) - - var cregistered_proof_allocs *cgoAllocMap - ref81b617c2.registered_proof, cregistered_proof_allocs = (C.fil_RegisteredPoStProof)(x.RegisteredProof), cgoAllocsUnknown - allocs81b617c2.Borrow(cregistered_proof_allocs) - - var ccomm_r_allocs *cgoAllocMap - ref81b617c2.comm_r, ccomm_r_allocs = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)), cgoAllocsUnknown - allocs81b617c2.Borrow(ccomm_r_allocs) - - var csector_id_allocs *cgoAllocMap - ref81b617c2.sector_id, csector_id_allocs = (C.uint64_t)(x.SectorId), cgoAllocsUnknown - allocs81b617c2.Borrow(csector_id_allocs) - - x.ref81b617c2 = ref81b617c2 - x.allocs81b617c2 = allocs81b617c2 - return ref81b617c2, allocs81b617c2 - -} - -// PassValue does the same as PassRef except that it will try to dereference the returned pointer. -func (x FilPublicReplicaInfo) PassValue() (C.fil_PublicReplicaInfo, *cgoAllocMap) { - if x.ref81b617c2 != nil { - return *x.ref81b617c2, nil - } - ref, allocs := x.PassRef() - return *ref, allocs -} - -// Deref uses the underlying reference to C object and fills the wrapping struct with values. -// Do not forget to call this method whether you get a struct for C object and want to read its values. -func (x *FilPublicReplicaInfo) Deref() { - if x.ref81b617c2 == nil { - return - } - x.RegisteredProof = (FilRegisteredPoStProof)(x.ref81b617c2.registered_proof) - x.CommR = *(*[32]byte)(unsafe.Pointer(&x.ref81b617c2.comm_r)) - x.SectorId = (uint64)(x.ref81b617c2.sector_id) -} - -// unpackArgSFilPublicPieceInfo transforms a sliced Go data structure into plain C format. -func unpackArgSFilPublicPieceInfo(x []FilPublicPieceInfo) (unpacked *C.fil_PublicPieceInfo, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocFilPublicPieceInfoMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_PublicPieceInfo)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PublicPieceInfo)(h.Data) - return -} - -// packSFilPublicPieceInfo reads sliced Go data structure out from plain C format. -func packSFilPublicPieceInfo(v []FilPublicPieceInfo, ptr0 *C.fil_PublicPieceInfo) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPublicPieceInfoValue]C.fil_PublicPieceInfo)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPublicPieceInfoRef(unsafe.Pointer(&ptr1)) - } -} - -// unpackArgSFilPrivateReplicaInfo transforms a sliced Go data structure into plain C format. -func unpackArgSFilPrivateReplicaInfo(x []FilPrivateReplicaInfo) (unpacked *C.fil_PrivateReplicaInfo, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocFilPrivateReplicaInfoMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_PrivateReplicaInfo)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PrivateReplicaInfo)(h.Data) - return -} - -// packSFilPrivateReplicaInfo reads sliced Go data structure out from plain C format. -func packSFilPrivateReplicaInfo(v []FilPrivateReplicaInfo, ptr0 *C.fil_PrivateReplicaInfo) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPrivateReplicaInfoValue]C.fil_PrivateReplicaInfo)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPrivateReplicaInfoRef(unsafe.Pointer(&ptr1)) - } -} - -// unpackArgSFilPublicReplicaInfo transforms a sliced Go data structure into plain C format. -func unpackArgSFilPublicReplicaInfo(x []FilPublicReplicaInfo) (unpacked *C.fil_PublicReplicaInfo, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocFilPublicReplicaInfoMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_PublicReplicaInfo)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PublicReplicaInfo)(h.Data) - return -} - -// packSFilPublicReplicaInfo reads sliced Go data structure out from plain C format. -func packSFilPublicReplicaInfo(v []FilPublicReplicaInfo, ptr0 *C.fil_PublicReplicaInfo) { - const m = 0x7fffffff - for i0 := range v { - ptr1 := (*(*[m / sizeOfFilPublicReplicaInfoValue]C.fil_PublicReplicaInfo)(unsafe.Pointer(ptr0)))[i0] - v[i0] = *NewFilPublicReplicaInfoRef(unsafe.Pointer(&ptr1)) - } -} - -// unpackArgSFilPoStProof transforms a sliced Go data structure into plain C format. -func unpackArgSFilPoStProof(x []FilPoStProof) (unpacked *C.fil_PoStProof, allocs *cgoAllocMap) { - if x == nil { - return nil, nil - } - allocs = new(cgoAllocMap) - defer runtime.SetFinalizer(allocs, func(a *cgoAllocMap) { - go a.Free() - }) - - len0 := len(x) - mem0 := allocFilPoStProofMemory(len0) - allocs.Add(mem0) - h0 := &sliceHeader{ - Data: mem0, - Cap: len0, - Len: len0, - } - v0 := *(*[]C.fil_PoStProof)(unsafe.Pointer(h0)) - for i0 := range x { - allocs0 := new(cgoAllocMap) - v0[i0], allocs0 = x[i0].PassValue() - allocs.Borrow(allocs0) - } - h := (*sliceHeader)(unsafe.Pointer(&v0)) - unpacked = (*C.fil_PoStProof)(h.Data) - return -} diff --git a/chain/filecoin/filecoin-ffi/generated/cgo_helpers.h b/chain/filecoin/filecoin-ffi/generated/cgo_helpers.h deleted file mode 100644 index 952ed279..00000000 --- a/chain/filecoin/filecoin-ffi/generated/cgo_helpers.h +++ /dev/null @@ -1,9 +0,0 @@ -// WARNING: This file has automatically been generated -// Code generated by https://git.io/c-for-go. DO NOT EDIT. - -#include "../filcrypto.h" -#include -#pragma once - -#define __CGOGEN 1 - diff --git a/chain/filecoin/filecoin-ffi/generated/const.go b/chain/filecoin/filecoin-ffi/generated/const.go deleted file mode 100644 index 181aea88..00000000 --- a/chain/filecoin/filecoin-ffi/generated/const.go +++ /dev/null @@ -1,53 +0,0 @@ -// WARNING: This file has automatically been generated -// Code generated by https://git.io/c-for-go. DO NOT EDIT. - -package generated - -/* -#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto -#cgo pkg-config: ${SRCDIR}/../filcrypto.pc -#include "../filcrypto.h" -#include -#include "cgo_helpers.h" -*/ -import "C" - -// FCPResponseStatus as declared in filecoin-ffi/filcrypto.h:31 -type FCPResponseStatus int32 - -// FCPResponseStatus enumeration from filecoin-ffi/filcrypto.h:31 -const ( - FCPResponseStatusFCPNoError FCPResponseStatus = C.FCPResponseStatus_FCPNoError - FCPResponseStatusFCPUnclassifiedError FCPResponseStatus = C.FCPResponseStatus_FCPUnclassifiedError - FCPResponseStatusFCPCallerError FCPResponseStatus = C.FCPResponseStatus_FCPCallerError - FCPResponseStatusFCPReceiverError FCPResponseStatus = C.FCPResponseStatus_FCPReceiverError -) - -// FilRegisteredPoStProof as declared in filecoin-ffi/filcrypto.h:44 -type FilRegisteredPoStProof int32 - -// FilRegisteredPoStProof enumeration from filecoin-ffi/filcrypto.h:44 -const ( - FilRegisteredPoStProofStackedDrgWinning2KiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning2KiBV1 - FilRegisteredPoStProofStackedDrgWinning8MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning8MiBV1 - FilRegisteredPoStProofStackedDrgWinning512MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning512MiBV1 - FilRegisteredPoStProofStackedDrgWinning32GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning32GiBV1 - FilRegisteredPoStProofStackedDrgWinning64GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWinning64GiBV1 - FilRegisteredPoStProofStackedDrgWindow2KiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow2KiBV1 - FilRegisteredPoStProofStackedDrgWindow8MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow8MiBV1 - FilRegisteredPoStProofStackedDrgWindow512MiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow512MiBV1 - FilRegisteredPoStProofStackedDrgWindow32GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow32GiBV1 - FilRegisteredPoStProofStackedDrgWindow64GiBV1 FilRegisteredPoStProof = C.fil_RegisteredPoStProof_StackedDrgWindow64GiBV1 -) - -// FilRegisteredSealProof as declared in filecoin-ffi/filcrypto.h:52 -type FilRegisteredSealProof int32 - -// FilRegisteredSealProof enumeration from filecoin-ffi/filcrypto.h:52 -const ( - FilRegisteredSealProofStackedDrg2KiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg2KiBV1 - FilRegisteredSealProofStackedDrg8MiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg8MiBV1 - FilRegisteredSealProofStackedDrg512MiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg512MiBV1 - FilRegisteredSealProofStackedDrg32GiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg32GiBV1 - FilRegisteredSealProofStackedDrg64GiBV1 FilRegisteredSealProof = C.fil_RegisteredSealProof_StackedDrg64GiBV1 -) diff --git a/chain/filecoin/filecoin-ffi/generated/customallocs.go b/chain/filecoin/filecoin-ffi/generated/customallocs.go deleted file mode 100644 index 4c8d10dd..00000000 --- a/chain/filecoin/filecoin-ffi/generated/customallocs.go +++ /dev/null @@ -1,54 +0,0 @@ -package generated - -/* -#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto -#cgo pkg-config: ${SRCDIR}/../filcrypto.pc -#include "../filcrypto.h" -#include -#include "cgo_helpers.h" -*/ -import "C" -import ( - "unsafe" -) - -// AllocateProxy allocates a FilPrivateReplicaInfo proxy object in the C heap, -// returning a function which, when called, frees the allocated memory. This -// method exists because the default c-for-go allocation strategy allocates a -// C struct with a field whose values is a pointer into the Go heap, which is -// not permitted by the most strict CGO check (cgocheck=2). -func (x *FilPrivateReplicaInfo) AllocateProxy() func() { - mem := allocFilPrivateReplicaInfoMemory(1) - proxy := (*C.fil_PrivateReplicaInfo)(mem) - proxy.cache_dir_path = C.CString(x.CacheDirPath) - proxy.comm_r = *(*[32]C.uint8_t)(unsafe.Pointer(&x.CommR)) - proxy.registered_proof = (C.fil_RegisteredPoStProof)(x.RegisteredProof) - proxy.replica_path = C.CString(x.ReplicaPath) - proxy.sector_id = (C.uint64_t)(x.SectorId) - - x.ref81a31e9b = proxy - - return func() { - C.free(unsafe.Pointer(proxy.cache_dir_path)) - C.free(unsafe.Pointer(proxy.replica_path)) - C.free(unsafe.Pointer(proxy)) - } -} - -// AllocateProxy allocates a FilPoStProof proxy object in the C heap, -// returning a function which, when called, frees the allocated memory. -func (x *FilPoStProof) AllocateProxy() func() { - mem := allocFilPoStProofMemory(1) - proxy := (*C.fil_PoStProof)(mem) - - proxy.registered_proof = (C.fil_RegisteredPoStProof)(x.RegisteredProof) - proxy.proof_len = (C.size_t)(x.ProofLen) - proxy.proof_ptr = (*C.uchar)(unsafe.Pointer(C.CString(x.ProofPtr))) - - x.ref3451bfa = proxy - - return func() { - C.free(unsafe.Pointer(proxy.proof_ptr)) - C.free(unsafe.Pointer(proxy)) - } -} diff --git a/chain/filecoin/filecoin-ffi/generated/generated.go b/chain/filecoin/filecoin-ffi/generated/generated.go deleted file mode 100644 index 18f4f36e..00000000 --- a/chain/filecoin/filecoin-ffi/generated/generated.go +++ /dev/null @@ -1,809 +0,0 @@ -// WARNING: This file has automatically been generated -// Code generated by https://git.io/c-for-go. DO NOT EDIT. - -package generated - -/* -#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto -#cgo pkg-config: ${SRCDIR}/../filcrypto.pc -#include "../filcrypto.h" -#include -#include "cgo_helpers.h" -*/ -import "C" -import ( - "runtime" - "unsafe" -) - -// FilAggregate function as declared in filecoin-ffi/filcrypto.h:287 -func FilAggregate(flattenedSignaturesPtr string, flattenedSignaturesLen uint) *FilAggregateResponse { - flattenedSignaturesPtr = safeString(flattenedSignaturesPtr) - cflattenedSignaturesPtr, cflattenedSignaturesPtrAllocMap := unpackPUint8TString(flattenedSignaturesPtr) - cflattenedSignaturesLen, cflattenedSignaturesLenAllocMap := (C.size_t)(flattenedSignaturesLen), cgoAllocsUnknown - __ret := C.fil_aggregate(cflattenedSignaturesPtr, cflattenedSignaturesLen) - runtime.KeepAlive(cflattenedSignaturesLenAllocMap) - runtime.KeepAlive(flattenedSignaturesPtr) - runtime.KeepAlive(cflattenedSignaturesPtrAllocMap) - __v := NewFilAggregateResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilClearCache function as declared in filecoin-ffi/filcrypto.h:290 -func FilClearCache(sectorSize uint64, cacheDirPath string) *FilClearCacheResponse { - csectorSize, csectorSizeAllocMap := (C.uint64_t)(sectorSize), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - __ret := C.fil_clear_cache(csectorSize, ccacheDirPath) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(csectorSizeAllocMap) - __v := NewFilClearCacheResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilDestroyAggregateResponse function as declared in filecoin-ffi/filcrypto.h:292 -func FilDestroyAggregateResponse(ptr *FilAggregateResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_aggregate_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyClearCacheResponse function as declared in filecoin-ffi/filcrypto.h:294 -func FilDestroyClearCacheResponse(ptr *FilClearCacheResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_clear_cache_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyFauxrepResponse function as declared in filecoin-ffi/filcrypto.h:296 -func FilDestroyFauxrepResponse(ptr *FilFauxRepResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_fauxrep_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyFinalizeTicketResponse function as declared in filecoin-ffi/filcrypto.h:298 -func FilDestroyFinalizeTicketResponse(ptr *FilFinalizeTicketResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_finalize_ticket_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyGenerateDataCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:300 -func FilDestroyGenerateDataCommitmentResponse(ptr *FilGenerateDataCommitmentResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_data_commitment_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyGeneratePieceCommitmentResponse function as declared in filecoin-ffi/filcrypto.h:302 -func FilDestroyGeneratePieceCommitmentResponse(ptr *FilGeneratePieceCommitmentResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_piece_commitment_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyGenerateWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:304 -func FilDestroyGenerateWindowPostResponse(ptr *FilGenerateWindowPoStResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_window_post_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyGenerateWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:306 -func FilDestroyGenerateWinningPostResponse(ptr *FilGenerateWinningPoStResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_winning_post_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:308 -func FilDestroyGenerateWinningPostSectorChallenge(ptr *FilGenerateWinningPoStSectorChallenge) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_generate_winning_post_sector_challenge(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyGpuDeviceResponse function as declared in filecoin-ffi/filcrypto.h:310 -func FilDestroyGpuDeviceResponse(ptr *FilGpuDeviceResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_gpu_device_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyHashResponse function as declared in filecoin-ffi/filcrypto.h:312 -func FilDestroyHashResponse(ptr *FilHashResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_hash_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyInitLogFdResponse function as declared in filecoin-ffi/filcrypto.h:314 -func FilDestroyInitLogFdResponse(ptr *FilInitLogFdResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_init_log_fd_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyPrivateKeyGenerateResponse function as declared in filecoin-ffi/filcrypto.h:316 -func FilDestroyPrivateKeyGenerateResponse(ptr *FilPrivateKeyGenerateResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_private_key_generate_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyPrivateKeyPublicKeyResponse function as declared in filecoin-ffi/filcrypto.h:318 -func FilDestroyPrivateKeyPublicKeyResponse(ptr *FilPrivateKeyPublicKeyResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_private_key_public_key_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyPrivateKeySignResponse function as declared in filecoin-ffi/filcrypto.h:320 -func FilDestroyPrivateKeySignResponse(ptr *FilPrivateKeySignResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_private_key_sign_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:322 -func FilDestroySealCommitPhase1Response(ptr *FilSealCommitPhase1Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_commit_phase1_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:324 -func FilDestroySealCommitPhase2Response(ptr *FilSealCommitPhase2Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_commit_phase2_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealPreCommitPhase1Response function as declared in filecoin-ffi/filcrypto.h:326 -func FilDestroySealPreCommitPhase1Response(ptr *FilSealPreCommitPhase1Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_pre_commit_phase1_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroySealPreCommitPhase2Response function as declared in filecoin-ffi/filcrypto.h:328 -func FilDestroySealPreCommitPhase2Response(ptr *FilSealPreCommitPhase2Response) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_seal_pre_commit_phase2_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyStringResponse function as declared in filecoin-ffi/filcrypto.h:330 -func FilDestroyStringResponse(ptr *FilStringResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_string_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyUnsealRangeResponse function as declared in filecoin-ffi/filcrypto.h:332 -func FilDestroyUnsealRangeResponse(ptr *FilUnsealRangeResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_unseal_range_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifySealResponse function as declared in filecoin-ffi/filcrypto.h:338 -func FilDestroyVerifySealResponse(ptr *FilVerifySealResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_seal_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifyWindowPostResponse function as declared in filecoin-ffi/filcrypto.h:340 -func FilDestroyVerifyWindowPostResponse(ptr *FilVerifyWindowPoStResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_window_post_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyVerifyWinningPostResponse function as declared in filecoin-ffi/filcrypto.h:346 -func FilDestroyVerifyWinningPostResponse(ptr *FilVerifyWinningPoStResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_verify_winning_post_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyWriteWithAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:348 -func FilDestroyWriteWithAlignmentResponse(ptr *FilWriteWithAlignmentResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_write_with_alignment_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilDestroyWriteWithoutAlignmentResponse function as declared in filecoin-ffi/filcrypto.h:350 -func FilDestroyWriteWithoutAlignmentResponse(ptr *FilWriteWithoutAlignmentResponse) { - cptr, cptrAllocMap := ptr.PassRef() - C.fil_destroy_write_without_alignment_response(cptr) - runtime.KeepAlive(cptrAllocMap) -} - -// FilFauxrep function as declared in filecoin-ffi/filcrypto.h:352 -func FilFauxrep(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorPath string) *FilFauxRepResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - sealedSectorPath = safeString(sealedSectorPath) - csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) - __ret := C.fil_fauxrep(cregisteredProof, ccacheDirPath, csealedSectorPath) - runtime.KeepAlive(sealedSectorPath) - runtime.KeepAlive(csealedSectorPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilFauxrep2 function as declared in filecoin-ffi/filcrypto.h:356 -func FilFauxrep2(registeredProof FilRegisteredSealProof, cacheDirPath string, existingPAuxPath string) *FilFauxRepResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - existingPAuxPath = safeString(existingPAuxPath) - cexistingPAuxPath, cexistingPAuxPathAllocMap := unpackPCharString(existingPAuxPath) - __ret := C.fil_fauxrep2(cregisteredProof, ccacheDirPath, cexistingPAuxPath) - runtime.KeepAlive(existingPAuxPath) - runtime.KeepAlive(cexistingPAuxPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilFauxRepResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGenerateDataCommitment function as declared in filecoin-ffi/filcrypto.h:363 -func FilGenerateDataCommitment(registeredProof FilRegisteredSealProof, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilGenerateDataCommitmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) - cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown - __ret := C.fil_generate_data_commitment(cregisteredProof, cpiecesPtr, cpiecesLen) - runtime.KeepAlive(cpiecesLenAllocMap) - packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) - runtime.KeepAlive(cpiecesPtrAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGenerateDataCommitmentResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGeneratePieceCommitment function as declared in filecoin-ffi/filcrypto.h:371 -func FilGeneratePieceCommitment(registeredProof FilRegisteredSealProof, pieceFdRaw int32, unpaddedPieceSize uint64) *FilGeneratePieceCommitmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cpieceFdRaw, cpieceFdRawAllocMap := (C.int)(pieceFdRaw), cgoAllocsUnknown - cunpaddedPieceSize, cunpaddedPieceSizeAllocMap := (C.uint64_t)(unpaddedPieceSize), cgoAllocsUnknown - __ret := C.fil_generate_piece_commitment(cregisteredProof, cpieceFdRaw, cunpaddedPieceSize) - runtime.KeepAlive(cunpaddedPieceSizeAllocMap) - runtime.KeepAlive(cpieceFdRawAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGeneratePieceCommitmentResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGenerateWindowPost function as declared in filecoin-ffi/filcrypto.h:379 -func FilGenerateWindowPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWindowPoStResponse { - crandomness, crandomnessAllocMap := randomness.PassValue() - creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr) - creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_generate_window_post(crandomness, creplicasPtr, creplicasLen, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(creplicasLenAllocMap) - packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr) - runtime.KeepAlive(creplicasPtrAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilGenerateWindowPoStResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGenerateWinningPost function as declared in filecoin-ffi/filcrypto.h:388 -func FilGenerateWinningPost(randomness Fil32ByteArray, replicasPtr []FilPrivateReplicaInfo, replicasLen uint, proverId Fil32ByteArray) *FilGenerateWinningPoStResponse { - crandomness, crandomnessAllocMap := randomness.PassValue() - creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPrivateReplicaInfo(replicasPtr) - creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_generate_winning_post(crandomness, creplicasPtr, creplicasLen, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(creplicasLenAllocMap) - packSFilPrivateReplicaInfo(replicasPtr, creplicasPtr) - runtime.KeepAlive(creplicasPtrAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilGenerateWinningPoStResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGenerateWinningPostSectorChallenge function as declared in filecoin-ffi/filcrypto.h:397 -func FilGenerateWinningPostSectorChallenge(registeredProof FilRegisteredPoStProof, randomness Fil32ByteArray, sectorSetLen uint64, proverId Fil32ByteArray) *FilGenerateWinningPoStSectorChallenge { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - crandomness, crandomnessAllocMap := randomness.PassValue() - csectorSetLen, csectorSetLenAllocMap := (C.uint64_t)(sectorSetLen), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_generate_winning_post_sector_challenge(cregisteredProof, crandomness, csectorSetLen, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorSetLenAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilGenerateWinningPoStSectorChallengeRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetGpuDevices function as declared in filecoin-ffi/filcrypto.h:405 -func FilGetGpuDevices() *FilGpuDeviceResponse { - __ret := C.fil_get_gpu_devices() - __v := NewFilGpuDeviceResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetMaxUserBytesPerStagedSector function as declared in filecoin-ffi/filcrypto.h:411 -func FilGetMaxUserBytesPerStagedSector(registeredProof FilRegisteredSealProof) uint64 { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_max_user_bytes_per_staged_sector(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := (uint64)(__ret) - return __v -} - -// FilGetPostCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:417 -func FilGetPostCircuitIdentifier(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_circuit_identifier(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetPostParamsCid function as declared in filecoin-ffi/filcrypto.h:423 -func FilGetPostParamsCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_params_cid(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetPostParamsPath function as declared in filecoin-ffi/filcrypto.h:430 -func FilGetPostParamsPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_params_path(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetPostVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:436 -func FilGetPostVerifyingKeyCid(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_verifying_key_cid(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetPostVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:443 -func FilGetPostVerifyingKeyPath(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_verifying_key_path(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetPostVersion function as declared in filecoin-ffi/filcrypto.h:449 -func FilGetPostVersion(registeredProof FilRegisteredPoStProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredPoStProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_post_version(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetSealCircuitIdentifier function as declared in filecoin-ffi/filcrypto.h:455 -func FilGetSealCircuitIdentifier(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_circuit_identifier(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetSealParamsCid function as declared in filecoin-ffi/filcrypto.h:461 -func FilGetSealParamsCid(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_params_cid(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetSealParamsPath function as declared in filecoin-ffi/filcrypto.h:468 -func FilGetSealParamsPath(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_params_path(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetSealVerifyingKeyCid function as declared in filecoin-ffi/filcrypto.h:474 -func FilGetSealVerifyingKeyCid(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_verifying_key_cid(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetSealVerifyingKeyPath function as declared in filecoin-ffi/filcrypto.h:481 -func FilGetSealVerifyingKeyPath(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_verifying_key_path(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilGetSealVersion function as declared in filecoin-ffi/filcrypto.h:487 -func FilGetSealVersion(registeredProof FilRegisteredSealProof) *FilStringResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - __ret := C.fil_get_seal_version(cregisteredProof) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilStringResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilHash function as declared in filecoin-ffi/filcrypto.h:497 -func FilHash(messagePtr string, messageLen uint) *FilHashResponse { - messagePtr = safeString(messagePtr) - cmessagePtr, cmessagePtrAllocMap := unpackPUint8TString(messagePtr) - cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown - __ret := C.fil_hash(cmessagePtr, cmessageLen) - runtime.KeepAlive(cmessageLenAllocMap) - runtime.KeepAlive(messagePtr) - runtime.KeepAlive(cmessagePtrAllocMap) - __v := NewFilHashResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilHashVerify function as declared in filecoin-ffi/filcrypto.h:511 -func FilHashVerify(signaturePtr string, flattenedMessagesPtr string, flattenedMessagesLen uint, messageSizesPtr []uint, messageSizesLen uint, flattenedPublicKeysPtr string, flattenedPublicKeysLen uint) int32 { - signaturePtr = safeString(signaturePtr) - csignaturePtr, csignaturePtrAllocMap := unpackPUint8TString(signaturePtr) - flattenedMessagesPtr = safeString(flattenedMessagesPtr) - cflattenedMessagesPtr, cflattenedMessagesPtrAllocMap := unpackPUint8TString(flattenedMessagesPtr) - cflattenedMessagesLen, cflattenedMessagesLenAllocMap := (C.size_t)(flattenedMessagesLen), cgoAllocsUnknown - cmessageSizesPtr, cmessageSizesPtrAllocMap := (*C.size_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&messageSizesPtr)).Data)), cgoAllocsUnknown - cmessageSizesLen, cmessageSizesLenAllocMap := (C.size_t)(messageSizesLen), cgoAllocsUnknown - flattenedPublicKeysPtr = safeString(flattenedPublicKeysPtr) - cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := unpackPUint8TString(flattenedPublicKeysPtr) - cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown - __ret := C.fil_hash_verify(csignaturePtr, cflattenedMessagesPtr, cflattenedMessagesLen, cmessageSizesPtr, cmessageSizesLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) - runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) - runtime.KeepAlive(flattenedPublicKeysPtr) - runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) - runtime.KeepAlive(cmessageSizesLenAllocMap) - runtime.KeepAlive(cmessageSizesPtrAllocMap) - runtime.KeepAlive(cflattenedMessagesLenAllocMap) - runtime.KeepAlive(flattenedMessagesPtr) - runtime.KeepAlive(cflattenedMessagesPtrAllocMap) - runtime.KeepAlive(signaturePtr) - runtime.KeepAlive(csignaturePtrAllocMap) - __v := (int32)(__ret) - return __v -} - -// FilInitLogFd function as declared in filecoin-ffi/filcrypto.h:528 -func FilInitLogFd(logFd int32) *FilInitLogFdResponse { - clogFd, clogFdAllocMap := (C.int)(logFd), cgoAllocsUnknown - __ret := C.fil_init_log_fd(clogFd) - runtime.KeepAlive(clogFdAllocMap) - __v := NewFilInitLogFdResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilPrivateKeyGenerate function as declared in filecoin-ffi/filcrypto.h:533 -func FilPrivateKeyGenerate() *FilPrivateKeyGenerateResponse { - __ret := C.fil_private_key_generate() - __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilPrivateKeyGenerateWithSeed function as declared in filecoin-ffi/filcrypto.h:546 -func FilPrivateKeyGenerateWithSeed(rawSeed Fil32ByteArray) *FilPrivateKeyGenerateResponse { - crawSeed, crawSeedAllocMap := rawSeed.PassValue() - __ret := C.fil_private_key_generate_with_seed(crawSeed) - runtime.KeepAlive(crawSeedAllocMap) - __v := NewFilPrivateKeyGenerateResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilPrivateKeyPublicKey function as declared in filecoin-ffi/filcrypto.h:557 -func FilPrivateKeyPublicKey(rawPrivateKeyPtr string) *FilPrivateKeyPublicKeyResponse { - rawPrivateKeyPtr = safeString(rawPrivateKeyPtr) - crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := unpackPUint8TString(rawPrivateKeyPtr) - __ret := C.fil_private_key_public_key(crawPrivateKeyPtr) - runtime.KeepAlive(rawPrivateKeyPtr) - runtime.KeepAlive(crawPrivateKeyPtrAllocMap) - __v := NewFilPrivateKeyPublicKeyResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilPrivateKeySign function as declared in filecoin-ffi/filcrypto.h:570 -func FilPrivateKeySign(rawPrivateKeyPtr string, messagePtr string, messageLen uint) *FilPrivateKeySignResponse { - rawPrivateKeyPtr = safeString(rawPrivateKeyPtr) - crawPrivateKeyPtr, crawPrivateKeyPtrAllocMap := unpackPUint8TString(rawPrivateKeyPtr) - messagePtr = safeString(messagePtr) - cmessagePtr, cmessagePtrAllocMap := unpackPUint8TString(messagePtr) - cmessageLen, cmessageLenAllocMap := (C.size_t)(messageLen), cgoAllocsUnknown - __ret := C.fil_private_key_sign(crawPrivateKeyPtr, cmessagePtr, cmessageLen) - runtime.KeepAlive(cmessageLenAllocMap) - runtime.KeepAlive(messagePtr) - runtime.KeepAlive(cmessagePtrAllocMap) - runtime.KeepAlive(rawPrivateKeyPtr) - runtime.KeepAlive(crawPrivateKeyPtrAllocMap) - __v := NewFilPrivateKeySignResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilSealCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:578 -func FilSealCommitPhase1(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, cacheDirPath string, replicaPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealCommitPhase1Response { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - ccommR, ccommRAllocMap := commR.PassValue() - ccommD, ccommDAllocMap := commD.PassValue() - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - replicaPath = safeString(replicaPath) - creplicaPath, creplicaPathAllocMap := unpackPCharString(replicaPath) - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - cseed, cseedAllocMap := seed.PassValue() - cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) - cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown - __ret := C.fil_seal_commit_phase1(cregisteredProof, ccommR, ccommD, ccacheDirPath, creplicaPath, csectorId, cproverId, cticket, cseed, cpiecesPtr, cpiecesLen) - runtime.KeepAlive(cpiecesLenAllocMap) - packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) - runtime.KeepAlive(cpiecesPtrAllocMap) - runtime.KeepAlive(cseedAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(replicaPath) - runtime.KeepAlive(creplicaPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(ccommDAllocMap) - runtime.KeepAlive(ccommRAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilSealCommitPhase1ResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilSealCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:590 -func FilSealCommitPhase2(sealCommitPhase1OutputPtr string, sealCommitPhase1OutputLen uint, sectorId uint64, proverId Fil32ByteArray) *FilSealCommitPhase2Response { - sealCommitPhase1OutputPtr = safeString(sealCommitPhase1OutputPtr) - csealCommitPhase1OutputPtr, csealCommitPhase1OutputPtrAllocMap := unpackPUint8TString(sealCommitPhase1OutputPtr) - csealCommitPhase1OutputLen, csealCommitPhase1OutputLenAllocMap := (C.size_t)(sealCommitPhase1OutputLen), cgoAllocsUnknown - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_seal_commit_phase2(csealCommitPhase1OutputPtr, csealCommitPhase1OutputLen, csectorId, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(csealCommitPhase1OutputLenAllocMap) - runtime.KeepAlive(sealCommitPhase1OutputPtr) - runtime.KeepAlive(csealCommitPhase1OutputPtrAllocMap) - __v := NewFilSealCommitPhase2ResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilSealPreCommitPhase1 function as declared in filecoin-ffi/filcrypto.h:599 -func FilSealPreCommitPhase1(registeredProof FilRegisteredSealProof, cacheDirPath string, stagedSectorPath string, sealedSectorPath string, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, piecesPtr []FilPublicPieceInfo, piecesLen uint) *FilSealPreCommitPhase1Response { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - stagedSectorPath = safeString(stagedSectorPath) - cstagedSectorPath, cstagedSectorPathAllocMap := unpackPCharString(stagedSectorPath) - sealedSectorPath = safeString(sealedSectorPath) - csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - cpiecesPtr, cpiecesPtrAllocMap := unpackArgSFilPublicPieceInfo(piecesPtr) - cpiecesLen, cpiecesLenAllocMap := (C.size_t)(piecesLen), cgoAllocsUnknown - __ret := C.fil_seal_pre_commit_phase1(cregisteredProof, ccacheDirPath, cstagedSectorPath, csealedSectorPath, csectorId, cproverId, cticket, cpiecesPtr, cpiecesLen) - runtime.KeepAlive(cpiecesLenAllocMap) - packSFilPublicPieceInfo(piecesPtr, cpiecesPtr) - runtime.KeepAlive(cpiecesPtrAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(sealedSectorPath) - runtime.KeepAlive(csealedSectorPathAllocMap) - runtime.KeepAlive(stagedSectorPath) - runtime.KeepAlive(cstagedSectorPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilSealPreCommitPhase1ResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilSealPreCommitPhase2 function as declared in filecoin-ffi/filcrypto.h:613 -func FilSealPreCommitPhase2(sealPreCommitPhase1OutputPtr string, sealPreCommitPhase1OutputLen uint, cacheDirPath string, sealedSectorPath string) *FilSealPreCommitPhase2Response { - sealPreCommitPhase1OutputPtr = safeString(sealPreCommitPhase1OutputPtr) - csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputPtrAllocMap := unpackPUint8TString(sealPreCommitPhase1OutputPtr) - csealPreCommitPhase1OutputLen, csealPreCommitPhase1OutputLenAllocMap := (C.size_t)(sealPreCommitPhase1OutputLen), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - sealedSectorPath = safeString(sealedSectorPath) - csealedSectorPath, csealedSectorPathAllocMap := unpackPCharString(sealedSectorPath) - __ret := C.fil_seal_pre_commit_phase2(csealPreCommitPhase1OutputPtr, csealPreCommitPhase1OutputLen, ccacheDirPath, csealedSectorPath) - runtime.KeepAlive(sealedSectorPath) - runtime.KeepAlive(csealedSectorPathAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(csealPreCommitPhase1OutputLenAllocMap) - runtime.KeepAlive(sealPreCommitPhase1OutputPtr) - runtime.KeepAlive(csealPreCommitPhase1OutputPtrAllocMap) - __v := NewFilSealPreCommitPhase2ResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilUnsealRange function as declared in filecoin-ffi/filcrypto.h:621 -func FilUnsealRange(registeredProof FilRegisteredSealProof, cacheDirPath string, sealedSectorFdRaw int32, unsealOutputFdRaw int32, sectorId uint64, proverId Fil32ByteArray, ticket Fil32ByteArray, commD Fil32ByteArray, unpaddedByteIndex uint64, unpaddedBytesAmount uint64) *FilUnsealRangeResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - cacheDirPath = safeString(cacheDirPath) - ccacheDirPath, ccacheDirPathAllocMap := unpackPCharString(cacheDirPath) - csealedSectorFdRaw, csealedSectorFdRawAllocMap := (C.int)(sealedSectorFdRaw), cgoAllocsUnknown - cunsealOutputFdRaw, cunsealOutputFdRawAllocMap := (C.int)(unsealOutputFdRaw), cgoAllocsUnknown - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - ccommD, ccommDAllocMap := commD.PassValue() - cunpaddedByteIndex, cunpaddedByteIndexAllocMap := (C.uint64_t)(unpaddedByteIndex), cgoAllocsUnknown - cunpaddedBytesAmount, cunpaddedBytesAmountAllocMap := (C.uint64_t)(unpaddedBytesAmount), cgoAllocsUnknown - __ret := C.fil_unseal_range(cregisteredProof, ccacheDirPath, csealedSectorFdRaw, cunsealOutputFdRaw, csectorId, cproverId, cticket, ccommD, cunpaddedByteIndex, cunpaddedBytesAmount) - runtime.KeepAlive(cunpaddedBytesAmountAllocMap) - runtime.KeepAlive(cunpaddedByteIndexAllocMap) - runtime.KeepAlive(ccommDAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(cunsealOutputFdRawAllocMap) - runtime.KeepAlive(csealedSectorFdRawAllocMap) - runtime.KeepAlive(cacheDirPath) - runtime.KeepAlive(ccacheDirPathAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilUnsealRangeResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilVerify function as declared in filecoin-ffi/filcrypto.h:643 -func FilVerify(signaturePtr string, flattenedDigestsPtr string, flattenedDigestsLen uint, flattenedPublicKeysPtr string, flattenedPublicKeysLen uint) int32 { - signaturePtr = safeString(signaturePtr) - csignaturePtr, csignaturePtrAllocMap := unpackPUint8TString(signaturePtr) - flattenedDigestsPtr = safeString(flattenedDigestsPtr) - cflattenedDigestsPtr, cflattenedDigestsPtrAllocMap := unpackPUint8TString(flattenedDigestsPtr) - cflattenedDigestsLen, cflattenedDigestsLenAllocMap := (C.size_t)(flattenedDigestsLen), cgoAllocsUnknown - flattenedPublicKeysPtr = safeString(flattenedPublicKeysPtr) - cflattenedPublicKeysPtr, cflattenedPublicKeysPtrAllocMap := unpackPUint8TString(flattenedPublicKeysPtr) - cflattenedPublicKeysLen, cflattenedPublicKeysLenAllocMap := (C.size_t)(flattenedPublicKeysLen), cgoAllocsUnknown - __ret := C.fil_verify(csignaturePtr, cflattenedDigestsPtr, cflattenedDigestsLen, cflattenedPublicKeysPtr, cflattenedPublicKeysLen) - runtime.KeepAlive(cflattenedPublicKeysLenAllocMap) - runtime.KeepAlive(flattenedPublicKeysPtr) - runtime.KeepAlive(cflattenedPublicKeysPtrAllocMap) - runtime.KeepAlive(cflattenedDigestsLenAllocMap) - runtime.KeepAlive(flattenedDigestsPtr) - runtime.KeepAlive(cflattenedDigestsPtrAllocMap) - runtime.KeepAlive(signaturePtr) - runtime.KeepAlive(csignaturePtrAllocMap) - __v := (int32)(__ret) - return __v -} - -// FilVerifySeal function as declared in filecoin-ffi/filcrypto.h:653 -func FilVerifySeal(registeredProof FilRegisteredSealProof, commR Fil32ByteArray, commD Fil32ByteArray, proverId Fil32ByteArray, ticket Fil32ByteArray, seed Fil32ByteArray, sectorId uint64, proofPtr string, proofLen uint) *FilVerifySealResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - ccommR, ccommRAllocMap := commR.PassValue() - ccommD, ccommDAllocMap := commD.PassValue() - cproverId, cproverIdAllocMap := proverId.PassValue() - cticket, cticketAllocMap := ticket.PassValue() - cseed, cseedAllocMap := seed.PassValue() - csectorId, csectorIdAllocMap := (C.uint64_t)(sectorId), cgoAllocsUnknown - proofPtr = safeString(proofPtr) - cproofPtr, cproofPtrAllocMap := unpackPUint8TString(proofPtr) - cproofLen, cproofLenAllocMap := (C.size_t)(proofLen), cgoAllocsUnknown - __ret := C.fil_verify_seal(cregisteredProof, ccommR, ccommD, cproverId, cticket, cseed, csectorId, cproofPtr, cproofLen) - runtime.KeepAlive(cproofLenAllocMap) - runtime.KeepAlive(proofPtr) - runtime.KeepAlive(cproofPtrAllocMap) - runtime.KeepAlive(csectorIdAllocMap) - runtime.KeepAlive(cseedAllocMap) - runtime.KeepAlive(cticketAllocMap) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(ccommDAllocMap) - runtime.KeepAlive(ccommRAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilVerifySealResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilVerifyWindowPost function as declared in filecoin-ffi/filcrypto.h:666 -func FilVerifyWindowPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWindowPoStResponse { - crandomness, crandomnessAllocMap := randomness.PassValue() - creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) - creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown - cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) - cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_verify_window_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(cproofsLenAllocMap) - packSFilPoStProof(proofsPtr, cproofsPtr) - runtime.KeepAlive(cproofsPtrAllocMap) - runtime.KeepAlive(creplicasLenAllocMap) - packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) - runtime.KeepAlive(creplicasPtrAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilVerifyWindowPoStResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilVerifyWinningPost function as declared in filecoin-ffi/filcrypto.h:676 -func FilVerifyWinningPost(randomness Fil32ByteArray, replicasPtr []FilPublicReplicaInfo, replicasLen uint, proofsPtr []FilPoStProof, proofsLen uint, proverId Fil32ByteArray) *FilVerifyWinningPoStResponse { - crandomness, crandomnessAllocMap := randomness.PassValue() - creplicasPtr, creplicasPtrAllocMap := unpackArgSFilPublicReplicaInfo(replicasPtr) - creplicasLen, creplicasLenAllocMap := (C.size_t)(replicasLen), cgoAllocsUnknown - cproofsPtr, cproofsPtrAllocMap := unpackArgSFilPoStProof(proofsPtr) - cproofsLen, cproofsLenAllocMap := (C.size_t)(proofsLen), cgoAllocsUnknown - cproverId, cproverIdAllocMap := proverId.PassValue() - __ret := C.fil_verify_winning_post(crandomness, creplicasPtr, creplicasLen, cproofsPtr, cproofsLen, cproverId) - runtime.KeepAlive(cproverIdAllocMap) - runtime.KeepAlive(cproofsLenAllocMap) - packSFilPoStProof(proofsPtr, cproofsPtr) - runtime.KeepAlive(cproofsPtrAllocMap) - runtime.KeepAlive(creplicasLenAllocMap) - packSFilPublicReplicaInfo(replicasPtr, creplicasPtr) - runtime.KeepAlive(creplicasPtrAllocMap) - runtime.KeepAlive(crandomnessAllocMap) - __v := NewFilVerifyWinningPoStResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilWriteWithAlignment function as declared in filecoin-ffi/filcrypto.h:687 -func FilWriteWithAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32, existingPieceSizesPtr []uint64, existingPieceSizesLen uint) *FilWriteWithAlignmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown - csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown - cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown - cexistingPieceSizesPtr, cexistingPieceSizesPtrAllocMap := (*C.uint64_t)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&existingPieceSizesPtr)).Data)), cgoAllocsUnknown - cexistingPieceSizesLen, cexistingPieceSizesLenAllocMap := (C.size_t)(existingPieceSizesLen), cgoAllocsUnknown - __ret := C.fil_write_with_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd, cexistingPieceSizesPtr, cexistingPieceSizesLen) - runtime.KeepAlive(cexistingPieceSizesLenAllocMap) - runtime.KeepAlive(cexistingPieceSizesPtrAllocMap) - runtime.KeepAlive(cdstFdAllocMap) - runtime.KeepAlive(csrcSizeAllocMap) - runtime.KeepAlive(csrcFdAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilWriteWithAlignmentResponseRef(unsafe.Pointer(__ret)) - return __v -} - -// FilWriteWithoutAlignment function as declared in filecoin-ffi/filcrypto.h:698 -func FilWriteWithoutAlignment(registeredProof FilRegisteredSealProof, srcFd int32, srcSize uint64, dstFd int32) *FilWriteWithoutAlignmentResponse { - cregisteredProof, cregisteredProofAllocMap := (C.fil_RegisteredSealProof)(registeredProof), cgoAllocsUnknown - csrcFd, csrcFdAllocMap := (C.int)(srcFd), cgoAllocsUnknown - csrcSize, csrcSizeAllocMap := (C.uint64_t)(srcSize), cgoAllocsUnknown - cdstFd, cdstFdAllocMap := (C.int)(dstFd), cgoAllocsUnknown - __ret := C.fil_write_without_alignment(cregisteredProof, csrcFd, csrcSize, cdstFd) - runtime.KeepAlive(cdstFdAllocMap) - runtime.KeepAlive(csrcSizeAllocMap) - runtime.KeepAlive(csrcFdAllocMap) - runtime.KeepAlive(cregisteredProofAllocMap) - __v := NewFilWriteWithoutAlignmentResponseRef(unsafe.Pointer(__ret)) - return __v -} diff --git a/chain/filecoin/filecoin-ffi/generated/types.go b/chain/filecoin/filecoin-ffi/generated/types.go deleted file mode 100644 index 6e26e56e..00000000 --- a/chain/filecoin/filecoin-ffi/generated/types.go +++ /dev/null @@ -1,319 +0,0 @@ -// WARNING: This file has automatically been generated -// Code generated by https://git.io/c-for-go. DO NOT EDIT. - -package generated - -/* -#cgo LDFLAGS: -L${SRCDIR}/.. -lfilcrypto -#cgo pkg-config: ${SRCDIR}/../filcrypto.pc -#include "../filcrypto.h" -#include -#include "cgo_helpers.h" -*/ -import "C" - -// FilBLSSignature as declared in filecoin-ffi/filcrypto.h:56 -type FilBLSSignature struct { - Inner [96]byte - refa2ac09ba *C.fil_BLSSignature - allocsa2ac09ba interface{} -} - -// FilAggregateResponse as declared in filecoin-ffi/filcrypto.h:63 -type FilAggregateResponse struct { - Signature FilBLSSignature - refb3efa36d *C.fil_AggregateResponse - allocsb3efa36d interface{} -} - -// FilClearCacheResponse as declared in filecoin-ffi/filcrypto.h:68 -type FilClearCacheResponse struct { - ErrorMsg string - StatusCode FCPResponseStatus - refa9a80400 *C.fil_ClearCacheResponse - allocsa9a80400 interface{} -} - -// FilFauxRepResponse as declared in filecoin-ffi/filcrypto.h:74 -type FilFauxRepResponse struct { - ErrorMsg string - StatusCode FCPResponseStatus - Commitment [32]byte - refaa003f71 *C.fil_FauxRepResponse - allocsaa003f71 interface{} -} - -// FilFinalizeTicketResponse as declared in filecoin-ffi/filcrypto.h:80 -type FilFinalizeTicketResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - Ticket [32]byte - refb370fa86 *C.fil_FinalizeTicketResponse - allocsb370fa86 interface{} -} - -// FilGenerateDataCommitmentResponse as declared in filecoin-ffi/filcrypto.h:86 -type FilGenerateDataCommitmentResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - CommD [32]byte - ref87da7dd9 *C.fil_GenerateDataCommitmentResponse - allocs87da7dd9 interface{} -} - -// FilGeneratePieceCommitmentResponse as declared in filecoin-ffi/filcrypto.h:97 -type FilGeneratePieceCommitmentResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - CommP [32]byte - NumBytesAligned uint64 - ref4b00fda4 *C.fil_GeneratePieceCommitmentResponse - allocs4b00fda4 interface{} -} - -// FilPoStProof as declared in filecoin-ffi/filcrypto.h:103 -type FilPoStProof struct { - RegisteredProof FilRegisteredPoStProof - ProofLen uint - ProofPtr string - ref3451bfa *C.fil_PoStProof - allocs3451bfa interface{} -} - -// FilGenerateWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:110 -type FilGenerateWindowPoStResponse struct { - ErrorMsg string - ProofsLen uint - ProofsPtr []FilPoStProof - StatusCode FCPResponseStatus - ref2a5f3ba8 *C.fil_GenerateWindowPoStResponse - allocs2a5f3ba8 interface{} -} - -// FilGenerateWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:117 -type FilGenerateWinningPoStResponse struct { - ErrorMsg string - ProofsLen uint - ProofsPtr []FilPoStProof - StatusCode FCPResponseStatus - ref1405b8ec *C.fil_GenerateWinningPoStResponse - allocs1405b8ec interface{} -} - -// FilGenerateWinningPoStSectorChallenge as declared in filecoin-ffi/filcrypto.h:124 -type FilGenerateWinningPoStSectorChallenge struct { - ErrorMsg string - StatusCode FCPResponseStatus - IdsPtr []uint64 - IdsLen uint - ref69d2a405 *C.fil_GenerateWinningPoStSectorChallenge - allocs69d2a405 interface{} -} - -// FilGpuDeviceResponse as declared in filecoin-ffi/filcrypto.h:131 -type FilGpuDeviceResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - DevicesLen uint - DevicesPtr []string - ref58f92915 *C.fil_GpuDeviceResponse - allocs58f92915 interface{} -} - -// FilBLSDigest as declared in filecoin-ffi/filcrypto.h:135 -type FilBLSDigest struct { - Inner [96]byte - ref215fc78c *C.fil_BLSDigest - allocs215fc78c interface{} -} - -// FilHashResponse as declared in filecoin-ffi/filcrypto.h:142 -type FilHashResponse struct { - Digest FilBLSDigest - refc52a22ef *C.fil_HashResponse - allocsc52a22ef interface{} -} - -// FilInitLogFdResponse as declared in filecoin-ffi/filcrypto.h:147 -type FilInitLogFdResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - ref3c1a0a08 *C.fil_InitLogFdResponse - allocs3c1a0a08 interface{} -} - -// FilBLSPrivateKey as declared in filecoin-ffi/filcrypto.h:151 -type FilBLSPrivateKey struct { - Inner [32]byte - ref2f77fe3a *C.fil_BLSPrivateKey - allocs2f77fe3a interface{} -} - -// FilPrivateKeyGenerateResponse as declared in filecoin-ffi/filcrypto.h:158 -type FilPrivateKeyGenerateResponse struct { - PrivateKey FilBLSPrivateKey - ref2dba09f *C.fil_PrivateKeyGenerateResponse - allocs2dba09f interface{} -} - -// FilBLSPublicKey as declared in filecoin-ffi/filcrypto.h:162 -type FilBLSPublicKey struct { - Inner [48]byte - ref6d0cab13 *C.fil_BLSPublicKey - allocs6d0cab13 interface{} -} - -// FilPrivateKeyPublicKeyResponse as declared in filecoin-ffi/filcrypto.h:169 -type FilPrivateKeyPublicKeyResponse struct { - PublicKey FilBLSPublicKey - refee14e59d *C.fil_PrivateKeyPublicKeyResponse - allocsee14e59d interface{} -} - -// FilPrivateKeySignResponse as declared in filecoin-ffi/filcrypto.h:176 -type FilPrivateKeySignResponse struct { - Signature FilBLSSignature - refcdf97b28 *C.fil_PrivateKeySignResponse - allocscdf97b28 interface{} -} - -// FilSealCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:183 -type FilSealCommitPhase1Response struct { - StatusCode FCPResponseStatus - ErrorMsg string - SealCommitPhase1OutputPtr string - SealCommitPhase1OutputLen uint - ref61ed8561 *C.fil_SealCommitPhase1Response - allocs61ed8561 interface{} -} - -// FilSealCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:190 -type FilSealCommitPhase2Response struct { - StatusCode FCPResponseStatus - ErrorMsg string - ProofPtr string - ProofLen uint - ref5860b9a4 *C.fil_SealCommitPhase2Response - allocs5860b9a4 interface{} -} - -// FilSealPreCommitPhase1Response as declared in filecoin-ffi/filcrypto.h:197 -type FilSealPreCommitPhase1Response struct { - ErrorMsg string - StatusCode FCPResponseStatus - SealPreCommitPhase1OutputPtr string - SealPreCommitPhase1OutputLen uint - ref132bbfd8 *C.fil_SealPreCommitPhase1Response - allocs132bbfd8 interface{} -} - -// FilSealPreCommitPhase2Response as declared in filecoin-ffi/filcrypto.h:205 -type FilSealPreCommitPhase2Response struct { - ErrorMsg string - StatusCode FCPResponseStatus - RegisteredProof FilRegisteredSealProof - CommD [32]byte - CommR [32]byte - ref2aa6831d *C.fil_SealPreCommitPhase2Response - allocs2aa6831d interface{} -} - -// FilStringResponse as declared in filecoin-ffi/filcrypto.h:214 -type FilStringResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - StringVal string - ref4f413043 *C.fil_StringResponse - allocs4f413043 interface{} -} - -// FilUnsealRangeResponse as declared in filecoin-ffi/filcrypto.h:219 -type FilUnsealRangeResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - ref61e219c9 *C.fil_UnsealRangeResponse - allocs61e219c9 interface{} -} - -// FilVerifySealResponse as declared in filecoin-ffi/filcrypto.h:225 -type FilVerifySealResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - IsValid bool - refd4397079 *C.fil_VerifySealResponse - allocsd4397079 interface{} -} - -// FilVerifyWindowPoStResponse as declared in filecoin-ffi/filcrypto.h:231 -type FilVerifyWindowPoStResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - IsValid bool - ref34c4d49f *C.fil_VerifyWindowPoStResponse - allocs34c4d49f interface{} -} - -// FilVerifyWinningPoStResponse as declared in filecoin-ffi/filcrypto.h:237 -type FilVerifyWinningPoStResponse struct { - StatusCode FCPResponseStatus - ErrorMsg string - IsValid bool - refaca6860c *C.fil_VerifyWinningPoStResponse - allocsaca6860c interface{} -} - -// FilWriteWithAlignmentResponse as declared in filecoin-ffi/filcrypto.h:245 -type FilWriteWithAlignmentResponse struct { - CommP [32]byte - ErrorMsg string - LeftAlignmentUnpadded uint64 - StatusCode FCPResponseStatus - TotalWriteUnpadded uint64 - refa330e79 *C.fil_WriteWithAlignmentResponse - allocsa330e79 interface{} -} - -// FilWriteWithoutAlignmentResponse as declared in filecoin-ffi/filcrypto.h:252 -type FilWriteWithoutAlignmentResponse struct { - CommP [32]byte - ErrorMsg string - StatusCode FCPResponseStatus - TotalWriteUnpadded uint64 - refc8e1ed8 *C.fil_WriteWithoutAlignmentResponse - allocsc8e1ed8 interface{} -} - -// FilPublicPieceInfo as declared in filecoin-ffi/filcrypto.h:257 -type FilPublicPieceInfo struct { - NumBytes uint64 - CommP [32]byte - refd00025ac *C.fil_PublicPieceInfo - allocsd00025ac interface{} -} - -// Fil32ByteArray as declared in filecoin-ffi/filcrypto.h:261 -type Fil32ByteArray struct { - Inner [32]byte - ref373ec61a *C.fil_32ByteArray - allocs373ec61a interface{} -} - -// FilPrivateReplicaInfo as declared in filecoin-ffi/filcrypto.h:269 -type FilPrivateReplicaInfo struct { - RegisteredProof FilRegisteredPoStProof - CacheDirPath string - CommR [32]byte - ReplicaPath string - SectorId uint64 - ref81a31e9b *C.fil_PrivateReplicaInfo - allocs81a31e9b interface{} -} - -// FilPublicReplicaInfo as declared in filecoin-ffi/filcrypto.h:275 -type FilPublicReplicaInfo struct { - RegisteredProof FilRegisteredPoStProof - CommR [32]byte - SectorId uint64 - ref81b617c2 *C.fil_PublicReplicaInfo - allocs81b617c2 interface{} -} diff --git a/chain/filecoin/filecoin-ffi/go.mod b/chain/filecoin/filecoin-ffi/go.mod deleted file mode 100644 index f89b86b0..00000000 --- a/chain/filecoin/filecoin-ffi/go.mod +++ /dev/null @@ -1,15 +0,0 @@ -module github.com/filecoin-project/filecoin-ffi - -go 1.13 - -require ( - github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be - github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f - github.com/filecoin-project/specs-actors v0.6.1 - github.com/ipfs/go-cid v0.0.6 - github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.4.0 - github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829 -) - -replace github.com/xlab/c-for-go => github.com/Kubuxu/c-for-go v0.0.0-20200729154323-9d77fa534f6d diff --git a/chain/filecoin/filecoin-ffi/go.sum b/chain/filecoin/filecoin-ffi/go.sum deleted file mode 100644 index 7e0e350a..00000000 --- a/chain/filecoin/filecoin-ffi/go.sum +++ /dev/null @@ -1,190 +0,0 @@ -github.com/Kubuxu/c-for-go v0.0.0-20200729154323-9d77fa534f6d h1:JghhdYRtonvueFGY1fvc5Nxj81abWk5D0dirvlo8OtQ= -github.com/Kubuxu/c-for-go v0.0.0-20200729154323-9d77fa534f6d/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:TooKBwR/g8jG0hZ3lqe9S5sy2vTUcLOZLlz3M5wGn2E= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-bitfield v0.0.1 h1:Xg/JnrqqE77aJVKdbEyR04n9FZQWhwrN+buDgQCVpZU= -github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/specs-actors v0.6.1 h1:rhHlEzqcuuQU6oKc4csuq+/kQBDZ4EXtSomoN2XApCA= -github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= -github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= -github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= -github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= -github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.5 h1:o0Ix8e/ql7Zb5UVUJEUfjsWCIY8t48++9lR8qi6oiJU= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6 h1:go0y+GcDOGeJIV01FeBsta4FHngoA4Wz7KMeLkXAhMs= -github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-ipfs-util v0.0.1 h1:Wz9bL2wB2YBJqggkA4dD7oSmqB4cAnpNbGrlHJulv50= -github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= -github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= -github.com/ipfs/go-ipld-cbor v0.0.4 h1:Aw3KPOKXjvrm6VjwJvFf1F1ekR/BH3jdof3Bk7OTiSA= -github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-format v0.0.1 h1:HCu4eB/Gh+KD/Q0M8u888RFkorTWNIL3da4oc5dwc80= -github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= -github.com/ipfs/go-ipld-format v0.0.2 h1:OVAGlyYT6JPZ0pEfGntFPS40lfrDmaDbQwNHEY2G9Zs= -github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= -github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= -github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= -github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= -github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= -github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= -github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= -github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multibase v0.0.1 h1:PN9/v21eLywrFWdFNsFKaU04kLJzuYzmrJR+ubhT9qA= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= -github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= -github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= -github.com/multiformats/go-multihash v0.0.10 h1:lMoNbh2Ssd9PUF74Nz008KGzGPlfeV6wH3rit5IIGCM= -github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.13 h1:06x+mk/zj1FoMsgNejLpy6QTvJqlSt/BhLEy87zidlc= -github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= -github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-varint v0.0.2 h1:6sUvyh2YHpJCb8RZ6eYzj6iJQ4+chWYmyIHxszqlPTA= -github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= -github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1 h1:CskT+S6Ay54OwxBGB0R3Rsx4Muto6UnEYTyKJbyRIAI= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa h1:E+gaaifzi2xF65PbDmuKI3PhLWY6G5opMLniFq8vmXA= -github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= -github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436 h1:qOpVTI+BrstcjTZLm2Yz/3sOnqkzj3FQoh0g+E5s3Gc= -github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830 h1:8kxMKmKzXXL4Ru1nyhvdms/JjWt+3YLpvRb/bAjO/y0= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e h1:JY8o/ebUUrCYetWmjRCNghxC59cOEaili83rxPRQCLw= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384 h1:TFlARGu6Czu1z7q93HTxcP1P+/ZFC/IKythI5RzrnRg= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d h1:F3OmlXCzYtG9YE6tXDnUOlJBzVzHF8EcmZ1yTJlcgIk= -golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= -modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc= -modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdarg.h b/chain/filecoin/filecoin-ffi/headerstubs/stdarg.h deleted file mode 100644 index e69de29b..00000000 diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdbool.h b/chain/filecoin/filecoin-ffi/headerstubs/stdbool.h deleted file mode 100644 index e69de29b..00000000 diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdint.h b/chain/filecoin/filecoin-ffi/headerstubs/stdint.h deleted file mode 100644 index c48bf83c..00000000 --- a/chain/filecoin/filecoin-ffi/headerstubs/stdint.h +++ /dev/null @@ -1,4 +0,0 @@ -typedef unsigned char uint8_t; -typedef unsigned long long uint64_t; -typedef unsigned long int size_t; -#define bool _Bool diff --git a/chain/filecoin/filecoin-ffi/headerstubs/stdlib.h b/chain/filecoin/filecoin-ffi/headerstubs/stdlib.h deleted file mode 100644 index e69de29b..00000000 diff --git a/chain/filecoin/filecoin-ffi/install-filcrypto b/chain/filecoin/filecoin-ffi/install-filcrypto deleted file mode 100755 index f380de01..00000000 --- a/chain/filecoin/filecoin-ffi/install-filcrypto +++ /dev/null @@ -1,225 +0,0 @@ -#!/usr/bin/env bash -# shellcheck disable=SC2155 enable=require-variable-braces - -set -Exeo pipefail -auth_header=() -if [ -n "${GITHUB_TOKEN}" ]; then - auth_header=("-H" "Authorization: token ${GITHUB_TOKEN}") -fi - -# set CWD to the root of filecoin-ffi -# -cd "$(dirname "${BASH_SOURCE[0]}")" - -# tracks where the Rust sources are were we to build locally instead of -# downloading from GitHub Releases -# -rust_sources_dir="rust" - -# an array of values passed as 'target-feature' to the Rust compiler if we're -# building an optimized libfilcrypto (which takes advantage of some perf-boosting -# instruction sets) -# -#optimized_release_rustc_target_features=$(jq -r '.[].rustc_target_feature' < "${rust_sources_dir}/rustc-target-features-optimized.json") - -# each value in this area is checked against the "features" of the hosts CPU -# in order to determine if the host is suitable for an optimized release -# -cpu_features_required_for_optimized_release=$(jq -r '.[].check_cpu_for_feature | select(. != null)' < "${rust_sources_dir}/rustc-target-features-optimized.json") - -main() { - local __release_flags=$(get_release_flags) - if [ "${FFI_BUILD_FROM_SOURCE}" != "1" ] && download_release_tarball __tarball_path "${rust_sources_dir}" "filecoin-ffi" "${__release_flags}"; then - local __tmp_dir=$(mktemp -d) - - # silence shellcheck warning as the assignment happened in - # `download_release_tarball()` - # shellcheck disable=SC2154 - # extract downloaded tarball to temporary directory - # - tar -C "${__tmp_dir}" -xzf "${__tarball_path}" - - # copy build assets into root of filecoin-ffi - # - find -L "${__tmp_dir}" -type f -name filcrypto.h -exec cp -- "{}" . \; - find -L "${__tmp_dir}" -type f -name libfilcrypto.a -exec cp -- "{}" . \; - find -L "${__tmp_dir}" -type f -name filcrypto.pc -exec cp -- "{}" . \; - - check_installed_files - - (>&2 echo "[install-filcrypto/main] successfully installed prebuilt libfilcrypto") - else - (>&2 echo "[install-filcrypto/main] building libfilcrypto from local sources (dir = ${rust_sources_dir})") - - # build libfilcrypto (and corresponding header and pkg-config) - # - build_from_source "filcrypto" "${rust_sources_dir}" "${__release_flags}" - - # copy from Rust's build directory (target) to root of filecoin-ffi - # - find -L "${rust_sources_dir}/target/release" -type f -name filcrypto.h -exec cp -- "{}" . \; - find -L "${rust_sources_dir}/target/release" -type f -name libfilcrypto.a -exec cp -- "{}" . \; - find -L "${rust_sources_dir}" -type f -name filcrypto.pc -exec cp -- "{}" . \; - - check_installed_files - - (>&2 echo "[install-filcrypto/main] successfully built and installed libfilcrypto from source") - fi -} - -download_release_tarball() { - local __resultvar=$1 - local __rust_sources_path=$2 - local __repo_name=$3 - local __release_flags=$4 - local __release_sha1=$(git rev-parse HEAD) - local __release_tag="${__release_sha1:0:16}" - local __release_tag_url="https://api.github.com/repos/filecoin-project/${__repo_name}/releases/tags/${__release_tag}" - - # FIXME: Disable optimized release download, as it can't support properly support all native cpu flag detections - #if [ -z $release_flags ]; then - release_flag_name="standard" - #else - # release_flag_name="optimized" - #fi - - # TODO: This function shouldn't make assumptions about how these releases' - # names are constructed. Marginally less-bad would be to require that this - # function's caller provide the release name. - # - local __release_name="${__repo_name}-$(uname)-${release_flag_name}" - - (>&2 echo "[download_release_tarball] acquiring release @ ${__release_tag}") - - local __release_response=$(curl "${auth_header[@]}" \ - --retry 3 \ - --location "${__release_tag_url}") - - local __release_url=$(echo "${__release_response}" | jq -r ".assets[] | select(.name | contains(\"${__release_name}\")) | .url") - - local __tar_path="/tmp/${__release_name}_$(basename "${__release_url}").tar.gz" - - if [[ -z "${__release_url}" ]]; then - (>&2 echo "[download_release_tarball] failed to download release (tag URL: ${__release_tag_url}, response: ${__release_response})") - return 1 - fi - - local __asset_url=$(curl "${auth_header[@]}" \ - --head \ - --retry 3 \ - --header "Accept:application/octet-stream" \ - --location \ - --output /dev/null \ - -w "%{url_effective}" \ - "${__release_url}") - - if ! curl --retry 3 --output "${__tar_path}" "${__asset_url}"; then - (>&2 echo "[download_release_tarball] failed to download release asset (tag URL: ${__release_tag_url}, asset URL: ${__asset_url})") - return 1 - fi - - # set $__resultvar (which the caller provided as $1), which is the poor - # man's way of returning a value from a function in Bash - # - eval "${__resultvar}='${__tar_path}'" -} - -build_from_source() { - local __library_name=$1 - local __rust_sources_path=$2 - local __release_flags=$3 - local __repo_sha1=$(git rev-parse HEAD) - local __repo_sha1_truncated="${__repo_sha1:0:16}" - - (>&2 echo "building from source @ ${__repo_sha1_truncated}") - - if ! [ -x "$(command -v cargo)" ]; then - (>&2 echo '[build_from_source] Error: cargo is not installed.') - (>&2 echo '[build_from_source] install Rust toolchain to resolve this problem.') - exit 1 - fi - - if ! [ -x "$(command -v rustup)" ]; then - (>&2 echo '[build_from_source] Error: rustup is not installed.') - (>&2 echo '[build_from_source] install Rust toolchain installer to resolve this problem.') - exit 1 - fi - - pushd "${__rust_sources_path}" - - cargo --version - - if [ -n "${__release_flags}" ]; then - RUSTFLAGS="-C target-feature=${__release_flags}" ./scripts/build-release.sh "${__library_name}" "$(cat rust-toolchain)" - else - ./scripts/build-release.sh "${__library_name}" "$(cat rust-toolchain)" - fi - - popd -} - -get_release_flags() { - local __features="" - - # determine where to look for CPU features - # - if [[ ! -f "/proc/cpuinfo" ]]; then - (>&2 echo "[get_release_flags] no /proc/cpuinfo file; falling back to Darwin feature detection") - __features=$(sysctl -a | grep machdep.cpu | tr '[:upper:]' '[:lower:]' | grep features) - else - #aarch64_uname=$(uname -a | grep aarch64) - x86_64_uname=$(uname -a | grep x86_64) - # shellcheck disable=SC2002 - if [ -n "${x86_64_uname}" ]; then - __features=$(cat /proc/cpuinfo | grep flags | head -n 1) - else - # For now we assume aarch64. If another supported platform is added, explicitly check for it - __features=$(cat /proc/cpuinfo | grep Features | head -n 1) - fi - fi - - # Maps cpu flag to rust flags (related to entries in rust/rustc-target-features-optimized.json) - feature_map=("adx:+adx" "sha_ni:+sha" "sha2:+sha2" "sse2:+sse2" "avx2:+avx2" "avx:+avx" "sse4_2:+sse4.2" "sse4_1:+sse4.1") - - target_features="" - # check for the presence of each required CPU feature - # - # shellcheck disable=SC2068 # the splitting is intentional - for x in ${cpu_features_required_for_optimized_release[@]}; do - current_feature=$(echo "${__features}" | grep -c "${x}") - if [ "1" = "${current_feature}" ]; then - for feature in "${feature_map[@]}"; do - key=${feature%%:*} - if [ "${key}" == "${x}" ]; then - val=${feature#*:} - if [ -z "${target_features}" ]; then - target_features="${val}" - else - target_features="${target_features},${val}" - fi - fi - done - fi - done - - echo "${target_features}" -} - -check_installed_files() { - if [[ ! -f "./filcrypto.h" ]]; then - (>&2 echo "[check_installed_files] failed to install filcrypto.h") - exit 1 - fi - - if [[ ! -f "./libfilcrypto.a" ]]; then - (>&2 echo "[check_installed_files] failed to install libfilcrypto.a") - exit 1 - fi - - if [[ ! -f "./filcrypto.pc" ]]; then - (>&2 echo "[check_installed_files] failed to install filcrypto.pc") - exit 1 - fi -} - -main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/mkreleaselog b/chain/filecoin/filecoin-ffi/mkreleaselog deleted file mode 100755 index c1086228..00000000 --- a/chain/filecoin/filecoin-ffi/mkreleaselog +++ /dev/null @@ -1,240 +0,0 @@ -#!/bin/zsh - -# Note: This script is a modified version of the mkreleaselog script used by -# the go-ipfs team. -# -# Usage: ./mkreleaselog v0.25.0 v0.26.0 > /tmp/release.log - -set -euo pipefail -export GO111MODULE=on -export GOPATH="$(go env GOPATH)" - -alias jq="jq --unbuffered" - -REPO_SUFFIXES_TO_STRIP=( - "/v2" - "/v3" - "/v4" - "/v5" - "/v6" -) - -AUTHORS=( - # orgs - filecoin-project - - # Authors of personal repos used by filecoin-ffi that should be mentioned in the - # release notes. - xlab -) - -[[ -n "${REPO_FILTER+x}" ]] || REPO_FILTER="github.com/(${$(printf "|%s" "${AUTHORS[@]}"):1})" - -[[ -n "${IGNORED_FILES+x}" ]] || IGNORED_FILES='^\(\.gx\|package\.json\|\.travis\.yml\|go.mod\|go\.sum|\.github|\.circleci\)$' - -NL=$'\n' - -msg() { - echo "$*" >&2 -} - -statlog() { - rpath="$GOPATH/src/$1" - for s in $REPO_SUFFIXES_TO_STRIP; do - rpath=${rpath%$s} - done - - start="${2:-}" - end="${3:-HEAD}" - - git -C "$rpath" log --shortstat --no-merges --pretty="tformat:%H%n%aN%n%aE" "$start..$end" | while - read hash - read name - read email - read _ # empty line - read changes - do - changed=0 - insertions=0 - deletions=0 - while read count event; do - if [[ "$event" =~ ^file ]]; then - changed=$count - elif [[ "$event" =~ ^insertion ]]; then - insertions=$count - elif [[ "$event" =~ ^deletion ]]; then - deletions=$count - else - echo "unknown event $event" >&2 - exit 1 - fi - done<<<"${changes//,/$NL}" - - jq -n \ - --arg "hash" "$hash" \ - --arg "name" "$name" \ - --arg "email" "$email" \ - --argjson "changed" "$changed" \ - --argjson "insertions" "$insertions" \ - --argjson "deletions" "$deletions" \ - '{Commit: $hash, Author: $name, Email: $email, Files: $changed, Insertions: $insertions, Deletions: $deletions}' - done -} - -# Returns a stream of deps changed between $1 and $2. -dep_changes() { - { - <"$1" - <"$2" - } | jq -s 'JOIN(INDEX(.[0][]; .Path); .[1][]; .Path; {Path: .[0].Path, Old: (.[1] | del(.Path)), New: (.[0] | del(.Path))}) | select(.New.Version != .Old.Version)' -} - -# resolve_commits resolves a git ref for each version. -resolve_commits() { - jq '. + {Ref: (.Version|capture("^((?.*)\\+incompatible|v.*-(0\\.)?[0-9]{14}-(?[a-f0-9]{12})|(?v.*))$") | .ref1 // .ref2 // .ref3)}' -} - -pr_link() { - local repo="$1" - local prnum="$2" - local ghname="${repo##github.com/}" - printf -- "[%s#%s](https://%s/pull/%s)" "$ghname" "$prnum" "$repo" "$prnum" -} - -# Generate a release log for a range of commits in a single repo. -release_log() { - setopt local_options BASH_REMATCH - - local repo="$1" - local start="$2" - local end="${3:-HEAD}" - local dir="$GOPATH/src/$repo" - - local commit pr - git -C "$dir" log \ - --format='tformat:%H %s' \ - --first-parent \ - "$start..$end" | - while read commit subject; do - # Skip gx-only PRs. - git -C "$dir" diff-tree --no-commit-id --name-only "$commit^" "$commit" | - grep -v "${IGNORED_FILES}" >/dev/null || continue - - if [[ "$subject" =~ '^Merge pull request #([0-9]+) from' ]]; then - local prnum="${BASH_REMATCH[2]}" - local desc="$(git -C "$dir" show --summary --format='tformat:%b' "$commit" | head -1)" - printf -- "- %s (%s)\n" "$desc" "$(pr_link "$repo" "$prnum")" - elif [[ "$subject" =~ '\(#([0-9]+)\)$' ]]; then - local prnum="${BASH_REMATCH[2]}" - printf -- "- %s (%s)\n" "$subject" "$(pr_link "$repo" "$prnum")" - else - printf -- "- %s\n" "$subject" - fi - done -} - -indent() { - sed -e 's/^/ /' -} - -mod_deps() { - go list -json -m all | jq 'select(.Version != null)' -} - -ensure() { - local repo="$1" - for s in $REPO_SUFFIXES_TO_STRIP; do - repo=${repo%$s} - done - - local commit="$2" - - local rpath="$GOPATH/src/$repo" - if [[ ! -d "$rpath" ]]; then - msg "Cloning $repo..." - git clone "http://$repo" "$rpath" >&2 - fi - - if ! git -C "$rpath" rev-parse --verify "$commit" >/dev/null; then - msg "Fetching $repo..." - git -C "$rpath" fetch --all >&2 - fi - - git -C "$rpath" rev-parse --verify "$commit" >/dev/null || return 1 -} - -statsummary() { - jq -s 'group_by(.Author)[] | {Author: .[0].Author, Commits: (. | length), Insertions: (map(.Insertions) | add), Deletions: (map(.Deletions) | add), Files: (map(.Files) | add)}' | - jq '. + {Lines: (.Deletions + .Insertions)}' -} - -recursive_release_log() { - local start="${1:-$(git tag -l | sort -V | grep -v -- '-rc' | grep 'v'| tail -n1)}" - local end="${2:-$(git rev-parse HEAD)}" - local repo_root="$(git rev-parse --show-toplevel)" - local package="$(cd "$repo_root" && go list)" - - if ! [[ "${GOPATH}/${package}" != "${repo_root}" ]]; then - echo "This script requires the target package and all dependencies to live in a GOPATH." - return 1 - fi - - ( - local result=0 - local workspace="$(mktemp -d)" - trap "$(printf 'rm -rf "%q"' "$workspace")" INT TERM EXIT - cd "$workspace" - - echo "Computing old deps..." >&2 - git -C "$repo_root" show "$start:go.mod" >go.mod - mod_deps | resolve_commits | jq -s > old_deps.json - - echo "Computing new deps..." >&2 - git -C "$repo_root" show "$end:go.mod" >go.mod - mod_deps | resolve_commits | jq -s > new_deps.json - - rm -f go.mod go.sum - - printf -- "Generating Changelog for %s %s..%s\n" "$package" "$start" "$end" >&2 - - printf -- "- %s:\n" "$package" - release_log "$package" "$start" "$end" | indent - - statlog "$package" "$start" "$end" > statlog.json - - dep_changes old_deps.json new_deps.json | - jq --arg filter "$REPO_FILTER" 'select(.Path | match($filter))' | - # Compute changelogs - jq -r '"\(.Path) \(.New.Version) \(.New.Ref) \(.Old.Version) \(.Old.Ref // "")"' | - while read repo new new_ref old old_ref; do - for s in $REPO_SUFFIXES_TO_STRIP; do - repo=${repo%$s} - done - - if ! ensure "$repo" "$new_ref"; then - result=1 - local changelog="failed to fetch repo" - else - statlog "$repo" "$old_ref" "$new_ref" >> statlog.json - local changelog="$(release_log "$repo" "$old_ref" "$new_ref")" - fi - if [[ -n "$changelog" ]]; then - printf -- "- %s (%s -> %s):\n" "$repo" "$old" "$new" - echo "$changelog" | indent - fi - done - - echo - echo "Contributors" - echo - - echo "| Contributor | Commits | Lines ± | Files Changed |" - echo "|-------------|---------|---------|---------------|" - statsummary "] -license = "MIT OR Apache-2.0" -repository = "https://github.com/filecoin-project/filecoin-ffi" -readme = "README.md" -edition = "2018" -publish = false - -[lib] -crate-type = ["rlib", "staticlib"] - -[dependencies] -bls-signatures = "0.6.0" -byteorder = "1.2" -drop_struct_macro_derive = "0.4.0" -ff = { version = "0.2.1", package = "fff" } -ffi-toolkit = "0.4.0" -libc = "0.2.58" -log = "0.4.7" -paired = "0.20.0" -fil_logger = "0.1.0" -rand = "0.7" -rand_chacha = "0.2.1" -rayon = "1.2.1" -anyhow = "1.0.23" -bellperson = { version = "0.9.2", features = ["gpu"] } -serde_json = "1.0.46" - -neptune = "=1.1.1" -neptune-triton = "=1.0.0" - -[dependencies.filecoin-proofs-api] -package = "filecoin-proofs-api" -version = "5.0.0" - -[build-dependencies] -cbindgen = "= 0.14.0" - -[dev-dependencies] -tempfile = "3.0.8" - diff --git a/chain/filecoin/filecoin-ffi/rust/build.rs b/chain/filecoin/filecoin-ffi/rust/build.rs deleted file mode 100644 index bb3cf601..00000000 --- a/chain/filecoin/filecoin-ffi/rust/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -use std::env; -use std::path::Path; - -fn main() { - let out_dir = env::var("OUT_DIR").unwrap(); - let hdr_out = Path::new(&out_dir).join("include/filcrypto.h"); - - cbindgen::generate(std::env::var("CARGO_MANIFEST_DIR").unwrap()) - .expect("Could not generate header") - .write_to_file(hdr_out); -} diff --git a/chain/filecoin/filecoin-ffi/rust/cbindgen.toml b/chain/filecoin/filecoin-ffi/rust/cbindgen.toml deleted file mode 100644 index b5e0fadd..00000000 --- a/chain/filecoin/filecoin-ffi/rust/cbindgen.toml +++ /dev/null @@ -1,23 +0,0 @@ -header = """ -/* filcrypto Header */ - -#ifdef __cplusplus -extern "C" { -#endif -""" -trailer = """ -#ifdef __cplusplus -} /* extern "C" */ -#endif -""" - -include_guard = "filcrypto_H" -include_version = true -language = "C" - -[parse] -parse_deps = true -include = ["ffi-toolkit"] - -[enum] -prefix_with_name = true diff --git a/chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template b/chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template deleted file mode 100644 index 56ab937d..00000000 --- a/chain/filecoin/filecoin-ffi/rust/filcrypto.pc.template +++ /dev/null @@ -1,4 +0,0 @@ -Name: filcrypto -Version: @VERSION@ -Description: C bindings for Filecoin Proofs -Libs: @PRIVATE_LIBS@ diff --git a/chain/filecoin/filecoin-ffi/rust/rust-toolchain b/chain/filecoin/filecoin-ffi/rust/rust-toolchain deleted file mode 100644 index 3987c472..00000000 --- a/chain/filecoin/filecoin-ffi/rust/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -1.43.1 diff --git a/chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json b/chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json deleted file mode 100644 index 3dd8a275..00000000 --- a/chain/filecoin/filecoin-ffi/rust/rustc-target-features-optimized.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "rustc_target_feature": "+adx", - "check_cpu_for_feature": "adx" - }, - { - "rustc_target_feature": "+sha", - "check_cpu_for_feature": "sha_ni" - }, - { - "rustc_target_feature": "+sha2", - "check_cpu_for_feature": "sha2" - }, - { - "rustc_target_feature": "+sse2", - "check_cpu_for_feature": "sse2" - }, - { - "rustc_target_feature": "+avx2", - "check_cpu_for_feature": "avx2" - }, - { - "rustc_target_feature": "+avx", - "check_cpu_for_feature": "avx" - }, - { - "rustc_target_feature": "+sse4.2", - "check_cpu_for_feature": "sse4_2" - }, - { - "rustc_target_feature": "+sse4.1", - "check_cpu_for_feature": "sse4_1" - } -] diff --git a/chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh b/chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh deleted file mode 100755 index 14089fd6..00000000 --- a/chain/filecoin/filecoin-ffi/rust/scripts/build-release.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -set -Exeo pipefail - -main() { - if [[ -z "$1" ]] - then - (>&2 echo '[build-release/main] Error: script requires a library name, e.g. "filecoin" or "snark"') - exit 1 - fi - - if [[ -z "$2" ]] - then - (>&2 echo '[build-release/main] Error: script requires a toolchain, e.g. ./build-release.sh +nightly-2019-04-19') - exit 1 - fi - - # temporary place for storing build output (cannot use 'local', because - # 'trap' is not going to have access to variables scoped to this function) - # - __build_output_log_tmp=$(mktemp) - - # clean up temp file on exit - # - trap '{ rm -f $__build_output_log_tmp; }' EXIT - - # build with RUSTFLAGS configured to output linker flags for native libs - # - local __rust_flags="--print native-static-libs ${RUSTFLAGS}" - - RUSTFLAGS="${__rust_flags}" \ - cargo +$2 build \ - --release ${@:3} 2>&1 | tee ${__build_output_log_tmp} - - # parse build output for linker flags - # - local __linker_flags=$(cat ${__build_output_log_tmp} \ - | grep native-static-libs\: \ - | head -n 1 \ - | cut -d ':' -f 3) - - # generate pkg-config - # - sed -e "s;@VERSION@;$(git rev-parse HEAD);" \ - -e "s;@PRIVATE_LIBS@;${__linker_flags};" "$1.pc.template" > "$1.pc" - - # ensure header file was built - # - find -L . -type f -name "$1.h" | read - - # ensure the archive file was built - # - find -L . -type f -name "lib$1.a" | read -} - -main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh b/chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh deleted file mode 100755 index bf1d085f..00000000 --- a/chain/filecoin/filecoin-ffi/rust/scripts/package-release.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -set -Exeuo pipefail - -main() { - if [[ -z "$1" ]] - then - (>&2 echo '[package-release/main] Error: script requires path to which it will write release (gzipped) tarball, e.g. "/tmp/filecoin-ffi-Darwin-standard.tar.tz"') - exit 1 - fi - - local __tarball_output_path=$1 - - # create temporary directory to hold build artifacts (must not be declared - # with 'local' because we will use 'trap' to clean it up) - # - __tmp_dir=$(mktemp -d) - - (>&2 echo "[package-release/main] preparing release files") - - # clean up temp directory on exit - # - trap '{ rm -rf $__tmp_dir; }' EXIT - - # copy assets into temporary directory - # - find -L . -type f -name filcrypto.h -exec cp -- "{}" $__tmp_dir/ \; - find -L . -type f -name libfilcrypto.a -exec cp -- "{}" $__tmp_dir/ \; - find -L . -type f -name filcrypto.pc -exec cp -- "{}" $__tmp_dir/ \; - - # create gzipped tarball from contents of temporary directory - # - tar -czf $__tarball_output_path $__tmp_dir/* - - (>&2 echo "[package-release/main] release file created: $__tarball_output_path") -} - -main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh b/chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh deleted file mode 100755 index 017040ef..00000000 --- a/chain/filecoin/filecoin-ffi/rust/scripts/publish-release.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -set -Exeuo pipefail - -main() { - if [[ -z "$1" ]] - then - (>&2 echo '[publish-release/main] Error: script requires a release (gzipped) tarball path, e.g. "/tmp/filecoin-ffi-Darwin-standard.tar.tz"') - exit 1 - fi - - if [[ -z "$2" ]] - then - (>&2 echo '[publish-release/main] Error: script requires a release name, e.g. "filecoin-ffi-Darwin-standard" or "filecoin-ffi-Linux-optimized"') - exit 1 - fi - - local __release_file=$1 - local __release_name=$2 - local __release_tag="${CIRCLE_SHA1:0:16}" - - # make sure we have a token set, api requests won't work otherwise - if [ -z $GITHUB_TOKEN ]; then - (>&2 echo "[publish-release/main] \$GITHUB_TOKEN not set, publish failed") - exit 1 - fi - - # see if the release already exists by tag - local __release_response=` - curl \ - --header "Authorization: token $GITHUB_TOKEN" \ - "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/releases/tags/$__release_tag" - ` - - local __release_id=`echo $__release_response | jq '.id'` - - if [ "$__release_id" = "null" ]; then - (>&2 echo '[publish-release/main] creating release') - - RELEASE_DATA="{ - \"tag_name\": \"$__release_tag\", - \"target_commitish\": \"$CIRCLE_SHA1\", - \"name\": \"$__release_tag\", - \"body\": \"\" - }" - - # create it if it doesn't exist yet - # - __release_response=` - curl \ - --request POST \ - --header "Authorization: token $GITHUB_TOKEN" \ - --header "Content-Type: application/json" \ - --data "$RELEASE_DATA" \ - "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/releases" - ` - else - (>&2 echo '[publish-release/main] release already exists') - fi - - __release_upload_url=`echo $__release_response | jq -r '.upload_url' | cut -d'{' -f1` - - curl \ - --request POST \ - --header "Authorization: token $GITHUB_TOKEN" \ - --header "Content-Type: application/octet-stream" \ - --data-binary "@$__release_file" \ - "$__release_upload_url?name=$(basename $__release_file)" - - (>&2 echo '[publish-release/main] release file uploaded') -} - -main "$@"; exit diff --git a/chain/filecoin/filecoin-ffi/rust/src/bls/api.rs b/chain/filecoin/filecoin-ffi/rust/src/bls/api.rs deleted file mode 100644 index b1f542df..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/bls/api.rs +++ /dev/null @@ -1,437 +0,0 @@ -use std::slice::from_raw_parts; - -use bls_signatures::{ - aggregate as aggregate_sig, - groupy::{CurveAffine, CurveProjective, EncodedPoint, GroupDecodingError}, - hash as hash_sig, - paired::bls12_381::{G2Affine, G2Compressed}, - verify as verify_sig, PrivateKey, PublicKey, Serialize, Signature, -}; -use rand::rngs::OsRng; -use rand::SeedableRng; -use rand_chacha::ChaChaRng; -use rayon::prelude::*; - -use crate::bls::types; -use crate::proofs::types::fil_32ByteArray; - -pub const SIGNATURE_BYTES: usize = 96; -pub const PRIVATE_KEY_BYTES: usize = 32; -pub const PUBLIC_KEY_BYTES: usize = 48; -pub const DIGEST_BYTES: usize = 96; - -#[repr(C)] -pub struct fil_BLSSignature { - pub inner: [u8; SIGNATURE_BYTES], -} - -#[repr(C)] -pub struct fil_BLSPrivateKey { - pub inner: [u8; PRIVATE_KEY_BYTES], -} - -#[repr(C)] -pub struct fil_BLSPublicKey { - pub inner: [u8; PUBLIC_KEY_BYTES], -} - -#[repr(C)] -pub struct fil_BLSDigest { - pub inner: [u8; DIGEST_BYTES], -} - -/// Unwraps or returns the passed in value. -macro_rules! try_ffi { - ($res:expr, $val:expr) => {{ - match $res { - Ok(res) => res, - Err(_) => return $val, - } - }}; -} - -/// Compute the digest of a message -/// -/// # Arguments -/// -/// * `message_ptr` - pointer to a message byte array -/// * `message_len` - length of the byte array -#[no_mangle] -pub unsafe extern "C" fn fil_hash( - message_ptr: *const u8, - message_len: libc::size_t, -) -> *mut types::fil_HashResponse { - // prep request - let message = from_raw_parts(message_ptr, message_len); - - // call method - let digest = hash_sig(message); - - // prep response - let mut raw_digest: [u8; DIGEST_BYTES] = [0; DIGEST_BYTES]; - raw_digest.copy_from_slice(digest.into_affine().into_compressed().as_ref()); - - let response = types::fil_HashResponse { - digest: fil_BLSDigest { inner: raw_digest }, - }; - - Box::into_raw(Box::new(response)) -} - -/// Aggregate signatures together into a new signature -/// -/// # Arguments -/// -/// * `flattened_signatures_ptr` - pointer to a byte array containing signatures -/// * `flattened_signatures_len` - length of the byte array (multiple of SIGNATURE_BYTES) -/// -/// Returns `NULL` on error. Result must be freed using `destroy_aggregate_response`. -#[no_mangle] -pub unsafe extern "C" fn fil_aggregate( - flattened_signatures_ptr: *const u8, - flattened_signatures_len: libc::size_t, -) -> *mut types::fil_AggregateResponse { - // prep request - let signatures = try_ffi!( - from_raw_parts(flattened_signatures_ptr, flattened_signatures_len) - .par_chunks(SIGNATURE_BYTES) - .map(|item| { Signature::from_bytes(item) }) - .collect::, _>>(), - std::ptr::null_mut() - ); - - let mut raw_signature: [u8; SIGNATURE_BYTES] = [0; SIGNATURE_BYTES]; - - let aggregated = try_ffi!(aggregate_sig(&signatures), std::ptr::null_mut()); - aggregated - .write_bytes(&mut raw_signature.as_mut()) - .expect("preallocated"); - - let response = types::fil_AggregateResponse { - signature: fil_BLSSignature { - inner: raw_signature, - }, - }; - - Box::into_raw(Box::new(response)) -} - -/// Verify that a signature is the aggregated signature of hashes - pubkeys -/// -/// # Arguments -/// -/// * `signature_ptr` - pointer to a signature byte array (SIGNATURE_BYTES long) -/// * `flattened_digests_ptr` - pointer to a byte array containing digests -/// * `flattened_digests_len` - length of the byte array (multiple of DIGEST_BYTES) -/// * `flattened_public_keys_ptr` - pointer to a byte array containing public keys -/// * `flattened_public_keys_len` - length of the array -#[no_mangle] -pub unsafe extern "C" fn fil_verify( - signature_ptr: *const u8, - flattened_digests_ptr: *const u8, - flattened_digests_len: libc::size_t, - flattened_public_keys_ptr: *const u8, - flattened_public_keys_len: libc::size_t, -) -> libc::c_int { - // prep request - let raw_signature = from_raw_parts(signature_ptr, SIGNATURE_BYTES); - let signature = try_ffi!(Signature::from_bytes(raw_signature), 0); - - let raw_digests = from_raw_parts(flattened_digests_ptr, flattened_digests_len); - let raw_public_keys = from_raw_parts(flattened_public_keys_ptr, flattened_public_keys_len); - - if raw_digests.len() % DIGEST_BYTES != 0 { - return 0; - } - if raw_public_keys.len() % PUBLIC_KEY_BYTES != 0 { - return 0; - } - - if raw_digests.len() / DIGEST_BYTES != raw_public_keys.len() / PUBLIC_KEY_BYTES { - return 0; - } - - let digests: Vec<_> = try_ffi!( - raw_digests - .par_chunks(DIGEST_BYTES) - .map(|item: &[u8]| { - let mut digest = G2Compressed::empty(); - digest.as_mut().copy_from_slice(item); - - let affine: G2Affine = digest.into_affine()?; - let projective = affine.into_projective(); - Ok(projective) - }) - .collect::, GroupDecodingError>>(), - 0 - ); - - let public_keys: Vec<_> = try_ffi!( - raw_public_keys - .par_chunks(PUBLIC_KEY_BYTES) - .map(|item| { PublicKey::from_bytes(item) }) - .collect::>(), - 0 - ); - - verify_sig(&signature, digests.as_slice(), public_keys.as_slice()) as libc::c_int -} - -/// Verify that a signature is the aggregated signature of the hhashed messages -/// -/// # Arguments -/// -/// * `signature_ptr` - pointer to a signature byte array (SIGNATURE_BYTES long) -/// * `messages_ptr` - pointer to an array containing the pointers to the messages -/// * `messages_sizes_ptr` - pointer to an array containing the lengths of the messages -/// * `messages_len` - length of the two messages arrays -/// * `flattened_public_keys_ptr` - pointer to a byte array containing public keys -/// * `flattened_public_keys_len` - length of the array -#[no_mangle] -pub unsafe extern "C" fn fil_hash_verify( - signature_ptr: *const u8, - flattened_messages_ptr: *const u8, - flattened_messages_len: libc::size_t, - message_sizes_ptr: *const libc::size_t, - message_sizes_len: libc::size_t, - flattened_public_keys_ptr: *const u8, - flattened_public_keys_len: libc::size_t, -) -> libc::c_int { - // prep request - let raw_signature = from_raw_parts(signature_ptr, SIGNATURE_BYTES); - let signature = try_ffi!(Signature::from_bytes(raw_signature), 0); - - let flattened = from_raw_parts(flattened_messages_ptr, flattened_messages_len); - let chunk_sizes = from_raw_parts(message_sizes_ptr, message_sizes_len); - - // split the flattened message array into slices of individual messages to - // be hashed - let mut messages: Vec<&[u8]> = Vec::with_capacity(message_sizes_len); - let mut offset = 0; - for chunk_size in chunk_sizes.iter() { - messages.push(&flattened[offset..offset + *chunk_size]); - offset += *chunk_size - } - - let raw_public_keys = from_raw_parts(flattened_public_keys_ptr, flattened_public_keys_len); - - if raw_public_keys.len() % PUBLIC_KEY_BYTES != 0 { - return 0; - } - - let digests: Vec<_> = messages - .into_par_iter() - .map(|message: &[u8]| hash_sig(message)) - .collect::>(); - - let public_keys: Vec<_> = try_ffi!( - raw_public_keys - .par_chunks(PUBLIC_KEY_BYTES) - .map(|item| { PublicKey::from_bytes(item) }) - .collect::>(), - 0 - ); - - verify_sig(&signature, &digests, &public_keys) as libc::c_int -} - -/// Generate a new private key -#[no_mangle] -pub unsafe extern "C" fn fil_private_key_generate() -> *mut types::fil_PrivateKeyGenerateResponse { - let mut raw_private_key: [u8; PRIVATE_KEY_BYTES] = [0; PRIVATE_KEY_BYTES]; - PrivateKey::generate(&mut OsRng) - .write_bytes(&mut raw_private_key.as_mut()) - .expect("preallocated"); - - let response = types::fil_PrivateKeyGenerateResponse { - private_key: fil_BLSPrivateKey { - inner: raw_private_key, - }, - }; - - Box::into_raw(Box::new(response)) -} - -/// Generate a new private key with seed -/// -/// **Warning**: Use this function only for testing or with very secure seeds -/// -/// # Arguments -/// -/// * `raw_seed` - a seed byte array with 32 bytes -/// -/// Returns `NULL` when passed a NULL pointer. -#[no_mangle] -pub unsafe extern "C" fn fil_private_key_generate_with_seed( - raw_seed: fil_32ByteArray, -) -> *mut types::fil_PrivateKeyGenerateResponse { - let rng = &mut ChaChaRng::from_seed(raw_seed.inner); - - let mut raw_private_key: [u8; PRIVATE_KEY_BYTES] = [0; PRIVATE_KEY_BYTES]; - PrivateKey::generate(rng) - .write_bytes(&mut raw_private_key.as_mut()) - .expect("preallocated"); - - let response = types::fil_PrivateKeyGenerateResponse { - private_key: fil_BLSPrivateKey { - inner: raw_private_key, - }, - }; - - Box::into_raw(Box::new(response)) -} - -/// Sign a message with a private key and return the signature -/// -/// # Arguments -/// -/// * `raw_private_key_ptr` - pointer to a private key byte array -/// * `message_ptr` - pointer to a message byte array -/// * `message_len` - length of the byte array -/// -/// Returns `NULL` when passed invalid arguments. -#[no_mangle] -pub unsafe extern "C" fn fil_private_key_sign( - raw_private_key_ptr: *const u8, - message_ptr: *const u8, - message_len: libc::size_t, -) -> *mut types::fil_PrivateKeySignResponse { - // prep request - let private_key_slice = from_raw_parts(raw_private_key_ptr, PRIVATE_KEY_BYTES); - let private_key = try_ffi!( - PrivateKey::from_bytes(private_key_slice), - std::ptr::null_mut() - ); - let message = from_raw_parts(message_ptr, message_len); - - let mut raw_signature: [u8; SIGNATURE_BYTES] = [0; SIGNATURE_BYTES]; - PrivateKey::sign(&private_key, message) - .write_bytes(&mut raw_signature.as_mut()) - .expect("preallocated"); - - let response = types::fil_PrivateKeySignResponse { - signature: fil_BLSSignature { - inner: raw_signature, - }, - }; - - Box::into_raw(Box::new(response)) -} - -/// Generate the public key for a private key -/// -/// # Arguments -/// -/// * `raw_private_key_ptr` - pointer to a private key byte array -/// -/// Returns `NULL` when passed invalid arguments. -#[no_mangle] -pub unsafe extern "C" fn fil_private_key_public_key( - raw_private_key_ptr: *const u8, -) -> *mut types::fil_PrivateKeyPublicKeyResponse { - let private_key_slice = from_raw_parts(raw_private_key_ptr, PRIVATE_KEY_BYTES); - let private_key = try_ffi!( - PrivateKey::from_bytes(private_key_slice), - std::ptr::null_mut() - ); - - let mut raw_public_key: [u8; PUBLIC_KEY_BYTES] = [0; PUBLIC_KEY_BYTES]; - private_key - .public_key() - .write_bytes(&mut raw_public_key.as_mut()) - .expect("preallocated"); - - let response = types::fil_PrivateKeyPublicKeyResponse { - public_key: fil_BLSPublicKey { - inner: raw_public_key, - }, - }; - - Box::into_raw(Box::new(response)) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn key_verification() { - unsafe { - let private_key = (*fil_private_key_generate()).private_key.inner; - let public_key = (*fil_private_key_public_key(&private_key[0])) - .public_key - .inner; - let message = b"hello world"; - let digest = (*fil_hash(&message[0], message.len())).digest.inner; - let signature = (*fil_private_key_sign(&private_key[0], &message[0], message.len())) - .signature - .inner; - let verified = fil_verify( - &signature[0], - &digest[0], - digest.len(), - &public_key[0], - public_key.len(), - ); - - assert_eq!(1, verified); - - let flattened_messages = message; - let message_sizes = [message.len()]; - let verified = fil_hash_verify( - signature.as_ptr(), - flattened_messages.as_ptr(), - flattened_messages.len(), - message_sizes.as_ptr(), - message_sizes.len(), - public_key.as_ptr(), - public_key.len(), - ); - - assert_eq!(1, verified); - - let different_message = b"bye world"; - let different_digest = (*fil_hash(&different_message[0], different_message.len())) - .digest - .inner; - let not_verified = fil_verify( - &signature[0], - &different_digest[0], - different_digest.len(), - &public_key[0], - public_key.len(), - ); - - assert_eq!(0, not_verified); - - // garbage verification - let different_digest = vec![0, 1, 2, 3, 4]; - let not_verified = fil_verify( - &signature[0], - &different_digest[0], - different_digest.len(), - &public_key[0], - public_key.len(), - ); - - assert_eq!(0, not_verified); - } - } - - #[test] - fn private_key_with_seed() { - unsafe { - let seed = fil_32ByteArray { inner: [5u8; 32] }; - let private_key = (*fil_private_key_generate_with_seed(seed)) - .private_key - .inner; - assert_eq!( - [ - 115, 245, 77, 209, 4, 57, 40, 107, 10, 153, 141, 16, 153, 172, 85, 197, 125, - 163, 35, 217, 108, 241, 64, 235, 231, 220, 131, 1, 77, 253, 176, 19 - ], - private_key, - ); - } - } -} diff --git a/chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs b/chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs deleted file mode 100644 index 8389f117..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/bls/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod api; -pub mod types; diff --git a/chain/filecoin/filecoin-ffi/rust/src/bls/types.rs b/chain/filecoin/filecoin-ffi/rust/src/bls/types.rs deleted file mode 100644 index 53cb8b56..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/bls/types.rs +++ /dev/null @@ -1,67 +0,0 @@ -use crate::bls::api::{fil_BLSDigest, fil_BLSPrivateKey, fil_BLSPublicKey, fil_BLSSignature}; - -/// HashResponse - -#[repr(C)] -pub struct fil_HashResponse { - pub digest: fil_BLSDigest, -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_hash_response(ptr: *mut fil_HashResponse) { - let _ = Box::from_raw(ptr); -} - -/// AggregateResponse - -#[repr(C)] -pub struct fil_AggregateResponse { - pub signature: fil_BLSSignature, -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_aggregate_response(ptr: *mut fil_AggregateResponse) { - let _ = Box::from_raw(ptr); -} - -/// PrivateKeyGenerateResponse - -#[repr(C)] -pub struct fil_PrivateKeyGenerateResponse { - pub private_key: fil_BLSPrivateKey, -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_private_key_generate_response( - ptr: *mut fil_PrivateKeyGenerateResponse, -) { - let _ = Box::from_raw(ptr); -} - -/// PrivateKeySignResponse - -#[repr(C)] -pub struct fil_PrivateKeySignResponse { - pub signature: fil_BLSSignature, -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_private_key_sign_response( - ptr: *mut fil_PrivateKeySignResponse, -) { - let _ = Box::from_raw(ptr); -} - -/// PrivateKeyPublicKeyResponse - -#[repr(C)] -pub struct fil_PrivateKeyPublicKeyResponse { - pub public_key: fil_BLSPublicKey, -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_private_key_public_key_response( - ptr: *mut fil_PrivateKeyPublicKeyResponse, -) { - let _ = Box::from_raw(ptr); -} diff --git a/chain/filecoin/filecoin-ffi/rust/src/lib.rs b/chain/filecoin/filecoin-ffi/rust/src/lib.rs deleted file mode 100644 index 9d7ec544..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -#![deny(clippy::all)] -#![allow(clippy::missing_safety_doc)] - -pub mod bls; -pub mod proofs; -pub mod util; diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs deleted file mode 100644 index 8762bd80..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/proofs/api.rs +++ /dev/null @@ -1,1725 +0,0 @@ -use ffi_toolkit::{ - c_str_to_pbuf, catch_panic_response, raw_ptr, rust_str_to_c_str, FCPResponseStatus, -}; -use filecoin_proofs_api::seal::SealPreCommitPhase2Output; -use filecoin_proofs_api::{ - PieceInfo, RegisteredPoStProof, RegisteredSealProof, SectorId, UnpaddedByteIndex, - UnpaddedBytesAmount, -}; -use log::info; -use std::mem; -use std::path::PathBuf; -use std::slice::from_raw_parts; - -use super::helpers::{c_to_rust_post_proofs, to_private_replica_info_map}; -use super::types::*; -use crate::util::api::init_log; - -/// TODO: document -/// -#[no_mangle] -#[cfg(not(target_os = "windows"))] -pub unsafe extern "C" fn fil_write_with_alignment( - registered_proof: fil_RegisteredSealProof, - src_fd: libc::c_int, - src_size: u64, - dst_fd: libc::c_int, - existing_piece_sizes_ptr: *const u64, - existing_piece_sizes_len: libc::size_t, -) -> *mut fil_WriteWithAlignmentResponse { - catch_panic_response(|| { - init_log(); - - info!("write_with_alignment: start"); - - let mut response = fil_WriteWithAlignmentResponse::default(); - - let piece_sizes: Vec = - from_raw_parts(existing_piece_sizes_ptr, existing_piece_sizes_len) - .iter() - .map(|n| UnpaddedBytesAmount(*n)) - .collect(); - - let n = UnpaddedBytesAmount(src_size); - - match filecoin_proofs_api::seal::add_piece( - registered_proof.into(), - FileDescriptorRef::new(src_fd), - FileDescriptorRef::new(dst_fd), - n, - &piece_sizes, - ) { - Ok((info, written)) => { - response.comm_p = info.commitment; - response.left_alignment_unpadded = (written - n).into(); - response.status_code = FCPResponseStatus::FCPNoError; - response.total_write_unpadded = written.into(); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("write_with_alignment: finish"); - - raw_ptr(response) - }) -} - -/// TODO: document -/// -#[no_mangle] -#[cfg(not(target_os = "windows"))] -pub unsafe extern "C" fn fil_write_without_alignment( - registered_proof: fil_RegisteredSealProof, - src_fd: libc::c_int, - src_size: u64, - dst_fd: libc::c_int, -) -> *mut fil_WriteWithoutAlignmentResponse { - catch_panic_response(|| { - init_log(); - - info!("write_without_alignment: start"); - - let mut response = fil_WriteWithoutAlignmentResponse::default(); - - match filecoin_proofs_api::seal::write_and_preprocess( - registered_proof.into(), - FileDescriptorRef::new(src_fd), - FileDescriptorRef::new(dst_fd), - UnpaddedBytesAmount(src_size), - ) { - Ok((info, written)) => { - response.comm_p = info.commitment; - response.status_code = FCPResponseStatus::FCPNoError; - response.total_write_unpadded = written.into(); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("write_without_alignment: finish"); - - raw_ptr(response) - }) -} - -#[no_mangle] -pub unsafe extern "C" fn fil_fauxrep( - registered_proof: fil_RegisteredSealProof, - cache_dir_path: *const libc::c_char, - sealed_sector_path: *const libc::c_char, -) -> *mut fil_FauxRepResponse { - catch_panic_response(|| { - init_log(); - - info!("fauxrep: start"); - - let mut response: fil_FauxRepResponse = Default::default(); - - let result = filecoin_proofs_api::seal::fauxrep( - registered_proof.into(), - c_str_to_pbuf(cache_dir_path), - c_str_to_pbuf(sealed_sector_path), - ); - - match result { - Ok(output) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.commitment = output; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("fauxrep: finish"); - - raw_ptr(response) - }) -} - -#[no_mangle] -pub unsafe extern "C" fn fil_fauxrep2( - registered_proof: fil_RegisteredSealProof, - cache_dir_path: *const libc::c_char, - existing_p_aux_path: *const libc::c_char, -) -> *mut fil_FauxRepResponse { - catch_panic_response(|| { - init_log(); - - info!("fauxrep2: start"); - - let mut response: fil_FauxRepResponse = Default::default(); - - let result = filecoin_proofs_api::seal::fauxrep2( - registered_proof.into(), - c_str_to_pbuf(cache_dir_path), - c_str_to_pbuf(existing_p_aux_path), - ); - - match result { - Ok(output) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.commitment = output; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("fauxrep2: finish"); - - raw_ptr(response) - }) -} - -/// TODO: document -/// -#[no_mangle] -pub unsafe extern "C" fn fil_seal_pre_commit_phase1( - registered_proof: fil_RegisteredSealProof, - cache_dir_path: *const libc::c_char, - staged_sector_path: *const libc::c_char, - sealed_sector_path: *const libc::c_char, - sector_id: u64, - prover_id: fil_32ByteArray, - ticket: fil_32ByteArray, - pieces_ptr: *const fil_PublicPieceInfo, - pieces_len: libc::size_t, -) -> *mut fil_SealPreCommitPhase1Response { - catch_panic_response(|| { - init_log(); - - info!("seal_pre_commit_phase1: start"); - - let public_pieces: Vec = from_raw_parts(pieces_ptr, pieces_len) - .iter() - .cloned() - .map(Into::into) - .collect(); - - let mut response: fil_SealPreCommitPhase1Response = Default::default(); - - let result = filecoin_proofs_api::seal::seal_pre_commit_phase1( - registered_proof.into(), - c_str_to_pbuf(cache_dir_path), - c_str_to_pbuf(staged_sector_path), - c_str_to_pbuf(sealed_sector_path), - prover_id.inner, - SectorId::from(sector_id), - ticket.inner, - &public_pieces, - ) - .and_then(|output| serde_json::to_vec(&output).map_err(Into::into)); - - match result { - Ok(output) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.seal_pre_commit_phase1_output_ptr = output.as_ptr(); - response.seal_pre_commit_phase1_output_len = output.len(); - mem::forget(output); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("seal_pre_commit_phase1: finish"); - - raw_ptr(response) - }) -} - -/// TODO: document -/// -#[no_mangle] -pub unsafe extern "C" fn fil_seal_pre_commit_phase2( - seal_pre_commit_phase1_output_ptr: *const u8, - seal_pre_commit_phase1_output_len: libc::size_t, - cache_dir_path: *const libc::c_char, - sealed_sector_path: *const libc::c_char, -) -> *mut fil_SealPreCommitPhase2Response { - catch_panic_response(|| { - init_log(); - - info!("seal_pre_commit_phase2: start"); - - let mut response: fil_SealPreCommitPhase2Response = Default::default(); - - let phase_1_output = serde_json::from_slice(from_raw_parts( - seal_pre_commit_phase1_output_ptr, - seal_pre_commit_phase1_output_len, - )) - .map_err(Into::into); - - let result = phase_1_output.and_then(|o| { - filecoin_proofs_api::seal::seal_pre_commit_phase2::( - o, - c_str_to_pbuf(cache_dir_path), - c_str_to_pbuf(sealed_sector_path), - ) - }); - - match result { - Ok(output) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.comm_r = output.comm_r; - response.comm_d = output.comm_d; - response.registered_proof = output.registered_proof.into(); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("seal_pre_commit_phase2: finish"); - - raw_ptr(response) - }) -} - -/// TODO: document -/// -#[no_mangle] -pub unsafe extern "C" fn fil_seal_commit_phase1( - registered_proof: fil_RegisteredSealProof, - comm_r: fil_32ByteArray, - comm_d: fil_32ByteArray, - cache_dir_path: *const libc::c_char, - replica_path: *const libc::c_char, - sector_id: u64, - prover_id: fil_32ByteArray, - ticket: fil_32ByteArray, - seed: fil_32ByteArray, - pieces_ptr: *const fil_PublicPieceInfo, - pieces_len: libc::size_t, -) -> *mut fil_SealCommitPhase1Response { - catch_panic_response(|| { - init_log(); - - info!("seal_commit_phase1: start"); - - let mut response = fil_SealCommitPhase1Response::default(); - - let spcp2o = SealPreCommitPhase2Output { - registered_proof: registered_proof.into(), - comm_r: comm_r.inner, - comm_d: comm_d.inner, - }; - - let public_pieces: Vec = from_raw_parts(pieces_ptr, pieces_len) - .iter() - .cloned() - .map(Into::into) - .collect(); - - let result = filecoin_proofs_api::seal::seal_commit_phase1( - c_str_to_pbuf(cache_dir_path), - c_str_to_pbuf(replica_path), - prover_id.inner, - SectorId::from(sector_id), - ticket.inner, - seed.inner, - spcp2o, - &public_pieces, - ); - - match result.and_then(|output| serde_json::to_vec(&output).map_err(Into::into)) { - Ok(output) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.seal_commit_phase1_output_ptr = output.as_ptr(); - response.seal_commit_phase1_output_len = output.len(); - mem::forget(output); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("seal_commit_phase1: finish"); - - raw_ptr(response) - }) -} - -#[no_mangle] -pub unsafe extern "C" fn fil_seal_commit_phase2( - seal_commit_phase1_output_ptr: *const u8, - seal_commit_phase1_output_len: libc::size_t, - sector_id: u64, - prover_id: fil_32ByteArray, -) -> *mut fil_SealCommitPhase2Response { - catch_panic_response(|| { - init_log(); - - info!("seal_commit_phase2: start"); - - let mut response = fil_SealCommitPhase2Response::default(); - - let scp1o = serde_json::from_slice(from_raw_parts( - seal_commit_phase1_output_ptr, - seal_commit_phase1_output_len, - )) - .map_err(Into::into); - - let result = scp1o.and_then(|o| { - filecoin_proofs_api::seal::seal_commit_phase2( - o, - prover_id.inner, - SectorId::from(sector_id), - ) - }); - - match result { - Ok(output) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.proof_ptr = output.proof.as_ptr(); - response.proof_len = output.proof.len(); - mem::forget(output.proof); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("seal_commit_phase2: finish"); - - raw_ptr(response) - }) -} - -/// TODO: document -#[no_mangle] -pub unsafe extern "C" fn fil_unseal_range( - registered_proof: fil_RegisteredSealProof, - cache_dir_path: *const libc::c_char, - sealed_sector_fd_raw: libc::c_int, - unseal_output_fd_raw: libc::c_int, - sector_id: u64, - prover_id: fil_32ByteArray, - ticket: fil_32ByteArray, - comm_d: fil_32ByteArray, - unpadded_byte_index: u64, - unpadded_bytes_amount: u64, -) -> *mut fil_UnsealRangeResponse { - catch_panic_response(|| { - init_log(); - - info!("unseal_range: start"); - - use std::os::unix::io::{FromRawFd, IntoRawFd}; - - let mut sealed_sector = std::fs::File::from_raw_fd(sealed_sector_fd_raw); - let mut unseal_output = std::fs::File::from_raw_fd(unseal_output_fd_raw); - - let result = filecoin_proofs_api::seal::unseal_range( - registered_proof.into(), - c_str_to_pbuf(cache_dir_path), - &mut sealed_sector, - &mut unseal_output, - prover_id.inner, - SectorId::from(sector_id), - comm_d.inner, - ticket.inner, - UnpaddedByteIndex(unpadded_byte_index), - UnpaddedBytesAmount(unpadded_bytes_amount), - ); - - // keep all file descriptors alive until unseal_range returns - let _ = sealed_sector.into_raw_fd(); - let _ = unseal_output.into_raw_fd(); - - let mut response = fil_UnsealRangeResponse::default(); - - match result { - Ok(_) => { - response.status_code = FCPResponseStatus::FCPNoError; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - }; - - info!("unseal_range: finish"); - - raw_ptr(response) - }) -} - -/// Verifies the output of seal. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_verify_seal( - registered_proof: fil_RegisteredSealProof, - comm_r: fil_32ByteArray, - comm_d: fil_32ByteArray, - prover_id: fil_32ByteArray, - ticket: fil_32ByteArray, - seed: fil_32ByteArray, - sector_id: u64, - proof_ptr: *const u8, - proof_len: libc::size_t, -) -> *mut super::types::fil_VerifySealResponse { - catch_panic_response(|| { - init_log(); - - info!("verify_seal: start"); - - let mut proof_bytes: Vec = vec![0; proof_len]; - proof_bytes.clone_from_slice(from_raw_parts(proof_ptr, proof_len)); - - let result = filecoin_proofs_api::seal::verify_seal( - registered_proof.into(), - comm_r.inner, - comm_d.inner, - prover_id.inner, - SectorId::from(sector_id), - ticket.inner, - seed.inner, - &proof_bytes, - ); - - let mut response = fil_VerifySealResponse::default(); - - match result { - Ok(true) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.is_valid = true; - } - Ok(false) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.is_valid = false; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - }; - - info!("verify_seal: finish"); - - raw_ptr(response) - }) -} - -/// Verifies that a proof-of-spacetime is valid. -#[no_mangle] -pub unsafe extern "C" fn fil_verify_winning_post( - randomness: fil_32ByteArray, - replicas_ptr: *const fil_PublicReplicaInfo, - replicas_len: libc::size_t, - proofs_ptr: *const fil_PoStProof, - proofs_len: libc::size_t, - prover_id: fil_32ByteArray, -) -> *mut fil_VerifyWinningPoStResponse { - catch_panic_response(|| { - init_log(); - - info!("verify_winning_post: start"); - - let mut response = fil_VerifyWinningPoStResponse::default(); - - let convert = super::helpers::to_public_replica_info_map(replicas_ptr, replicas_len); - - let result = convert.and_then(|replicas| { - let post_proofs = c_to_rust_post_proofs(proofs_ptr, proofs_len)?; - let proofs: Vec = post_proofs.iter().flat_map(|pp| pp.clone().proof).collect(); - - filecoin_proofs_api::post::verify_winning_post( - &randomness.inner, - &proofs, - &replicas, - prover_id.inner, - ) - }); - - match result { - Ok(is_valid) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.is_valid = is_valid; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - }; - - info!("verify_winning_post: {}", "finish"); - raw_ptr(response) - }) -} - -/// TODO: document -/// -#[no_mangle] -pub unsafe extern "C" fn fil_generate_window_post( - randomness: fil_32ByteArray, - replicas_ptr: *const fil_PrivateReplicaInfo, - replicas_len: libc::size_t, - prover_id: fil_32ByteArray, -) -> *mut fil_GenerateWindowPoStResponse { - catch_panic_response(|| { - init_log(); - - info!("generate_window_post: start"); - - let mut response = fil_GenerateWindowPoStResponse::default(); - - let result = to_private_replica_info_map(replicas_ptr, replicas_len).and_then(|rs| { - filecoin_proofs_api::post::generate_window_post(&randomness.inner, &rs, prover_id.inner) - }); - - match result { - Ok(output) => { - let mapped: Vec = output - .iter() - .cloned() - .map(|(t, proof)| { - let out = fil_PoStProof { - registered_proof: (t).into(), - proof_len: proof.len(), - proof_ptr: proof.as_ptr(), - }; - - mem::forget(proof); - - out - }) - .collect(); - - response.status_code = FCPResponseStatus::FCPNoError; - response.proofs_ptr = mapped.as_ptr(); - response.proofs_len = mapped.len(); - mem::forget(mapped); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("generate_window_post: finish"); - - raw_ptr(response) - }) -} - -/// Verifies that a proof-of-spacetime is valid. -#[no_mangle] -pub unsafe extern "C" fn fil_verify_window_post( - randomness: fil_32ByteArray, - replicas_ptr: *const fil_PublicReplicaInfo, - replicas_len: libc::size_t, - proofs_ptr: *const fil_PoStProof, - proofs_len: libc::size_t, - prover_id: fil_32ByteArray, -) -> *mut fil_VerifyWindowPoStResponse { - catch_panic_response(|| { - init_log(); - - info!("verify_window_post: start"); - - let mut response = fil_VerifyWindowPoStResponse::default(); - - let convert = super::helpers::to_public_replica_info_map(replicas_ptr, replicas_len); - - let result = convert.and_then(|replicas| { - let post_proofs = c_to_rust_post_proofs(proofs_ptr, proofs_len)?; - - let proofs: Vec<(RegisteredPoStProof, &[u8])> = post_proofs - .iter() - .map(|x| (x.registered_proof, x.proof.as_ref())) - .collect(); - - filecoin_proofs_api::post::verify_window_post( - &randomness.inner, - &proofs, - &replicas, - prover_id.inner, - ) - }); - - match result { - Ok(is_valid) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.is_valid = is_valid; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - }; - - info!("verify_window_post: {}", "finish"); - raw_ptr(response) - }) -} - -/// Returns the merkle root for a piece after piece padding and alignment. -/// The caller is responsible for closing the passed in file descriptor. -#[no_mangle] -#[cfg(not(target_os = "windows"))] -pub unsafe extern "C" fn fil_generate_piece_commitment( - registered_proof: fil_RegisteredSealProof, - piece_fd_raw: libc::c_int, - unpadded_piece_size: u64, -) -> *mut fil_GeneratePieceCommitmentResponse { - catch_panic_response(|| { - init_log(); - - use std::os::unix::io::{FromRawFd, IntoRawFd}; - - let mut piece_file = std::fs::File::from_raw_fd(piece_fd_raw); - - let unpadded_piece_size = UnpaddedBytesAmount(unpadded_piece_size); - let result = filecoin_proofs_api::seal::generate_piece_commitment( - registered_proof.into(), - &mut piece_file, - unpadded_piece_size, - ); - - // avoid dropping the File which closes it - let _ = piece_file.into_raw_fd(); - - let mut response = fil_GeneratePieceCommitmentResponse::default(); - - match result { - Ok(meta) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.comm_p = meta.commitment; - response.num_bytes_aligned = meta.size.into(); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - raw_ptr(response) - }) -} - -/// Returns the merkle root for a sector containing the provided pieces. -#[no_mangle] -pub unsafe extern "C" fn fil_generate_data_commitment( - registered_proof: fil_RegisteredSealProof, - pieces_ptr: *const fil_PublicPieceInfo, - pieces_len: libc::size_t, -) -> *mut fil_GenerateDataCommitmentResponse { - catch_panic_response(|| { - init_log(); - - info!("generate_data_commitment: start"); - - let public_pieces: Vec = from_raw_parts(pieces_ptr, pieces_len) - .iter() - .cloned() - .map(Into::into) - .collect(); - - let result = - filecoin_proofs_api::seal::compute_comm_d(registered_proof.into(), &public_pieces); - - let mut response = fil_GenerateDataCommitmentResponse::default(); - - match result { - Ok(commitment) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.comm_d = commitment; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("generate_data_commitment: finish"); - - raw_ptr(response) - }) -} - -#[no_mangle] -pub unsafe extern "C" fn fil_clear_cache( - sector_size: u64, - cache_dir_path: *const libc::c_char, -) -> *mut fil_ClearCacheResponse { - catch_panic_response(|| { - init_log(); - - let result = - filecoin_proofs_api::seal::clear_cache(sector_size, &c_str_to_pbuf(cache_dir_path)); - - let mut response = fil_ClearCacheResponse::default(); - - match result { - Ok(_) => { - response.status_code = FCPResponseStatus::FCPNoError; - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - }; - - raw_ptr(response) - }) -} - -/// TODO: document -/// -#[no_mangle] -pub unsafe extern "C" fn fil_generate_winning_post_sector_challenge( - registered_proof: fil_RegisteredPoStProof, - randomness: fil_32ByteArray, - sector_set_len: u64, - prover_id: fil_32ByteArray, -) -> *mut fil_GenerateWinningPoStSectorChallenge { - catch_panic_response(|| { - init_log(); - - info!("generate_winning_post_sector_challenge: start"); - - let mut response = fil_GenerateWinningPoStSectorChallenge::default(); - - let result = filecoin_proofs_api::post::generate_winning_post_sector_challenge( - registered_proof.into(), - &randomness.inner, - sector_set_len, - prover_id.inner, - ); - - match result { - Ok(output) => { - let mapped: Vec = output.into_iter().map(u64::from).collect(); - - response.status_code = FCPResponseStatus::FCPNoError; - response.ids_ptr = mapped.as_ptr(); - response.ids_len = mapped.len(); - mem::forget(mapped); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("generate_winning_post_sector_challenge: finish"); - - raw_ptr(response) - }) -} - -/// TODO: document -/// -#[no_mangle] -pub unsafe extern "C" fn fil_generate_winning_post( - randomness: fil_32ByteArray, - replicas_ptr: *const fil_PrivateReplicaInfo, - replicas_len: libc::size_t, - prover_id: fil_32ByteArray, -) -> *mut fil_GenerateWinningPoStResponse { - catch_panic_response(|| { - init_log(); - - info!("generate_winning_post: start"); - - let mut response = fil_GenerateWinningPoStResponse::default(); - - let result = to_private_replica_info_map(replicas_ptr, replicas_len).and_then(|rs| { - filecoin_proofs_api::post::generate_winning_post( - &randomness.inner, - &rs, - prover_id.inner, - ) - }); - - match result { - Ok(output) => { - let mapped: Vec = output - .iter() - .cloned() - .map(|(t, proof)| { - let out = fil_PoStProof { - registered_proof: (t).into(), - proof_len: proof.len(), - proof_ptr: proof.as_ptr(), - }; - - mem::forget(proof); - - out - }) - .collect(); - - response.status_code = FCPResponseStatus::FCPNoError; - response.proofs_ptr = mapped.as_ptr(); - response.proofs_len = mapped.len(); - mem::forget(mapped); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - info!("generate_winning_post: finish"); - - raw_ptr(response) - }) -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_write_with_alignment_response( - ptr: *mut fil_WriteWithAlignmentResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_write_without_alignment_response( - ptr: *mut fil_WriteWithoutAlignmentResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_fauxrep_response(ptr: *mut fil_FauxRepResponse) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_seal_pre_commit_phase1_response( - ptr: *mut fil_SealPreCommitPhase1Response, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_seal_pre_commit_phase2_response( - ptr: *mut fil_SealPreCommitPhase2Response, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_seal_commit_phase1_response( - ptr: *mut fil_SealCommitPhase1Response, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_seal_commit_phase2_response( - ptr: *mut fil_SealCommitPhase2Response, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_unseal_range_response(ptr: *mut fil_UnsealRangeResponse) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_generate_piece_commitment_response( - ptr: *mut fil_GeneratePieceCommitmentResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_generate_data_commitment_response( - ptr: *mut fil_GenerateDataCommitmentResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_string_response(ptr: *mut fil_StringResponse) { - let _ = Box::from_raw(ptr); -} - -/// Returns the number of user bytes that will fit into a staged sector. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_max_user_bytes_per_staged_sector( - registered_proof: fil_RegisteredSealProof, -) -> u64 { - u64::from(UnpaddedBytesAmount::from( - RegisteredSealProof::from(registered_proof).sector_size(), - )) -} - -/// Returns the CID of the Groth parameter file for sealing. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_seal_params_cid( - registered_proof: fil_RegisteredSealProof, -) -> *mut fil_StringResponse { - registered_seal_proof_accessor(registered_proof, RegisteredSealProof::params_cid) -} - -/// Returns the CID of the verifying key-file for verifying a seal proof. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_seal_verifying_key_cid( - registered_proof: fil_RegisteredSealProof, -) -> *mut fil_StringResponse { - registered_seal_proof_accessor(registered_proof, RegisteredSealProof::verifying_key_cid) -} - -/// Returns the path from which the proofs library expects to find the Groth -/// parameter file used when sealing. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_seal_params_path( - registered_proof: fil_RegisteredSealProof, -) -> *mut fil_StringResponse { - registered_seal_proof_accessor(registered_proof, |p| { - p.cache_params_path() - .map(|pb| String::from(pb.to_string_lossy())) - }) -} - -/// Returns the path from which the proofs library expects to find the verifying -/// key-file used when verifying a seal proof. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_seal_verifying_key_path( - registered_proof: fil_RegisteredSealProof, -) -> *mut fil_StringResponse { - registered_seal_proof_accessor(registered_proof, |p| { - p.cache_verifying_key_path() - .map(|pb| String::from(pb.to_string_lossy())) - }) -} - -/// Returns the identity of the circuit for the provided seal proof. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_seal_circuit_identifier( - registered_proof: fil_RegisteredSealProof, -) -> *mut fil_StringResponse { - registered_seal_proof_accessor(registered_proof, RegisteredSealProof::circuit_identifier) -} - -/// Returns the version of the provided seal proof type. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_seal_version( - registered_proof: fil_RegisteredSealProof, -) -> *mut fil_StringResponse { - registered_seal_proof_accessor(registered_proof, |p| Ok(format!("{:?}", p))) -} - -/// Returns the CID of the Groth parameter file for generating a PoSt. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_post_params_cid( - registered_proof: fil_RegisteredPoStProof, -) -> *mut fil_StringResponse { - registered_post_proof_accessor(registered_proof, RegisteredPoStProof::params_cid) -} - -/// Returns the CID of the verifying key-file for verifying a PoSt proof. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_post_verifying_key_cid( - registered_proof: fil_RegisteredPoStProof, -) -> *mut fil_StringResponse { - registered_post_proof_accessor(registered_proof, RegisteredPoStProof::verifying_key_cid) -} - -/// Returns the path from which the proofs library expects to find the Groth -/// parameter file used when generating a PoSt. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_post_params_path( - registered_proof: fil_RegisteredPoStProof, -) -> *mut fil_StringResponse { - registered_post_proof_accessor(registered_proof, |p| { - p.cache_params_path() - .map(|pb| String::from(pb.to_string_lossy())) - }) -} - -/// Returns the path from which the proofs library expects to find the verifying -/// key-file used when verifying a PoSt proof. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_post_verifying_key_path( - registered_proof: fil_RegisteredPoStProof, -) -> *mut fil_StringResponse { - registered_post_proof_accessor(registered_proof, |p| { - p.cache_verifying_key_path() - .map(|pb| String::from(pb.to_string_lossy())) - }) -} - -/// Returns the identity of the circuit for the provided PoSt proof type. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_post_circuit_identifier( - registered_proof: fil_RegisteredPoStProof, -) -> *mut fil_StringResponse { - registered_post_proof_accessor(registered_proof, RegisteredPoStProof::circuit_identifier) -} - -/// Returns the version of the provided seal proof. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_get_post_version( - registered_proof: fil_RegisteredPoStProof, -) -> *mut fil_StringResponse { - registered_post_proof_accessor(registered_proof, |p| Ok(format!("{:?}", p))) -} - -unsafe fn registered_seal_proof_accessor( - registered_proof: fil_RegisteredSealProof, - op: fn(RegisteredSealProof) -> anyhow::Result, -) -> *mut fil_StringResponse { - let mut response = fil_StringResponse::default(); - - let rsp: RegisteredSealProof = registered_proof.into(); - - match op(rsp) { - Ok(s) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.string_val = rust_str_to_c_str(s); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - raw_ptr(response) -} - -unsafe fn registered_post_proof_accessor( - registered_proof: fil_RegisteredPoStProof, - op: fn(RegisteredPoStProof) -> anyhow::Result, -) -> *mut fil_StringResponse { - let mut response = fil_StringResponse::default(); - - let rsp: RegisteredPoStProof = registered_proof.into(); - - match op(rsp) { - Ok(s) => { - response.status_code = FCPResponseStatus::FCPNoError; - response.string_val = rust_str_to_c_str(s); - } - Err(err) => { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str(format!("{:?}", err)); - } - } - - raw_ptr(response) -} - -/// Deallocates a VerifySealResponse. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_verify_seal_response(ptr: *mut fil_VerifySealResponse) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_finalize_ticket_response( - ptr: *mut fil_FinalizeTicketResponse, -) { - let _ = Box::from_raw(ptr); -} - -/// Deallocates a VerifyPoStResponse. -/// -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_verify_winning_post_response( - ptr: *mut fil_VerifyWinningPoStResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_verify_window_post_response( - ptr: *mut fil_VerifyWindowPoStResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_generate_winning_post_response( - ptr: *mut fil_GenerateWinningPoStResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_generate_window_post_response( - ptr: *mut fil_GenerateWindowPoStResponse, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_generate_winning_post_sector_challenge( - ptr: *mut fil_GenerateWinningPoStSectorChallenge, -) { - let _ = Box::from_raw(ptr); -} - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_clear_cache_response(ptr: *mut fil_ClearCacheResponse) { - let _ = Box::from_raw(ptr); -} - -#[cfg(test)] -pub mod tests { - use std::io::{Read, Seek, SeekFrom, Write}; - use std::os::unix::io::IntoRawFd; - - use anyhow::Result; - use ffi_toolkit::{c_str_to_rust_str, FCPResponseStatus}; - use rand::{thread_rng, Rng}; - - use super::*; - use std::ffi::CStr; - - #[test] - fn test_write_with_and_without_alignment() -> Result<()> { - let registered_proof = fil_RegisteredSealProof::StackedDrg2KiBV1; - - // write some bytes to a temp file to be used as the byte source - let mut rng = thread_rng(); - let buf: Vec = (0..508).map(|_| rng.gen()).collect(); - - // first temp file occupies 4 nodes in a merkle tree built over the - // destination (after preprocessing) - let mut src_file_a = tempfile::tempfile()?; - src_file_a.write_all(&buf[0..127])?; - src_file_a.seek(SeekFrom::Start(0))?; - - // second occupies 16 nodes - let mut src_file_b = tempfile::tempfile()?; - src_file_b.write_all(&buf[0..508])?; - src_file_b.seek(SeekFrom::Start(0))?; - - // create a temp file to be used as the byte destination - let dest = tempfile::tempfile()?; - - // transmute temp files to file descriptors - let src_fd_a = src_file_a.into_raw_fd(); - let src_fd_b = src_file_b.into_raw_fd(); - let dst_fd = dest.into_raw_fd(); - - // write the first file - unsafe { - let resp = fil_write_without_alignment(registered_proof, src_fd_a, 127, dst_fd); - - if (*resp).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp).error_msg); - panic!("write_without_alignment failed: {:?}", msg); - } - - assert_eq!( - (*resp).total_write_unpadded, - 127, - "should have added 127 bytes of (unpadded) left alignment" - ); - } - - // write the second - unsafe { - let existing = vec![127u64]; - - let resp = fil_write_with_alignment( - registered_proof, - src_fd_b, - 508, - dst_fd, - existing.as_ptr(), - existing.len(), - ); - - if (*resp).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp).error_msg); - panic!("write_with_alignment failed: {:?}", msg); - } - - assert_eq!( - (*resp).left_alignment_unpadded, - 381, - "should have added 381 bytes of (unpadded) left alignment" - ); - } - - Ok(()) - } - - #[test] - fn test_proof_types() -> Result<()> { - let seal_types = vec![ - fil_RegisteredSealProof::StackedDrg2KiBV1, - fil_RegisteredSealProof::StackedDrg8MiBV1, - fil_RegisteredSealProof::StackedDrg512MiBV1, - fil_RegisteredSealProof::StackedDrg32GiBV1, - ]; - - let post_types = vec![ - fil_RegisteredPoStProof::StackedDrgWinning2KiBV1, - fil_RegisteredPoStProof::StackedDrgWinning8MiBV1, - fil_RegisteredPoStProof::StackedDrgWinning512MiBV1, - fil_RegisteredPoStProof::StackedDrgWinning32GiBV1, - fil_RegisteredPoStProof::StackedDrgWindow2KiBV1, - fil_RegisteredPoStProof::StackedDrgWindow8MiBV1, - fil_RegisteredPoStProof::StackedDrgWindow512MiBV1, - fil_RegisteredPoStProof::StackedDrgWindow32GiBV1, - ]; - - let num_ops = (seal_types.len() + post_types.len()) * 6; - - let mut pairs: Vec<(&str, *mut fil_StringResponse)> = Vec::with_capacity(num_ops); - - unsafe { - for st in seal_types { - pairs.push(("get_seal_params_cid", fil_get_seal_params_cid(st))); - pairs.push(( - "get_seal_verify_key_cid", - fil_get_seal_verifying_key_cid(st), - )); - pairs.push(("get_seal_verify_key_cid", fil_get_seal_params_path(st))); - pairs.push(( - "get_seal_verify_key_cid", - fil_get_seal_verifying_key_path(st), - )); - pairs.push(( - "get_seal_circuit_identifier", - fil_get_seal_circuit_identifier(st), - )); - pairs.push(("get_seal_version", fil_get_seal_version(st))); - } - - for pt in post_types { - pairs.push(("get_post_params_cid", fil_get_post_params_cid(pt))); - pairs.push(( - "get_post_verify_key_cid", - fil_get_post_verifying_key_cid(pt), - )); - pairs.push(("get_post_params_path", fil_get_post_params_path(pt))); - pairs.push(( - "get_post_verifying_key_path", - fil_get_post_verifying_key_path(pt), - )); - pairs.push(( - "get_post_circuit_identifier", - fil_get_post_circuit_identifier(pt), - )); - pairs.push(("get_post_version", fil_get_post_version(pt))); - } - } - - for (label, r) in pairs { - unsafe { - assert_eq!( - (*r).status_code, - FCPResponseStatus::FCPNoError, - "non-success exit code from {:?}: {:?}", - label, - c_str_to_rust_str((*r).error_msg) - ); - - let x = CStr::from_ptr((*r).string_val); - let y = x.to_str().unwrap(); - - assert!(!y.is_empty()); - - fil_destroy_string_response(r); - } - } - - Ok(()) - } - - #[test] - fn test_sealing() -> Result<()> { - let wrap = |x| fil_32ByteArray { inner: x }; - - // miscellaneous setup and shared values - let registered_proof_seal = fil_RegisteredSealProof::StackedDrg2KiBV1; - let registered_proof_winning_post = fil_RegisteredPoStProof::StackedDrgWinning2KiBV1; - let registered_proof_window_post = fil_RegisteredPoStProof::StackedDrgWindow2KiBV1; - - let cache_dir = tempfile::tempdir()?; - let cache_dir_path = cache_dir.into_path(); - - let prover_id = fil_32ByteArray { inner: [1u8; 32] }; - let randomness = fil_32ByteArray { inner: [7u8; 32] }; - let sector_id = 42; - let seed = fil_32ByteArray { inner: [5u8; 32] }; - let ticket = fil_32ByteArray { inner: [6u8; 32] }; - - // create a byte source (a user's piece) - let mut rng = thread_rng(); - let buf_a: Vec = (0..2032).map(|_| rng.gen()).collect(); - - let mut piece_file_a = tempfile::tempfile()?; - piece_file_a.write_all(&buf_a[0..127])?; - piece_file_a.seek(SeekFrom::Start(0))?; - - let mut piece_file_b = tempfile::tempfile()?; - piece_file_b.write_all(&buf_a[0..1016])?; - piece_file_b.seek(SeekFrom::Start(0))?; - - // create the staged sector (the byte destination) - let (staged_file, staged_path) = tempfile::NamedTempFile::new()?.keep()?; - - // create a temp file to be used as the byte destination - let (sealed_file, sealed_path) = tempfile::NamedTempFile::new()?.keep()?; - - // last temp file is used to output unsealed bytes - let (unseal_file, unseal_path) = tempfile::NamedTempFile::new()?.keep()?; - - // transmute temp files to file descriptors - let piece_file_a_fd = piece_file_a.into_raw_fd(); - let piece_file_b_fd = piece_file_b.into_raw_fd(); - let staged_sector_fd = staged_file.into_raw_fd(); - - unsafe { - let resp_a1 = fil_write_without_alignment( - registered_proof_seal, - piece_file_a_fd, - 127, - staged_sector_fd, - ); - - if (*resp_a1).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_a1).error_msg); - panic!("write_without_alignment failed: {:?}", msg); - } - - let existing_piece_sizes = vec![127]; - - let resp_a2 = fil_write_with_alignment( - registered_proof_seal, - piece_file_b_fd, - 1016, - staged_sector_fd, - existing_piece_sizes.as_ptr(), - existing_piece_sizes.len(), - ); - - if (*resp_a2).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_a2).error_msg); - panic!("write_with_alignment failed: {:?}", msg); - } - - let pieces = vec![ - fil_PublicPieceInfo { - num_bytes: 127, - comm_p: (*resp_a1).comm_p, - }, - fil_PublicPieceInfo { - num_bytes: 1016, - comm_p: (*resp_a2).comm_p, - }, - ]; - - let resp_x = - fil_generate_data_commitment(registered_proof_seal, pieces.as_ptr(), pieces.len()); - - if (*resp_x).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_x).error_msg); - panic!("generate_data_commitment failed: {:?}", msg); - } - - let cache_dir_path_c_str = rust_str_to_c_str(cache_dir_path.to_str().unwrap()); - let staged_path_c_str = rust_str_to_c_str(staged_path.to_str().unwrap()); - let replica_path_c_str = rust_str_to_c_str(sealed_path.to_str().unwrap()); - let unseal_path_c_str = rust_str_to_c_str(unseal_path.to_str().unwrap()); - - let resp_b1 = fil_seal_pre_commit_phase1( - registered_proof_seal, - cache_dir_path_c_str, - staged_path_c_str, - replica_path_c_str, - sector_id, - prover_id, - ticket, - pieces.as_ptr(), - pieces.len(), - ); - - if (*resp_b1).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_b1).error_msg); - panic!("seal_pre_commit_phase1 failed: {:?}", msg); - } - - let resp_b2 = fil_seal_pre_commit_phase2( - (*resp_b1).seal_pre_commit_phase1_output_ptr, - (*resp_b1).seal_pre_commit_phase1_output_len, - cache_dir_path_c_str, - replica_path_c_str, - ); - - if (*resp_b2).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_b2).error_msg); - panic!("seal_pre_commit_phase2 failed: {:?}", msg); - } - - let pre_computed_comm_d = &(*resp_x).comm_d; - let pre_commit_comm_d = &(*resp_b2).comm_d; - - assert_eq!( - format!("{:x?}", &pre_computed_comm_d), - format!("{:x?}", &pre_commit_comm_d), - "pre-computed CommD and pre-commit CommD don't match" - ); - - let resp_c1 = fil_seal_commit_phase1( - registered_proof_seal, - wrap((*resp_b2).comm_r), - wrap((*resp_b2).comm_d), - cache_dir_path_c_str, - replica_path_c_str, - sector_id, - prover_id, - ticket, - seed, - pieces.as_ptr(), - pieces.len(), - ); - - if (*resp_c1).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_c1).error_msg); - panic!("seal_commit_phase1 failed: {:?}", msg); - } - - let resp_c2 = fil_seal_commit_phase2( - (*resp_c1).seal_commit_phase1_output_ptr, - (*resp_c1).seal_commit_phase1_output_len, - sector_id, - prover_id, - ); - - if (*resp_c2).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_c2).error_msg); - panic!("seal_commit_phase2 failed: {:?}", msg); - } - - let resp_d = fil_verify_seal( - registered_proof_seal, - wrap((*resp_b2).comm_r), - wrap((*resp_b2).comm_d), - prover_id, - ticket, - seed, - sector_id, - (*resp_c2).proof_ptr, - (*resp_c2).proof_len, - ); - - if (*resp_d).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_d).error_msg); - panic!("seal_commit failed: {:?}", msg); - } - - assert!((*resp_d).is_valid, "proof was not valid"); - - let resp_e = fil_unseal_range( - registered_proof_seal, - cache_dir_path_c_str, - sealed_file.into_raw_fd(), - unseal_file.into_raw_fd(), - sector_id, - prover_id, - ticket, - wrap((*resp_b2).comm_d), - 0, - 2032, - ); - - if (*resp_e).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_e).error_msg); - panic!("unseal failed: {:?}", msg); - } - - // ensure unsealed bytes match what we had in our piece - let mut buf_b = Vec::with_capacity(2032); - let mut f = std::fs::File::open(unseal_path)?; - - let _ = f.read_to_end(&mut buf_b)?; - - let piece_a_len = (*resp_a1).total_write_unpadded as usize; - let piece_b_len = (*resp_a2).total_write_unpadded as usize; - let piece_b_prefix_len = (*resp_a2).left_alignment_unpadded as usize; - - let alignment = vec![0; piece_b_prefix_len]; - - let expected = [ - &buf_a[0..piece_a_len], - &alignment[..], - &buf_a[0..(piece_b_len - piece_b_prefix_len)], - ] - .concat(); - - assert_eq!( - format!("{:x?}", &expected), - format!("{:x?}", &buf_b), - "original bytes don't match unsealed bytes" - ); - - // generate a PoSt - - let sectors = vec![sector_id]; - let resp_f = fil_generate_winning_post_sector_challenge( - registered_proof_winning_post, - randomness, - sectors.len() as u64, - prover_id, - ); - - if (*resp_f).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_f).error_msg); - panic!("generate_candidates failed: {:?}", msg); - } - - // exercise the ticket-finalizing code path (but don't do anything - // with the results - let result: &[u64] = from_raw_parts((*resp_f).ids_ptr, (*resp_f).ids_len); - - if result.is_empty() { - panic!("generate_candidates produced no results"); - } - - let private_replicas = vec![fil_PrivateReplicaInfo { - registered_proof: registered_proof_winning_post, - cache_dir_path: cache_dir_path_c_str, - comm_r: (*resp_b2).comm_r, - replica_path: replica_path_c_str, - sector_id, - }]; - - // winning post - - let resp_h = fil_generate_winning_post( - randomness, - private_replicas.as_ptr(), - private_replicas.len(), - prover_id, - ); - - if (*resp_h).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_h).error_msg); - panic!("generate_winning_post failed: {:?}", msg); - } - let public_replicas = vec![fil_PublicReplicaInfo { - registered_proof: registered_proof_winning_post, - sector_id, - comm_r: (*resp_b2).comm_r, - }]; - - let resp_i = fil_verify_winning_post( - randomness, - public_replicas.as_ptr(), - public_replicas.len(), - (*resp_h).proofs_ptr, - (*resp_h).proofs_len, - prover_id, - ); - - if (*resp_i).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_i).error_msg); - panic!("verify_winning_post failed: {:?}", msg); - } - - if !(*resp_i).is_valid { - panic!("verify_winning_post rejected the provided proof as invalid"); - } - - // window post - - let private_replicas = vec![fil_PrivateReplicaInfo { - registered_proof: registered_proof_window_post, - cache_dir_path: cache_dir_path_c_str, - comm_r: (*resp_b2).comm_r, - replica_path: replica_path_c_str, - sector_id, - }]; - - let resp_j = fil_generate_window_post( - randomness, - private_replicas.as_ptr(), - private_replicas.len(), - prover_id, - ); - - if (*resp_j).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_j).error_msg); - panic!("generate_window_post failed: {:?}", msg); - } - - let public_replicas = vec![fil_PublicReplicaInfo { - registered_proof: registered_proof_window_post, - sector_id, - comm_r: (*resp_b2).comm_r, - }]; - - let resp_k = fil_verify_window_post( - randomness, - public_replicas.as_ptr(), - public_replicas.len(), - (*resp_j).proofs_ptr, - (*resp_j).proofs_len, - prover_id, - ); - - if (*resp_k).status_code != FCPResponseStatus::FCPNoError { - let msg = c_str_to_rust_str((*resp_k).error_msg); - panic!("verify_window_post failed: {:?}", msg); - } - - if !(*resp_k).is_valid { - panic!("verify_window_post rejected the provided proof as invalid"); - } - - fil_destroy_write_without_alignment_response(resp_a1); - fil_destroy_write_with_alignment_response(resp_a2); - fil_destroy_generate_data_commitment_response(resp_x); - - fil_destroy_seal_pre_commit_phase1_response(resp_b1); - fil_destroy_seal_pre_commit_phase2_response(resp_b2); - fil_destroy_seal_commit_phase1_response(resp_c1); - fil_destroy_seal_commit_phase2_response(resp_c2); - - fil_destroy_verify_seal_response(resp_d); - fil_destroy_unseal_range_response(resp_e); - - fil_destroy_generate_winning_post_sector_challenge(resp_f); - fil_destroy_generate_winning_post_response(resp_h); - fil_destroy_verify_winning_post_response(resp_i); - - fil_destroy_generate_window_post_response(resp_j); - fil_destroy_verify_window_post_response(resp_k); - - c_str_to_rust_str(cache_dir_path_c_str); - c_str_to_rust_str(staged_path_c_str); - c_str_to_rust_str(replica_path_c_str); - c_str_to_rust_str(unseal_path_c_str); - } - - Ok(()) - } -} diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs deleted file mode 100644 index 132666a4..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/proofs/helpers.rs +++ /dev/null @@ -1,134 +0,0 @@ -use std::collections::btree_map::BTreeMap; -use std::path::PathBuf; -use std::slice::from_raw_parts; - -use anyhow::{ensure, Result}; -use ffi_toolkit::{c_str_to_pbuf, c_str_to_rust_str}; -use filecoin_proofs_api::{PrivateReplicaInfo, PublicReplicaInfo, SectorId}; - -use super::types::{fil_PrivateReplicaInfo, fil_PublicReplicaInfo, fil_RegisteredPoStProof}; -use crate::proofs::types::{fil_PoStProof, PoStProof}; - -#[derive(Debug, Clone)] -struct PublicReplicaInfoTmp { - pub registered_proof: fil_RegisteredPoStProof, - pub comm_r: [u8; 32], - pub sector_id: u64, -} - -#[allow(clippy::type_complexity)] -pub unsafe fn to_public_replica_info_map( - replicas_ptr: *const fil_PublicReplicaInfo, - replicas_len: libc::size_t, -) -> Result> { - use rayon::prelude::*; - - ensure!(!replicas_ptr.is_null(), "replicas_ptr must not be null"); - - let mut replicas = Vec::new(); - - for ffi_info in from_raw_parts(replicas_ptr, replicas_len) { - replicas.push(PublicReplicaInfoTmp { - sector_id: ffi_info.sector_id, - registered_proof: ffi_info.registered_proof, - comm_r: ffi_info.comm_r, - }); - } - - let map = replicas - .into_par_iter() - .map(|info| { - let PublicReplicaInfoTmp { - registered_proof, - comm_r, - sector_id, - } = info; - - ( - SectorId::from(sector_id), - PublicReplicaInfo::new(registered_proof.into(), comm_r), - ) - }) - .collect(); - - Ok(map) -} - -#[derive(Debug, Clone)] -struct PrivateReplicaInfoTmp { - pub registered_proof: fil_RegisteredPoStProof, - pub cache_dir_path: std::path::PathBuf, - pub comm_r: [u8; 32], - pub replica_path: std::path::PathBuf, - pub sector_id: u64, -} - -pub unsafe fn to_private_replica_info_map( - replicas_ptr: *const fil_PrivateReplicaInfo, - replicas_len: libc::size_t, -) -> Result> { - use rayon::prelude::*; - - ensure!(!replicas_ptr.is_null(), "replicas_ptr must not be null"); - - let replicas: Vec<_> = from_raw_parts(replicas_ptr, replicas_len) - .iter() - .map(|ffi_info| { - let cache_dir_path = c_str_to_pbuf(ffi_info.cache_dir_path); - let replica_path = c_str_to_rust_str(ffi_info.replica_path).to_string(); - - PrivateReplicaInfoTmp { - registered_proof: ffi_info.registered_proof, - cache_dir_path, - comm_r: ffi_info.comm_r, - replica_path: PathBuf::from(replica_path), - sector_id: ffi_info.sector_id, - } - }) - .collect(); - - let map = replicas - .into_par_iter() - .map(|info| { - let PrivateReplicaInfoTmp { - registered_proof, - cache_dir_path, - comm_r, - replica_path, - sector_id, - } = info; - - ( - SectorId::from(sector_id), - PrivateReplicaInfo::new( - registered_proof.into(), - comm_r, - cache_dir_path, - replica_path, - ), - ) - }) - .collect(); - - Ok(map) -} - -pub unsafe fn c_to_rust_post_proofs( - post_proofs_ptr: *const fil_PoStProof, - post_proofs_len: libc::size_t, -) -> Result> { - ensure!( - !post_proofs_ptr.is_null(), - "post_proofs_ptr must not be null" - ); - - let out = from_raw_parts(post_proofs_ptr, post_proofs_len) - .iter() - .map(|fpp| PoStProof { - registered_proof: fpp.registered_proof.into(), - proof: from_raw_parts(fpp.proof_ptr, fpp.proof_len).to_vec(), - }) - .collect(); - - Ok(out) -} diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs deleted file mode 100644 index 1a67a192..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/proofs/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -mod helpers; - -pub mod api; -pub mod types; diff --git a/chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs b/chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs deleted file mode 100644 index 6ae0f852..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/proofs/types.rs +++ /dev/null @@ -1,609 +0,0 @@ -use std::io::{Error, SeekFrom}; -use std::ptr; -use std::slice::from_raw_parts; - -use anyhow::Result; -use drop_struct_macro_derive::DropStructMacro; -use ffi_toolkit::{code_and_message_impl, free_c_str, CodeAndMessage, FCPResponseStatus}; -use filecoin_proofs_api::{ - PieceInfo, RegisteredPoStProof, RegisteredSealProof, UnpaddedBytesAmount, -}; - -#[repr(C)] -#[derive(Debug, Clone, Copy)] -pub struct fil_32ByteArray { - pub inner: [u8; 32], -} - -/// FileDescriptorRef does not drop its file descriptor when it is dropped. Its -/// owner must manage the lifecycle of the file descriptor. -pub struct FileDescriptorRef(std::mem::ManuallyDrop); - -impl FileDescriptorRef { - #[cfg(not(target_os = "windows"))] - pub unsafe fn new(raw: std::os::unix::io::RawFd) -> Self { - use std::os::unix::io::FromRawFd; - FileDescriptorRef(std::mem::ManuallyDrop::new(std::fs::File::from_raw_fd(raw))) - } -} - -impl std::io::Read for FileDescriptorRef { - fn read(&mut self, buf: &mut [u8]) -> std::io::Result { - self.0.read(buf) - } -} - -impl std::io::Write for FileDescriptorRef { - fn write(&mut self, buf: &[u8]) -> Result { - self.0.write(buf) - } - - fn flush(&mut self) -> Result<(), Error> { - self.0.flush() - } -} - -impl std::io::Seek for FileDescriptorRef { - fn seek(&mut self, pos: SeekFrom) -> Result { - self.0.seek(pos) - } -} - -#[repr(C)] -#[derive(Debug, Clone, Copy)] -pub enum fil_RegisteredSealProof { - StackedDrg2KiBV1, - StackedDrg8MiBV1, - StackedDrg512MiBV1, - StackedDrg32GiBV1, - StackedDrg64GiBV1, -} - -impl From for fil_RegisteredSealProof { - fn from(other: RegisteredSealProof) -> Self { - match other { - RegisteredSealProof::StackedDrg2KiBV1 => fil_RegisteredSealProof::StackedDrg2KiBV1, - RegisteredSealProof::StackedDrg8MiBV1 => fil_RegisteredSealProof::StackedDrg8MiBV1, - RegisteredSealProof::StackedDrg512MiBV1 => fil_RegisteredSealProof::StackedDrg512MiBV1, - RegisteredSealProof::StackedDrg32GiBV1 => fil_RegisteredSealProof::StackedDrg32GiBV1, - RegisteredSealProof::StackedDrg64GiBV1 => fil_RegisteredSealProof::StackedDrg64GiBV1, - } - } -} - -impl From for RegisteredSealProof { - fn from(other: fil_RegisteredSealProof) -> Self { - match other { - fil_RegisteredSealProof::StackedDrg2KiBV1 => RegisteredSealProof::StackedDrg2KiBV1, - fil_RegisteredSealProof::StackedDrg8MiBV1 => RegisteredSealProof::StackedDrg8MiBV1, - fil_RegisteredSealProof::StackedDrg512MiBV1 => RegisteredSealProof::StackedDrg512MiBV1, - fil_RegisteredSealProof::StackedDrg32GiBV1 => RegisteredSealProof::StackedDrg32GiBV1, - fil_RegisteredSealProof::StackedDrg64GiBV1 => RegisteredSealProof::StackedDrg64GiBV1, - } - } -} - -#[repr(C)] -#[derive(Debug, Clone, Copy)] -pub enum fil_RegisteredPoStProof { - StackedDrgWinning2KiBV1, - StackedDrgWinning8MiBV1, - StackedDrgWinning512MiBV1, - StackedDrgWinning32GiBV1, - StackedDrgWinning64GiBV1, - StackedDrgWindow2KiBV1, - StackedDrgWindow8MiBV1, - StackedDrgWindow512MiBV1, - StackedDrgWindow32GiBV1, - StackedDrgWindow64GiBV1, -} - -impl From for fil_RegisteredPoStProof { - fn from(other: RegisteredPoStProof) -> Self { - use RegisteredPoStProof::*; - - match other { - StackedDrgWinning2KiBV1 => fil_RegisteredPoStProof::StackedDrgWinning2KiBV1, - StackedDrgWinning8MiBV1 => fil_RegisteredPoStProof::StackedDrgWinning8MiBV1, - StackedDrgWinning512MiBV1 => fil_RegisteredPoStProof::StackedDrgWinning512MiBV1, - StackedDrgWinning32GiBV1 => fil_RegisteredPoStProof::StackedDrgWinning32GiBV1, - StackedDrgWinning64GiBV1 => fil_RegisteredPoStProof::StackedDrgWinning64GiBV1, - StackedDrgWindow2KiBV1 => fil_RegisteredPoStProof::StackedDrgWindow2KiBV1, - StackedDrgWindow8MiBV1 => fil_RegisteredPoStProof::StackedDrgWindow8MiBV1, - StackedDrgWindow512MiBV1 => fil_RegisteredPoStProof::StackedDrgWindow512MiBV1, - StackedDrgWindow32GiBV1 => fil_RegisteredPoStProof::StackedDrgWindow32GiBV1, - StackedDrgWindow64GiBV1 => fil_RegisteredPoStProof::StackedDrgWindow64GiBV1, - } - } -} - -impl From for RegisteredPoStProof { - fn from(other: fil_RegisteredPoStProof) -> Self { - use RegisteredPoStProof::*; - - match other { - fil_RegisteredPoStProof::StackedDrgWinning2KiBV1 => StackedDrgWinning2KiBV1, - fil_RegisteredPoStProof::StackedDrgWinning8MiBV1 => StackedDrgWinning8MiBV1, - fil_RegisteredPoStProof::StackedDrgWinning512MiBV1 => StackedDrgWinning512MiBV1, - fil_RegisteredPoStProof::StackedDrgWinning32GiBV1 => StackedDrgWinning32GiBV1, - fil_RegisteredPoStProof::StackedDrgWinning64GiBV1 => StackedDrgWinning64GiBV1, - fil_RegisteredPoStProof::StackedDrgWindow2KiBV1 => StackedDrgWindow2KiBV1, - fil_RegisteredPoStProof::StackedDrgWindow8MiBV1 => StackedDrgWindow8MiBV1, - fil_RegisteredPoStProof::StackedDrgWindow512MiBV1 => StackedDrgWindow512MiBV1, - fil_RegisteredPoStProof::StackedDrgWindow32GiBV1 => StackedDrgWindow32GiBV1, - fil_RegisteredPoStProof::StackedDrgWindow64GiBV1 => StackedDrgWindow64GiBV1, - } - } -} - -#[repr(C)] -#[derive(Clone)] -pub struct fil_PublicPieceInfo { - pub num_bytes: u64, - pub comm_p: [u8; 32], -} - -impl From for PieceInfo { - fn from(x: fil_PublicPieceInfo) -> Self { - let fil_PublicPieceInfo { num_bytes, comm_p } = x; - PieceInfo { - commitment: comm_p, - size: UnpaddedBytesAmount(num_bytes), - } - } -} - -#[repr(C)] -#[derive(Clone)] -pub struct fil_PoStProof { - pub registered_proof: fil_RegisteredPoStProof, - pub proof_len: libc::size_t, - pub proof_ptr: *const u8, -} - -impl Drop for fil_PoStProof { - fn drop(&mut self) { - let _ = unsafe { - Vec::from_raw_parts(self.proof_ptr as *mut u8, self.proof_len, self.proof_len) - }; - } -} - -#[derive(Clone, Debug)] -pub struct PoStProof { - pub registered_proof: RegisteredPoStProof, - pub proof: Vec, -} - -impl From for PoStProof { - fn from(other: fil_PoStProof) -> Self { - let proof = unsafe { from_raw_parts(other.proof_ptr, other.proof_len).to_vec() }; - - PoStProof { - registered_proof: other.registered_proof.into(), - proof, - } - } -} - -#[repr(C)] -#[derive(Clone)] -pub struct fil_PrivateReplicaInfo { - pub registered_proof: fil_RegisteredPoStProof, - pub cache_dir_path: *const libc::c_char, - pub comm_r: [u8; 32], - pub replica_path: *const libc::c_char, - pub sector_id: u64, -} - -#[repr(C)] -#[derive(Clone)] -pub struct fil_PublicReplicaInfo { - pub registered_proof: fil_RegisteredPoStProof, - pub comm_r: [u8; 32], - pub sector_id: u64, -} - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_GenerateWinningPoStSectorChallenge { - pub error_msg: *const libc::c_char, - pub status_code: FCPResponseStatus, - pub ids_ptr: *const u64, - pub ids_len: libc::size_t, -} - -impl Default for fil_GenerateWinningPoStSectorChallenge { - fn default() -> fil_GenerateWinningPoStSectorChallenge { - fil_GenerateWinningPoStSectorChallenge { - ids_len: 0, - ids_ptr: ptr::null(), - error_msg: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - } - } -} - -code_and_message_impl!(fil_GenerateWinningPoStSectorChallenge); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_GenerateWinningPoStResponse { - pub error_msg: *const libc::c_char, - pub proofs_len: libc::size_t, - pub proofs_ptr: *const fil_PoStProof, - pub status_code: FCPResponseStatus, -} - -impl Default for fil_GenerateWinningPoStResponse { - fn default() -> fil_GenerateWinningPoStResponse { - fil_GenerateWinningPoStResponse { - error_msg: ptr::null(), - proofs_len: 0, - proofs_ptr: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - } - } -} - -code_and_message_impl!(fil_GenerateWinningPoStResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_GenerateWindowPoStResponse { - pub error_msg: *const libc::c_char, - pub proofs_len: libc::size_t, - pub proofs_ptr: *const fil_PoStProof, - pub status_code: FCPResponseStatus, -} - -impl Default for fil_GenerateWindowPoStResponse { - fn default() -> fil_GenerateWindowPoStResponse { - fil_GenerateWindowPoStResponse { - error_msg: ptr::null(), - proofs_len: 0, - proofs_ptr: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - } - } -} - -code_and_message_impl!(fil_GenerateWindowPoStResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_WriteWithAlignmentResponse { - pub comm_p: [u8; 32], - pub error_msg: *const libc::c_char, - pub left_alignment_unpadded: u64, - pub status_code: FCPResponseStatus, - pub total_write_unpadded: u64, -} - -impl Default for fil_WriteWithAlignmentResponse { - fn default() -> fil_WriteWithAlignmentResponse { - fil_WriteWithAlignmentResponse { - comm_p: Default::default(), - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - left_alignment_unpadded: 0, - total_write_unpadded: 0, - } - } -} - -code_and_message_impl!(fil_WriteWithAlignmentResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_WriteWithoutAlignmentResponse { - pub comm_p: [u8; 32], - pub error_msg: *const libc::c_char, - pub status_code: FCPResponseStatus, - pub total_write_unpadded: u64, -} - -impl Default for fil_WriteWithoutAlignmentResponse { - fn default() -> fil_WriteWithoutAlignmentResponse { - fil_WriteWithoutAlignmentResponse { - comm_p: Default::default(), - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - total_write_unpadded: 0, - } - } -} - -code_and_message_impl!(fil_WriteWithoutAlignmentResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_SealPreCommitPhase1Response { - pub error_msg: *const libc::c_char, - pub status_code: FCPResponseStatus, - pub seal_pre_commit_phase1_output_ptr: *const u8, - pub seal_pre_commit_phase1_output_len: libc::size_t, -} - -impl Default for fil_SealPreCommitPhase1Response { - fn default() -> fil_SealPreCommitPhase1Response { - fil_SealPreCommitPhase1Response { - error_msg: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - seal_pre_commit_phase1_output_ptr: ptr::null(), - seal_pre_commit_phase1_output_len: 0, - } - } -} - -code_and_message_impl!(fil_SealPreCommitPhase1Response); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_FauxRepResponse { - pub error_msg: *const libc::c_char, - pub status_code: FCPResponseStatus, - pub commitment: [u8; 32], -} - -impl Default for fil_FauxRepResponse { - fn default() -> fil_FauxRepResponse { - fil_FauxRepResponse { - error_msg: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - commitment: Default::default(), - } - } -} - -code_and_message_impl!(fil_FauxRepResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_SealPreCommitPhase2Response { - pub error_msg: *const libc::c_char, - pub status_code: FCPResponseStatus, - pub registered_proof: fil_RegisteredSealProof, - pub comm_d: [u8; 32], - pub comm_r: [u8; 32], -} - -impl Default for fil_SealPreCommitPhase2Response { - fn default() -> fil_SealPreCommitPhase2Response { - fil_SealPreCommitPhase2Response { - error_msg: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - registered_proof: fil_RegisteredSealProof::StackedDrg2KiBV1, - comm_d: Default::default(), - comm_r: Default::default(), - } - } -} - -code_and_message_impl!(fil_SealPreCommitPhase2Response); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_SealCommitPhase1Response { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub seal_commit_phase1_output_ptr: *const u8, - pub seal_commit_phase1_output_len: libc::size_t, -} - -impl Default for fil_SealCommitPhase1Response { - fn default() -> fil_SealCommitPhase1Response { - fil_SealCommitPhase1Response { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - seal_commit_phase1_output_ptr: ptr::null(), - seal_commit_phase1_output_len: 0, - } - } -} - -code_and_message_impl!(fil_SealCommitPhase1Response); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_SealCommitPhase2Response { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub proof_ptr: *const u8, - pub proof_len: libc::size_t, -} - -impl Default for fil_SealCommitPhase2Response { - fn default() -> fil_SealCommitPhase2Response { - fil_SealCommitPhase2Response { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - proof_ptr: ptr::null(), - proof_len: 0, - } - } -} - -code_and_message_impl!(fil_SealCommitPhase2Response); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_UnsealRangeResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, -} - -impl Default for fil_UnsealRangeResponse { - fn default() -> fil_UnsealRangeResponse { - fil_UnsealRangeResponse { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - } - } -} - -code_and_message_impl!(fil_UnsealRangeResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_VerifySealResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub is_valid: bool, -} - -impl Default for fil_VerifySealResponse { - fn default() -> fil_VerifySealResponse { - fil_VerifySealResponse { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - is_valid: false, - } - } -} - -code_and_message_impl!(fil_VerifySealResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_VerifyWinningPoStResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub is_valid: bool, -} - -impl Default for fil_VerifyWinningPoStResponse { - fn default() -> fil_VerifyWinningPoStResponse { - fil_VerifyWinningPoStResponse { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - is_valid: false, - } - } -} - -code_and_message_impl!(fil_VerifyWinningPoStResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_VerifyWindowPoStResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub is_valid: bool, -} - -impl Default for fil_VerifyWindowPoStResponse { - fn default() -> fil_VerifyWindowPoStResponse { - fil_VerifyWindowPoStResponse { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - is_valid: false, - } - } -} - -code_and_message_impl!(fil_VerifyWindowPoStResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_FinalizeTicketResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub ticket: [u8; 32], -} - -impl Default for fil_FinalizeTicketResponse { - fn default() -> Self { - fil_FinalizeTicketResponse { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - ticket: [0u8; 32], - } - } -} - -code_and_message_impl!(fil_FinalizeTicketResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_GeneratePieceCommitmentResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub comm_p: [u8; 32], - /// The number of unpadded bytes in the original piece plus any (unpadded) - /// alignment bytes added to create a whole merkle tree. - pub num_bytes_aligned: u64, -} - -impl Default for fil_GeneratePieceCommitmentResponse { - fn default() -> fil_GeneratePieceCommitmentResponse { - fil_GeneratePieceCommitmentResponse { - status_code: FCPResponseStatus::FCPNoError, - comm_p: Default::default(), - error_msg: ptr::null(), - num_bytes_aligned: 0, - } - } -} - -code_and_message_impl!(fil_GeneratePieceCommitmentResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_GenerateDataCommitmentResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub comm_d: [u8; 32], -} - -impl Default for fil_GenerateDataCommitmentResponse { - fn default() -> fil_GenerateDataCommitmentResponse { - fil_GenerateDataCommitmentResponse { - status_code: FCPResponseStatus::FCPNoError, - comm_d: Default::default(), - error_msg: ptr::null(), - } - } -} - -code_and_message_impl!(fil_GenerateDataCommitmentResponse); - -/// - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_StringResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub string_val: *const libc::c_char, -} - -impl Default for fil_StringResponse { - fn default() -> fil_StringResponse { - fil_StringResponse { - status_code: FCPResponseStatus::FCPNoError, - error_msg: ptr::null(), - string_val: ptr::null(), - } - } -} - -code_and_message_impl!(fil_StringResponse); - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_ClearCacheResponse { - pub error_msg: *const libc::c_char, - pub status_code: FCPResponseStatus, -} - -impl Default for fil_ClearCacheResponse { - fn default() -> fil_ClearCacheResponse { - fil_ClearCacheResponse { - error_msg: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - } - } -} - -code_and_message_impl!(fil_ClearCacheResponse); diff --git a/chain/filecoin/filecoin-ffi/rust/src/util/api.rs b/chain/filecoin/filecoin-ffi/rust/src/util/api.rs deleted file mode 100644 index 9ddb017f..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/util/api.rs +++ /dev/null @@ -1,168 +0,0 @@ -use std::ffi::CString; -use std::fs::File; -use std::os::unix::io::FromRawFd; -use std::sync::Once; - -use bellperson::GPU_NVIDIA_DEVICES; -use ffi_toolkit::{catch_panic_response, raw_ptr, rust_str_to_c_str, FCPResponseStatus}; - -use super::types::{fil_GpuDeviceResponse, fil_InitLogFdResponse}; - -/// Protects the init off the logger. -static LOG_INIT: Once = Once::new(); - -/// Ensures the logger is initialized. -pub fn init_log() { - LOG_INIT.call_once(|| { - fil_logger::init(); - }); -} -/// Initialize the logger with a file to log into -/// -/// Returns `None` if there is already an active logger -pub fn init_log_with_file(file: File) -> Option<()> { - if LOG_INIT.is_completed() { - None - } else { - LOG_INIT.call_once(|| { - fil_logger::init_with_file(file); - }); - Some(()) - } -} - -/// Returns an array of strings containing the device names that can be used. -#[no_mangle] -pub unsafe extern "C" fn fil_get_gpu_devices() -> *mut fil_GpuDeviceResponse { - catch_panic_response(|| { - let n = GPU_NVIDIA_DEVICES.len(); - - let devices: Vec<*const libc::c_char> = GPU_NVIDIA_DEVICES - .iter() - .map(|d| d.name().unwrap_or_else(|_| "Unknown".to_string())) - .map(|d| { - CString::new(d) - .unwrap_or_else(|_| CString::new("Unknown").unwrap()) - .into_raw() as *const libc::c_char - }) - .collect(); - - let dyn_array = Box::into_raw(devices.into_boxed_slice()); - - let mut response = fil_GpuDeviceResponse::default(); - response.devices_len = n; - response.devices_ptr = dyn_array as *const *const libc::c_char; - - raw_ptr(response) - }) -} - -/// Initializes the logger with a file descriptor where logs will be logged into. -/// -/// This is usually a pipe that was opened on the receiving side of the logs. The logger is -/// initialized on the invocation, subsequent calls won't have any effect. -/// -/// This function must be called right at the start, before any other call. Else the logger will -/// be initializes implicitely and log to stderr. -#[no_mangle] -#[cfg(not(target_os = "windows"))] -pub unsafe extern "C" fn fil_init_log_fd(log_fd: libc::c_int) -> *mut fil_InitLogFdResponse { - catch_panic_response(|| { - let file = File::from_raw_fd(log_fd); - let mut response = fil_InitLogFdResponse::default(); - if init_log_with_file(file).is_none() { - response.status_code = FCPResponseStatus::FCPUnclassifiedError; - response.error_msg = rust_str_to_c_str("There is already an active logger. `fil_init_log_fd()` needs to be called before any other FFI function is called."); - } - raw_ptr(response) - }) -} - -#[cfg(test)] -mod tests { - - use crate::util::api::fil_get_gpu_devices; - use crate::util::types::fil_destroy_gpu_device_response; - - #[test] - fn test_get_gpu_devices() { - unsafe { - let resp = fil_get_gpu_devices(); - - let strings = std::slice::from_raw_parts_mut( - (*resp).devices_ptr as *mut *mut libc::c_char, - (*resp).devices_len as usize, - ); - - let devices: Vec = strings - .iter_mut() - .map(|s| { - std::ffi::CStr::from_ptr(*s) - .to_str() - .unwrap_or("Unknown") - .to_owned() - }) - .collect(); - - assert_eq!(devices.len(), (*resp).devices_len); - fil_destroy_gpu_device_response(resp); - } - } - - #[test] - #[ignore] - #[cfg(target_os = "linux")] - fn test_init_log_fd() { - /* - - Warning: This test is leaky. When run alongside other (Rust) tests in - this project, `[flexi_logger] writing log line failed` lines will be - observed in stderr, and various unrelated tests will fail. - - - @laser 20200725 - - */ - use std::env; - use std::fs::File; - use std::io::{BufRead, BufReader, Write}; - use std::os::unix::io::FromRawFd; - - use ffi_toolkit::FCPResponseStatus; - - use crate::util::api::fil_init_log_fd; - use crate::util::types::fil_destroy_init_log_fd_response; - - let mut fds: [libc::c_int; 2] = [0; 2]; - let res = unsafe { libc::pipe2(fds.as_mut_ptr(), libc::O_CLOEXEC) }; - if res != 0 { - panic!("Cannot create pipe"); - } - let [read_fd, write_fd] = fds; - - unsafe { - let mut reader = BufReader::new(File::from_raw_fd(read_fd)); - let mut writer = File::from_raw_fd(write_fd); - - // Without setting this env variable there won't be any log output - env::set_var("RUST_LOG", "debug"); - - let resp = fil_init_log_fd(write_fd); - fil_destroy_init_log_fd_response(resp); - - log::info!("a log message"); - - // Write a newline so that things don't block even if the logging doesn't work - writer.write_all(b"\n").unwrap(); - - let mut log_message = String::new(); - reader.read_line(&mut log_message).unwrap(); - - assert!(log_message.ends_with("a log message\n")); - - // Now test that there is an error when we try to init it again - let resp_error = fil_init_log_fd(write_fd); - assert_ne!((*resp_error).status_code, FCPResponseStatus::FCPNoError); - fil_destroy_init_log_fd_response(resp_error); - } - } -} diff --git a/chain/filecoin/filecoin-ffi/rust/src/util/mod.rs b/chain/filecoin/filecoin-ffi/rust/src/util/mod.rs deleted file mode 100644 index 8389f117..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/util/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod api; -pub mod types; diff --git a/chain/filecoin/filecoin-ffi/rust/src/util/types.rs b/chain/filecoin/filecoin-ffi/rust/src/util/types.rs deleted file mode 100644 index 732e22a1..00000000 --- a/chain/filecoin/filecoin-ffi/rust/src/util/types.rs +++ /dev/null @@ -1,55 +0,0 @@ -use std::ptr; - -use drop_struct_macro_derive::DropStructMacro; -// `CodeAndMessage` is the trait implemented by `code_and_message_impl -use ffi_toolkit::{code_and_message_impl, free_c_str, CodeAndMessage, FCPResponseStatus}; - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_GpuDeviceResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, - pub devices_len: libc::size_t, - pub devices_ptr: *const *const libc::c_char, -} - -impl Default for fil_GpuDeviceResponse { - fn default() -> Self { - Self { - error_msg: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - devices_len: 0, - devices_ptr: ptr::null(), - } - } -} - -code_and_message_impl!(fil_GpuDeviceResponse); - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_gpu_device_response(ptr: *mut fil_GpuDeviceResponse) { - let _ = Box::from_raw(ptr); -} - -#[repr(C)] -#[derive(DropStructMacro)] -pub struct fil_InitLogFdResponse { - pub status_code: FCPResponseStatus, - pub error_msg: *const libc::c_char, -} - -impl Default for fil_InitLogFdResponse { - fn default() -> Self { - Self { - error_msg: ptr::null(), - status_code: FCPResponseStatus::FCPNoError, - } - } -} - -code_and_message_impl!(fil_InitLogFdResponse); - -#[no_mangle] -pub unsafe extern "C" fn fil_destroy_init_log_fd_response(ptr: *mut fil_InitLogFdResponse) { - let _ = Box::from_raw(ptr); -} diff --git a/chain/filecoin/filecoin-ffi/tools.go b/chain/filecoin/filecoin-ffi/tools.go deleted file mode 100644 index 60b36fbc..00000000 --- a/chain/filecoin/filecoin-ffi/tools.go +++ /dev/null @@ -1,7 +0,0 @@ -//+build tools - -package ffi - -import ( - _ "github.com/xlab/c-for-go" -) diff --git a/chain/filecoin/filecoin-ffi/types.go b/chain/filecoin/filecoin-ffi/types.go deleted file mode 100644 index 5a810ed4..00000000 --- a/chain/filecoin/filecoin-ffi/types.go +++ /dev/null @@ -1,127 +0,0 @@ -package ffi - -import ( - "bytes" - "encoding/json" - "sort" - - "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/ipfs/go-cid" -) - -// BLS - -// SignatureBytes is the length of a BLS signature -const SignatureBytes = 96 - -// PrivateKeyBytes is the length of a BLS private key -const PrivateKeyBytes = 32 - -// PublicKeyBytes is the length of a BLS public key -const PublicKeyBytes = 48 - -// DigestBytes is the length of a BLS message hash/digest -const DigestBytes = 96 - -// Signature is a compressed affine -type Signature [SignatureBytes]byte - -// PrivateKey is a compressed affine -type PrivateKey [PrivateKeyBytes]byte - -// PublicKey is a compressed affine -type PublicKey [PublicKeyBytes]byte - -// Message is a byte slice -type Message []byte - -// Digest is a compressed affine -type Digest [DigestBytes]byte - -// Used when generating a private key deterministically -type PrivateKeyGenSeed [32]byte - -// Proofs - -// SortedPublicSectorInfo is a slice of publicSectorInfo sorted -// (lexicographically, ascending) by sealed (replica) CID. -type SortedPublicSectorInfo struct { - f []publicSectorInfo -} - -// SortedPrivateSectorInfo is a slice of PrivateSectorInfo sorted -// (lexicographically, ascending) by sealed (replica) CID. -type SortedPrivateSectorInfo struct { - f []PrivateSectorInfo -} - -func newSortedPublicSectorInfo(sectorInfo ...publicSectorInfo) SortedPublicSectorInfo { - fn := func(i, j int) bool { - return bytes.Compare(sectorInfo[i].SealedCID.Bytes(), sectorInfo[j].SealedCID.Bytes()) == -1 - } - - sort.Slice(sectorInfo[:], fn) - - return SortedPublicSectorInfo{ - f: sectorInfo, - } -} - -// Values returns the sorted publicSectorInfo as a slice -func (s *SortedPublicSectorInfo) Values() []publicSectorInfo { - return s.f -} - -// MarshalJSON JSON-encodes and serializes the SortedPublicSectorInfo. -func (s SortedPublicSectorInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(s.f) -} - -// UnmarshalJSON parses the JSON-encoded byte slice and stores the result in the -// value pointed to by s.f. Note that this method allows for construction of a -// SortedPublicSectorInfo which violates its invariant (that its publicSectorInfo are sorted -// in some defined way). Callers should take care to never provide a byte slice -// which would violate this invariant. -func (s *SortedPublicSectorInfo) UnmarshalJSON(b []byte) error { - return json.Unmarshal(b, &s.f) -} - -// NewSortedPrivateSectorInfo returns a SortedPrivateSectorInfo -func NewSortedPrivateSectorInfo(sectorInfo ...PrivateSectorInfo) SortedPrivateSectorInfo { - fn := func(i, j int) bool { - return bytes.Compare(sectorInfo[i].SealedCID.Bytes(), sectorInfo[j].SealedCID.Bytes()) == -1 - } - - sort.Slice(sectorInfo[:], fn) - - return SortedPrivateSectorInfo{ - f: sectorInfo, - } -} - -// Values returns the sorted PrivateSectorInfo as a slice -func (s *SortedPrivateSectorInfo) Values() []PrivateSectorInfo { - return s.f -} - -// MarshalJSON JSON-encodes and serializes the SortedPrivateSectorInfo. -func (s SortedPrivateSectorInfo) MarshalJSON() ([]byte, error) { - return json.Marshal(s.f) -} - -func (s *SortedPrivateSectorInfo) UnmarshalJSON(b []byte) error { - return json.Unmarshal(b, &s.f) -} - -type publicSectorInfo struct { - PoStProofType abi.RegisteredPoStProof - SealedCID cid.Cid - SectorNum abi.SectorNumber -} - -type PrivateSectorInfo struct { - abi.SectorInfo - CacheDirPath string - PoStProofType abi.RegisteredPoStProof - SealedSectorPath string -} diff --git a/chain/filecoin/filecoin-ffi/workflows.go b/chain/filecoin/filecoin-ffi/workflows.go deleted file mode 100644 index 47bd5636..00000000 --- a/chain/filecoin/filecoin-ffi/workflows.go +++ /dev/null @@ -1,393 +0,0 @@ -//+build cgo - -package ffi - -import ( - "bytes" - "crypto/rand" - "encoding/binary" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - - "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/ipfs/go-cid" -) - -func WorkflowProofsLifecycle(t TestHelper) { - minerID := abi.ActorID(42) - randomness := [32]byte{9, 9, 9} - sealProofType := abi.RegisteredSealProof_StackedDrg2KiBV1 - winningPostProofType := abi.RegisteredPoStProof_StackedDrgWinning2KiBV1 - sectorNum := abi.SectorNumber(42) - - ticket := abi.SealRandomness{5, 4, 2} - - seed := abi.InteractiveSealRandomness{7, 4, 2} - - // initialize a sector builder - metadataDir := requireTempDirPath(t, "metadata") - defer os.RemoveAll(metadataDir) - - sealedSectorsDir := requireTempDirPath(t, "sealed-sectors") - defer os.RemoveAll(sealedSectorsDir) - - stagedSectorsDir := requireTempDirPath(t, "staged-sectors") - defer os.RemoveAll(stagedSectorsDir) - - sectorCacheRootDir := requireTempDirPath(t, "sector-cache-root-dir") - defer os.RemoveAll(sectorCacheRootDir) - - sectorCacheDirPath := requireTempDirPath(t, "sector-cache-dir") - defer os.RemoveAll(sectorCacheDirPath) - - fauxSectorCacheDirPath := requireTempDirPath(t, "faux-sector-cache-dir") - defer os.RemoveAll(fauxSectorCacheDirPath) - - stagedSectorFile := requireTempFile(t, bytes.NewReader([]byte{}), 0) - defer stagedSectorFile.Close() - - sealedSectorFile := requireTempFile(t, bytes.NewReader([]byte{}), 0) - defer sealedSectorFile.Close() - - fauxSealedSectorFile := requireTempFile(t, bytes.NewReader([]byte{}), 0) - defer fauxSealedSectorFile.Close() - - unsealOutputFileA := requireTempFile(t, bytes.NewReader([]byte{}), 0) - defer unsealOutputFileA.Close() - - unsealOutputFileB := requireTempFile(t, bytes.NewReader([]byte{}), 0) - defer unsealOutputFileB.Close() - - unsealOutputFileC := requireTempFile(t, bytes.NewReader([]byte{}), 0) - defer unsealOutputFileC.Close() - - unsealOutputFileD := requireTempFile(t, bytes.NewReader([]byte{}), 0) - defer unsealOutputFileD.Close() - - // some rando bytes - someBytes := make([]byte, abi.PaddedPieceSize(2048).Unpadded()) - _, err := io.ReadFull(rand.Reader, someBytes) - t.RequireNoError(err) - - // write first piece - pieceFileA := requireTempFile(t, bytes.NewReader(someBytes[0:127]), 127) - - pieceCIDA, err := GeneratePieceCIDFromFile(sealProofType, pieceFileA, 127) - t.RequireNoError(err) - - // seek back to head (generating piece commitment moves offset) - _, err = pieceFileA.Seek(0, 0) - t.RequireNoError(err) - - // write the first piece using the alignment-free function - n, pieceCID, err := WriteWithoutAlignment(sealProofType, pieceFileA, 127, stagedSectorFile) - t.RequireNoError(err) - t.AssertEqual(int(n), 127) - t.AssertTrue(pieceCID.Equals(pieceCIDA)) - - // write second piece + alignment - t.RequireNoError(err) - pieceFileB := requireTempFile(t, bytes.NewReader(someBytes[0:1016]), 1016) - - pieceCIDB, err := GeneratePieceCIDFromFile(sealProofType, pieceFileB, 1016) - t.RequireNoError(err) - - // seek back to head - _, err = pieceFileB.Seek(0, 0) - t.RequireNoError(err) - - // second piece relies on the alignment-computing version - left, tot, pieceCID, err := WriteWithAlignment(sealProofType, pieceFileB, 1016, stagedSectorFile, []abi.UnpaddedPieceSize{127}) - t.RequireNoError(err) - t.AssertEqual(889, int(left)) - t.AssertEqual(1905, int(tot)) - t.AssertTrue(pieceCID.Equals(pieceCIDB)) - - publicPieces := []abi.PieceInfo{{ - Size: abi.UnpaddedPieceSize(127).Padded(), - PieceCID: pieceCIDA, - }, { - Size: abi.UnpaddedPieceSize(1016).Padded(), - PieceCID: pieceCIDB, - }} - - preGeneratedUnsealedCID, err := GenerateUnsealedCID(sealProofType, publicPieces) - t.RequireNoError(err) - - // pre-commit the sector - sealPreCommitPhase1Output, err := SealPreCommitPhase1(sealProofType, sectorCacheDirPath, stagedSectorFile.Name(), sealedSectorFile.Name(), sectorNum, minerID, ticket, publicPieces) - t.RequireNoError(err) - - sealedCID, unsealedCID, err := SealPreCommitPhase2(sealPreCommitPhase1Output, sectorCacheDirPath, sealedSectorFile.Name()) - t.RequireNoError(err) - - t.AssertTrue(unsealedCID.Equals(preGeneratedUnsealedCID), "prover and verifier should agree on data commitment") - - // commit the sector - sealCommitPhase1Output, err := SealCommitPhase1(sealProofType, sealedCID, unsealedCID, sectorCacheDirPath, sealedSectorFile.Name(), sectorNum, minerID, ticket, seed, publicPieces) - t.RequireNoError(err) - - proof, err := SealCommitPhase2(sealCommitPhase1Output, sectorNum, minerID) - t.RequireNoError(err) - - // verify the 'ole proofy - isValid, err := VerifySeal(abi.SealVerifyInfo{ - SectorID: abi.SectorID{ - Miner: minerID, - Number: sectorNum, - }, - SealedCID: sealedCID, - SealProof: sealProofType, - Proof: proof, - DealIDs: []abi.DealID{}, - Randomness: ticket, - InteractiveRandomness: seed, - UnsealedCID: unsealedCID, - }) - t.RequireNoError(err) - t.RequireTrue(isValid, "proof wasn't valid") - - // unseal the entire sector and verify that things went as we planned - _, err = sealedSectorFile.Seek(0, 0) - t.RequireNoError(err) - t.RequireNoError(Unseal(sealProofType, sectorCacheDirPath, sealedSectorFile, unsealOutputFileA, sectorNum, minerID, ticket, unsealedCID)) - _, err = unsealOutputFileA.Seek(0, 0) - t.RequireNoError(err) - contents, err := ioutil.ReadFile(unsealOutputFileA.Name()) - t.RequireNoError(err) - - // unsealed sector includes a bunch of alignment NUL-bytes - alignment := make([]byte, 889) - - // verify that we unsealed what we expected to unseal - t.AssertTrue(bytes.Equal(someBytes[0:127], contents[0:127]), "bytes aren't equal") - t.AssertTrue(bytes.Equal(alignment, contents[127:1016]), "bytes aren't equal") - t.AssertTrue(bytes.Equal(someBytes[0:1016], contents[1016:2032]), "bytes aren't equal") - - // unseal just the first piece - _, err = sealedSectorFile.Seek(0, 0) - t.RequireNoError(err) - err = UnsealRange(sealProofType, sectorCacheDirPath, sealedSectorFile, unsealOutputFileB, sectorNum, minerID, ticket, unsealedCID, 0, 127) - t.RequireNoError(err) - _, err = unsealOutputFileB.Seek(0, 0) - t.RequireNoError(err) - contentsB, err := ioutil.ReadFile(unsealOutputFileB.Name()) - t.RequireNoError(err) - t.AssertEqual(127, len(contentsB)) - t.AssertTrue(bytes.Equal(someBytes[0:127], contentsB[0:127]), "bytes aren't equal") - - // unseal just the second piece - _, err = sealedSectorFile.Seek(0, 0) - t.RequireNoError(err) - err = UnsealRange(sealProofType, sectorCacheDirPath, sealedSectorFile, unsealOutputFileC, sectorNum, minerID, ticket, unsealedCID, 1016, 1016) - t.RequireNoError(err) - _, err = unsealOutputFileC.Seek(0, 0) - t.RequireNoError(err) - contentsC, err := ioutil.ReadFile(unsealOutputFileC.Name()) - t.RequireNoError(err) - t.AssertEqual(1016, len(contentsC)) - t.AssertTrue(bytes.Equal(someBytes[0:1016], contentsC[0:1016]), "bytes aren't equal") - - // verify that the sector builder owns no sealed sectors - var sealedSectorPaths []string - t.RequireNoError(filepath.Walk(sealedSectorsDir, visit(&sealedSectorPaths))) - t.AssertEqual(1, len(sealedSectorPaths), sealedSectorPaths) - - // no sector cache dirs, either - var sectorCacheDirPaths []string - t.RequireNoError(filepath.Walk(sectorCacheRootDir, visit(§orCacheDirPaths))) - t.AssertEqual(1, len(sectorCacheDirPaths), sectorCacheDirPaths) - - // run the FauxRep routine, for good measure - fauxSectorCID, err := FauxRep(sealProofType, fauxSectorCacheDirPath, fauxSealedSectorFile.Name()) - t.RequireNoError(err, "FauxRep produced an error") - t.RequireTrue(!cid.Undef.Equals(fauxSectorCID), "faux sector CID shouldn't be undefined") - - // run the FauxRep2 routine, for good measure - fauxSectorCID2, err := FauxRep2(sealProofType, fauxSectorCacheDirPath, fauxSealedSectorFile.Name()) - t.RequireNoError(err, "FauxRep2 produced an error") - t.RequireTrue(!cid.Undef.Equals(fauxSectorCID2), "faux sector CID 2 shouldn't be undefined") - - // generate a PoSt over the proving set before importing, just to exercise - // the new API - privateInfo := NewSortedPrivateSectorInfo(PrivateSectorInfo{ - SectorInfo: abi.SectorInfo{ - SectorNumber: sectorNum, - SealedCID: sealedCID, - }, - CacheDirPath: sectorCacheDirPath, - PoStProofType: winningPostProofType, - SealedSectorPath: sealedSectorFile.Name(), - }) - - provingSet := []abi.SectorInfo{{ - SealProof: sealProofType, - SectorNumber: sectorNum, - SealedCID: sealedCID, - }} - - // figure out which sectors have been challenged - indicesInProvingSet, err := GenerateWinningPoStSectorChallenge(winningPostProofType, minerID, randomness[:], uint64(len(provingSet))) - t.RequireNoError(err) - - var challengedSectors []abi.SectorInfo - for idx := range indicesInProvingSet { - challengedSectors = append(challengedSectors, provingSet[indicesInProvingSet[idx]]) - } - - proofs, err := GenerateWinningPoSt(minerID, privateInfo, randomness[:]) - t.RequireNoError(err) - - isValid, err = VerifyWinningPoSt(abi.WinningPoStVerifyInfo{ - Randomness: randomness[:], - Proofs: proofs, - ChallengedSectors: challengedSectors, - Prover: minerID, - }) - t.RequireNoError(err) - t.AssertTrue(isValid, "VerifyWinningPoSt rejected the (standalone) proof as invalid") -} - -func WorkflowGetGPUDevicesDoesNotProduceAnError(t TestHelper) { - devices, err := GetGPUDevices() - t.RequireNoError(err) - fmt.Printf("devices: %+v\n", devices) // clutters up test output, but useful -} - -func WorkflowRegisteredSealProofFunctions(t TestHelper) { - sealTypes := []abi.RegisteredSealProof{ - abi.RegisteredSealProof_StackedDrg2KiBV1, - abi.RegisteredSealProof_StackedDrg8MiBV1, - abi.RegisteredSealProof_StackedDrg512MiBV1, - abi.RegisteredSealProof_StackedDrg32GiBV1, - abi.RegisteredSealProof_StackedDrg64GiBV1, - } - - for _, st := range sealTypes { - v, err := GetSealVersion(st) - t.AssertNoError(err) - t.AssertTrue(len(v) > 0) - } -} - -func WorkflowRegisteredPoStProofFunctions(t TestHelper) { - postTypes := []abi.RegisteredPoStProof{ - abi.RegisteredPoStProof_StackedDrgWinning2KiBV1, - abi.RegisteredPoStProof_StackedDrgWinning8MiBV1, - abi.RegisteredPoStProof_StackedDrgWinning512MiBV1, - abi.RegisteredPoStProof_StackedDrgWinning32GiBV1, - abi.RegisteredPoStProof_StackedDrgWinning64GiBV1, - abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, - abi.RegisteredPoStProof_StackedDrgWindow8MiBV1, - abi.RegisteredPoStProof_StackedDrgWindow512MiBV1, - abi.RegisteredPoStProof_StackedDrgWindow32GiBV1, - abi.RegisteredPoStProof_StackedDrgWindow64GiBV1, - } - - for _, pt := range postTypes { - v, err := GetPoStVersion(pt) - t.AssertNoError(err) - t.AssertTrue(len(v) > 0) - } -} - -func WorkflowGenerateWinningPoStSectorChallengeEdgeCase(t TestHelper) { - for i := 0; i < 10000; i++ { - var randomnessFr32 [32]byte - _, err := io.ReadFull(rand.Reader, randomnessFr32[0:31]) // last byte of the 32 is always NUL - t.RequireNoError(err) - - minerID := abi.ActorID(randUInt64()) - eligibleSectorsLen := uint64(1) - - indices2, err := GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof_StackedDrgWinning2KiBV1, minerID, randomnessFr32[:], eligibleSectorsLen) - t.RequireNoError(err) - t.AssertEqual(1, len(indices2)) - t.AssertEqual(0, int(indices2[0])) - } -} - -func WorkflowGenerateWinningPoStSectorChallenge(t TestHelper) { - for i := 0; i < 10000; i++ { - var randomnessFr32 [32]byte - _, err := io.ReadFull(rand.Reader, randomnessFr32[0:31]) // last byte of the 32 is always NUL - t.RequireNoError(err) - - minerID := abi.ActorID(randUInt64()) - eligibleSectorsLen := randUInt64() - - if eligibleSectorsLen == 0 { - continue // no fun - } - - indices, err := GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof_StackedDrgWinning2KiBV1, minerID, randomnessFr32[:], eligibleSectorsLen) - t.AssertNoError(err) - - max := uint64(0) - for idx := range indices { - if indices[idx] > max { - max = indices[idx] - } - } - - t.AssertTrue(max < eligibleSectorsLen, "out of range value - max: ", max, "eligibleSectorsLen: ", eligibleSectorsLen) - t.AssertTrue(uint64(len(indices)) <= eligibleSectorsLen, "should never generate more indices than number of eligible sectors") - } -} - -func randUInt64() uint64 { - buf := make([]byte, 8) - _, err := rand.Read(buf) - if err != nil { - panic(err) - } - - return binary.LittleEndian.Uint64(buf) -} - -func requireTempFile(t TestHelper, fileContentsReader io.Reader, size uint64) *os.File { - file, err := ioutil.TempFile("", "") - t.RequireNoError(err) - - written, err := io.Copy(file, fileContentsReader) - t.RequireNoError(err) - // check that we wrote everything - t.RequireEqual(int(size), int(written)) - - t.RequireNoError(file.Sync()) - - // seek to the beginning - _, err = file.Seek(0, 0) - t.RequireNoError(err) - - return file -} - -func requireTempDirPath(t TestHelper, prefix string) string { - dir, err := ioutil.TempDir("", prefix) - t.RequireNoError(err) - - return dir -} - -func visit(paths *[]string) filepath.WalkFunc { - return func(path string, info os.FileInfo, err error) error { - if err != nil { - panic(err) - } - *paths = append(*paths, path) - return nil - } -} - -type TestHelper interface { - AssertEqual(expected, actual interface{}, msgAndArgs ...interface{}) bool - AssertNoError(err error, msgAndArgs ...interface{}) bool - AssertTrue(value bool, msgAndArgs ...interface{}) bool - RequireEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) - RequireNoError(err error, msgAndArgs ...interface{}) - RequireTrue(value bool, msgAndArgs ...interface{}) -} From a5273cbaaea59f80e37720661cb6f5d823a057e1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 11:23:10 +0530 Subject: [PATCH 018/335] implement account API for filecoin --- .gitmodules | 2 +- chain/filecoin/account.go | 76 ++++++++++++++++++++++--------------- chain/filecoin/filecoin-ffi | 1 + multichain.go | 2 +- 4 files changed, 49 insertions(+), 32 deletions(-) create mode 160000 chain/filecoin/filecoin-ffi diff --git a/.gitmodules b/.gitmodules index ce71b4f5..e1b9bf3c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "chain/filecoin/filecoin-ffi"] path = chain/filecoin/filecoin-ffi - url = https://github.com/filecoin-project/filecoin-ffi \ No newline at end of file + url = https://github.com/filecoin-project/filecoin-ffi diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 1938c4af..34cf5709 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -13,6 +13,8 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/filecoin-project/specs-actors/actors/crypto" + "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -201,43 +203,57 @@ func NewClient(opts ClientOptions) (*Client, error) { // hash. It also returns the number of confirmations for the transaction. func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { // parse the transaction ID to a message ID - // msgId, err := cid.Parse(txId.String()) - // if err != nil { - // return nil, nil, fmt.Errorf("parsing txId: %v", err) - // } + msgId, err := cid.Parse(txId.String()) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("parsing txId: %v", err) + } - // get message - // message, err := client.node.ChainGetMessage(ctx, msgId) - // if err != nil { - // return nil, nil, fmt.Errorf("fetching tx: %v", err) - // } + // lookup message receipt to get its height + messageLookup, err := client.node.StateSearchMsg(ctx, msgId) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("searching msg: %v", err) + } - // TODO?: See if we can get a signed message + // get the most recent tipset and its height + headTipset, err := client.node.ChainHead(ctx) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching head: %v", err) + } + confs := headTipset.Height() - messageLookup.Height + 1 - // TODO?: API call to get the block number for the above message + // get the message + msg, err := client.node.ChainGetMessage(ctx, msgId) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching msg: %v", err) + } - // get most recent block number - // 1. get chain tipset - // 2. choose the most recent block from tipset.blks - // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 - // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 - panic("unimplemented") + return &Tx{msg: *msg}, pack.NewU64(uint64(confs)), nil } // SubmitTx to the underlying blockchain network. // TODO: should also return a transaction hash (pack.Bytes) ? func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { - // construct crypto.Signature - // https://github.com/filecoin-project/specs-actors/blob/master/actors/crypto/signature.go - - // construct types.SignedMessage - // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/signedmessage.go - - // submit transaction to mempool - // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L169 - // msgId, err := client.node.MpoolPush(ctx, &signedMessage) - // if err != nil { - // return fmt.Errorf("pushing message to message pool: %v", err) - // } - panic("unimplemented") + switch tx := tx.(type) { + case Tx: + // construct crypto.Signature + signature := crypto.Signature{ + Type: crypto.SigTypeSecp256k1, + Data: tx.signature.Bytes(), + } + + // construct types.SignedMessage + signedMessage := types.SignedMessage{ + Message: tx.msg, + Signature: signature, + } + + // submit transaction to mempool + _, err := client.node.MpoolPush(ctx, &signedMessage) + if err != nil { + return fmt.Errorf("pushing msg to mpool: %v", err) + } + return nil + default: + return fmt.Errorf("invalid tx type: %v", tx) + } } diff --git a/chain/filecoin/filecoin-ffi b/chain/filecoin/filecoin-ffi new file mode 160000 index 00000000..777a6fbf --- /dev/null +++ b/chain/filecoin/filecoin-ffi @@ -0,0 +1 @@ +Subproject commit 777a6fbf4446b1112adfd4fa5dd88e0c88974122 diff --git a/multichain.go b/multichain.go index d5fb0aaa..f067e4a8 100644 --- a/multichain.go +++ b/multichain.go @@ -58,7 +58,7 @@ const ( DGB = Asset("DGB") // DigiByte DOGE = Asset("DOGE") // Dogecoin ETH = Asset("ETH") // Ether - FIL = Asset("FIL") // Filecoin + FIL = Asset("FIL") // Filecoin FTM = Asset("FTM") // Fantom SOL = Asset("SOL") // Solana LUNA = Asset("LUNA") // Luna From 9c2e4d0dc853456f5f8826b4d4ccd79eccc187b1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 14:19:26 +0530 Subject: [PATCH 019/335] copy over filecoin account api impl --- api/account/account.go | 6 +- chain/ethereum/account.go | 12 ++-- chain/filecoin/account.go | 96 +++++++++++++++----------- go.mod | 40 ++--------- go.sum | 140 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 216 insertions(+), 78 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index d530863d..858b6753 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -37,14 +37,14 @@ type Tx interface { // call functions on a contract. Payload() contract.CallData - // Sighash that must be signed before the transaction can be submitted by + // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighash() (pack.Bytes32, error) + Sighashes() ([]pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign(pack.Bytes65, pack.Bytes) error + Sign([]pack.Bytes65, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index cc66b22c..907adc21 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -78,17 +78,21 @@ func (tx *Tx) Payload() contract.CallData { return contract.CallData(pack.NewBytes(tx.tx.Data())) } -func (tx *Tx) Sighash() (pack.Bytes32, error) { +func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighash := tx.signer.Hash(tx.tx) - return pack.NewBytes32(sighash), nil + return []pack.Bytes32{pack.NewBytes32(sighash)}, nil } -func (tx *Tx) Sign(signature pack.Bytes65, pubKey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") } - signedTx, err := tx.tx.WithSignature(tx.signer, signature.Bytes()) + if len(signatures) != 1 { + return fmt.Errorf("expected exactly signature") + } + + signedTx, err := tx.tx.WithSignature(tx.signer, signatures[0].Bytes()) if err != nil { return err } diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 503adf0a..34cf5709 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -7,10 +7,13 @@ import ( "net/http" filaddress "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/lotus/api" filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" @@ -129,15 +132,16 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U } return Tx{ msg: types.Message{ - Version: types.MessageVersion, - From: filfrom, - To: filto, - Value: big.Int{Int: value.Int()}, - Nonce: value.Int().Uint64(), - GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, - GasLimit: txBuilder.gasLimit.Int().Int64(), - Method: methodNum, - Params: payload, + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: value.Int().Uint64(), + GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, + GasPremium: big.Int{Int: pack.NewU256([32]byte{}).Int()}, + GasLimit: txBuilder.gasLimit.Int().Int64(), + Method: methodNum, + Params: payload, }, signature: pack.Bytes65{}, }, nil @@ -187,7 +191,7 @@ func NewClient(opts ClientOptions) (*Client, error) { requestHeaders.Add(AuthorizationKey, opts.AuthToken) } - node, closer, err := filclient.NewFullNodeRPC(opts.MultiAddress, requestHeaders) + node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.MultiAddress, requestHeaders) if err != nil { return nil, err } @@ -199,41 +203,57 @@ func NewClient(opts ClientOptions) (*Client, error) { // hash. It also returns the number of confirmations for the transaction. func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { // parse the transaction ID to a message ID - // msgId, err := cid.Parse(txId.String()) - // if err != nil { - // return nil, nil, fmt.Errorf("parsing txId: %v", err) - // } + msgId, err := cid.Parse(txId.String()) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("parsing txId: %v", err) + } - // get message - // message, err := client.node.ChainGetMessage(ctx, msgId) - // if err != nil { - // return nil, nil, fmt.Errorf("fetching tx: %v", err) - // } + // lookup message receipt to get its height + messageLookup, err := client.node.StateSearchMsg(ctx, msgId) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("searching msg: %v", err) + } - // TODO?: See if we can get a signed message + // get the most recent tipset and its height + headTipset, err := client.node.ChainHead(ctx) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching head: %v", err) + } + confs := headTipset.Height() - messageLookup.Height + 1 - // TODO?: API call to get the block number for the above message + // get the message + msg, err := client.node.ChainGetMessage(ctx, msgId) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching msg: %v", err) + } - // get most recent block number - // 1. get chain tipset - // 2. choose the most recent block from tipset.blks - // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 - // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 + return &Tx{msg: *msg}, pack.NewU64(uint64(confs)), nil } // SubmitTx to the underlying blockchain network. // TODO: should also return a transaction hash (pack.Bytes) ? func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { - // construct crypto.Signature - // https://github.com/filecoin-project/specs-actors/blob/master/actors/crypto/signature.go - - // construct types.SignedMessage - // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/signedmessage.go - - // submit transaction to mempool - // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L169 - // msgId, err := client.node.MpoolPush(ctx, &signedMessage) - // if err != nil { - // return fmt.Errorf("pushing message to message pool: %v", err) - // } + switch tx := tx.(type) { + case Tx: + // construct crypto.Signature + signature := crypto.Signature{ + Type: crypto.SigTypeSecp256k1, + Data: tx.signature.Bytes(), + } + + // construct types.SignedMessage + signedMessage := types.SignedMessage{ + Message: tx.msg, + Signature: signature, + } + + // submit transaction to mempool + _, err := client.node.MpoolPush(ctx, &signedMessage) + if err != nil { + return fmt.Errorf("pushing msg to mpool: %v", err) + } + return nil + default: + return fmt.Errorf("invalid tx type: %v", tx) + } } diff --git a/go.mod b/go.mod index f1d625e0..e83ddd6c 100644 --- a/go.mod +++ b/go.mod @@ -3,52 +3,26 @@ module github.com/renproject/multichain go 1.14 require ( - github.com/btcsuite/btcd v0.20.1-beta + github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcutil v1.0.2 github.com/centrifuge/go-substrate-rpc-client v1.1.0 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf - github.com/cosmos/cosmos-sdk v0.39.1 - github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect - github.com/elastic/go-sysinfo v1.4.0 // indirect - github.com/elastic/go-windows v1.0.1 // indirect - github.com/ethereum/go-ethereum v1.9.19 - github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef - github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect - github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-data-transfer v0.5.0 // indirect - github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4 - github.com/filecoin-project/lotus v0.4.1 - github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect - github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf - github.com/gorilla/mux v1.8.0 // indirect + github.com/ethereum/go-ethereum v1.9.20 + github.com/filecoin-project/go-address v0.0.3 + github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 + github.com/filecoin-project/lotus v0.5.6 + github.com/filecoin-project/specs-actors v0.9.3 github.com/ipfs/go-cid v0.0.7 - github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect - github.com/ipfs/go-hamt-ipld v0.1.1 // indirect - github.com/ipld/go-ipld-prime v0.0.3 // indirect - github.com/lib/pq v1.7.0 // indirect - github.com/libp2p/go-libp2p-core v0.6.1 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 - github.com/multiformats/go-multiaddr v0.3.1 // indirect github.com/multiformats/go-varint v0.0.6 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/pierrec/xxHash v0.1.5 // indirect - github.com/prometheus/procfs v0.1.3 // indirect - github.com/raulk/clock v1.1.0 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 - github.com/renproject/surge v1.2.5 - github.com/tendermint/tendermint v0.33.8 - github.com/terra-project/core v0.3.7 - github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377 - github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect + github.com/renproject/surge v1.2.6 go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a - golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8 // indirect - golang.org/x/tools v0.0.0-20200825202427-b303f430e36d // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5 // indirect - modernc.org/golex v1.0.1 // indirect ) replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi diff --git a/go.sum b/go.sum index 02f81257..9bc9704f 100644 --- a/go.sum +++ b/go.sum @@ -34,6 +34,7 @@ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGy github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -69,6 +70,7 @@ github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6Ro github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= @@ -99,6 +101,7 @@ github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6Q github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -113,6 +116,8 @@ github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcug github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -122,9 +127,12 @@ github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2ut github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129/go.mod h1:u9UyCz2eTrSGy6fbupqJ54eY5c4IC8gREQ1053dK12U= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -154,6 +162,7 @@ github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.2.1-0.20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -184,8 +193,11 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= @@ -218,6 +230,7 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-sysinfo v1.4.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= @@ -233,6 +246,8 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= github.com/ethereum/go-ethereum v1.9.19 h1:c9IrhzqPKY+ZkS/YhXCO3rgNzlxsVrCYIRvrIAFmIWM= github.com/ethereum/go-ethereum v1.9.19/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= +github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= +github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= @@ -242,6 +257,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= github.com/filecoin-project/chain-validation v0.0.6-0.20200615191232-6be1a8c6ed09/go.mod h1:HEJn6kOXMNhCNBYNTO/lrEI7wSgqCOR6hN5ecfYUnC8= +github.com/filecoin-project/chain-validation v0.0.6-0.20200813000554-40c22fe26eef/go.mod h1:SMj5VK1pYgqC8FXVEtOBRTc+9AIrYu+C+K3tAXi2Rk8= github.com/filecoin-project/filecoin-ffi v0.0.0-20200326153646-e899cc1dd072/go.mod h1:PtH9YP0rURHUKHrKeEBeWg/BqIBMQOz8wtlXlVGREBE= github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d/go.mod h1:vlQ7sDkbrtM70QMJFDvEyTDywY5SvIjadRCUB+76l90= github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= @@ -257,29 +273,49 @@ github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/ github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 h1:K6t4Hrs+rwUxBz2xg88Bdqeh4k5/rycQFdPseZhRyfE= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.2/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1 h1:xuHlrdznafh7ul5t4xEncnA4qgpQvJZEw+mr98eqHXw= github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.1.0 h1:ZDAQjvXuLzbrLnwfFruQFJP7IhImmXLuO+8i2qeAczM= github.com/filecoin-project/go-bitfield v0.1.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= +github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v0.3.0/go.mod h1:cONglGP4s/d+IUQw5mWZrQK+FQATQxr3AXzi4dRh0l4= github.com/filecoin-project/go-data-transfer v0.5.0 h1:pvWlab69BD5dwheRHjjBjFB6m7CEqEZeI+aChtVqKVk= github.com/filecoin-project/go-data-transfer v0.5.0/go.mod h1:7yckbsPPMGuN3O1+SYNE/lowwheaUn5woGILpjN52UI= +github.com/filecoin-project/go-data-transfer v0.6.1/go.mod h1:uRYBRKVBVM12CSusBtVrzDHkVw/3DKZpkxKJVP1Ydas= +github.com/filecoin-project/go-data-transfer v0.6.3 h1:7TLwm8nuodHYD/uiwJjKc/PGRR+LwqM8jmlZqgWuUfY= +github.com/filecoin-project/go-data-transfer v0.6.3/go.mod h1:PmBKVXkhh67/tnEdJXQwDHl5mT+7Tbcwe1NPninqhnM= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4 h1:VqNmKGy4/ryzo/TqevSa1kancc3hSdws7sl/NCTZzT0= github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= github.com/filecoin-project/go-fil-markets v0.3.2 h1:fvNgdTTIVtckBu61wxbKYSMJzedoFFIKYJagiCDFCiM= github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= +github.com/filecoin-project/go-fil-markets v0.5.6-0.20200814234959-80b1788108ac/go.mod h1:umicPCaN99ysHTiYOmwhuLxTFbOwcsI+mdw/t96vvM4= +github.com/filecoin-project/go-fil-markets v0.5.6/go.mod h1:SJApXAKr5jyGpbzDEOhvemui0pih7hhT8r2MXJxCP1E= +github.com/filecoin-project/go-fil-markets v0.5.8 h1:uwl0QNUVmmSlUQfxshpj21Dmhh6WKTQNhnb1GMfdp18= +github.com/filecoin-project/go-fil-markets v0.5.8/go.mod h1:6ZX1vbZbnukbVQ8tCB/MmEizuW/bmRX7SpGAltU3KVg= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 h1:FXtCp0ybqdQL9knb3OGDpkNTaBbPxgkqPeWKotUwkH0= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= +github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= +github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= @@ -288,16 +324,26 @@ github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/g github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200619205156-c7bf525c06ef/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 h1:Jbburj7Ih2iaJ/o5Q9A+EAeTabME6YII7FLi9SKUf5c= +github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= github.com/filecoin-project/lotus v0.4.1 h1:rg9X3TY7ymT+m6ATIQ7xt8FW2CpCeznwOFfbONPMz84= github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlSclQamx+sQDKRMI= +github.com/filecoin-project/lotus v0.4.3-0.20200819133134-a21234cd54d5/go.mod h1:YYUqCqyv4odVgKSFQAnIdAl0v1cIfbEYnF9E118dMGQ= +github.com/filecoin-project/lotus v0.4.3-0.20200819134055-b13681df3205/go.mod h1:rooripL/X8ixwUngDPzphAv/RKZXWBprbyxxDW0EJi0= +github.com/filecoin-project/lotus v0.4.3-0.20200820203717-d1718369a182/go.mod h1:biFZPQ/YyQGfkHUmHMiaNf2hnD6zm1+OAXPQYQ61Zkg= +github.com/filecoin-project/lotus v0.5.6 h1:3Jea/vfZBs95KmNuqyXGEpB6h+uF69xyMz0OD+Igpi8= +github.com/filecoin-project/lotus v0.5.6/go.mod h1:JeT2ti5ArW4B69k1FMMFV1rj00wX4ooHMX6zS5MgY+w= github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= +github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= +github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= +github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= @@ -307,10 +353,22 @@ github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf h1 github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 h1:7wH0V1OhS5gkjlJF/PvwS6MuS1oeVqCJlNECgf9eabw= github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= +github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= +github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= +github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= +github.com/filecoin-project/specs-actors v0.9.2/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= +github.com/filecoin-project/specs-actors v0.9.3 h1:Fi75G/UQ7R4eiIwnN+S6bBQ9LqKivyJdw62jJzTi6aE= +github.com/filecoin-project/specs-actors v0.9.3/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/statediff v0.0.1/go.mod h1:qNWauolLFEzOiA4LNWermBRVNbaZHfPcPevumZeh+hE= github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= +github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= +github.com/filecoin-project/test-vectors v0.0.0-20200819133914-e20cc29cc926/go.mod h1:ou1Im2BTyrYTnXX8yj5VvC+DTfbIrwESJjKDxbh31nA= +github.com/filecoin-project/test-vectors v0.0.0-20200826113833-9ffe6524729d/go.mod h1:hY/JN3OFRtykBrMByFjTonUFEOW2bRJjyR5YMUh3jLw= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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= @@ -364,6 +422,7 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -374,6 +433,7 @@ github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3 github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -403,6 +463,7 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= +github.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -508,6 +569,7 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= github.com/ipfs/go-bitswap v0.2.8/go.mod h1:2Yjog0GMdH8+AsxkE0DI9D2mANaUTxbVVav0pPoZoug= +github.com/ipfs/go-bitswap v0.2.20/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= @@ -537,6 +599,7 @@ github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRV github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= @@ -555,9 +618,14 @@ github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2 github.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEPb0= github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= +github.com/ipfs/go-fs-lock v0.0.6/go.mod h1:OTR+Rj9sHiRubJh3dRhD15Juhd/+w6VPOY28L7zESmM= github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83 h1:tkGDAwcZfzDFeBNyBWYOM02Qw0rGpA2UuCvq49T3K5o= github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.1.1/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.1.2 h1:25Ll9kIXCE+DY0dicvfS3KMw+U5sd01b/FJbA7KAbhg= +github.com/ipfs/go-graphsync v0.1.2/go.mod h1:sLXVXm1OxtE2XYPw62MuXCdAuNwkAdsbnfrmos5odbA= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= github.com/ipfs/go-hamt-ipld v0.1.1-0.20200501020327-d53d20a7063e/go.mod h1:giiPqWYCnRBYpNTsJ/EX1ojldX5kTXrXYckSJQ7ko9M= @@ -569,6 +637,8 @@ github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2Is github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= github.com/ipfs/go-ipfs-blockstore v1.0.0 h1:pmFp5sFYsYVvMOp9X01AK3s85usVcLvkBTRsN6SnfUA= github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= +github.com/ipfs/go-ipfs-blockstore v1.0.1 h1:fnuVj4XdZp4yExhd0CnUwAiMNJHiPnfInhiuwz4lW1w= +github.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= @@ -582,6 +652,7 @@ github.com/ipfs/go-ipfs-ds-help v1.0.0 h1:bEQ8hMGs80h0sR8O4tfDgV6B01aaF9qeTrujrT github.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE= github.com/ipfs/go-ipfs-exchange-interface v0.0.1 h1:LJXIo9W7CAmugqI+uofioIpRb6rY30GUu7G6LUfpMvM= github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= +github.com/ipfs/go-ipfs-exchange-offline v0.0.1 h1:P56jYKZF7lDDOLx5SotVh5KFxoY6C81I1NSHW1FxGew= github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= @@ -624,12 +695,15 @@ github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBW github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= +github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4 h1:3bijxqzQ1O9yg7gd7Aqk80oaEvsJ+uXw0zSvi2qR3Jw= github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= +github.com/ipfs/go-merkledag v0.3.2 h1:MRqj40QkrWkvPswXs4EfSslhZ4RVPRbxwX11js0t1xY= +github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= @@ -653,7 +727,10 @@ github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e h1:ZISbJlM0ur github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime v0.0.3 h1:OjjcSu6gZ2auqLK++HfGKB+3aTfx3rnTNgxDorWQKjA= github.com/ipld/go-ipld-prime v0.0.3/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= +github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef h1:/yPelt/0CuzZsmRkYzBBnJ499JnAOGaIaAXHujx96ic= +github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= +github.com/ipld/go-ipld-prime-proto v0.0.0-20200828231332-ae0aea07222b/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -675,6 +752,7 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -746,6 +824,8 @@ github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQq github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= +github.com/libp2p/go-libp2p v0.10.3/go.mod h1:0ER6iPSaPeQjryNgOnm9bLNpMJCYmuw54xJXsVR17eE= +github.com/libp2p/go-libp2p v0.11.0/go.mod h1:3/ogJDXsbbepEfqtZKBR/DedzxJXCeK17t2Z9RE9bEE= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= @@ -754,12 +834,14 @@ github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQ github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= +github.com/libp2p/go-libp2p-autonat v0.3.2/go.mod h1:0OzOi1/cVc7UcxfOddemYD5vzEqi4fwRbnZcJGLi68U= github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= +github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= github.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE= github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= @@ -769,6 +851,7 @@ github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3 github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= +github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= @@ -807,6 +890,8 @@ github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFT github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= +github.com/libp2p/go-libp2p-discovery v0.5.0 h1:Qfl+e5+lfDgwdrXdu4YNCWyEo3fWuP+WgN9mN0iWviQ= +github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= @@ -815,6 +900,7 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= github.com/libp2p/go-libp2p-kad-dht v0.2.1/go.mod h1:k7ONOlup7HKzQ68dE6lSnp07cdxdkmnRa+6B4Fh9/w0= github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= +github.com/libp2p/go-libp2p-kad-dht v0.8.3/go.mod h1:HnYYy8taJWESkqiESd1ngb9XX/XGGsMA5G0Vj2HoSh4= github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= @@ -825,6 +911,7 @@ github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3 github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= +github.com/libp2p/go-libp2p-mplex v0.2.4/go.mod h1:mI7iOezdWFOisvUwaYd3IDrJ4oVmgoXK8H331ui39CE= github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= @@ -847,6 +934,7 @@ github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRj github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= +github.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= @@ -854,12 +942,19 @@ github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEX github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q= github.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= github.com/libp2p/go-libp2p-pubsub v0.3.2/go.mod h1:Uss7/Cfz872KggNb+doCVPHeCDmXB7z500m/R8DaAUk= +github.com/libp2p/go-libp2p-pubsub v0.3.4/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.5-0.20200820194335-bfc96c2cd081/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.5 h1:iF75GWpcxKEUQU8tTkgLy69qIQvfhL+t6U6ndQrB6ho= +github.com/libp2p/go-libp2p-pubsub v0.3.5/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= +github.com/libp2p/go-libp2p-quic-transport v0.7.1/go.mod h1:TD31to4E5exogR/GWHClXCfkktigjAl5rXSt7HoxNvY= +github.com/libp2p/go-libp2p-quic-transport v0.8.0/go.mod h1:F2FG/6Bzz0U6essUVxDzE0s9CrY4XGLbl7QEmDNvU7A= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= +github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= @@ -877,12 +972,14 @@ github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaT github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= +github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= +github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= @@ -914,20 +1011,24 @@ github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+ github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= +github.com/libp2p/go-msgio v0.0.6 h1:lQ7Uc0kS1wb1EfRxO2Eir/RJoHkHn7t6o+EiwsYIKJA= github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= +github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= +github.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw= github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= @@ -940,6 +1041,7 @@ github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19 github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= +github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= github.com/libp2p/go-ws-transport v0.0.1/go.mod h1:p3bKjDWHEgtuKKj+2OdPYs5dAPIjtpQGHF2tJfGz7Ww= @@ -961,6 +1063,8 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.17.3/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.18.0/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= @@ -969,8 +1073,11 @@ github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= +github.com/marten-seemann/qpack v0.2.0/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/marten-seemann/qtls v0.9.1/go.mod h1:T1MmAdDPyISzxlK6kjRr0pcZFBVd1OZbBb/j3cvzHhk= +github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= +github.com/marten-seemann/qtls-go1-15 v0.1.0/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -1004,6 +1111,8 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= @@ -1057,6 +1166,7 @@ github.com/multiformats/go-multiaddr-dns v0.1.0/go.mod h1:01k2RAqtoXIuPa3DCavAE9 github.com/multiformats/go-multiaddr-dns v0.2.0 h1:YWJoIDwLePniH7OU5hBnDZV6SWuvJqJ0YtN6pLeH9zA= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= +github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= github.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= @@ -1065,6 +1175,7 @@ github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQ github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= +github.com/multiformats/go-multiaddr-net v0.2.0 h1:MSXRGN0mFymt6B1yo/6BPnIRpLPEnKgQNvVfCX5VDJk= github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA= github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= @@ -1083,6 +1194,8 @@ github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wS github.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= +github.com/multiformats/go-multistream v0.1.2 h1:knyamLYMPFPngQjGQ0lhnlys3jtVR/3xV6TREUJr+fE= +github.com/multiformats/go-multistream v0.1.2/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= @@ -1120,6 +1233,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -1137,6 +1251,8 @@ github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKw github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= @@ -1216,6 +1332,7 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y= github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1228,17 +1345,21 @@ github.com/renproject/pack v0.2.3/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7Gvy github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/renproject/surge v1.2.5 h1:P2qKZxWiKrC8hw7in/hXVtic+dGkhd1M0H/1Lj+fJnw= github.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= +github.com/renproject/surge v1.2.6 h1:4EV2jbBPvQM8Wnv5zL1N1X/UbaH6AZiRUv7r4xZ8ncA= +github.com/renproject/surge v1.2.6/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -1332,6 +1453,7 @@ github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/supranational/blst v0.1.1/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= @@ -1394,8 +1516,12 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377 h1:LHFlP/ktDvOnCap7PsT87cs7Gwd0p+qv6Qm5g2ZPR+I= github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c h1:BMg3YUwLEUIYBJoYZVhA4ZDTciXRj6r7ffOCshWrsoE= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee h1:U7zWWvvAjT76EiuWPSOiZlQDnaQYPxPoxugTtTAcJK0= +github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= @@ -1411,13 +1537,19 @@ github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84 github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= +github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= +github.com/willscott/go-cmp v0.5.2-0.20200812183318-8affb9542345/go.mod h1:D7hA8H5pyQx7Y5Em7IWx1R4vNJzfon3gpG9nxjkITjQ= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= +github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1451,6 +1583,7 @@ go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= +go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1467,6 +1600,7 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20190218023631-ce4c26f7be8e/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20190313082347-94abd6928b1d/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1500,6 +1634,7 @@ golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1538,6 +1673,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1582,6 +1718,8 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1726,6 +1864,7 @@ golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1853,6 +1992,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= From a799e81a867e486c7cd19f8e7916a397a6b9f6fa Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 21:44:51 +0530 Subject: [PATCH 020/335] docker run script fix, add filecoin to chain types --- infra/filecoin/run.sh | 10 +++++++--- multichain.go | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/infra/filecoin/run.sh b/infra/filecoin/run.sh index 1e2ec3e3..f56620e2 100644 --- a/infra/filecoin/run.sh +++ b/infra/filecoin/run.sh @@ -1,5 +1,9 @@ #!/bin/bash +cd /app/ + +export LOTUS_SKIP_GENESIS_CHECK=_yes_ + ./lotus daemon --lotus-make-genesis=dev.gen --genesis-template=localnet.json --bootstrap=false & PID=$! @@ -41,13 +45,13 @@ Timeout = "30s" # HeadNotifs = false #' > ~/.lotus/config.toml -./lotus daemon --lotus-make-genesis=/root/dev.gen --genesis-template=/root/localnet.json --bootstrap=false & +./lotus daemon --lotus-make-genesis=/root/dev.gen --genesis-template=/app/localnet.json --bootstrap=false & sleep 5 -./lotus-storage-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync +./lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync -./lotus-storage-miner run --nosync & +./lotus-miner run --nosync & sleep 15 diff --git a/multichain.go b/multichain.go index 26503c1e..30625b51 100644 --- a/multichain.go +++ b/multichain.go @@ -99,7 +99,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case BNB, ETH: + case BNB, ETH, FIL: return ChainTypeAccountBased default: return ChainType("") @@ -165,7 +165,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum: + case BinanceSmartChain, Ethereum, Filecoin: return ChainTypeAccountBased default: return ChainType("") @@ -174,7 +174,7 @@ func (chain Chain) ChainType() ChainType { func (chain Chain) IsAccountBased() bool { switch chain { - case BinanceSmartChain, Ethereum: + case BinanceSmartChain, Ethereum, Filecoin: return true default: return false From 9686ec8686c8011e27ed67d8b50295cc452b7011 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 21:56:06 +0530 Subject: [PATCH 021/335] minor modifications --- chain/filecoin/account.go | 2 +- chain/filecoin/address.go | 6 +++--- chain/filecoin/address_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 34cf5709..b238ceaf 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -116,7 +116,7 @@ func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} } -func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (account.Tx, error) { +func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ pack.U256, payload pack.Bytes) (account.Tx, error) { filfrom, err := filaddress.NewFromString(string(from)) if err != nil { return nil, fmt.Errorf("bad from address '%v': %v", from, err) diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go index afe9333f..06a36b12 100644 --- a/chain/filecoin/address.go +++ b/chain/filecoin/address.go @@ -5,7 +5,7 @@ import ( "github.com/renproject/multichain/api/address" ) -type AddressEncoderDecoder struct { +type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } @@ -13,8 +13,8 @@ type AddressEncoderDecoder struct { type AddressEncoder struct{} type AddressDecoder struct{} -func NewAddressEncoderDecoder() AddressEncoderDecoder { - return AddressEncoderDecoder{ +func NewAddressEncodeDecoder() AddressEncodeDecoder { + return AddressEncodeDecoder{ AddressEncoder: AddressEncoder{}, AddressDecoder: AddressDecoder{}, } diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go index 1b4497cb..fb8dedc3 100644 --- a/chain/filecoin/address_test.go +++ b/chain/filecoin/address_test.go @@ -18,7 +18,7 @@ import ( var _ = Describe("Address", func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) - encoderDecoder := filecoin.NewAddressEncoderDecoder() + encoderDecoder := filecoin.NewAddressEncodeDecoder() Context("when encoding and decoding", func() { Context("for ID protocol", func() { From a9e073aec1643d03da6a37562d540ab127a8ec51 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 21:59:59 +0530 Subject: [PATCH 022/335] better performance for docker file --- infra/filecoin/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index aa8c623b..d802e50a 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -8,11 +8,6 @@ RUN wget -c https://golang.org/dl/go1.14.6.linux-amd64.tar.gz RUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz ENV PATH=$PATH:/usr/local/go/bin -COPY run.sh /root/run.sh -COPY miner.key /root/miner.key -RUN chmod +x /root/run.sh -RUN chmod +x /root/miner.key - WORKDIR /app RUN git clone https://github.com/filecoin-project/lotus . @@ -22,6 +17,11 @@ RUN ./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 RUN ./lotus-seed genesis new localnet.json RUN ./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json +COPY run.sh /root/run.sh +COPY miner.key /root/miner.key +RUN chmod +x /root/run.sh +RUN chmod +x /root/miner.key + EXPOSE 1234 CMD /root/run.sh From 84dc1952c10c4ab036b3519b267526249a309e84 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 1 Sep 2020 00:19:52 +0530 Subject: [PATCH 023/335] add command to create new auth token --- infra/filecoin/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infra/filecoin/run.sh b/infra/filecoin/run.sh index f56620e2..0638fbc2 100644 --- a/infra/filecoin/run.sh +++ b/infra/filecoin/run.sh @@ -14,6 +14,8 @@ sleep 10 ./lotus wallet import /root/miner.key +./lotus auth create-token --perm admin + kill $PID echo ' From ba9a3340673bbdeabc0ad6ae1edefbda21363d2e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 1 Sep 2020 16:19:09 +0530 Subject: [PATCH 024/335] lint and cleanup --- api/account/account.go | 2 ++ api/gas/gas.go | 9 --------- chain/bitcoin/address.go | 13 +++++++++++++ chain/bitcoin/gas.go | 7 ------- chain/bitcoin/utxo.go | 8 +++++++- chain/bitcoincash/address.go | 1 + chain/bitcoincash/gas.go | 7 +++++++ chain/bitcoincash/utxo.go | 20 ++++++++++++++++++++ chain/celo/address.go | 2 ++ chain/digibyte/address.go | 7 +++++++ chain/digibyte/digibyte.go | 14 +++++++++----- chain/digibyte/gas.go | 5 +++++ chain/digibyte/utxo.go | 25 ++++++++++++++++++++----- chain/ethereum/account.go | 33 +++++++++++++++++++++++++++++++-- chain/ethereum/address.go | 6 ++++++ chain/ethereum/gas.go | 12 ------------ chain/filecoin/account.go | 33 +++++++++++++++++++++++++-------- chain/filecoin/address.go | 9 +++++++++ chain/zcash/address.go | 2 ++ chain/zcash/gas.go | 2 ++ chain/zcash/utxo.go | 17 +++++++++++++++++ chain/zcash/zcash.go | 7 +++++++ 22 files changed, 192 insertions(+), 49 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 858b6753..27341cb0 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -56,6 +56,8 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { + // BuildTx consumes transaction fields to construct and return a transaction + // that implements the multichain.AccountTx interface BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } diff --git a/api/gas/gas.go b/api/gas/gas.go index 36d94b43..2578fc80 100644 --- a/api/gas/gas.go +++ b/api/gas/gas.go @@ -10,12 +10,6 @@ import ( "github.com/renproject/pack" ) -type TxType uint8 - -const ( - ETHTransfer = TxType(0) -) - // The Estimator interface defines the functionality required to know the // current recommended gas prices. type Estimator interface { @@ -28,7 +22,4 @@ type Estimator interface { // required to get a transaction into one of the next few blocks (because // blocks happen a lot faster). EstimateGasPrice(context.Context) (pack.U256, error) - - // EstimateGasLimit ... - EstimateGasLimit(TxType) (pack.U256, error) } diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 3547eaeb..44038866 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -8,11 +8,14 @@ import ( "github.com/renproject/pack" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the +// chain specific configurations func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(params), @@ -20,14 +23,19 @@ func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { } } +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder struct { params *chaincfg.Params } +// NewAddressEncoder constructs a new AddressEncoder with the chain specific +// configurations func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { return AddressEncoder{params: params} } +// EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { encodedAddr := base58.Encode([]byte(rawAddr)) if _, err := btcutil.DecodeAddress(encodedAddr, encoder.params); err != nil { @@ -37,14 +45,19 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address return address.Address(encodedAddr), nil } +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder struct { params *chaincfg.Params } +// NewAddressDecoder constructs a new AddressDecoder with the chain specific +// configurations func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { return AddressDecoder{params: params} } +// DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (pack.Bytes, error) { if _, err := btcutil.DecodeAddress(string(addr), decoder.params); err != nil { // Check that the address is valid. diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index e901fc1e..40207885 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -3,7 +3,6 @@ package bitcoin import ( "context" - "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -31,9 +30,3 @@ func NewGasEstimator(satsPerByte pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.satsPerByte, nil } - -// EstimateGasLimit returns the gas limit for a transaction. This is not relevant -// for UTXO type of chains -func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { - return pack.NewU256([32]byte{}), nil -} diff --git a/chain/bitcoin/utxo.go b/chain/bitcoin/utxo.go index 367365e9..119e5880 100644 --- a/chain/bitcoin/utxo.go +++ b/chain/bitcoin/utxo.go @@ -81,15 +81,18 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given underlying transaction. func (tx *Tx) Hash() (pack.Bytes, error) { txhash := tx.msgTx.TxHash() return pack.NewBytes(txhash[:]), nil } +// Inputs returns the UTXO inputs in the underlying transaction. func (tx *Tx) Inputs() ([]utxo.Input, error) { return tx.inputs, nil } +// Outputs returns the UTXO outputs in the underlying transaction. func (tx *Tx) Outputs() ([]utxo.Output, error) { hash, err := tx.Hash() if err != nil { @@ -111,7 +114,7 @@ func (tx *Tx) Outputs() ([]utxo.Output, error) { } // Sighashes returns the digests that must be signed before the transaction -// can be submitted by the client. All transactions assume that the f +// can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighashes := make([]pack.Bytes32, len(tx.inputs)) @@ -150,6 +153,8 @@ func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { return sighashes, nil } +// Sign consumes a list of signatures, and adds them to the list of UTXOs in +// the underlying transactions. func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -201,6 +206,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the UTXO transaction to bytes func (tx *Tx) Serialize() (pack.Bytes, error) { buf := new(bytes.Buffer) if err := tx.msgTx.Serialize(buf); err != nil { diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index 89722d20..efcebd83 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -176,6 +176,7 @@ func EncodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, return EncodeToString(AppendChecksum(AddressPrefix(params), data)), nil } +// DecodeAddress implements the address.Decoder interface func DecodeAddress(addr string, params *chaincfg.Params) (Address, error) { // Legacy address decoding if address, err := btcutil.DecodeAddress(addr, params); err == nil { diff --git a/chain/bitcoincash/gas.go b/chain/bitcoincash/gas.go index 1658a0fe..b2b5369d 100644 --- a/chain/bitcoincash/gas.go +++ b/chain/bitcoincash/gas.go @@ -2,6 +2,13 @@ package bitcoincash import "github.com/renproject/multichain/chain/bitcoin" +// A GasEstimator returns the SATs-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// SATs-per-byte. type GasEstimator = bitcoin.GasEstimator +// NewGasEstimator returns a simple gas estimator that always returns the given +// number of SATs-per-byte. var NewGasEstimator = bitcoin.NewGasEstimator diff --git a/chain/bitcoincash/utxo.go b/chain/bitcoincash/utxo.go index 6dfddc54..2880be16 100644 --- a/chain/bitcoincash/utxo.go +++ b/chain/bitcoincash/utxo.go @@ -26,16 +26,25 @@ const SighashMask = txscript.SigHashType(0x1F) // Version of Bitcoin Cash transactions supported by the multichain. const Version int32 = 1 +// ClientOptions are used to parameterise the behaviour of the Client. type ClientOptions = bitcoin.ClientOptions +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. func DefaultClientOptions() ClientOptions { return bitcoin.DefaultClientOptions().WithHost("http://127.0.0.1:19443") } +// A Client interacts with an instance of the Bitcoin network using the RPC +// interface exposed by a Bitcoin node. type Client = bitcoin.Client +// NewClient returns a new Client. var NewClient = bitcoin.NewClient +// The TxBuilder is an implementation of a UTXO-compatible transaction builder +// for Bitcoin. type TxBuilder struct { params *chaincfg.Params } @@ -103,15 +112,21 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given underlying transaction. It +// implements the multichain.UTXOTx interface func (tx *Tx) Hash() (pack.Bytes, error) { txhash := tx.msgTx.TxHash() return pack.NewBytes(txhash[:]), nil } +// Inputs returns the UTXO inputs in the underlying transaction. It implements +// the multichain.UTXOTx interface func (tx *Tx) Inputs() ([]utxo.Input, error) { return tx.inputs, nil } +// Outputs returns the UTXO outputs in the underlying transaction. It implements +// the multichain.UTXOTx interface func (tx *Tx) Outputs() ([]utxo.Output, error) { hash, err := tx.Hash() if err != nil { @@ -132,6 +147,8 @@ func (tx *Tx) Outputs() ([]utxo.Output, error) { return outputs, nil } +// Sighashes returns the digests that must be signed before the transaction +// can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighashes := make([]pack.Bytes32, len(tx.inputs)) @@ -157,6 +174,8 @@ func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { return sighashes, nil } +// Sign consumes a list of signatures, and adds them to the list of UTXOs in +// the underlying transactions. It implements the multichain.UTXOTx interface func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -190,6 +209,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the UTXO transaction to bytes func (tx *Tx) Serialize() (pack.Bytes, error) { buf := new(bytes.Buffer) if err := tx.msgTx.Serialize(buf); err != nil { diff --git a/chain/celo/address.go b/chain/celo/address.go index b4a448f9..a5c6995c 100644 --- a/chain/celo/address.go +++ b/chain/celo/address.go @@ -19,5 +19,7 @@ type AddressDecoder = ethereum.AddressDecoder type AddressEncodeDecoder = ethereum.AddressEncodeDecoder var ( + // NewAddressEncodeDecoder creates a new address encode-decoder that + // implements the address.Encoder and address.Decoder interfaces NewAddressEncodeDecoder = ethereum.NewAddressEncodeDecoder ) diff --git a/chain/digibyte/address.go b/chain/digibyte/address.go index 9712b843..e2f26874 100644 --- a/chain/digibyte/address.go +++ b/chain/digibyte/address.go @@ -2,6 +2,13 @@ package digibyte import "github.com/renproject/multichain/chain/bitcoin" +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder = bitcoin.AddressEncoder + +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder = bitcoin.AddressDecoder + +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder = bitcoin.AddressEncodeDecoder diff --git a/chain/digibyte/digibyte.go b/chain/digibyte/digibyte.go index 9d20b9c3..e3dd5eea 100644 --- a/chain/digibyte/digibyte.go +++ b/chain/digibyte/digibyte.go @@ -24,14 +24,16 @@ var ( ) const ( + // DeploymentTestDummy ... DeploymentTestDummy = iota + + // DeploymentCSV ... DeploymentCSV + + // DeploymentSegwit ... DeploymentSegwit - // DeploymentVersionBits - // DeploymentVersionReserveAlgos - // DeploymentOdo - // DeploymentEquihash - // DeploymentEthash + + // DefinedDeployments ... DefinedDeployments ) @@ -111,6 +113,7 @@ func newHashFromStr(hexStr string) *chainhash.Hash { return hash } +// MainNetParams returns the chain configuration for mainnet var MainNetParams = chaincfg.Params{ Name: "mainnet", Net: 0xdab6c3fa, @@ -305,6 +308,7 @@ var MainNetParams = chaincfg.Params{ HDCoinType: 0x14, } +// RegressionNetParams returns the chain configuration for a devnet/regnet var RegressionNetParams = chaincfg.Params{ Name: "regtest", diff --git a/chain/digibyte/gas.go b/chain/digibyte/gas.go index 9750c922..fdc69082 100644 --- a/chain/digibyte/gas.go +++ b/chain/digibyte/gas.go @@ -2,4 +2,9 @@ package digibyte import "github.com/renproject/multichain/chain/bitcoin" +// A GasEstimator returns the SATs-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// SATs-per-byte. type GasEstimator = bitcoin.GasEstimator diff --git a/chain/digibyte/utxo.go b/chain/digibyte/utxo.go index afde227d..76604833 100644 --- a/chain/digibyte/utxo.go +++ b/chain/digibyte/utxo.go @@ -3,14 +3,29 @@ package digibyte import "github.com/renproject/multichain/chain/bitcoin" type ( - Tx = bitcoin.Tx - TxBuilder = bitcoin.TxBuilder - Client = bitcoin.Client + // Tx represents a simple Bitcoin transaction that implements the Bitcoin Compat + // API. + Tx = bitcoin.Tx + + // The TxBuilder is an implementation of a UTXO-compatible transaction builder + // for Bitcoin. + TxBuilder = bitcoin.TxBuilder + + // A Client interacts with an instance of the Bitcoin network using the RPC + // interface exposed by a Bitcoin node. + Client = bitcoin.Client + + // ClientOptions are used to parameterise the behaviour of the Client. ClientOptions = bitcoin.ClientOptions ) var ( - NewTxBuilder = bitcoin.NewTxBuilder - NewClient = bitcoin.NewClient + // NewTxBuilder re-exports bitoin.NewTxBuilder + NewTxBuilder = bitcoin.NewTxBuilder + + // NewClient re-exports bitcoin.NewClient + NewClient = bitcoin.NewClient + + // DefaultClientOptions re-exports bitcoin.DefaultClientOptions DefaultClientOptions = bitcoin.DefaultClientOptions ) diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 907adc21..7e2b83ea 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -14,14 +14,21 @@ import ( "github.com/renproject/pack" ) +// The TxBuilder is an implementation of a Account-based chains compatible +// transaction builder for Ethereum. type TxBuilder struct { config *params.ChainConfig } +// NewTxBuilder returns a transaction builder that builds Account-compatible +// Ethereum transactions for the given chain configuration. func NewTxBuilder(config *params.ChainConfig) TxBuilder { return TxBuilder{config: config} } +// BuildTx returns an Ethereum transaction that transfers value from an address +// to another address, with other transaction-specific fields. The returned +// transaction implements the multichain.AccountTx interface. func (txBuilder TxBuilder) BuildTx( from, to address.Address, value, nonce pack.U256, @@ -45,6 +52,8 @@ func (txBuilder TxBuilder) BuildTx( return &Tx{fromAddr, tx, signer, signed}, nil } +// Tx represents an Ethereum transaction that implements the +// multichain.AccountTx interface type Tx struct { from Address @@ -54,35 +63,48 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given transaction. func (tx *Tx) Hash() pack.Bytes { return pack.NewBytes(tx.tx.Hash().Bytes()) } +// From returns the sender of the transaction. func (tx *Tx) From() address.Address { return address.Address(tx.from.String()) } +// To returns the recipient of the transaction. func (tx *Tx) To() address.Address { return address.Address(tx.tx.To().String()) } +// Value returns the value (in native tokens) that is being transferred in the +// transaction. func (tx *Tx) Value() pack.U256 { return pack.NewU256FromInt(tx.tx.Value()) } +// Nonce returns the transaction nonce for the transaction sender. This is a +// one-time use incremental identifier to protect against double spending. func (tx *Tx) Nonce() pack.U256 { return pack.NewU256FromU64(pack.NewU64(tx.tx.Nonce())) } +// Payload returns the data/payload attached in the transaction. func (tx *Tx) Payload() contract.CallData { return contract.CallData(pack.NewBytes(tx.tx.Data())) } +// Sighashes returns the digest that must be signed by the sender before the +// transaction can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighash := tx.signer.Hash(tx.tx) return []pack.Bytes32{pack.NewBytes32(sighash)}, nil } +// Sign consumes a list of signatures, and adds them to the underlying +// Ethereum transaction. In case of Ethereum, we expect only a single signature +// per transaction. func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -102,6 +124,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the transaction to bytes. func (tx *Tx) Serialize() (pack.Bytes, error) { serialized, err := tx.tx.MarshalJSON() if err != nil { @@ -111,10 +134,13 @@ func (tx *Tx) Serialize() (pack.Bytes, error) { return pack.NewBytes(serialized), nil } +// EthClient interacts with an instance of the Ethereum network using the RPC +// interface exposed by an Ethereum node. type EthClient struct { client *ethclient.Client } +// NewClient returns a new Client. func NewClient(rpcURL pack.String) (account.Client, error) { client, err := ethclient.Dial(string(rpcURL)) if err != nil { @@ -124,8 +150,10 @@ func NewClient(rpcURL pack.String) (account.Client, error) { return EthClient{client}, nil } -func (client EthClient) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { - txHash := common.BytesToHash(txId) +// Tx queries the Ethereum node to fetch a transaction with the provided tx ID +// and also returns the number of block confirmations for the transaction. +func (client EthClient) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { + txHash := common.BytesToHash(txID) tx, isPending, err := client.client.TransactionByHash(ctx, txHash) if err != nil { return nil, pack.NewU64(0), fmt.Errorf("fetching tx: %v", err) @@ -146,6 +174,7 @@ func (client EthClient) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pa return &Tx{tx: tx}, pack.NewU64(confs), nil } +// SubmitTx submits a signed transaction to the Ethereum network. func (client EthClient) SubmitTx(ctx context.Context, tx account.Tx) error { panic("unimplemented") } diff --git a/chain/ethereum/address.go b/chain/ethereum/address.go index 7a1ebb46..dd3dae5b 100644 --- a/chain/ethereum/address.go +++ b/chain/ethereum/address.go @@ -12,17 +12,20 @@ import ( "github.com/renproject/surge" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// AddressEncoder implements the address.Encoder interface. type AddressEncoder interface { EncodeAddress(address.RawAddress) (address.Address, error) } type addressEncoder struct{} +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder. func NewAddressEncodeDecoder() address.EncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(), @@ -30,16 +33,19 @@ func NewAddressEncodeDecoder() address.EncodeDecoder { } } +// AddressDecoder implements the address.Decoder interface. type AddressDecoder interface { DecodeAddress(address.Address) (address.RawAddress, error) } type addressDecoder struct{} +// NewAddressDecoder constructs a new AddressDecoder. func NewAddressDecoder() AddressDecoder { return addressDecoder{} } +// NewAddressEncoder constructs a new AddressEncoder. func NewAddressEncoder() AddressEncoder { return addressEncoder{} } diff --git a/chain/ethereum/gas.go b/chain/ethereum/gas.go index c2c9addb..f091bb6d 100644 --- a/chain/ethereum/gas.go +++ b/chain/ethereum/gas.go @@ -2,9 +2,7 @@ package ethereum import ( "context" - "fmt" - "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -32,13 +30,3 @@ func NewGasEstimator(wei pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.wei, nil } - -// EstimateGasLimit returns the gas limit depending on what type of transaction we wish to do -func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { - switch txType { - case gas.ETHTransfer: - return pack.NewU256FromU64(pack.NewU64(21000)), nil - default: - return pack.NewU256([32]byte{}), fmt.Errorf("non-exhaustive transaction type: %v", txType) - } -} diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index b238ceaf..9ef0c84e 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -23,11 +23,21 @@ import ( ) const ( - AuthorizationKey = "Authorization" - DefaultClientMultiAddress = "" - DefaultClientAuthToken = "" + // AuthorizationKey is the header key used for authorization + AuthorizationKey = "Authorization" + + // DefaultClientMultiAddress is the RPC websocket URL used by default, to + // interact with the filecoin lotus node. + DefaultClientMultiAddress = "ws://127.0.0.1:1234/rpc/v0" + + // DefaultClientAuthToken is the auth token used to instantiate the lotus + // client. A valid lotus auth token is required to write messages to the + // filecoin storage. To do read-only queries, auth token is not required. + DefaultClientAuthToken = "" ) +// Tx represents a filecoin transaction, encapsulating a message and its +// signature. type Tx struct { msg types.Message signature pack.Bytes65 @@ -107,15 +117,20 @@ func (tx Tx) Serialize() (pack.Bytes, error) { return buf.Bytes(), nil } +// TxBuilder represents a transaction builder that builds transactions to be +// broadcasted to the filecoin network. The TxBuilder is configured using a +// gas price and gas limit. type TxBuilder struct { gasPrice pack.U256 gasLimit pack.U256 } +// NewTxBuilder creates a new transaction builder. func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} } +// BuildTx receives transaction fields and constructs a new transaction. func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ pack.U256, payload pack.Bytes) (account.Tx, error) { filfrom, err := filaddress.NewFromString(string(from)) if err != nil { @@ -178,6 +193,8 @@ func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { return opts } +// Client holds options to connect to a filecoin lotus node, and the underlying +// RPC client instance. type Client struct { opts ClientOptions node api.FullNode @@ -201,15 +218,15 @@ func NewClient(opts ClientOptions) (*Client, error) { // Tx returns the transaction uniquely identified by the given transaction // hash. It also returns the number of confirmations for the transaction. -func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { +func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { // parse the transaction ID to a message ID - msgId, err := cid.Parse(txId.String()) + msgID, err := cid.Parse(txID.String()) if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("parsing txId: %v", err) + return nil, pack.NewU64(0), fmt.Errorf("parsing txID: %v", err) } // lookup message receipt to get its height - messageLookup, err := client.node.StateSearchMsg(ctx, msgId) + messageLookup, err := client.node.StateSearchMsg(ctx, msgID) if err != nil { return nil, pack.NewU64(0), fmt.Errorf("searching msg: %v", err) } @@ -222,7 +239,7 @@ func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack confs := headTipset.Height() - messageLookup.Height + 1 // get the message - msg, err := client.node.ChainGetMessage(ctx, msgId) + msg, err := client.node.ChainGetMessage(ctx, msgID) if err != nil { return nil, pack.NewU64(0), fmt.Errorf("fetching msg: %v", err) } diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go index 06a36b12..cb34c5a6 100644 --- a/chain/filecoin/address.go +++ b/chain/filecoin/address.go @@ -5,14 +5,19 @@ import ( "github.com/renproject/multichain/api/address" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// AddressEncoder implements the address.Encoder interface. type AddressEncoder struct{} + +// AddressDecoder implements the address.Decoder interface. type AddressDecoder struct{} +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder. func NewAddressEncodeDecoder() AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: AddressEncoder{}, @@ -20,6 +25,8 @@ func NewAddressEncodeDecoder() AddressEncodeDecoder { } } +// EncodeAddress implements the address.Encoder interface. It receives a raw +// address and encodes it to a human-readable stringified address. func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) { addr, err := filaddress.NewFromBytes([]byte(raw)) if err != nil { @@ -28,6 +35,8 @@ func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Add return address.Address(addr.String()), nil } +// DecodeAddress implements the address.Decoder interface. It receives a human +// readable address and decodes it to an address represented by raw bytes. func (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { rawAddr, err := filaddress.NewFromString(string(addr)) if err != nil { diff --git a/chain/zcash/address.go b/chain/zcash/address.go index 794b0be6..c1ae2851 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -122,6 +122,8 @@ func (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool { return addr.AddressScriptHash.IsForNet(params) } +// DecodeAddress decodes a string-representation of an address to an address +// type that implements the zcash.Address interface func DecodeAddress(addr string) (Address, error) { var decoded = base58.Decode(addr) if len(decoded) != 26 && len(decoded) != 25 { diff --git a/chain/zcash/gas.go b/chain/zcash/gas.go index 6b864739..ce366b71 100644 --- a/chain/zcash/gas.go +++ b/chain/zcash/gas.go @@ -2,6 +2,8 @@ package zcash import "github.com/renproject/multichain/chain/bitcoin" +// GasEstimator re-exports bitcoin.GasEstimator type GasEstimator = bitcoin.GasEstimator +// NewGasEstimator re-exports bitcoin.NewGasEstimator var NewGasEstimator = bitcoin.NewGasEstimator diff --git a/chain/zcash/utxo.go b/chain/zcash/utxo.go index aa4dee7b..ec852dd3 100644 --- a/chain/zcash/utxo.go +++ b/chain/zcash/utxo.go @@ -21,16 +21,24 @@ import ( // Version of Zcash transactions supported by the multichain. const Version int32 = 4 +// ClientOptions are used to parameterise the behaviour of the Client. type ClientOptions = bitcoin.ClientOptions +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. func DefaultClientOptions() ClientOptions { return bitcoin.DefaultClientOptions().WithHost("http://127.0.0.1:18232") } +// Client re-exports bitcoin.Client. type Client = bitcoin.Client +// NewClient re-exports bitcoin.Client var NewClient = bitcoin.NewClient +// The TxBuilder is an implementation of a UTXO-compatible transaction builder +// for Bitcoin. type TxBuilder struct { params *Params expiryHeight uint32 @@ -100,6 +108,7 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given underlying transaction. func (tx *Tx) Hash() (pack.Bytes, error) { serial, err := tx.Serialize() if err != nil { @@ -109,9 +118,12 @@ func (tx *Tx) Hash() (pack.Bytes, error) { return pack.NewBytes(txhash[:]), nil } +// Inputs returns the UTXO inputs in the underlying transaction. func (tx *Tx) Inputs() ([]utxo.Input, error) { return tx.inputs, nil } + +// Outputs returns the UTXO outputs in the underlying transaction. func (tx *Tx) Outputs() ([]utxo.Output, error) { hash, err := tx.Hash() if err != nil { @@ -132,6 +144,8 @@ func (tx *Tx) Outputs() ([]utxo.Output, error) { return outputs, nil } +// Sighashes returns the digests that must be signed before the transaction +// can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighashes := make([]pack.Bytes32, len(tx.inputs)) for i, txin := range tx.inputs { @@ -160,6 +174,8 @@ func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { return sighashes, nil } +// Sign consumes a list of signatures, and adds them to the list of UTXOs in +// the underlying transactions. func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -192,6 +208,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the UTXO transaction to bytes. func (tx *Tx) Serialize() (pack.Bytes, error) { w := new(bytes.Buffer) pver := uint32(0) diff --git a/chain/zcash/zcash.go b/chain/zcash/zcash.go index f76d1081..d5a98847 100644 --- a/chain/zcash/zcash.go +++ b/chain/zcash/zcash.go @@ -17,6 +17,7 @@ const ( versionSaplingGroupID = 0x892f2085 ) +// Params signifies the chain specific parameters of the Zcash network. type Params struct { // TODO: We do not actually need to embed the entire chaincfg params object. *chaincfg.Params @@ -26,6 +27,7 @@ type Params struct { Upgrades []ParamsUpgrade } +// ParamsUpgrade ... type ParamsUpgrade struct { ActivationHeight uint32 BranchID []byte @@ -34,6 +36,7 @@ type ParamsUpgrade struct { var ( witnessMarkerBytes = []byte{0x00, 0x01} + // MainNetParams defines the mainnet configuration. MainNetParams = Params{ Params: &chaincfg.MainNetParams, @@ -46,6 +49,8 @@ var ( {653600, []byte{0x60, 0x0E, 0xB4, 0x2B}}, }, } + + // TestNet3Params defines the testnet configuration. TestNet3Params = Params{ Params: &chaincfg.TestNet3Params, @@ -58,6 +63,8 @@ var ( {584000, []byte{0x60, 0x0E, 0xB4, 0x2B}}, }, } + + // RegressionNetParams defines a devet/regnet configuration. RegressionNetParams = Params{ Params: &chaincfg.RegressionNetParams, From 74b880fbe470ff25357720ed44e7cfe25b06c279 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 2 Sep 2020 09:57:01 +1000 Subject: [PATCH 025/335] add better logs and fixmes --- chain/ethereum/account.go | 6 +++++- go.sum | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 7e2b83ea..f7f8eb3b 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -111,7 +111,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { } if len(signatures) != 1 { - return fmt.Errorf("expected exactly signature") + return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } signedTx, err := tx.tx.WithSignature(tx.signer, signatures[0].Bytes()) @@ -126,6 +126,10 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { // Serialize serializes the transaction to bytes. func (tx *Tx) Serialize() (pack.Bytes, error) { + // FIXME: I am pretty sure that this is not the format the Ethereum expects + // transactions to be serialised to on the network. Although the client + // might expect to send JSON objects, that is different from serialization, + // and can better represented by implementing MarshalJSON on this type. serialized, err := tx.tx.MarshalJSON() if err != nil { return pack.Bytes{}, err diff --git a/go.sum b/go.sum index b8181905..22ee56be 100644 --- a/go.sum +++ b/go.sum @@ -78,6 +78,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -166,6 +167,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= @@ -208,6 +210,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= +github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -315,6 +318,7 @@ github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNI github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -1213,6 +1217,7 @@ github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJP github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= From 4b46c1e9f4d5a1d78de0fdb05d6165649588fe83 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 2 Sep 2020 13:18:31 +1000 Subject: [PATCH 026/335] remove duplicate file --- chain/filecoin/filecoint_suite_test.go | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 chain/filecoin/filecoint_suite_test.go diff --git a/chain/filecoin/filecoint_suite_test.go b/chain/filecoin/filecoint_suite_test.go deleted file mode 100644 index db0159ad..00000000 --- a/chain/filecoin/filecoint_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package filecoin_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestFilecoin(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Filecoin Suite") -} From 5daff54d2939708409da0edbebb38e1492f0d97b Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 18 Aug 2020 16:30:08 +1000 Subject: [PATCH 027/335] add cosmos code --- chain/cosmos/address.go | 23 ++++ chain/cosmos/address_test.go | 25 ++++ chain/cosmos/client.go | 140 +++++++++++++++++++++ chain/cosmos/cosmos.go | 148 ++++++++++++++++++++++ chain/cosmos/cosmos_suite_test.go | 13 ++ chain/cosmos/cosmos_test.go | 140 +++++++++++++++++++++ chain/cosmos/gas.go | 38 ++++++ chain/cosmos/tx.go | 198 ++++++++++++++++++++++++++++++ 8 files changed, 725 insertions(+) create mode 100644 chain/cosmos/address.go create mode 100644 chain/cosmos/address_test.go create mode 100644 chain/cosmos/client.go create mode 100644 chain/cosmos/cosmos.go create mode 100644 chain/cosmos/cosmos_suite_test.go create mode 100644 chain/cosmos/cosmos_test.go create mode 100644 chain/cosmos/gas.go create mode 100644 chain/cosmos/tx.go diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go new file mode 100644 index 00000000..ce3eb94a --- /dev/null +++ b/chain/cosmos/address.go @@ -0,0 +1,23 @@ +package cosmos + +import ( + "github.com/cosmos/cosmos-sdk/types" + "github.com/renproject/multichain/api/address" +) + +type AddressDecoder struct { + hrp string +} + +func NewAddressDecoder(hrp string) AddressDecoder { + return AddressDecoder{hrp: hrp} +} + +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + types.GetConfig().SetBech32PrefixForAccount(decoder.hrp, decoder.hrp+"pub") + rawAddr, err := types.AccAddressFromBech32(string(addr)) + if err != nil { + return nil, err + } + return address.RawAddress(rawAddr), nil +} diff --git a/chain/cosmos/address_test.go b/chain/cosmos/address_test.go new file mode 100644 index 00000000..e1932969 --- /dev/null +++ b/chain/cosmos/address_test.go @@ -0,0 +1,25 @@ +package cosmos_test + +// import ( +// "github.com/renproject/multichain/chain/cosmos" +// "github.com/renproject/pack" + +// . "github.com/onsi/ginkgo" +// . "github.com/onsi/gomega" +// ) + +// var _ = Describe("Cosmos", func() { +// Context("when decoding address", func() { +// Context("when decoding terra address", func() { +// It("should work", func() { +// decoder := cosmos.NewAddressDecoder("terra") + +// addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" +// addr, err := decoder.DecodeAddress(pack.NewString(addrStr)) + +// Expect(err).ToNot(HaveOccurred()) +// Expect(addr.AccAddress().String()).Should(Equal(addrStr)) +// }) +// }) +// }) +// }) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go new file mode 100644 index 00000000..c5e6e80a --- /dev/null +++ b/chain/cosmos/client.go @@ -0,0 +1,140 @@ +package cosmos + +import ( + "fmt" + "time" + + "github.com/renproject/multichain/api/account" + "github.com/renproject/pack" + + "github.com/cosmos/cosmos-sdk/client/context" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/client/utils" + rpchttp "github.com/tendermint/tendermint/rpc/client/http" +) + +const ( + // DefaultClientTimeout used by the Client. + DefaultClientTimeout = time.Minute + // DefaultClientTimeoutRetry used by the Client. + DefaultClientTimeoutRetry = time.Second + // DefaultClientHost used by the Client. This should only be used for local + // deployments of the multichain. + DefaultClientHost = "http://0.0.0.0:26657" +) + +// ClientOptions are used to parameterise the behaviour of the Client. +type ClientOptions struct { + Timeout time.Duration + TimeoutRetry time.Duration + Host string +} + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. +func DefaultClientOptions() ClientOptions { + return ClientOptions{ + Timeout: DefaultClientTimeout, + TimeoutRetry: DefaultClientTimeoutRetry, + Host: DefaultClientHost, + } +} + +// WithHost sets the URL of the Bitcoin node. +func (opts ClientOptions) WithHost(host string) ClientOptions { + opts.Host = host + return opts +} + +// A Client interacts with an instance of the Cosmos based network using the REST +// interface exposed by a lightclient node. +type Client interface { + // Account query account with address + Account(address Address) (Account, error) + // Tx query transaction with txHash + Tx(txHash pack.String) (StdTx, error) + // SubmitTx to the Cosmos based network. + SubmitTx(tx Tx, broadcastMode pack.String) (pack.String, error) +} + +type client struct { + opts ClientOptions + cliCtx context.CLIContext + broadcastMode pack.String +} + +// NewClient returns a new Client. +func NewClient(opts ClientOptions, cdc *codec.Codec, broadcastMode pack.String) Client { + httpClient, err := rpchttp.NewWithTimeout(opts.Host, "websocket", uint(opts.Timeout/time.Second)) + if err != nil { + panic(err) + } + + cliCtx := context.NewCLIContext().WithCodec(cdc).WithClient(httpClient).WithTrustNode(true) + + return &client{ + opts: opts, + cliCtx: cliCtx, + broadcastMode: broadcastMode, + } +} + +// Account contains necessary info for sdk.Account +type Account struct { + Address Address `json:"address"` + AccountNumber pack.U64 `json:"account_number"` + SequenceNumber pack.U64 `json:"sequence_number"` + Coins Coins `json:"coins"` +} + +// Account query account with address +func (client *client) Account(addr Address) (Account, error) { + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(addr.AccAddress()) + if err != nil { + return Account{}, err + } + + return Account{ + Address: addr, + AccountNumber: pack.U64(acc.GetAccountNumber()), + SequenceNumber: pack.U64(acc.GetSequence()), + Coins: parseCoins(acc.GetCoins()), + }, nil +} + +// Tx query transaction with txHash +func (client *client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) { + res, err := utils.QueryTx(client.cliCtx, txHash.String()) + if err != nil { + return StdTx{}, 0, err + } + + stdTx := res.Tx.(auth.StdTx) + if res.Code != 0 { + return StdTx{}, 0, fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + } + + return parseStdTx(stdTx), 1 +} + +// SubmitTx to the Cosmos based network. +func (client *client) SubmitTx(ctx context.Context, tx account.Tx) (pack.String, error) { + txBytes, err := tx.Serialize() + if err != nil { + return pack.String(""), fmt.Errorf("bad \"submittx\": %v", err) + } + + res, err := client.cliCtx.WithBroadcastMode(client.broadcastMode.String()).BroadcastTx(txBytes) + if err != nil { + return pack.String(""), err + } + + if res.Code != 0 { + return pack.String(""), fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + } + + return pack.NewString(res.TxHash), nil +} diff --git a/chain/cosmos/cosmos.go b/chain/cosmos/cosmos.go new file mode 100644 index 00000000..3a18dd4c --- /dev/null +++ b/chain/cosmos/cosmos.go @@ -0,0 +1,148 @@ +package cosmos + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/client/utils" + + "github.com/renproject/multichain/compat/cosmoscompat" + "github.com/renproject/pack" + + "github.com/tendermint/tendermint/crypto/secp256k1" + "github.com/tendermint/tendermint/crypto/tmhash" +) + +// NewClient returns returns a new Client with default codec +func NewClient(opts cosmoscompat.ClientOptions) cosmoscompat.Client { + return cosmoscompat.NewClient(opts, simapp.MakeCodec()) +} + +type txBuilder struct { + auth.TxBuilder + cdc *codec.Codec +} + +// NewTxBuilder returns an implementation of the transaction builder interface +// from the Cosmos Compat API, and exposes the functionality to build simple +// Cosmos based transactions. +func NewTxBuilder(options cosmoscompat.TxOptions) cosmoscompat.TxBuilder { + cdc := simapp.MakeCodec() + + return txBuilder{ + TxBuilder: auth.NewTxBuilder( + utils.GetTxEncoder(cdc), + options.AccountNumber.Uint64(), + options.SequenceNumber.Uint64(), + options.Gas.Uint64(), + 0, + false, + options.ChainID.String(), + options.Memo.String(), + options.Fees.Coins(), sdk.DecCoins{}, + ), + cdc: simapp.MakeCodec(), + } +} + +// WithCodec replace codec with custom one +func (builder txBuilder) WithCodec(cdc *codec.Codec) cosmoscompat.TxBuilder { + builder.WithTxEncoder(utils.GetTxEncoder(cdc)) + builder.cdc = cdc + return builder +} + +func (builder txBuilder) BuildTx(sendMsgs []cosmoscompat.MsgSend) (cosmoscompat.Tx, error) { + sdkMsgs := []sdk.Msg{} + for _, sendMsg := range sendMsgs { + sdkMsgs = append(sdkMsgs, sendMsg.Msg()) + } + + signMsg, err := builder.BuildSignMsg(sdkMsgs) + if err != nil { + return nil, err + } + + return &Tx{cdc: builder.cdc, signMsg: signMsg}, nil +} + +// Tx represents a simple Terra transaction that implements the Cosmos Compat +// API. +type Tx struct { + cdc *codec.Codec + signMsg auth.StdSignMsg + signatures []auth.StdSignature +} + +// Hash return txhash bytes +func (tx *Tx) Hash() (pack.Bytes32, error) { + if len(tx.signatures) == 0 { + return pack.Bytes32{}, fmt.Errorf("please do tx.Sign() first to get a hash") + } + + txBytes, err := tx.Serialize() + if err != nil { + return pack.Bytes32{}, err + } + + hashBytes := pack.Bytes32{} + hashBytes.Unmarshal(tmhash.Sum(txBytes), 32) + return hashBytes, nil +} + +// SigBytes that need to be signed before this transaction can be +// submitted. +func (tx *Tx) SigBytes() pack.Bytes { + return tx.signMsg.Bytes() +} + +// Sign the transaction by injecting signatures and the serialized pubkey of +// the signer. +func (tx *Tx) Sign(signatures []cosmoscompat.StdSignature) error { + var stdSignatures []auth.StdSignature + for _, sig := range signatures { + var pubKey secp256k1.PubKeySecp256k1 + copy(pubKey[:], sig.PubKey[:secp256k1.PubKeySecp256k1Size]) + + stdSignatures = append(stdSignatures, auth.StdSignature{ + Signature: sig.Signature, + PubKey: pubKey, + }) + } + + signers := make(map[string]bool) + for _, msg := range tx.signMsg.Msgs { + for _, signer := range msg.GetSigners() { + fmt.Println("SIBONG", signer.String()) + signers[signer.String()] = true + } + } + + for _, sig := range stdSignatures { + signer := sdk.AccAddress(sig.Address()).String() + if _, ok := signers[signer]; !ok { + return fmt.Errorf("wrong signer: %s", signer) + } + } + + if len(signers) != len(stdSignatures) { + return fmt.Errorf("insufficient signers") + } + + fmt.Println("SIBONG", stdSignatures) + tx.signatures = stdSignatures + return nil +} + +// Serialize the transaction. +func (tx *Tx) Serialize() (pack.Bytes, error) { + txBytes, err := tx.cdc.MarshalBinaryLengthPrefixed(auth.NewStdTx(tx.signMsg.Msgs, tx.signMsg.Fee, tx.signatures, tx.signMsg.Memo)) + if err != nil { + return pack.Bytes{}, err + } + + return txBytes, nil +} diff --git a/chain/cosmos/cosmos_suite_test.go b/chain/cosmos/cosmos_suite_test.go new file mode 100644 index 00000000..b1f67bf2 --- /dev/null +++ b/chain/cosmos/cosmos_suite_test.go @@ -0,0 +1,13 @@ +package cosmos_test + +// import ( +// "testing" + +// . "github.com/onsi/ginkgo" +// . "github.com/onsi/gomega" +// ) + +// func TestCosmos(t *testing.T) { +// RegisterFailHandler(Fail) +// RunSpecs(t, "Cosmos Suite") +// } diff --git a/chain/cosmos/cosmos_test.go b/chain/cosmos/cosmos_test.go new file mode 100644 index 00000000..963ac226 --- /dev/null +++ b/chain/cosmos/cosmos_test.go @@ -0,0 +1,140 @@ +package cosmos_test + +// import ( +// "encoding/hex" +// "os" +// "strings" +// "time" + +// "github.com/tendermint/tendermint/crypto/secp256k1" + +// sdk "github.com/cosmos/cosmos-sdk/types" +// "github.com/terra-project/core/app" + +// "github.com/renproject/multichain/chain/cosmos" +// "github.com/renproject/multichain/compat/cosmoscompat" +// "github.com/renproject/pack" + +// . "github.com/onsi/ginkgo" +// . "github.com/onsi/gomega" +// ) + +// var _ = Describe("Cosmos", func() { +// Context("when submitting transactions", func() { +// Context("when sending LUNA to multiple addresses", func() { +// It("should work", func() { +// // Load private key, and assume that the associated address has +// // funds to spend. You can do this by setting TERRA_PK to the +// // value specified in the `./multichaindeploy/.env` file. +// pkEnv := os.Getenv("TERRA_PK") +// if pkEnv == "" { +// panic("TERRA_PK is undefined") +// } + +// addrEnv := os.Getenv("TERRA_ADDRESS") +// if addrEnv == "" { +// panic("TERRA_ADDRESS is undefined") +// } + +// // pkEnv := "a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330" +// // addrEnv := "terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u" + +// pkBz, err := hex.DecodeString(pkEnv) +// Expect(err).ToNot(HaveOccurred()) + +// var pk secp256k1.PrivKeySecp256k1 +// copy(pk[:], pkBz) + +// addr := cosmoscompat.Address(pk.PubKey().Address()) + +// decoder := cosmos.NewAddressDecoder("terra") +// expectedAddr, err := decoder.DecodeAddress(pack.NewString(addrEnv)) +// Expect(err).ToNot(HaveOccurred()) +// Expect(addr).Should(Equal(expectedAddr)) + +// pk1 := secp256k1.GenPrivKey() +// pk2 := secp256k1.GenPrivKey() + +// recipient1 := sdk.AccAddress(pk1.PubKey().Address()) +// recipient2 := sdk.AccAddress(pk2.PubKey().Address()) + +// msgs := []cosmoscompat.MsgSend{ +// { +// FromAddress: cosmoscompat.Address(addr), +// ToAddress: cosmoscompat.Address(recipient1), +// Amount: cosmoscompat.Coins{ +// { +// Denom: "uluna", +// Amount: pack.U64(1000000), +// }, +// }, +// }, +// { +// FromAddress: cosmoscompat.Address(addr), +// ToAddress: cosmoscompat.Address(recipient2), +// Amount: cosmoscompat.Coins{ +// { +// Denom: "uluna", +// Amount: pack.U64(2000000), +// }, +// }, +// }, +// } + +// client := cosmoscompat.NewClient(cosmoscompat.DefaultClientOptions(), app.MakeCodec()) +// account, err := client.Account(addr) +// Expect(err).NotTo(HaveOccurred()) + +// txBuilder := cosmos.NewTxBuilder(cosmoscompat.TxOptions{ +// AccountNumber: account.AccountNumber, +// SequenceNumber: account.SequenceNumber, +// Gas: 200000, +// ChainID: "testnet", +// Memo: "multichain", +// Fees: cosmoscompat.Coins{ +// { +// Denom: "uluna", +// Amount: pack.U64(3000), +// }, +// }, +// }).WithCodec(app.MakeCodec()) + +// tx, err := txBuilder.BuildTx(msgs) +// Expect(err).NotTo(HaveOccurred()) + +// sigBytes, err := pk.Sign(tx.SigBytes()) +// Expect(err).NotTo(HaveOccurred()) + +// pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) +// err = tx.Sign([]cosmoscompat.StdSignature{ +// { +// Signature: pack.NewBytes(sigBytes), +// PubKey: pack.NewBytes(pubKey[:]), +// }, +// }) +// Expect(err).NotTo(HaveOccurred()) + +// txHash, err := client.SubmitTx(tx, pack.NewString("sync")) +// Expect(err).NotTo(HaveOccurred()) + +// for { +// // Loop until the transaction has at least a few +// // confirmations. This implies that the transaction is +// // definitely valid, and the test has passed. We were +// // successfully able to use the multichain to construct and +// // submit a Bitcoin transaction! +// _, err := client.Tx(txHash) +// if err == nil { +// break +// } + +// if !strings.Contains(err.Error(), "not found") { +// Expect(err).NotTo(HaveOccurred()) +// } + +// time.Sleep(10 * time.Second) +// } +// }) +// }) +// }) +// }) diff --git a/chain/cosmos/gas.go b/chain/cosmos/gas.go new file mode 100644 index 00000000..f6eb82dd --- /dev/null +++ b/chain/cosmos/gas.go @@ -0,0 +1,38 @@ +package cosmos + +import ( + "context" + + "github.com/renproject/pack" +) + +// A GasEstimator returns the gas-per-byte that is needed in order to confirm +// transactions with relatively high speed. In distributed networks that work to +// collectively build transactions, it is important that all nodes return the +// same values from this interface. +type GasEstimator interface { + GasPerByte(ctx context.Context) (pack.U64, error) + GasPerSignature(ctx context.Context) (pack.U64, error) +} + +type gasEstimator struct { + gasPerByte pack.U64 + gasPerSignature pack.U64 +} + +// NewGasEstimator returns a simple gas estimator that always returns the same +// amount of gas-per-byte. +func NewGasEstimator(gasPerByte, gasPerSignature pack.U64) GasEstimator { + return &gasEstimator{ + gasPerByte: gasPerByte, + gasPerSignature: gasPerSignature, + } +} + +func (gasEstimator *gasEstimator) GasPerByte(ctx context.Context) (pack.U64, error) { + return gasEstimator.gasPerByte, nil +} + +func (gasEstimator *gasEstimator) GasPerSignature(ctx context.Context) (pack.U64, error) { + return gasEstimator.gasPerSignature, nil +} diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go new file mode 100644 index 00000000..314eac6b --- /dev/null +++ b/chain/cosmos/tx.go @@ -0,0 +1,198 @@ +package cosmos + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/bank" + + "github.com/renproject/pack" +) + +// TxBuilder defines an interface that can be used to build simple Bitcoin +// transactions. +type TxBuilder interface { + // BuildTx returns a simple Bitcoin transaction that consumes a set of + // Bitcoin outputs and uses the funds to make payments to a set of Bitcoin + // recipients. The sum value of the inputs must be greater than the sum + // value of the outputs, and the difference is paid as a fee to the Bitcoin + // network. + BuildTx(msgs []MsgSend) (Tx, error) + WithCodec(cdc *codec.Codec) TxBuilder +} + +// Tx defines an interface that must be implemented by all types of Bitcoin +// transactions. +type Tx interface { + // Hash of the transaction. + Hash() (pack.Bytes32, error) + + // SigBytes that need to be signed before this transaction can be + // submitted. + SigBytes() pack.Bytes + + // Sign the transaction by injecting signatures and the serialized pubkey of + // the signer. + Sign([]StdSignature) error + + // Serialize the transaction. + Serialize() (pack.Bytes, error) +} + +// An Address is a public address that can be encoded/decoded to/from strings. +// Addresses are usually formatted different between different network +// configurations. +type Address sdk.AccAddress + +// AccAddress convert Address to sdk.AccAddress +func (addr Address) AccAddress() sdk.AccAddress { + return sdk.AccAddress(addr) +} + +// TxBuilderOptions only contains necessary options to build tx from tx builder +type TxBuilderOptions struct { + AccountNumber pack.U64 `json:"account_number"` + SequenceNumber pack.U64 `json:"sequence_number"` + Gas pack.U64 `json:"gas"` + ChainID pack.String `json:"chain_id"` + Memo pack.String `json:"memo"` + Fees Coins `json:"fees"` +} + +// Coin copy type from sdk.coin +type Coin struct { + Denom pack.String `json:"denom"` + Amount pack.U64 `json:"amount"` +} + +// parseCoin parse sdk.Coin to Coin +func parseCoin(sdkCoin sdk.Coin) Coin { + return Coin{ + Denom: pack.NewString(sdkCoin.Denom), + Amount: pack.U64(uint64(sdkCoin.Amount.Int64())), + } +} + +// Coins array of Coin +type Coins []Coin + +// parseCoins parse sdk.Coins to Coins +func parseCoins(sdkCoins sdk.Coins) Coins { + var coins Coins + for _, sdkCoin := range sdkCoins { + coins = append(coins, parseCoin(sdkCoin)) + } + return coins +} + +// Coins parse pack coins to sdk coins +func (coins Coins) Coins() sdk.Coins { + sdkCoins := sdk.Coins{} + for _, coin := range coins { + sdkCoin := sdk.Coin{ + Denom: coin.Denom.String(), + Amount: sdk.NewInt(int64(coin.Amount.Uint64())), + } + + sdkCoins = append(sdkCoins, sdkCoin) + } + + sdkCoins.Sort() + return sdkCoins +} + +// MsgSend - high level transaction of the coin module +type MsgSend struct { + FromAddress Address `json:"from_address" yaml:"from_address"` + ToAddress Address `json:"to_address" yaml:"to_address"` + Amount Coins `json:"amount" yaml:"amount"` +} + +// Msg convert MsgSend to sdk.Msg +func (msg MsgSend) Msg() sdk.Msg { + return bank.NewMsgSend( + msg.FromAddress.AccAddress(), + msg.ToAddress.AccAddress(), + msg.Amount.Coins(), + ) +} + +// NOTE: we only support MsgSend +// parseMsg parse sdk.Msg to MsgSend +func parseMsg(msg sdk.Msg) (MsgSend, error) { + if msg, ok := msg.(bank.MsgSend); ok { + return MsgSend{ + FromAddress: Address(msg.FromAddress), + ToAddress: Address(msg.ToAddress), + Amount: parseCoins(msg.Amount), + }, nil + } else { + return MsgSend{}, fmt.Errorf("Failed to parse %v to MsgSend", msg) + } +} + +// StdFee auth.StdFee wrapper +type StdFee struct { + Amount Coins `json:"amount" yaml:"amount"` + Gas pack.U64 `json:"gas" yaml:"gas"` +} + +// parseStdFee parse auth.StdFee to StdFee +func parseStdFee(stdFee auth.StdFee) StdFee { + return StdFee{ + Amount: parseCoins(stdFee.Amount), + Gas: pack.U64(stdFee.Gas), + } +} + +// StdSignature auth.StdStdSignature wrapper +type StdSignature struct { + PubKey pack.Bytes `json:"pub_key" yaml:"pub_key"` + Signature pack.Bytes `json:"signature" yaml:"signature"` +} + +// parseStdSignature parse auth.StdSignature to StdSignature +func parseStdSignature(stdSig auth.StdSignature) StdSignature { + return StdSignature{ + PubKey: pack.NewBytes(stdSig.PubKey.Bytes()), + Signature: pack.NewBytes(stdSig.Signature), + } +} + +// StdTx auth.StStdTx wrapper +type StdTx struct { + Msgs []MsgSend `json:"msgs" yaml:"msgs"` + Fee StdFee `json:"fee" yaml:"fee"` + Signatures []StdSignature `json:"signatures" yaml:"signatures"` + Memo pack.String `json:"memo" yaml:"memo"` +} + +// parseStdTx parse auth.StdTx to StdTx +func parseStdTx(stdTx auth.StdTx) (StdTx, error) { + var msgs []MsgSend + for _, msg := range stdTx.Msgs { + msg, err := parseMsg(msg) + if err != nil { + return StdTx{}, err + } + + msgs = append(msgs, msg) + } + + var sigs []StdSignature + for _, sig := range stdTx.Signatures { + sigs = append(sigs, parseStdSignature(sig)) + } + + fee := parseStdFee(stdTx.Fee) + memo := pack.NewString(stdTx.Memo) + + return StdTx{ + Msgs: msgs, + Fee: fee, + Memo: memo, + Signatures: sigs, + }, nil +} From a5c60ca868ae1a742935fc497a37d66b76d58d11 Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 18 Aug 2020 16:31:13 +1000 Subject: [PATCH 028/335] add terra impl too --- chain/terra/address.go | 15 ++++ chain/terra/address_test.go | 25 ++++++ chain/terra/terra.go | 26 ++++++ chain/terra/terra_suite_test.go | 13 +++ chain/terra/terra_test.go | 140 ++++++++++++++++++++++++++++++++ 5 files changed, 219 insertions(+) create mode 100644 chain/terra/address.go create mode 100644 chain/terra/address_test.go create mode 100644 chain/terra/terra.go create mode 100644 chain/terra/terra_suite_test.go create mode 100644 chain/terra/terra_test.go diff --git a/chain/terra/address.go b/chain/terra/address.go new file mode 100644 index 00000000..6edd3624 --- /dev/null +++ b/chain/terra/address.go @@ -0,0 +1,15 @@ +package terra + +import "github.com/renproject/multichain/chain/cosmos" + +type ( + AddressDecoder = cosmos.AddressDecoder + AddressEncoder = cosmos.AddressEncoder + AddressEncodeDecoder = cosmos.AddressEncodeDecoder +) + +var ( + NewAddressDecoder = cosmos.NewAddressDecoder + NewAddressEncoder = cosmos.NewAddressEncoder + NewAddressEnodeDecoder = cosmos.NewAddressEncodeDecoder +) diff --git a/chain/terra/address_test.go b/chain/terra/address_test.go new file mode 100644 index 00000000..be7528f8 --- /dev/null +++ b/chain/terra/address_test.go @@ -0,0 +1,25 @@ +package terra_test + +import ( + "github.com/renproject/multichain/chain/terra" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Terra", func() { + Context("when decoding address", func() { + Context("when decoding Terra address", func() { + It("should work", func() { + decoder := terra.NewAddressDecoder() + + addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" + addr, err := decoder.DecodeAddress(pack.NewString(addrStr)) + + Expect(err).ToNot(HaveOccurred()) + Expect(addr.AccAddress().String()).Should(Equal(addrStr)) + }) + }) + }) +}) \ No newline at end of file diff --git a/chain/terra/terra.go b/chain/terra/terra.go new file mode 100644 index 00000000..a4b7193a --- /dev/null +++ b/chain/terra/terra.go @@ -0,0 +1,26 @@ +package terra + +import ( + "github.com/renproject/multichain/chain/cosmos" + "github.com/terra-project/core/app" +) + +type ( + Client = cosmos.Client + ClientOptions = cosmos.ClientOptions + Tx = cosmos.Tx + TxBuilder = cosmos.TxBuilder + TxBuilderOptions = cosmos.TxBuilderOptions +) + +// NewClient returns returns a new Client with terra codec +func NewClient(opts ClientOptions) Client { + return cosmos.NewClient(opts, app.MakeCodec()) +} + +// NewTxBuilder returns an implementation of the transaction builder interface +// from the Cosmos Compat API, and exposes the functionality to build simple +// Terra transactions. +func NewTxBuilder(opts TxBuilderOptions) TxBuilder { + return cosmos.NewTxBuilder(opts).WithCodec(app.MakeCodec()) +} diff --git a/chain/terra/terra_suite_test.go b/chain/terra/terra_suite_test.go new file mode 100644 index 00000000..11f9c854 --- /dev/null +++ b/chain/terra/terra_suite_test.go @@ -0,0 +1,13 @@ +package terra_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestTerra(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Terra Suite") +} diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go new file mode 100644 index 00000000..9f8a7159 --- /dev/null +++ b/chain/terra/terra_test.go @@ -0,0 +1,140 @@ +package terra_test + +import ( + "encoding/hex" + "os" + "strings" + "time" + + "github.com/tendermint/tendermint/crypto/secp256k1" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/terra-project/core/app" + + "github.com/renproject/multichain/chain/terra" + "github.com/renproject/multichain/compat/cosmoscompat" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Terra", func() { + Context("when submitting transactions", func() { + Context("when sending LUNA to multiple addresses", func() { + It("should work", func() { + // Load private key, and assume that the associated address has + // funds to spend. You can do this by setting TERRA_PK to the + // value specified in the `./multichaindeploy/.env` file. + pkEnv := os.Getenv("TERRA_PK") + if pkEnv == "" { + panic("TERRA_PK is undefined") + } + + addrEnv := os.Getenv("TERRA_ADDRESS") + if addrEnv == "" { + panic("TERRA_ADDRESS is undefined") + } + + // pkEnv := "a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330" + // addrEnv := "terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u" + + pkBz, err := hex.DecodeString(pkEnv) + Expect(err).ToNot(HaveOccurred()) + + var pk secp256k1.PrivKeySecp256k1 + copy(pk[:], pkBz) + + addr := cosmoscompat.Address(pk.PubKey().Address()) + + decoder := terra.NewAddressDecoder() + expectedAddr, err := decoder.DecodeAddress(pack.NewString(addrEnv)) + Expect(err).ToNot(HaveOccurred()) + Expect(addr).Should(Equal(expectedAddr)) + + pk1 := secp256k1.GenPrivKey() + pk2 := secp256k1.GenPrivKey() + + recipient1 := sdk.AccAddress(pk1.PubKey().Address()) + recipient2 := sdk.AccAddress(pk2.PubKey().Address()) + + msgs := []cosmoscompat.MsgSend{ + { + FromAddress: cosmoscompat.Address(addr), + ToAddress: cosmoscompat.Address(recipient1), + Amount: cosmoscompat.Coins{ + { + Denom: "uluna", + Amount: pack.U64(1000000), + }, + }, + }, + { + FromAddress: cosmoscompat.Address(addr), + ToAddress: cosmoscompat.Address(recipient2), + Amount: cosmoscompat.Coins{ + { + Denom: "uluna", + Amount: pack.U64(2000000), + }, + }, + }, + } + + client := cosmoscompat.NewClient(cosmoscompat.DefaultClientOptions(), app.MakeCodec()) + account, err := client.Account(addr) + Expect(err).NotTo(HaveOccurred()) + + txBuilder := terra.NewTxBuilder(cosmoscompat.TxOptions{ + AccountNumber: account.AccountNumber, + SequenceNumber: account.SequenceNumber, + Gas: 200000, + ChainID: "testnet", + Memo: "multichain", + Fees: cosmoscompat.Coins{ + { + Denom: "uluna", + Amount: pack.U64(3000), + }, + }, + }).WithCodec(app.MakeCodec()) + + tx, err := txBuilder.BuildTx(msgs) + Expect(err).NotTo(HaveOccurred()) + + sigBytes, err := pk.Sign(tx.SigBytes()) + Expect(err).NotTo(HaveOccurred()) + + pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) + err = tx.Sign([]cosmoscompat.StdSignature{ + { + Signature: pack.NewBytes(sigBytes), + PubKey: pack.NewBytes(pubKey[:]), + }, + }) + Expect(err).NotTo(HaveOccurred()) + + txHash, err := client.SubmitTx(tx, pack.NewString("sync")) + Expect(err).NotTo(HaveOccurred()) + + for { + // Loop until the transaction has at least a few + // confirmations. This implies that the transaction is + // definitely valid, and the test has passed. We were + // successfully able to use the multichain to construct and + // submit a Bitcoin transaction! + _, err := client.Tx(txHash) + if err == nil { + break + } + + if !strings.Contains(err.Error(), "not found") { + Expect(err).NotTo(HaveOccurred()) + } + + time.Sleep(10 * time.Second) + } + }) + }) + }) +}) From db592d6a138277c293403d3556dfd7e2529a92c4 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 10:15:47 +0530 Subject: [PATCH 029/335] sign method should be defined for pointer --- chain/filecoin/account.go | 6 +++--- chain/filecoin/filecoint_suite_test.go | 13 ------------- go.mod | 1 + go.sum | 13 +++++++++++++ 4 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 chain/filecoin/filecoint_suite_test.go diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 9ef0c84e..d0f0d6f7 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -99,7 +99,7 @@ func (tx Tx) Sighashes() ([]pack.Bytes32, error) { // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes must also be // specified. -func (tx Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { if len(signatures) != 1 { return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } @@ -145,7 +145,7 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ methodNum = abi.MethodNum(payload[0]) payload = payload[1:] } - return Tx{ + return &Tx{ msg: types.Message{ Version: types.MessageVersion, From: filfrom, @@ -251,7 +251,7 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack // TODO: should also return a transaction hash (pack.Bytes) ? func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { switch tx := tx.(type) { - case Tx: + case *Tx: // construct crypto.Signature signature := crypto.Signature{ Type: crypto.SigTypeSecp256k1, diff --git a/chain/filecoin/filecoint_suite_test.go b/chain/filecoin/filecoint_suite_test.go deleted file mode 100644 index db0159ad..00000000 --- a/chain/filecoin/filecoint_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package filecoin_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestFilecoin(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Filecoin Suite") -} diff --git a/go.mod b/go.mod index 652b66de..e83ddd6c 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( github.com/multiformats/go-varint v0.0.6 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 + github.com/pierrec/xxHash v0.1.5 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 github.com/renproject/surge v1.2.6 diff --git a/go.sum b/go.sum index b8181905..f7263269 100644 --- a/go.sum +++ b/go.sum @@ -78,6 +78,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -108,9 +109,11 @@ github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcug github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= @@ -124,6 +127,7 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/centrifuge/go-substrate-rpc-client v1.1.0 h1:cpfG7KKwy+n7FRb1LkiMYwi6e4gwzaooGfPIzXXQj6w= github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -137,6 +141,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -166,6 +171,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= @@ -208,6 +214,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= +github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -315,6 +322,7 @@ github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNI github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -1137,6 +1145,8 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= +github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1189,6 +1199,7 @@ github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y= github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= github.com/renproject/pack v0.2.3/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= @@ -1201,6 +1212,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -1213,6 +1225,7 @@ github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJP github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= From c8730b3e0c2a601048eb2e43730dfe9ad036d74b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 16:17:52 +0530 Subject: [PATCH 030/335] support multichain API for cosmos --- api/account/account.go | 6 +- chain/cosmos/address.go | 54 +++++++- chain/cosmos/client.go | 73 +++++----- chain/cosmos/cosmos.go | 147 -------------------- chain/cosmos/tx.go | 261 +++++++++++++++++++++++++++--------- chain/terra/address.go | 18 ++- chain/terra/address_test.go | 11 +- chain/terra/terra.go | 16 ++- chain/terra/terra_test.go | 134 ++++++++++-------- go.mod | 11 +- go.sum | 169 +++++++++++++++++++++++ 11 files changed, 578 insertions(+), 322 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 7d309721..45c97753 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -39,12 +39,12 @@ type Tx interface { // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighashes() ([]pack.Bytes32, error) + Sighashes() ([]pack.Bytes, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign([]pack.Bytes65, pack.Bytes) error + Sign([]pack.Bytes, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. @@ -56,7 +56,7 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { - BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (Tx, error) + BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } // The Client interface defines the functionality required to interact with a diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index ce3eb94a..201f43cd 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -1,23 +1,71 @@ package cosmos import ( - "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/renproject/multichain/api/address" ) +// An Address is a public address that can be encoded/decoded to/from strings. +// Addresses are usually formatted different between different network +// configurations. +type Address sdk.AccAddress + +// AccAddress convert Address to sdk.AccAddress +func (addr Address) AccAddress() sdk.AccAddress { + return sdk.AccAddress(addr) +} + +// String implements the Stringer interface +func (addr Address) String() string { + return sdk.AccAddress(addr).String() +} + +// AddressEncodeDecoder encapsulates fields that implement the +// address.EncodeDecoder interface +type AddressEncodeDecoder struct { + AddressEncoder + AddressDecoder +} + +// NewAddressEncodeDecoder creates a new address encoder-decoder +func NewAddressEncodeDecoder(hrp string) AddressEncodeDecoder { + return AddressEncodeDecoder{ + AddressEncoder: AddressEncoder{}, + AddressDecoder: NewAddressDecoder(hrp), + } +} + +// AddressEncoder implements the address.Encoder interface +type AddressEncoder struct{} + +// AddressDecoder implements the address.Decoder interface type AddressDecoder struct { hrp string } +// NewAddressDecoder creates a new address decoder func NewAddressDecoder(hrp string) AddressDecoder { return AddressDecoder{hrp: hrp} } +// NewAddressEncoder creates a new address encoder +func NewAddressEncoder() AddressEncoder { + return AddressEncoder{} +} + +// DecodeAddress consumes a human-readable representation of a cosmos +// compatible address and decodes it to its raw bytes representation. func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { - types.GetConfig().SetBech32PrefixForAccount(decoder.hrp, decoder.hrp+"pub") - rawAddr, err := types.AccAddressFromBech32(string(addr)) + sdk.GetConfig().SetBech32PrefixForAccount(decoder.hrp, decoder.hrp+"pub") + rawAddr, err := sdk.AccAddressFromBech32(string(addr)) if err != nil { return nil, err } return address.RawAddress(rawAddr), nil } + +// EncodeAddress consumes raw bytes and encodes them to a human-readable +// address format. +func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + panic("unimplemented") +} diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index c5e6e80a..888bc851 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -1,13 +1,14 @@ package cosmos import ( + "context" "fmt" "time" "github.com/renproject/multichain/api/account" "github.com/renproject/pack" - "github.com/cosmos/cosmos-sdk/client/context" + cliContext "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" @@ -22,13 +23,20 @@ const ( // DefaultClientHost used by the Client. This should only be used for local // deployments of the multichain. DefaultClientHost = "http://0.0.0.0:26657" + // DefaultBroadcastMode configures the behaviour of a cosmos client while it + // interacts with the cosmos node. Allowed broadcast modes can be async, sync + // and block. "async" returns immediately after broadcasting, "sync" returns + // after the transaction has been checked and "block" waits until the + // transaction is committed to the chain. + DefaultBroadcastMode = "sync" ) // ClientOptions are used to parameterise the behaviour of the Client. type ClientOptions struct { - Timeout time.Duration - TimeoutRetry time.Duration - Host string + Timeout time.Duration + TimeoutRetry time.Duration + Host pack.String + BroadcastMode pack.String } // DefaultClientOptions returns ClientOptions with the default settings. These @@ -36,14 +44,15 @@ type ClientOptions struct { // multichain. In production, the host, user, and password should be changed. func DefaultClientOptions() ClientOptions { return ClientOptions{ - Timeout: DefaultClientTimeout, - TimeoutRetry: DefaultClientTimeoutRetry, - Host: DefaultClientHost, + Timeout: DefaultClientTimeout, + TimeoutRetry: DefaultClientTimeoutRetry, + Host: pack.String(DefaultClientHost), + BroadcastMode: pack.String(DefaultBroadcastMode), } } // WithHost sets the URL of the Bitcoin node. -func (opts ClientOptions) WithHost(host string) ClientOptions { +func (opts ClientOptions) WithHost(host pack.String) ClientOptions { opts.Host = host return opts } @@ -53,31 +62,28 @@ func (opts ClientOptions) WithHost(host string) ClientOptions { type Client interface { // Account query account with address Account(address Address) (Account, error) - // Tx query transaction with txHash - Tx(txHash pack.String) (StdTx, error) - // SubmitTx to the Cosmos based network. - SubmitTx(tx Tx, broadcastMode pack.String) (pack.String, error) + + // Client interface from account.Client + account.Client } type client struct { - opts ClientOptions - cliCtx context.CLIContext - broadcastMode pack.String + opts ClientOptions + cliCtx cliContext.CLIContext } // NewClient returns a new Client. -func NewClient(opts ClientOptions, cdc *codec.Codec, broadcastMode pack.String) Client { - httpClient, err := rpchttp.NewWithTimeout(opts.Host, "websocket", uint(opts.Timeout/time.Second)) +func NewClient(opts ClientOptions, cdc *codec.Codec) Client { + httpClient, err := rpchttp.NewWithTimeout(opts.Host.String(), "websocket", uint(opts.Timeout/time.Second)) if err != nil { panic(err) } - cliCtx := context.NewCLIContext().WithCodec(cdc).WithClient(httpClient).WithTrustNode(true) + cliCtx := cliContext.NewCLIContext().WithCodec(cdc).WithClient(httpClient).WithTrustNode(true) return &client{ - opts: opts, - cliCtx: cliCtx, - broadcastMode: broadcastMode, + opts: opts, + cliCtx: cliCtx, } } @@ -109,32 +115,37 @@ func (client *client) Account(addr Address) (Account, error) { func (client *client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) { res, err := utils.QueryTx(client.cliCtx, txHash.String()) if err != nil { - return StdTx{}, 0, err + return &StdTx{}, pack.NewU64(0), err } - stdTx := res.Tx.(auth.StdTx) + authStdTx := res.Tx.(auth.StdTx) if res.Code != 0 { - return StdTx{}, 0, fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + return &StdTx{}, pack.NewU64(0), fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + } + + stdTx, err := parseStdTx(authStdTx) + if err != nil { + return &StdTx{}, pack.NewU64(0), fmt.Errorf("parse tx failed: %v", err) } - return parseStdTx(stdTx), 1 + return &stdTx, pack.NewU64(1), nil } // SubmitTx to the Cosmos based network. -func (client *client) SubmitTx(ctx context.Context, tx account.Tx) (pack.String, error) { +func (client *client) SubmitTx(ctx context.Context, tx account.Tx) error { txBytes, err := tx.Serialize() if err != nil { - return pack.String(""), fmt.Errorf("bad \"submittx\": %v", err) + return fmt.Errorf("bad \"submittx\": %v", err) } - res, err := client.cliCtx.WithBroadcastMode(client.broadcastMode.String()).BroadcastTx(txBytes) + res, err := client.cliCtx.WithBroadcastMode(client.opts.BroadcastMode.String()).BroadcastTx(txBytes) if err != nil { - return pack.String(""), err + return err } if res.Code != 0 { - return pack.String(""), fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + return fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) } - return pack.NewString(res.TxHash), nil + return nil } diff --git a/chain/cosmos/cosmos.go b/chain/cosmos/cosmos.go index 3a18dd4c..33a99846 100644 --- a/chain/cosmos/cosmos.go +++ b/chain/cosmos/cosmos.go @@ -1,148 +1 @@ package cosmos - -import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/cosmos/cosmos-sdk/x/auth/client/utils" - - "github.com/renproject/multichain/compat/cosmoscompat" - "github.com/renproject/pack" - - "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/tendermint/tendermint/crypto/tmhash" -) - -// NewClient returns returns a new Client with default codec -func NewClient(opts cosmoscompat.ClientOptions) cosmoscompat.Client { - return cosmoscompat.NewClient(opts, simapp.MakeCodec()) -} - -type txBuilder struct { - auth.TxBuilder - cdc *codec.Codec -} - -// NewTxBuilder returns an implementation of the transaction builder interface -// from the Cosmos Compat API, and exposes the functionality to build simple -// Cosmos based transactions. -func NewTxBuilder(options cosmoscompat.TxOptions) cosmoscompat.TxBuilder { - cdc := simapp.MakeCodec() - - return txBuilder{ - TxBuilder: auth.NewTxBuilder( - utils.GetTxEncoder(cdc), - options.AccountNumber.Uint64(), - options.SequenceNumber.Uint64(), - options.Gas.Uint64(), - 0, - false, - options.ChainID.String(), - options.Memo.String(), - options.Fees.Coins(), sdk.DecCoins{}, - ), - cdc: simapp.MakeCodec(), - } -} - -// WithCodec replace codec with custom one -func (builder txBuilder) WithCodec(cdc *codec.Codec) cosmoscompat.TxBuilder { - builder.WithTxEncoder(utils.GetTxEncoder(cdc)) - builder.cdc = cdc - return builder -} - -func (builder txBuilder) BuildTx(sendMsgs []cosmoscompat.MsgSend) (cosmoscompat.Tx, error) { - sdkMsgs := []sdk.Msg{} - for _, sendMsg := range sendMsgs { - sdkMsgs = append(sdkMsgs, sendMsg.Msg()) - } - - signMsg, err := builder.BuildSignMsg(sdkMsgs) - if err != nil { - return nil, err - } - - return &Tx{cdc: builder.cdc, signMsg: signMsg}, nil -} - -// Tx represents a simple Terra transaction that implements the Cosmos Compat -// API. -type Tx struct { - cdc *codec.Codec - signMsg auth.StdSignMsg - signatures []auth.StdSignature -} - -// Hash return txhash bytes -func (tx *Tx) Hash() (pack.Bytes32, error) { - if len(tx.signatures) == 0 { - return pack.Bytes32{}, fmt.Errorf("please do tx.Sign() first to get a hash") - } - - txBytes, err := tx.Serialize() - if err != nil { - return pack.Bytes32{}, err - } - - hashBytes := pack.Bytes32{} - hashBytes.Unmarshal(tmhash.Sum(txBytes), 32) - return hashBytes, nil -} - -// SigBytes that need to be signed before this transaction can be -// submitted. -func (tx *Tx) SigBytes() pack.Bytes { - return tx.signMsg.Bytes() -} - -// Sign the transaction by injecting signatures and the serialized pubkey of -// the signer. -func (tx *Tx) Sign(signatures []cosmoscompat.StdSignature) error { - var stdSignatures []auth.StdSignature - for _, sig := range signatures { - var pubKey secp256k1.PubKeySecp256k1 - copy(pubKey[:], sig.PubKey[:secp256k1.PubKeySecp256k1Size]) - - stdSignatures = append(stdSignatures, auth.StdSignature{ - Signature: sig.Signature, - PubKey: pubKey, - }) - } - - signers := make(map[string]bool) - for _, msg := range tx.signMsg.Msgs { - for _, signer := range msg.GetSigners() { - fmt.Println("SIBONG", signer.String()) - signers[signer.String()] = true - } - } - - for _, sig := range stdSignatures { - signer := sdk.AccAddress(sig.Address()).String() - if _, ok := signers[signer]; !ok { - return fmt.Errorf("wrong signer: %s", signer) - } - } - - if len(signers) != len(stdSignatures) { - return fmt.Errorf("insufficient signers") - } - - fmt.Println("SIBONG", stdSignatures) - tx.signatures = stdSignatures - return nil -} - -// Serialize the transaction. -func (tx *Tx) Serialize() (pack.Bytes, error) { - txBytes, err := tx.cdc.MarshalBinaryLengthPrefixed(auth.NewStdTx(tx.signMsg.Msgs, tx.signMsg.Fee, tx.signatures, tx.signMsg.Memo)) - if err != nil { - return pack.Bytes{}, err - } - - return txBytes, nil -} diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 314eac6b..0f968298 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -4,61 +4,105 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/client/utils" "github.com/cosmos/cosmos-sdk/x/bank" + "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" + + "github.com/tendermint/tendermint/crypto/secp256k1" + "github.com/tendermint/tendermint/crypto/tmhash" ) -// TxBuilder defines an interface that can be used to build simple Bitcoin -// transactions. -type TxBuilder interface { - // BuildTx returns a simple Bitcoin transaction that consumes a set of - // Bitcoin outputs and uses the funds to make payments to a set of Bitcoin - // recipients. The sum value of the inputs must be greater than the sum - // value of the outputs, and the difference is paid as a fee to the Bitcoin - // network. - BuildTx(msgs []MsgSend) (Tx, error) - WithCodec(cdc *codec.Codec) TxBuilder +type txBuilder struct { + cdc *codec.Codec + coinDenom pack.String + chainID pack.String + accountNumber pack.U64 } -// Tx defines an interface that must be implemented by all types of Bitcoin -// transactions. -type Tx interface { - // Hash of the transaction. - Hash() (pack.Bytes32, error) - - // SigBytes that need to be signed before this transaction can be - // submitted. - SigBytes() pack.Bytes +// TxBuilderOptions only contains necessary options to build tx from tx builder +type TxBuilderOptions struct { + Cdc *codec.Codec `json:"cdc"` + AccountNumber pack.U64 `json:"account_number"` + ChainID pack.String `json:"chain_id"` + CoinDenom pack.String `json:"coin_denom"` +} - // Sign the transaction by injecting signatures and the serialized pubkey of - // the signer. - Sign([]StdSignature) error +// NewTxBuilder returns an implementation of the transaction builder interface +// from the Cosmos Compat API, and exposes the functionality to build simple +// Cosmos based transactions. +func NewTxBuilder(options TxBuilderOptions) account.TxBuilder { + if options.Cdc == nil { + options.Cdc = simapp.MakeCodec() + } - // Serialize the transaction. - Serialize() (pack.Bytes, error) + return txBuilder{ + cdc: options.Cdc, + coinDenom: options.CoinDenom, + chainID: options.ChainID, + accountNumber: options.AccountNumber, + } } -// An Address is a public address that can be encoded/decoded to/from strings. -// Addresses are usually formatted different between different network -// configurations. -type Address sdk.AccAddress +// BuildTx consumes a list of MsgSend to build and return a cosmos transaction. +// This transaction is unsigned, and must be signed before submitting to the +// cosmos chain. +func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (account.Tx, error) { + fromAddr, err := sdk.AccAddressFromBech32(string(from)) + if err != nil { + return nil, err + } + + toAddr, err := sdk.AccAddressFromBech32(string(to)) + if err != nil { + return nil, err + } -// AccAddress convert Address to sdk.AccAddress -func (addr Address) AccAddress() sdk.AccAddress { - return sdk.AccAddress(addr) -} + sendMsg := MsgSend{ + FromAddress: Address(fromAddr), + ToAddress: Address(toAddr), + Amount: []Coin{Coin{ + Denom: builder.coinDenom, + Amount: pack.NewU64(value.Int().Uint64()), + }}, + } -// TxBuilderOptions only contains necessary options to build tx from tx builder -type TxBuilderOptions struct { - AccountNumber pack.U64 `json:"account_number"` - SequenceNumber pack.U64 `json:"sequence_number"` - Gas pack.U64 `json:"gas"` - ChainID pack.String `json:"chain_id"` - Memo pack.String `json:"memo"` - Fees Coins `json:"fees"` + feeAmount := gasLimit.Int().Uint64() * gasPrice.Int().Uint64() + fees := Coins{Coin{Denom: builder.coinDenom, Amount: pack.NewU64(feeAmount)}} + + txBuilder := auth.NewTxBuilder( + utils.GetTxEncoder(builder.cdc), + builder.accountNumber.Uint64(), + nonce.Int().Uint64(), + gasLimit.Int().Uint64(), + 0, + false, + builder.chainID.String(), + payload.String(), + fees.Coins(), + sdk.DecCoins{}, + ) + + sdkMsgs := []sdk.Msg{sendMsg.Msg()} + + signMsg, err := txBuilder.BuildSignMsg(sdkMsgs) + if err != nil { + return nil, err + } + + return &StdTx{ + msgs: []MsgSend{sendMsg}, + fee: parseStdFee(signMsg.Fee), + memo: pack.String(payload.String()), + cdc: builder.cdc, + signMsg: signMsg, + }, nil } // Coin copy type from sdk.coin @@ -80,7 +124,7 @@ type Coins []Coin // parseCoins parse sdk.Coins to Coins func parseCoins(sdkCoins sdk.Coins) Coins { - var coins Coins + coins := make(Coins, 0, len(sdkCoins)) for _, sdkCoin := range sdkCoins { coins = append(coins, parseCoin(sdkCoin)) } @@ -89,14 +133,12 @@ func parseCoins(sdkCoins sdk.Coins) Coins { // Coins parse pack coins to sdk coins func (coins Coins) Coins() sdk.Coins { - sdkCoins := sdk.Coins{} + sdkCoins := make(sdk.Coins, 0, len(coins)) for _, coin := range coins { - sdkCoin := sdk.Coin{ + sdkCoins = append(sdkCoins, sdk.Coin{ Denom: coin.Denom.String(), Amount: sdk.NewInt(int64(coin.Amount.Uint64())), - } - - sdkCoins = append(sdkCoins, sdkCoin) + }) } sdkCoins.Sort() @@ -128,9 +170,9 @@ func parseMsg(msg sdk.Msg) (MsgSend, error) { ToAddress: Address(msg.ToAddress), Amount: parseCoins(msg.Amount), }, nil - } else { - return MsgSend{}, fmt.Errorf("Failed to parse %v to MsgSend", msg) } + + return MsgSend{}, fmt.Errorf("Failed to parse %v to MsgSend", msg) } // StdFee auth.StdFee wrapper @@ -163,10 +205,112 @@ func parseStdSignature(stdSig auth.StdSignature) StdSignature { // StdTx auth.StStdTx wrapper type StdTx struct { - Msgs []MsgSend `json:"msgs" yaml:"msgs"` - Fee StdFee `json:"fee" yaml:"fee"` - Signatures []StdSignature `json:"signatures" yaml:"signatures"` - Memo pack.String `json:"memo" yaml:"memo"` + msgs []MsgSend + fee StdFee + memo pack.String + signatures []auth.StdSignature + + cdc *codec.Codec + signMsg auth.StdSignMsg +} + +// From returns the sender of the transaction +func (tx StdTx) From() address.Address { + return address.Address(tx.msgs[0].FromAddress.AccAddress().String()) +} + +// To returns the recipients of the transaction. For the cosmos chain, there +// can be multiple recipients from a single transaction. +func (tx StdTx) To() address.Address { + return address.Address(tx.msgs[0].ToAddress.AccAddress().String()) +} + +// Value returns the values being transferred in a transaction. For the cosmos +// chain, there can be multiple messages (each with a different value being +// transferred) in a single transaction. +func (tx StdTx) Value() pack.U256 { + value := pack.NewU64(0) + for _, msg := range tx.msgs { + value.AddAssign(msg.Amount[0].Amount) + } + return pack.NewU256FromU64(value) +} + +// Nonce returns the transaction count of the transaction sender. +func (tx StdTx) Nonce() pack.U256 { + return pack.NewU256FromU64(pack.NewU64(tx.signMsg.Sequence)) +} + +// Payload returns the memo attached to the transaction. +func (tx StdTx) Payload() contract.CallData { + return contract.CallData(pack.NewBytes([]byte(tx.memo))) +} + +// Hash return txhash bytes. +func (tx StdTx) Hash() pack.Bytes { + if len(tx.signatures) == 0 { + return pack.Bytes{} + } + + txBytes, err := tx.Serialize() + if err != nil { + return pack.Bytes{} + } + + hashBytes := pack.Bytes32{} + hashBytes.Unmarshal(tmhash.Sum(txBytes), 32) + return pack.NewBytes(hashBytes[:]) +} + +// Sighashes that need to be signed before this transaction can be submitted. +func (tx StdTx) Sighashes() ([]pack.Bytes, error) { + return []pack.Bytes{tx.signMsg.Bytes()}, nil +} + +// Sign the transaction by injecting signatures and the serialized pubkey of +// the signer. +func (tx *StdTx) Sign(signatures []pack.Bytes, pubKey pack.Bytes) error { + var stdSignatures []auth.StdSignature + for _, sig := range signatures { + var cpPubKey secp256k1.PubKeySecp256k1 + copy(cpPubKey[:], pubKey[:secp256k1.PubKeySecp256k1Size]) + + stdSignatures = append(stdSignatures, auth.StdSignature{ + Signature: sig, + PubKey: cpPubKey, + }) + } + + signers := make(map[string]bool) + for _, msg := range tx.signMsg.Msgs { + for _, signer := range msg.GetSigners() { + signers[signer.String()] = true + } + } + + for _, sig := range stdSignatures { + signer := sdk.AccAddress(sig.Address()).String() + if _, ok := signers[signer]; !ok { + return fmt.Errorf("wrong signer: %s", signer) + } + } + + if len(signers) != len(stdSignatures) { + return fmt.Errorf("insufficient signers") + } + + tx.signatures = stdSignatures + return nil +} + +// Serialize the transaction. +func (tx StdTx) Serialize() (pack.Bytes, error) { + txBytes, err := tx.cdc.MarshalBinaryLengthPrefixed(auth.NewStdTx(tx.signMsg.Msgs, tx.signMsg.Fee, tx.signatures, tx.signMsg.Memo)) + if err != nil { + return pack.Bytes{}, err + } + + return txBytes, nil } // parseStdTx parse auth.StdTx to StdTx @@ -181,18 +325,13 @@ func parseStdTx(stdTx auth.StdTx) (StdTx, error) { msgs = append(msgs, msg) } - var sigs []StdSignature - for _, sig := range stdTx.Signatures { - sigs = append(sigs, parseStdSignature(sig)) - } - fee := parseStdFee(stdTx.Fee) memo := pack.NewString(stdTx.Memo) return StdTx{ - Msgs: msgs, - Fee: fee, - Memo: memo, - Signatures: sigs, + msgs: msgs, + fee: fee, + memo: memo, + signatures: stdTx.Signatures, }, nil } diff --git a/chain/terra/address.go b/chain/terra/address.go index 6edd3624..d48d1789 100644 --- a/chain/terra/address.go +++ b/chain/terra/address.go @@ -3,13 +3,23 @@ package terra import "github.com/renproject/multichain/chain/cosmos" type ( - AddressDecoder = cosmos.AddressDecoder - AddressEncoder = cosmos.AddressEncoder + // AddressDecoder re-exports cosmos.AddressDecoder + AddressDecoder = cosmos.AddressDecoder + + // AddressEncoder re-exports cosmos.AddressEncoder + AddressEncoder = cosmos.AddressEncoder + + // AddressEncodeDecoder re-exports cosmos.AddressEncodeDecoder AddressEncodeDecoder = cosmos.AddressEncodeDecoder ) var ( - NewAddressDecoder = cosmos.NewAddressDecoder - NewAddressEncoder = cosmos.NewAddressEncoder + // NewAddressDecoder re-exports cosmos.NewAddressDecoder + NewAddressDecoder = cosmos.NewAddressDecoder + + // NewAddressEncoder re-exports cosmos.NewAddressEncoder + NewAddressEncoder = cosmos.NewAddressEncoder + + // NewAddressEnodeDecoder re-exports cosmos.NewAddressEnodeDecoder NewAddressEnodeDecoder = cosmos.NewAddressEncodeDecoder ) diff --git a/chain/terra/address_test.go b/chain/terra/address_test.go index be7528f8..cb31d74b 100644 --- a/chain/terra/address_test.go +++ b/chain/terra/address_test.go @@ -1,6 +1,7 @@ package terra_test import ( + "github.com/renproject/multichain" "github.com/renproject/multichain/chain/terra" "github.com/renproject/pack" @@ -12,14 +13,12 @@ var _ = Describe("Terra", func() { Context("when decoding address", func() { Context("when decoding Terra address", func() { It("should work", func() { - decoder := terra.NewAddressDecoder() - + decoder := terra.NewAddressDecoder("terra") + addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" - addr, err := decoder.DecodeAddress(pack.NewString(addrStr)) - + _, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) Expect(err).ToNot(HaveOccurred()) - Expect(addr.AccAddress().String()).Should(Equal(addrStr)) }) }) }) -}) \ No newline at end of file +}) diff --git a/chain/terra/terra.go b/chain/terra/terra.go index a4b7193a..225ad155 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -1,15 +1,19 @@ package terra import ( + "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/chain/cosmos" "github.com/terra-project/core/app" ) type ( - Client = cosmos.Client - ClientOptions = cosmos.ClientOptions - Tx = cosmos.Tx - TxBuilder = cosmos.TxBuilder + // Client re-exports cosmos.Client + Client = cosmos.Client + + // ClientOptions re-exports cosmos.ClientOptions + ClientOptions = cosmos.ClientOptions + + // TxBuilderOptions re-exports cosmos.TxBuilderOptions TxBuilderOptions = cosmos.TxBuilderOptions ) @@ -21,6 +25,6 @@ func NewClient(opts ClientOptions) Client { // NewTxBuilder returns an implementation of the transaction builder interface // from the Cosmos Compat API, and exposes the functionality to build simple // Terra transactions. -func NewTxBuilder(opts TxBuilderOptions) TxBuilder { - return cosmos.NewTxBuilder(opts).WithCodec(app.MakeCodec()) +func NewTxBuilder(opts TxBuilderOptions) account.TxBuilder { + return cosmos.NewTxBuilder(opts) } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 9f8a7159..e49d3120 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -1,7 +1,9 @@ package terra_test import ( + "context" "encoding/hex" + "fmt" "os" "strings" "time" @@ -11,8 +13,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/terra-project/core/app" + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/cosmos" "github.com/renproject/multichain/chain/terra" - "github.com/renproject/multichain/compat/cosmoscompat" "github.com/renproject/pack" . "github.com/onsi/ginkgo" @@ -23,6 +26,10 @@ var _ = Describe("Terra", func() { Context("when submitting transactions", func() { Context("when sending LUNA to multiple addresses", func() { It("should work", func() { + // create context for the test + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + // Load private key, and assume that the associated address has // funds to spend. You can do this by setting TERRA_PK to the // value specified in the `./multichaindeploy/.env` file. @@ -45,76 +52,89 @@ var _ = Describe("Terra", func() { var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBz) - addr := cosmoscompat.Address(pk.PubKey().Address()) + addr := cosmos.Address(pk.PubKey().Address()) - decoder := terra.NewAddressDecoder() - expectedAddr, err := decoder.DecodeAddress(pack.NewString(addrEnv)) + decoder := terra.NewAddressDecoder("terra") + expectedAddr, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrEnv))) Expect(err).ToNot(HaveOccurred()) Expect(addr).Should(Equal(expectedAddr)) pk1 := secp256k1.GenPrivKey() - pk2 := secp256k1.GenPrivKey() + // pk2 := secp256k1.GenPrivKey() recipient1 := sdk.AccAddress(pk1.PubKey().Address()) - recipient2 := sdk.AccAddress(pk2.PubKey().Address()) - - msgs := []cosmoscompat.MsgSend{ - { - FromAddress: cosmoscompat.Address(addr), - ToAddress: cosmoscompat.Address(recipient1), - Amount: cosmoscompat.Coins{ - { - Denom: "uluna", - Amount: pack.U64(1000000), - }, - }, - }, - { - FromAddress: cosmoscompat.Address(addr), - ToAddress: cosmoscompat.Address(recipient2), - Amount: cosmoscompat.Coins{ - { - Denom: "uluna", - Amount: pack.U64(2000000), - }, - }, - }, - } - - client := cosmoscompat.NewClient(cosmoscompat.DefaultClientOptions(), app.MakeCodec()) + // recipient2 := sdk.AccAddress(pk2.PubKey().Address()) + + // msgs := []cosmos.MsgSend{ + // { + // FromAddress: cosmos.Address(addr), + // ToAddress: cosmos.Address(recipient1), + // Amount: cosmos.Coins{ + // { + // Denom: "uluna", + // Amount: pack.U64(1000000), + // }, + // }, + // }, + // { + // FromAddress: cosmos.Address(addr), + // ToAddress: cosmos.Address(recipient1), + // Amount: cosmos.Coins{ + // { + // Denom: "uluna", + // Amount: pack.U64(2000000), + // }, + // }, + // }, + // } + + client := cosmos.NewClient(cosmos.DefaultClientOptions(), app.MakeCodec()) account, err := client.Account(addr) Expect(err).NotTo(HaveOccurred()) - txBuilder := terra.NewTxBuilder(cosmoscompat.TxOptions{ - AccountNumber: account.AccountNumber, - SequenceNumber: account.SequenceNumber, - Gas: 200000, - ChainID: "testnet", - Memo: "multichain", - Fees: cosmoscompat.Coins{ - { - Denom: "uluna", - Amount: pack.U64(3000), - }, - }, - }).WithCodec(app.MakeCodec()) - - tx, err := txBuilder.BuildTx(msgs) + fmt.Printf("account = %v\n", account) + + txBuilder := terra.NewTxBuilder(cosmos.TxBuilderOptions{ + AccountNumber: account.AccountNumber, + // SequenceNumber: account.SequenceNumber, + // Gas: 200000, + ChainID: "testnet", + CoinDenom: "uluna", + Cdc: app.MakeCodec(), + // Memo: "multichain", + // Fees: cosmos.Coins{ + // { + // Denom: "uluna", + // Amount: pack.U64(3000), + // }, + // }, + }) + + tx, err := txBuilder.BuildTx( + multichain.Address(recipient1.String()), + multichain.Address(addr.String()), + pack.NewU256FromU64(pack.U64(2000000)), // value + pack.NewU256FromU64(account.SequenceNumber), + pack.NewU256FromU64(pack.U64(20000)), // gas limit + pack.NewU256FromU64(pack.U64(300)), // gas price, + pack.NewBytes([]byte("multichain")), // memo + ) Expect(err).NotTo(HaveOccurred()) - sigBytes, err := pk.Sign(tx.SigBytes()) + sighashes, err := tx.Sighashes() + Expect(err).NotTo(HaveOccurred()) + sigBytes, err := pk.Sign([]byte(sighashes[0])) Expect(err).NotTo(HaveOccurred()) pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) - err = tx.Sign([]cosmoscompat.StdSignature{ - { - Signature: pack.NewBytes(sigBytes), - PubKey: pack.NewBytes(pubKey[:]), - }, - }) + err = tx.Sign( + []pack.Bytes{pack.NewBytes(sigBytes)}, + pack.NewBytes(pubKey[:]), + ) Expect(err).NotTo(HaveOccurred()) - txHash, err := client.SubmitTx(tx, pack.NewString("sync")) + txHash := tx.Hash() + err = client.SubmitTx(ctx, tx) Expect(err).NotTo(HaveOccurred()) for { @@ -123,7 +143,7 @@ var _ = Describe("Terra", func() { // definitely valid, and the test has passed. We were // successfully able to use the multichain to construct and // submit a Bitcoin transaction! - _, err := client.Tx(txHash) + _, confs, err := client.Tx(ctx, txHash) if err == nil { break } @@ -132,7 +152,9 @@ var _ = Describe("Terra", func() { Expect(err).NotTo(HaveOccurred()) } - time.Sleep(10 * time.Second) + Expect(confs).To(Equal(1)) + + time.Sleep(2 * time.Second) } }) }) diff --git a/go.mod b/go.mod index 9d1029f0..b6e3674b 100644 --- a/go.mod +++ b/go.mod @@ -8,29 +8,30 @@ require ( github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf github.com/cosmos/cosmos-sdk v0.39.1 github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect + github.com/etcd-io/bbolt v1.3.3 // indirect github.com/ethereum/go-ethereum v1.9.19 - github.com/filecoin-project/go-address v0.0.3 + github.com/filecoin-project/go-address v0.0.3 // indirect github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect github.com/filecoin-project/go-bitfield v0.1.0 // indirect github.com/filecoin-project/go-data-transfer v0.5.0 // indirect github.com/filecoin-project/go-fil-markets v0.3.2 // indirect - github.com/filecoin-project/lotus v0.4.1 + github.com/filecoin-project/lotus v0.4.1 // indirect github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect - github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 + github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 // indirect github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect github.com/ipfs/go-hamt-ipld v0.1.1 // indirect github.com/lib/pq v1.7.0 // indirect - github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/raulk/clock v1.1.0 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 github.com/renproject/surge v1.2.5 + github.com/stumble/gorocksdb v0.0.3 // indirect github.com/tendermint/tendermint v0.33.8 - github.com/terra-project/core v0.3.7 + github.com/terra-project/core v0.4.0-rc.2.0.20200804094610-950d1da7f2e0 github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 diff --git a/go.sum b/go.sum index 690ddb94..788ff922 100644 --- a/go.sum +++ b/go.sum @@ -31,6 +31,7 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/99designs/keyring v1.1.3 h1:mEV3iyZWjkxQ7R8ia8GcG97vCX5zQQ7n4o8R2BylwQY= github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= @@ -47,9 +48,13 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/CosmWasm/go-cosmwasm v0.10.0 h1:3DBOiGtLllevLgf8PQO5+hRCKKqYEQJIw6cgaZzr1Ag= +github.com/CosmWasm/go-cosmwasm v0.10.0/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= @@ -57,6 +62,7 @@ github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4 github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -64,8 +70,10 @@ github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrU github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= @@ -92,19 +100,23 @@ github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.32.11/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d h1:1aAija9gr0Hyv4KfQcRcwlmFIrhkDmIj2dz5bkg/s/8= github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= +github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= @@ -114,6 +126,7 @@ github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9 github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v0.0.0-20190316010144-3ac1210f4b38/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= @@ -127,7 +140,9 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -155,11 +170,25 @@ github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/cosmos-sdk v0.33.2/go.mod h1:JrX/JpJunJQXBI5PEX2zELHMFzQr/159jDjIhesOh2c= +github.com/cosmos/cosmos-sdk v0.34.0/go.mod h1:a0NaOtHsrPNIS+uIbIeCuPINqUjgE4AVLfxFCMpBN6A= +github.com/cosmos/cosmos-sdk v0.36.0 h1:nDHhZDeucmv/PoThz89Q8cj9S8OH2EUutgertz2pZ90= +github.com/cosmos/cosmos-sdk v0.36.0/go.mod h1:3b/k/Zd+YDuttSmEJdNkxga1H5EIiDUhSYeErAHQN7A= +github.com/cosmos/cosmos-sdk v0.37.14 h1:O+uiYQoYwtSssHPj/kJ3xKSU8DnOhPsJo57lsqT6sLE= github.com/cosmos/cosmos-sdk v0.37.14/go.mod h1:qKU3AzVJ0GGWARqImZj24CIX35Q4nJEE+WrXVU/CzFo= +github.com/cosmos/cosmos-sdk v0.39.0/go.mod h1:3iKiqnQ48T0UG4IDw9EM8utQSwItutLUkmGkRSWpS5U= +github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/Vwac= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/ledger-cosmos-go v0.9.11/go.mod h1:RWldjvUf4Hfi46ti/8etBH3eQ2rOqqz2hstdzROQSHo= +github.com/cosmos/ledger-cosmos-go v0.10.1/go.mod h1:fT5C2lbyzNnq5WO3S3VgUxLhS1BqJVMv8Teh4EHrjIQ= +github.com/cosmos/ledger-cosmos-go v0.10.3/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-go v0.9.1/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -168,10 +197,12 @@ github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= +github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= @@ -202,6 +233,7 @@ github.com/drand/kyber v1.1.1/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6 github.com/drand/kyber-bls12381 v0.1.0/go.mod h1:N1emiHpm+jj7kMlxEbu3MUyOiooTgNySln564cgD9mk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a h1:mq+R6XEM6lJX5VlLyZIrUSP8tSuJp82xTK89hvBwJbU= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= @@ -217,15 +249,21 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/ethereum/go-ethereum v1.8.23/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= github.com/ethereum/go-ethereum v1.9.19 h1:c9IrhzqPKY+ZkS/YhXCO3rgNzlxsVrCYIRvrIAFmIWM= github.com/ethereum/go-ethereum v1.9.19/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= @@ -285,6 +323,7 @@ github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+ 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= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -304,17 +343,21 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -324,6 +367,7 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= @@ -339,6 +383,7 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -353,19 +398,25 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 h1:lMm2hD9Fy0ynom5+85/pbdkiYcBqM1JWmhpAXLmy0fw= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/golangci-lint v1.16.0/go.mod h1:uySrAxrUmZYnxyccYSnwuAEm+3144Zg5IAUueIW8+fA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -383,6 +434,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= @@ -390,6 +442,7 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -397,6 +450,7 @@ github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -410,9 +464,12 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3vH7VqgtMxQ= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= @@ -439,7 +496,9 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -453,6 +512,7 @@ github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOo github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -605,6 +665,7 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -620,6 +681,7 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -627,6 +689,7 @@ github.com/kabukky/httpscerts v0.0.0-20150320125433-617593d7dcb3/go.mod h1:BYpt4 github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -639,9 +702,11 @@ github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfo github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -649,6 +714,7 @@ github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= +github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= @@ -890,6 +956,7 @@ github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/A github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -910,12 +977,14 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= @@ -929,8 +998,10 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= @@ -939,11 +1010,13 @@ github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1 github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1047,16 +1120,20 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1/go.mod h1:pXzZSDlN+HPzSdyIBnKNN9ptD9Hx7iZMWIJPTwo4FPE= github.com/otiai10/copy v1.0.2/go.mod h1:c7RpqBkwMom4bYTSkLSym4VSJz/XtncWRAj/J4PEIMY= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= +github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw= github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -1064,8 +1141,10 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= @@ -1082,12 +1161,14 @@ github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A= github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= @@ -1099,26 +1180,33 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.0 h1:jhMy6QXfi3y2HEzFoyuCj40z4OZIIHHPtFyCMftmvKA= github.com/prometheus/procfs v0.1.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rakyll/statik v0.1.4/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= @@ -1133,6 +1221,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -1174,10 +1263,12 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= @@ -1191,22 +1282,31 @@ github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= +github.com/spf13/viper v1.0.3/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= +github.com/spf13/viper v1.6.1 h1:VPZzIkznI1YhVMRi6vNFLHSwhnhReBfgTxIPccpfdZk= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= @@ -1217,37 +1317,91 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stumble/gorocksdb v0.0.3 h1:9UU+QA1pqFYJuf9+5p7z1IqdE5k0mma4UAeu2wmX8kA= github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= +github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5 h1:u8i49c+BxloX3XQ55cvzFNXplizZP/q00i+IlttUjAU= github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= +github.com/tendermint/go-amino v0.15.0 h1:TC4e66P59W7ML9+bxio17CPKnxW3nKIRAYskntMAoRk= github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN+4JgQ= github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/iavl v0.12.1/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= +github.com/tendermint/iavl v0.12.4 h1:hd1woxUGISKkfUWBA4mmmTwOua6PQZTJM/F0FDrmMV8= github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= +github.com/tendermint/iavl v0.14.0 h1:Jkff+IFrXxRWtH9Jn/ga/2cxNnzMTv58xEKgCJsKUBg= github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= +github.com/tendermint/tendermint v0.29.1/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= +github.com/tendermint/tendermint v0.31.4/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= +github.com/tendermint/tendermint v0.32.2 h1:FvZWdksfDg/65vKKr5Lgo57keARFnmhrUEXHwyrV1QY= +github.com/tendermint/tendermint v0.32.2/go.mod h1:NwMyx58S8VJ7tEpFKqRVlVWKO9N9zjTHu+Dx96VsnOE= +github.com/tendermint/tendermint v0.32.12 h1:JFD3aQZFySamBeU1bfDaqOVgFo6w8UpmiKylVB8eV00= +github.com/tendermint/tendermint v0.32.12/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= +github.com/tendermint/tendermint v0.32.13 h1:gmfuBfqmozFbvPSVr1VbJpkfEyWfsxiHN/wHVgp/ujw= github.com/tendermint/tendermint v0.32.13/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= +github.com/tendermint/tendermint v0.33.6/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= +github.com/tendermint/tendermint v0.33.8 h1:Xxu4QhpqcomSE0iQDw1MqLgfsa8fqtPtWFJK6zZOVso= github.com/tendermint/tendermint v0.33.8/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= +github.com/tendermint/tm-db v0.2.0 h1:rJxgdqn6fIiVJZy4zLpY1qVlyD0TU6vhkT4kEf71TQQ= github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= +github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= +github.com/terra-project/core v0.0.5 h1:kotfrTwFcaSrUEAF+sUbmmfUs+kNEXQkl9jsZX75PrU= +github.com/terra-project/core v0.0.5/go.mod h1:vFRM5NltCZDvekkobyahiQuw2hBnCcUzPygqVO6WG0k= +github.com/terra-project/core v0.0.7/go.mod h1:13VtQKy+VaMprroNUg6VZtZWKgMp0pYfnLEVVjIBftU= +github.com/terra-project/core v0.1.0-rc0/go.mod h1:XHxluu5fNCshfFIWtw+CuG+QDOuNpwQQbj6MziViVDI= +github.com/terra-project/core v0.1.1/go.mod h1:RcmANwhkKV/FjYxiCDQNTL1MOtX/R7F8W3Tk0I0ds6U= +github.com/terra-project/core v0.2.0-rc0/go.mod h1:KsXLRPLQicXgzy1oRsghX/52ZhIHSMkcQi4z6a7PP1s= +github.com/terra-project/core v0.2.0/go.mod h1:KsXLRPLQicXgzy1oRsghX/52ZhIHSMkcQi4z6a7PP1s= +github.com/terra-project/core v0.2.1/go.mod h1:KsXLRPLQicXgzy1oRsghX/52ZhIHSMkcQi4z6a7PP1s= +github.com/terra-project/core v0.2.2/go.mod h1:hIVtajuqzNGtNs8eTuPDN6hpmoUARrkS6l974QNGUJo= +github.com/terra-project/core v0.2.3/go.mod h1:hIVtajuqzNGtNs8eTuPDN6hpmoUARrkS6l974QNGUJo= +github.com/terra-project/core v0.2.4/go.mod h1:+WdWWyCiqK1EuWi28tQy+LETb1GE96oVHCp7MltLj1w= +github.com/terra-project/core v0.2.5/go.mod h1:AkIAehQthAvM0tUwJ2Mdh6cMZyJxjUYuyJKdG9ZNBQE= +github.com/terra-project/core v0.2.6/go.mod h1:PbQfNqzG4lfTAuWLrbgbTg96pZpWEUrfoPaIqdkSX9A= +github.com/terra-project/core v0.2.7/go.mod h1:PbQfNqzG4lfTAuWLrbgbTg96pZpWEUrfoPaIqdkSX9A= +github.com/terra-project/core v0.3.0-rc0/go.mod h1:L+LFiZVuRt2E3s20aHL4UWjJqqImKIYFO7dnT9JhFM0= +github.com/terra-project/core v0.3.0-rc1/go.mod h1:L+LFiZVuRt2E3s20aHL4UWjJqqImKIYFO7dnT9JhFM0= +github.com/terra-project/core v0.3.0-rc2/go.mod h1:L+LFiZVuRt2E3s20aHL4UWjJqqImKIYFO7dnT9JhFM0= +github.com/terra-project/core v0.3.0-rc3/go.mod h1:L+LFiZVuRt2E3s20aHL4UWjJqqImKIYFO7dnT9JhFM0= +github.com/terra-project/core v0.3.0/go.mod h1:L+LFiZVuRt2E3s20aHL4UWjJqqImKIYFO7dnT9JhFM0= +github.com/terra-project/core v0.3.1/go.mod h1:L+LFiZVuRt2E3s20aHL4UWjJqqImKIYFO7dnT9JhFM0= +github.com/terra-project/core v0.3.2/go.mod h1:MUa1FrVWCMUHdKnpCvHodljU15LzD66sJHxHlSBORjk= +github.com/terra-project/core v0.3.3/go.mod h1:77b4dyp/4/CzHOnBVp489k7VQ8bmSO9glejY58iWplg= +github.com/terra-project/core v0.3.4/go.mod h1:zdebMWw51oOe31Zlp6apEFa5XtTMsiAeLcB5vbX2nZ4= +github.com/terra-project/core v0.3.5/go.mod h1:CSuEtyesdHP6L9yVE07hQh7Ok3yu2uUc8fWhN0OhRnQ= +github.com/terra-project/core v0.3.6/go.mod h1:buTmyb/YvJyKlp7qopMx0H+WSttKqLdctFrg9aYS7zY= +github.com/terra-project/core v0.3.7 h1:LTuDl+kEv3JBEgoAypTXeqNrxdt5ECCKdxJ8XNkvntU= github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= +github.com/terra-project/core v0.4.0-rc.2.0.20200804094610-950d1da7f2e0 h1:Yqw3ERYb7kBufUC8cG4xYsNxEheLFAOI+qPBcKhcsSg= +github.com/terra-project/core v0.4.0-rc.2.0.20200804094610-950d1da7f2e0/go.mod h1:8fYWjVEfLbGy4jTSorWdeygpTadbfw1PxYO9JeSQb80= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1310,6 +1464,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1319,6 +1474,7 @@ go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= @@ -1343,6 +1499,7 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1410,6 +1567,7 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -1417,6 +1575,7 @@ golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKG golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1490,6 +1649,7 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1601,6 +1761,7 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 h1:kDtqNkeBrZb8B+atrj50B5XLHpzXXqcCdZPP/ApQ5NY= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1656,6 +1817,7 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482 h1:i+Aiej6cta/Frzp13/swvwz5O00kYcSe0A/C5Wd7zX8= google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -1677,7 +1839,9 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200617041141-9a465503579e/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1688,10 +1852,12 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= @@ -1699,6 +1865,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= @@ -1719,6 +1886,7 @@ gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= @@ -1728,6 +1896,7 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= From e8c0fef542b289220f08718e29f0d43f16f53b5f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 16:30:01 +0530 Subject: [PATCH 031/335] use the forked dependencies as per terra --- go.mod | 8 +++++++- go.sum | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b6e3674b..a8cbdf83 100644 --- a/go.mod +++ b/go.mod @@ -31,8 +31,14 @@ require ( github.com/renproject/surge v1.2.5 github.com/stumble/gorocksdb v0.0.3 // indirect github.com/tendermint/tendermint v0.33.8 - github.com/terra-project/core v0.4.0-rc.2.0.20200804094610-950d1da7f2e0 + github.com/terra-project/core v0.4.0-rc.4 github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 ) + +replace github.com/cosmos/ledger-cosmos-go => github.com/terra-project/ledger-terra-go v0.11.1-terra + +replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 + +replace github.com/CosmWasm/go-cosmwasm => github.com/terra-project/go-cosmwasm v0.10.1-terra diff --git a/go.sum b/go.sum index 788ff922..ee923e96 100644 --- a/go.sum +++ b/go.sum @@ -31,6 +31,8 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.1.3 h1:mEV3iyZWjkxQ7R8ia8GcG97vCX5zQQ7n4o8R2BylwQY= github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= @@ -1402,6 +1404,11 @@ github.com/terra-project/core v0.3.7 h1:LTuDl+kEv3JBEgoAypTXeqNrxdt5ECCKdxJ8XNkv github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= github.com/terra-project/core v0.4.0-rc.2.0.20200804094610-950d1da7f2e0 h1:Yqw3ERYb7kBufUC8cG4xYsNxEheLFAOI+qPBcKhcsSg= github.com/terra-project/core v0.4.0-rc.2.0.20200804094610-950d1da7f2e0/go.mod h1:8fYWjVEfLbGy4jTSorWdeygpTadbfw1PxYO9JeSQb80= +github.com/terra-project/core v0.4.0-rc.4 h1:6ZK9KyUCRWw5kQmcBmTbKy6RZ8UU2ew9T3NrlH4jS1U= +github.com/terra-project/core v0.4.0-rc.4/go.mod h1:QoddSVukyuI5qM0rFp7xvKjTn/aoK3D177MUt1V7YXM= +github.com/terra-project/go-cosmwasm v0.10.1-terra h1:3yvESyqndOoJKmmFyGKfQy7rLg2Gz4ULwwoCi4fDqAw= +github.com/terra-project/go-cosmwasm v0.10.1-terra/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc= +github.com/terra-project/ledger-terra-go v0.11.1-terra/go.mod h1:5fdyEuDNvsymbqag/EaaAeWAgyAebQe2VH38H+DnXnA= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= From 0f0f2493c406b7d8f787b9d86ed272f44cb12b76 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 20:41:53 +0530 Subject: [PATCH 032/335] minor fixes and cleaning up --- chain/cosmos/client.go | 9 ++-- chain/cosmos/tx.go | 10 ++-- chain/terra/address.go | 3 ++ chain/terra/terra.go | 5 ++ chain/terra/terra_test.go | 99 ++++++++++++--------------------------- 5 files changed, 48 insertions(+), 78 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 888bc851..f4876f03 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -2,6 +2,7 @@ package cosmos import ( "context" + "encoding/hex" "fmt" "time" @@ -113,14 +114,14 @@ func (client *client) Account(addr Address) (Account, error) { // Tx query transaction with txHash func (client *client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) { - res, err := utils.QueryTx(client.cliCtx, txHash.String()) + res, err := utils.QueryTx(client.cliCtx, hex.EncodeToString(txHash[:])) if err != nil { - return &StdTx{}, pack.NewU64(0), err + return &StdTx{}, pack.NewU64(0), fmt.Errorf("query fail: %v", err) } authStdTx := res.Tx.(auth.StdTx) if res.Code != 0 { - return &StdTx{}, pack.NewU64(0), fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + return &StdTx{}, pack.NewU64(0), fmt.Errorf("tx failed code: %v, log: %v", res.Code, res.RawLog) } stdTx, err := parseStdTx(authStdTx) @@ -144,7 +145,7 @@ func (client *client) SubmitTx(ctx context.Context, tx account.Tx) error { } if res.Code != 0 { - return fmt.Errorf("Tx Failed Code: %v, Log: %v", res.Code, res.RawLog) + return fmt.Errorf("tx failed code: %v, log: %v", res.Code, res.RawLog) } return nil diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 0f968298..eee85b59 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -73,8 +73,10 @@ func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimi }}, } - feeAmount := gasLimit.Int().Uint64() * gasPrice.Int().Uint64() - fees := Coins{Coin{Denom: builder.coinDenom, Amount: pack.NewU64(feeAmount)}} + fees := Coins{Coin{ + Denom: builder.coinDenom, + Amount: pack.NewU64(gasPrice.Int().Uint64()), + }} txBuilder := auth.NewTxBuilder( utils.GetTxEncoder(builder.cdc), @@ -257,9 +259,7 @@ func (tx StdTx) Hash() pack.Bytes { return pack.Bytes{} } - hashBytes := pack.Bytes32{} - hashBytes.Unmarshal(tmhash.Sum(txBytes), 32) - return pack.NewBytes(hashBytes[:]) + return pack.NewBytes(tmhash.Sum(txBytes)) } // Sighashes that need to be signed before this transaction can be submitted. diff --git a/chain/terra/address.go b/chain/terra/address.go index d48d1789..7b235bdc 100644 --- a/chain/terra/address.go +++ b/chain/terra/address.go @@ -3,6 +3,9 @@ package terra import "github.com/renproject/multichain/chain/cosmos" type ( + // Address re-exports cosmos-compatible address + Address = cosmos.Address + // AddressDecoder re-exports cosmos.AddressDecoder AddressDecoder = cosmos.AddressDecoder diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 225ad155..3e439b5b 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -17,6 +17,11 @@ type ( TxBuilderOptions = cosmos.TxBuilderOptions ) +var ( + // DefaultClientOptions re-exports default cosmos-compatible client options + DefaultClientOptions = cosmos.DefaultClientOptions +) + // NewClient returns returns a new Client with terra codec func NewClient(opts ClientOptions) Client { return cosmos.NewClient(opts, app.MakeCodec()) diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index e49d3120..739264ad 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -3,9 +3,7 @@ package terra_test import ( "context" "encoding/hex" - "fmt" "os" - "strings" "time" "github.com/tendermint/tendermint/crypto/secp256k1" @@ -24,7 +22,7 @@ import ( var _ = Describe("Terra", func() { Context("when submitting transactions", func() { - Context("when sending LUNA to multiple addresses", func() { + Context("when sending LUNA", func() { It("should work", func() { // create context for the test ctx, cancel := context.WithCancel(context.Background()) @@ -43,89 +41,54 @@ var _ = Describe("Terra", func() { panic("TERRA_ADDRESS is undefined") } - // pkEnv := "a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330" - // addrEnv := "terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u" - pkBz, err := hex.DecodeString(pkEnv) Expect(err).ToNot(HaveOccurred()) var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBz) - addr := cosmos.Address(pk.PubKey().Address()) + addr := terra.Address(pk.PubKey().Address()) decoder := terra.NewAddressDecoder("terra") - expectedAddr, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrEnv))) + _, err = decoder.DecodeAddress(multichain.Address(pack.NewString(addrEnv))) Expect(err).ToNot(HaveOccurred()) - Expect(addr).Should(Equal(expectedAddr)) - - pk1 := secp256k1.GenPrivKey() - // pk2 := secp256k1.GenPrivKey() - - recipient1 := sdk.AccAddress(pk1.PubKey().Address()) - // recipient2 := sdk.AccAddress(pk2.PubKey().Address()) - - // msgs := []cosmos.MsgSend{ - // { - // FromAddress: cosmos.Address(addr), - // ToAddress: cosmos.Address(recipient1), - // Amount: cosmos.Coins{ - // { - // Denom: "uluna", - // Amount: pack.U64(1000000), - // }, - // }, - // }, - // { - // FromAddress: cosmos.Address(addr), - // ToAddress: cosmos.Address(recipient1), - // Amount: cosmos.Coins{ - // { - // Denom: "uluna", - // Amount: pack.U64(2000000), - // }, - // }, - // }, - // } - - client := cosmos.NewClient(cosmos.DefaultClientOptions(), app.MakeCodec()) + + // random recipient + pkRecipient := secp256k1.GenPrivKey() + recipient := sdk.AccAddress(pkRecipient.PubKey().Address()) + + // instantiate a new client + client := terra.NewClient(cosmos.DefaultClientOptions()) account, err := client.Account(addr) Expect(err).NotTo(HaveOccurred()) - fmt.Printf("account = %v\n", account) - - txBuilder := terra.NewTxBuilder(cosmos.TxBuilderOptions{ + // create a new cosmos-compatible transaction builder + txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ AccountNumber: account.AccountNumber, - // SequenceNumber: account.SequenceNumber, - // Gas: 200000, - ChainID: "testnet", - CoinDenom: "uluna", - Cdc: app.MakeCodec(), - // Memo: "multichain", - // Fees: cosmos.Coins{ - // { - // Denom: "uluna", - // Amount: pack.U64(3000), - // }, - // }, + ChainID: "testnet", + CoinDenom: "uluna", + Cdc: app.MakeCodec(), }) + // build the transaction tx, err := txBuilder.BuildTx( - multichain.Address(recipient1.String()), - multichain.Address(addr.String()), - pack.NewU256FromU64(pack.U64(2000000)), // value - pack.NewU256FromU64(account.SequenceNumber), - pack.NewU256FromU64(pack.U64(20000)), // gas limit - pack.NewU256FromU64(pack.U64(300)), // gas price, - pack.NewBytes([]byte("multichain")), // memo + multichain.Address(addr.String()), // from + multichain.Address(recipient.String()), // to + pack.NewU256FromU64(pack.U64(2000000)), // amount + pack.NewU256FromU64(account.SequenceNumber), // nonce + pack.NewU256FromU64(pack.U64(30000)), // gas + pack.NewU256FromU64(pack.U64(300)), // fee + pack.NewBytes([]byte("multichain")), // memo ) Expect(err).NotTo(HaveOccurred()) + // get the transaction bytes and sign it sighashes, err := tx.Sighashes() Expect(err).NotTo(HaveOccurred()) sigBytes, err := pk.Sign([]byte(sighashes[0])) Expect(err).NotTo(HaveOccurred()) + // attach the signature to the transaction pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) err = tx.Sign( []pack.Bytes{pack.NewBytes(sigBytes)}, @@ -133,6 +96,7 @@ var _ = Describe("Terra", func() { ) Expect(err).NotTo(HaveOccurred()) + // submit the transaction to the chain txHash := tx.Hash() err = client.SubmitTx(ctx, tx) Expect(err).NotTo(HaveOccurred()) @@ -143,17 +107,14 @@ var _ = Describe("Terra", func() { // definitely valid, and the test has passed. We were // successfully able to use the multichain to construct and // submit a Bitcoin transaction! - _, confs, err := client.Tx(ctx, txHash) + foundTx, confs, err := client.Tx(ctx, txHash) if err == nil { + Expect(confs).To(Equal(1)) + Expect(foundTx.Hash()).To(Equal(txHash)) break } - if !strings.Contains(err.Error(), "not found") { - Expect(err).NotTo(HaveOccurred()) - } - - Expect(confs).To(Equal(1)) - + // wait and retry querying for the transaction time.Sleep(2 * time.Second) } }) From 1b5f047465d768d6daa376db22ba252b13fe293f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 20:54:09 +0530 Subject: [PATCH 033/335] (fix) type fixes --- chain/terra/terra_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 739264ad..16c7a730 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -71,14 +71,15 @@ var _ = Describe("Terra", func() { }) // build the transaction + payload := pack.NewBytes([]byte("multichain")) tx, err := txBuilder.BuildTx( multichain.Address(addr.String()), // from multichain.Address(recipient.String()), // to pack.NewU256FromU64(pack.U64(2000000)), // amount pack.NewU256FromU64(account.SequenceNumber), // nonce - pack.NewU256FromU64(pack.U64(30000)), // gas + pack.NewU256FromU64(pack.U64(300000)), // gas pack.NewU256FromU64(pack.U64(300)), // fee - pack.NewBytes([]byte("multichain")), // memo + payload, // memo ) Expect(err).NotTo(HaveOccurred()) @@ -109,8 +110,8 @@ var _ = Describe("Terra", func() { // submit a Bitcoin transaction! foundTx, confs, err := client.Tx(ctx, txHash) if err == nil { - Expect(confs).To(Equal(1)) - Expect(foundTx.Hash()).To(Equal(txHash)) + Expect(confs.Uint64()).To(Equal(uint64(1))) + Expect(foundTx.Payload()).To(Equal(multichain.ContractCallData(payload))) break } From cf5ed2dab33247a81dd606ae5b2a7b8a5160a199 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 21:09:35 +0530 Subject: [PATCH 034/335] (fix) bytes stringified is in base64 format --- chain/terra/terra_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 16c7a730..b31aa22d 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -111,7 +111,7 @@ var _ = Describe("Terra", func() { foundTx, confs, err := client.Tx(ctx, txHash) if err == nil { Expect(confs.Uint64()).To(Equal(uint64(1))) - Expect(foundTx.Payload()).To(Equal(multichain.ContractCallData(payload))) + Expect(foundTx.Payload()).To(Equal(multichain.ContractCallData([]byte(payload.String())))) break } From 82a32f0e0090350cfdc3daf496c8475121140c05 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 22:21:27 +0530 Subject: [PATCH 035/335] remove commented out code --- chain/cosmos/address_test.go | 24 ------ chain/cosmos/cosmos_test.go | 139 ----------------------------------- 2 files changed, 163 deletions(-) diff --git a/chain/cosmos/address_test.go b/chain/cosmos/address_test.go index e1932969..712dd321 100644 --- a/chain/cosmos/address_test.go +++ b/chain/cosmos/address_test.go @@ -1,25 +1 @@ package cosmos_test - -// import ( -// "github.com/renproject/multichain/chain/cosmos" -// "github.com/renproject/pack" - -// . "github.com/onsi/ginkgo" -// . "github.com/onsi/gomega" -// ) - -// var _ = Describe("Cosmos", func() { -// Context("when decoding address", func() { -// Context("when decoding terra address", func() { -// It("should work", func() { -// decoder := cosmos.NewAddressDecoder("terra") - -// addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" -// addr, err := decoder.DecodeAddress(pack.NewString(addrStr)) - -// Expect(err).ToNot(HaveOccurred()) -// Expect(addr.AccAddress().String()).Should(Equal(addrStr)) -// }) -// }) -// }) -// }) diff --git a/chain/cosmos/cosmos_test.go b/chain/cosmos/cosmos_test.go index 963ac226..712dd321 100644 --- a/chain/cosmos/cosmos_test.go +++ b/chain/cosmos/cosmos_test.go @@ -1,140 +1 @@ package cosmos_test - -// import ( -// "encoding/hex" -// "os" -// "strings" -// "time" - -// "github.com/tendermint/tendermint/crypto/secp256k1" - -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/terra-project/core/app" - -// "github.com/renproject/multichain/chain/cosmos" -// "github.com/renproject/multichain/compat/cosmoscompat" -// "github.com/renproject/pack" - -// . "github.com/onsi/ginkgo" -// . "github.com/onsi/gomega" -// ) - -// var _ = Describe("Cosmos", func() { -// Context("when submitting transactions", func() { -// Context("when sending LUNA to multiple addresses", func() { -// It("should work", func() { -// // Load private key, and assume that the associated address has -// // funds to spend. You can do this by setting TERRA_PK to the -// // value specified in the `./multichaindeploy/.env` file. -// pkEnv := os.Getenv("TERRA_PK") -// if pkEnv == "" { -// panic("TERRA_PK is undefined") -// } - -// addrEnv := os.Getenv("TERRA_ADDRESS") -// if addrEnv == "" { -// panic("TERRA_ADDRESS is undefined") -// } - -// // pkEnv := "a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330" -// // addrEnv := "terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u" - -// pkBz, err := hex.DecodeString(pkEnv) -// Expect(err).ToNot(HaveOccurred()) - -// var pk secp256k1.PrivKeySecp256k1 -// copy(pk[:], pkBz) - -// addr := cosmoscompat.Address(pk.PubKey().Address()) - -// decoder := cosmos.NewAddressDecoder("terra") -// expectedAddr, err := decoder.DecodeAddress(pack.NewString(addrEnv)) -// Expect(err).ToNot(HaveOccurred()) -// Expect(addr).Should(Equal(expectedAddr)) - -// pk1 := secp256k1.GenPrivKey() -// pk2 := secp256k1.GenPrivKey() - -// recipient1 := sdk.AccAddress(pk1.PubKey().Address()) -// recipient2 := sdk.AccAddress(pk2.PubKey().Address()) - -// msgs := []cosmoscompat.MsgSend{ -// { -// FromAddress: cosmoscompat.Address(addr), -// ToAddress: cosmoscompat.Address(recipient1), -// Amount: cosmoscompat.Coins{ -// { -// Denom: "uluna", -// Amount: pack.U64(1000000), -// }, -// }, -// }, -// { -// FromAddress: cosmoscompat.Address(addr), -// ToAddress: cosmoscompat.Address(recipient2), -// Amount: cosmoscompat.Coins{ -// { -// Denom: "uluna", -// Amount: pack.U64(2000000), -// }, -// }, -// }, -// } - -// client := cosmoscompat.NewClient(cosmoscompat.DefaultClientOptions(), app.MakeCodec()) -// account, err := client.Account(addr) -// Expect(err).NotTo(HaveOccurred()) - -// txBuilder := cosmos.NewTxBuilder(cosmoscompat.TxOptions{ -// AccountNumber: account.AccountNumber, -// SequenceNumber: account.SequenceNumber, -// Gas: 200000, -// ChainID: "testnet", -// Memo: "multichain", -// Fees: cosmoscompat.Coins{ -// { -// Denom: "uluna", -// Amount: pack.U64(3000), -// }, -// }, -// }).WithCodec(app.MakeCodec()) - -// tx, err := txBuilder.BuildTx(msgs) -// Expect(err).NotTo(HaveOccurred()) - -// sigBytes, err := pk.Sign(tx.SigBytes()) -// Expect(err).NotTo(HaveOccurred()) - -// pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) -// err = tx.Sign([]cosmoscompat.StdSignature{ -// { -// Signature: pack.NewBytes(sigBytes), -// PubKey: pack.NewBytes(pubKey[:]), -// }, -// }) -// Expect(err).NotTo(HaveOccurred()) - -// txHash, err := client.SubmitTx(tx, pack.NewString("sync")) -// Expect(err).NotTo(HaveOccurred()) - -// for { -// // Loop until the transaction has at least a few -// // confirmations. This implies that the transaction is -// // definitely valid, and the test has passed. We were -// // successfully able to use the multichain to construct and -// // submit a Bitcoin transaction! -// _, err := client.Tx(txHash) -// if err == nil { -// break -// } - -// if !strings.Contains(err.Error(), "not found") { -// Expect(err).NotTo(HaveOccurred()) -// } - -// time.Sleep(10 * time.Second) -// } -// }) -// }) -// }) -// }) From d28cde268207a8027cb0ad62dc07858c5a5596b2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 00:03:43 +0530 Subject: [PATCH 036/335] signature and sighash to be bytes instead of fixed sized --- api/account/account.go | 4 ++-- chain/ethereum/account.go | 15 ++++++++++----- chain/filecoin/account.go | 21 +++++++++++++++++---- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 27341cb0..47f8394f 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -39,12 +39,12 @@ type Tx interface { // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighashes() ([]pack.Bytes32, error) + Sighashes() ([]pack.Bytes, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign([]pack.Bytes65, pack.Bytes) error + Sign([]pack.Bytes, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index f7f8eb3b..f92add87 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -97,15 +97,16 @@ func (tx *Tx) Payload() contract.CallData { // Sighashes returns the digest that must be signed by the sender before the // transaction can be submitted by the client. -func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { - sighash := tx.signer.Hash(tx.tx) - return []pack.Bytes32{pack.NewBytes32(sighash)}, nil +func (tx *Tx) Sighashes() ([]pack.Bytes, error) { + sighash32 := tx.signer.Hash(tx.tx) + sighash := sighash32[:] + return []pack.Bytes{pack.NewBytes(sighash)}, nil } // Sign consumes a list of signatures, and adds them to the underlying // Ethereum transaction. In case of Ethereum, we expect only a single signature // per transaction. -func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") } @@ -114,7 +115,11 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } - signedTx, err := tx.tx.WithSignature(tx.signer, signatures[0].Bytes()) + if len(signatures[0]) != 65 { + return fmt.Errorf("expected signature to be 65 bytes, got %v bytes", len(signatures[0])) + } + + signedTx, err := tx.tx.WithSignature(tx.signer, []byte(signatures[0])) if err != nil { return err } diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index d0f0d6f7..4bc068c1 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -92,18 +92,31 @@ func (tx Tx) Payload() contract.CallData { // Sighashes returns the digests that must be signed before the transaction // can be submitted by the client. -func (tx Tx) Sighashes() ([]pack.Bytes32, error) { - return []pack.Bytes32{blake2b.Sum256(tx.Hash())}, nil +func (tx Tx) Sighashes() ([]pack.Bytes, error) { + sighash32 := blake2b.Sum256(tx.Hash()) + sighash := sighash32[:] + return []pack.Bytes{pack.NewBytes(sighash)}, nil } // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes must also be // specified. -func (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes, pubkey pack.Bytes) error { if len(signatures) != 1 { return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } - tx.signature = signatures[0] + + if len(signatures[0]) != 65 { + return fmt.Errorf("expected signature to be 65 bytes, got %v bytes", len(signatures[0])) + } + + // we are sure there are exactly 65 bytes in the signature, so this is safe + sig := [65]byte{} + for i := range sig { + sig[i] = signatures[0][i] + } + + tx.signature = pack.NewBytes65(sig) return nil } From a74d01ffb35c0c53eda875a71900888b2d40c137 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 00:14:33 +0530 Subject: [PATCH 037/335] (fix) limit varint input to be uint63 --- chain/filecoin/address_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go index fb8dedc3..bb2241bc 100644 --- a/chain/filecoin/address_test.go +++ b/chain/filecoin/address_test.go @@ -24,7 +24,7 @@ var _ = Describe("Address", func() { Context("for ID protocol", func() { It("should behave correctly without errors", func() { f := func() bool { - x := varint.ToUvarint(r.Uint64()) + x := varint.ToUvarint(uint64(r.Int63())) x = append([]byte{byte(filaddress.ID)}, x...) rawAddr := address.RawAddress(pack.NewBytes(x[:])) From 089c73a214c2430d79413cf372d4dbd29e7a37b4 Mon Sep 17 00:00:00 2001 From: Loong Date: Thu, 3 Sep 2020 10:30:59 +1000 Subject: [PATCH 038/335] use bytes for cid, not hash --- chain/filecoin/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index d0f0d6f7..67fa613c 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -47,7 +47,7 @@ type Tx struct { // Generally, hashes are irreversible hash functions that consume the // content of the transaction. func (tx Tx) Hash() pack.Bytes { - return pack.NewBytes(tx.msg.Cid().Hash()) + return pack.NewBytes(tx.msg.Cid().Bytes()) } // From returns the address that is sending the transaction. Generally, From e6d52e1c881434a82ec3317eeedb47803761b6a8 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 12:30:10 +0530 Subject: [PATCH 039/335] basic test for filecoin --- chain/filecoin/filecoin_test.go | 112 ++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 0d419baa..1350417d 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -1 +1,113 @@ package filecoin_test + +import ( + "context" + "fmt" + "os" + "time" + + filaddress "github.com/filecoin-project/go-address" + "github.com/renproject/id" + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/filecoin" + "github.com/renproject/pack" + "github.com/renproject/surge" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Filecoin", func() { + Context("when broadcasting a tx", func() { + It("should work", func() { + // create context for the test + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + // instantiate the client + client, err := filecoin.NewClient( + filecoin.DefaultClientOptions(). + WithAddress("ws://127.0.0.1:1234/rpc/v0"). + WithAuthToken("Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.673MLa4AmbhNeC1Hj2Bn6c4t_ci68I0amkqAEHea8ik"), + ) + Expect(err).ToNot(HaveOccurred()) + + // read the private key that we will send transactions from + filPrivKeyStr := os.Getenv("FILECOIN_PK") + if filPrivKeyStr == "" { + panic("FILECOIN_PK is undefined") + } + filAddress := os.Getenv("FILECOIN_ADDRESS") + if filAddress == "" { + panic("FILECOIN_ADDRESS is undefined") + } + filPrivKey := id.PrivKey{} + err = surge.FromBinary(&filPrivKey, []byte(filPrivKeyStr)) + Expect(err).ToNot(HaveOccurred()) + filPubKey := filPrivKey.PubKey() + filPubKeyCompressed, err := surge.ToBinary(filPubKey) + Expect(err).NotTo(HaveOccurred()) + + // random recipient + recipientPK := id.NewPrivKey() + recipientPubKey := recipientPK.PubKey() + recipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey) + Expect(err).NotTo(HaveOccurred()) + recipientAddr, err := filaddress.NewSecp256k1Address(recipientPubKeyCompressed) + + // construct the transaction builder + gasPrice := pack.NewU256FromU64(pack.NewU64(100)) + gasLimit := pack.NewU256FromU64(pack.NewU64(100000)) + amount := pack.NewU256FromU64(pack.NewU64(100)) + nonce := pack.NewU256FromU64(pack.NewU64(0)) + payload := pack.Bytes(nil) + filTxBuilder := filecoin.NewTxBuilder(gasPrice, gasLimit) + + // build the transaction + tx, err := filTxBuilder.BuildTx( + multichain.Address(pack.String(filAddress)), + multichain.Address(pack.String(recipientAddr.String())), + amount, nonce, + pack.U256{}, pack.U256{}, + payload, + ) + Expect(err).ToNot(HaveOccurred()) + + // Sign the filecoin-side lock transaction + txSighashes, err := tx.Sighashes() + Expect(err).ToNot(HaveOccurred()) + Expect(len(txSighashes)).To(Equal(1)) + Expect(len(txSighashes[0])).To(Equal(32)) + sighash32 := [32]byte{} + for i, b := range []byte(txSighashes[0]) { + sighash32[i] = b + } + hash := id.Hash(sighash32) + sig, err := filPrivKey.Sign(&hash) + Expect(err).NotTo(HaveOccurred()) + sigBytes, err := surge.ToBinary(sig) + Expect(err).NotTo(HaveOccurred()) + txSignature := pack.NewBytes(sigBytes) + Expect(tx.Sign([]pack.Bytes{txSignature}, pack.NewBytes(filPubKeyCompressed))).To(Succeed()) + + // submit the transaction + txHash := tx.Hash() + fmt.Printf("tx = %v\n", tx) + fmt.Printf("txhash = %v\n", txHash) + err = client.SubmitTx(ctx, tx) + Expect(err).ToNot(HaveOccurred()) + + // wait for the transaction to be included in a block + for { + time.Sleep(time.Second) + fetchedTx, confs, err := client.Tx(ctx, txHash) + Expect(err).ToNot(HaveOccurred()) + Expect(fetchedTx.Hash().Equal(txHash)).To(BeTrue()) + Expect(confs).To(BeNumerically(">=", 0)) + if confs >= 1 { + break + } + } + }) + }) +}) From 7bed60acfa2c40b06787c1965ba3c1cf054ac05c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 17:48:07 +0530 Subject: [PATCH 040/335] update filecoin env and test --- chain/filecoin/filecoin_test.go | 32 ++++++++++++++++++-------------- infra/.env | 4 ++-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 1350417d..776d0dd6 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -6,6 +6,7 @@ import ( "os" "time" + ethcrypto "github.com/ethereum/go-ethereum/crypto" filaddress "github.com/filecoin-project/go-address" "github.com/renproject/id" "github.com/renproject/multichain" @@ -33,27 +34,30 @@ var _ = Describe("Filecoin", func() { Expect(err).ToNot(HaveOccurred()) // read the private key that we will send transactions from - filPrivKeyStr := os.Getenv("FILECOIN_PK") - if filPrivKeyStr == "" { + senderPrivKeyStr := os.Getenv("FILECOIN_PK") + if senderPrivKeyStr == "" { panic("FILECOIN_PK is undefined") } - filAddress := os.Getenv("FILECOIN_ADDRESS") - if filAddress == "" { + senderPK, err := ethcrypto.HexToECDSA(senderPrivKeyStr) + Expect(err).NotTo(HaveOccurred()) + senderPrivKey := id.PrivKey(*senderPK) + + // read sender's address into the filecoin-compatible format + senderAddr := os.Getenv("FILECOIN_ADDRESS") + if senderAddr == "" { panic("FILECOIN_ADDRESS is undefined") } - filPrivKey := id.PrivKey{} - err = surge.FromBinary(&filPrivKey, []byte(filPrivKeyStr)) - Expect(err).ToNot(HaveOccurred()) - filPubKey := filPrivKey.PubKey() - filPubKeyCompressed, err := surge.ToBinary(filPubKey) + senderFilAddr, err := filaddress.NewFromString(string(senderAddr)) Expect(err).NotTo(HaveOccurred()) + // FIXME // random recipient recipientPK := id.NewPrivKey() recipientPubKey := recipientPK.PubKey() recipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey) Expect(err).NotTo(HaveOccurred()) - recipientAddr, err := filaddress.NewSecp256k1Address(recipientPubKeyCompressed) + recipientFilAddr, err := filaddress.NewSecp256k1Address(recipientPubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) // construct the transaction builder gasPrice := pack.NewU256FromU64(pack.NewU64(100)) @@ -65,8 +69,8 @@ var _ = Describe("Filecoin", func() { // build the transaction tx, err := filTxBuilder.BuildTx( - multichain.Address(pack.String(filAddress)), - multichain.Address(pack.String(recipientAddr.String())), + multichain.Address(pack.String(senderFilAddr.String())), + multichain.Address(pack.String(recipientFilAddr.String())), amount, nonce, pack.U256{}, pack.U256{}, payload, @@ -83,12 +87,12 @@ var _ = Describe("Filecoin", func() { sighash32[i] = b } hash := id.Hash(sighash32) - sig, err := filPrivKey.Sign(&hash) + sig, err := senderPrivKey.Sign(&hash) Expect(err).NotTo(HaveOccurred()) sigBytes, err := surge.ToBinary(sig) Expect(err).NotTo(HaveOccurred()) txSignature := pack.NewBytes(sigBytes) - Expect(tx.Sign([]pack.Bytes{txSignature}, pack.NewBytes(filPubKeyCompressed))).To(Succeed()) + Expect(tx.Sign([]pack.Bytes{txSignature}, []byte{})).To(Succeed()) // submit the transaction txHash := tx.Hash() diff --git a/infra/.env b/infra/.env index be8dd432..90d28b79 100644 --- a/infra/.env +++ b/infra/.env @@ -55,8 +55,8 @@ export ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A # # Filecoin # -export FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a223168436f364f617442746f58636d304f6565665849473873374e505573576472372f6666735a58755964493d227d -export FILECOIN_ADDRESS=t17lz42vyixtlfs4a3j76cw53w32qb57w7g4g6qua +export FILECOIN_PK=c9512fecb037a3783b6c1da01ed65914330200258a03de7a87586b607f4b409b +export FILECOIN_ADDRESS=t16w3astlqg5zzv7fks73rq24indatrxaw4joukcq # # Terra From 315bd8a4bb425e65274e95fbce6e79d4600b7fd6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 20:17:48 +0530 Subject: [PATCH 041/335] add user key and decode in correct format --- chain/filecoin/filecoin_test.go | 13 ++++++++++--- infra/.env | 4 ++-- infra/filecoin/Dockerfile | 2 ++ infra/filecoin/miner.key | 2 +- infra/filecoin/run.sh | 3 ++- infra/filecoin/user.key | 1 + 6 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 infra/filecoin/user.key diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 776d0dd6..83729782 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -2,12 +2,14 @@ package filecoin_test import ( "context" + "encoding/hex" + "encoding/json" "fmt" "os" "time" - ethcrypto "github.com/ethereum/go-ethereum/crypto" filaddress "github.com/filecoin-project/go-address" + filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/filecoin" @@ -38,9 +40,14 @@ var _ = Describe("Filecoin", func() { if senderPrivKeyStr == "" { panic("FILECOIN_PK is undefined") } - senderPK, err := ethcrypto.HexToECDSA(senderPrivKeyStr) + var ki filtypes.KeyInfo + data, err := hex.DecodeString(senderPrivKeyStr) + Expect(err).NotTo(HaveOccurred()) + err = json.Unmarshal(data, &ki) + Expect(err).NotTo(HaveOccurred()) + senderPrivKey := id.PrivKey{} + err = surge.FromBinary(&senderPrivKey, ki.PrivateKey) Expect(err).NotTo(HaveOccurred()) - senderPrivKey := id.PrivKey(*senderPK) // read sender's address into the filecoin-compatible format senderAddr := os.Getenv("FILECOIN_ADDRESS") diff --git a/infra/.env b/infra/.env index 90d28b79..2a3da981 100644 --- a/infra/.env +++ b/infra/.env @@ -55,8 +55,8 @@ export ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A # # Filecoin # -export FILECOIN_PK=c9512fecb037a3783b6c1da01ed65914330200258a03de7a87586b607f4b409b -export FILECOIN_ADDRESS=t16w3astlqg5zzv7fks73rq24indatrxaw4joukcq +export FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d +export FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa # # Terra diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index d802e50a..3ebd1278 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -19,8 +19,10 @@ RUN ./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01 COPY run.sh /root/run.sh COPY miner.key /root/miner.key +COPY miner.key /root/user.key RUN chmod +x /root/run.sh RUN chmod +x /root/miner.key +RUN chmod +x /root/user.key EXPOSE 1234 diff --git a/infra/filecoin/miner.key b/infra/filecoin/miner.key index e4d811cd..2c0c1e21 100644 --- a/infra/filecoin/miner.key +++ b/infra/filecoin/miner.key @@ -1 +1 @@ -7b2254797065223a22736563703235366b31222c22507269766174654b6579223a223168436f364f617442746f58636d304f6565665849473873374e505573576472372f6666735a58755964493d227d \ No newline at end of file +7b2254797065223a22736563703235366b31222c22507269766174654b6579223a223168436f364f617442746f58636d304f6565665849473873374e505573576472372f6666735a58755964493d227d diff --git a/infra/filecoin/run.sh b/infra/filecoin/run.sh index 0638fbc2..7c0f8b41 100644 --- a/infra/filecoin/run.sh +++ b/infra/filecoin/run.sh @@ -13,6 +13,7 @@ sleep 10 ./lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key ./lotus wallet import /root/miner.key +./lotus wallet import /root/user.key ./lotus auth create-token --perm admin @@ -59,7 +60,7 @@ sleep 15 MAIN_WALLET="$(jq -r '.t01000.Owner' ~/.genesis-sectors/pre-seal-t01000.json)" -./lotus send --from $MAIN_WALLET t17lz42vyixtlfs4a3j76cw53w32qb57w7g4g6qua 1000000 +./lotus send --from $MAIN_WALLET t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa 1000000 while : do diff --git a/infra/filecoin/user.key b/infra/filecoin/user.key new file mode 100644 index 00000000..cd4bb900 --- /dev/null +++ b/infra/filecoin/user.key @@ -0,0 +1 @@ +7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d From 265dbe57b02a411f711151a3f3011061dcbc0d7a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 21:28:53 +0530 Subject: [PATCH 042/335] minor fixes --- chain/filecoin/account.go | 8 ++++++-- chain/filecoin/filecoin_test.go | 19 ++++++++++--------- infra/filecoin/Dockerfile | 2 +- infra/filecoin/run.sh | 1 + 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 5bf5060d..c11dbde3 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -164,7 +164,7 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ From: filfrom, To: filto, Value: big.Int{Int: value.Int()}, - Nonce: value.Int().Uint64(), + Nonce: nonce.Int().Uint64(), GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, GasPremium: big.Int{Int: pack.NewU256([32]byte{}).Int()}, GasLimit: txBuilder.gasLimit.Int().Int64(), @@ -233,7 +233,7 @@ func NewClient(opts ClientOptions) (*Client, error) { // hash. It also returns the number of confirmations for the transaction. func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { // parse the transaction ID to a message ID - msgID, err := cid.Parse(txID.String()) + msgID, err := cid.Parse([]byte(txID)) if err != nil { return nil, pack.NewU64(0), fmt.Errorf("parsing txID: %v", err) } @@ -243,6 +243,10 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack if err != nil { return nil, pack.NewU64(0), fmt.Errorf("searching msg: %v", err) } + if messageLookup == nil { + // FIXME: should this be an error? If the message is not yet found on-chain + return nil, pack.NewU64(0), nil + } // get the most recent tipset and its height headTipset, err := client.node.ChainHead(ctx) diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 83729782..58d18e66 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -10,6 +10,7 @@ import ( filaddress "github.com/filecoin-project/go-address" filtypes "github.com/filecoin-project/lotus/chain/types" + "github.com/ipfs/go-cid" "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/filecoin" @@ -67,10 +68,10 @@ var _ = Describe("Filecoin", func() { Expect(err).NotTo(HaveOccurred()) // construct the transaction builder - gasPrice := pack.NewU256FromU64(pack.NewU64(100)) - gasLimit := pack.NewU256FromU64(pack.NewU64(100000)) + gasPrice := pack.NewU256FromU64(pack.NewU64(10000)) + gasLimit := pack.NewU256FromU64(pack.NewU64(10000000)) amount := pack.NewU256FromU64(pack.NewU64(100)) - nonce := pack.NewU256FromU64(pack.NewU64(0)) + nonce := pack.NewU256FromU64(pack.NewU64(11)) payload := pack.Bytes(nil) filTxBuilder := filecoin.NewTxBuilder(gasPrice, gasLimit) @@ -103,19 +104,19 @@ var _ = Describe("Filecoin", func() { // submit the transaction txHash := tx.Hash() - fmt.Printf("tx = %v\n", tx) - fmt.Printf("txhash = %v\n", txHash) + txID, err := cid.Parse(txHash[:]) + Expect(err).NotTo(HaveOccurred()) + fmt.Printf("msgID = %v\n", txID) err = client.SubmitTx(ctx, tx) Expect(err).ToNot(HaveOccurred()) // wait for the transaction to be included in a block for { - time.Sleep(time.Second) + time.Sleep(2 * time.Second) fetchedTx, confs, err := client.Tx(ctx, txHash) Expect(err).ToNot(HaveOccurred()) - Expect(fetchedTx.Hash().Equal(txHash)).To(BeTrue()) - Expect(confs).To(BeNumerically(">=", 0)) - if confs >= 1 { + if fetchedTx != nil { + Expect(confs).To(BeNumerically(">=", 0)) break } } diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index 3ebd1278..d816630f 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -19,7 +19,7 @@ RUN ./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01 COPY run.sh /root/run.sh COPY miner.key /root/miner.key -COPY miner.key /root/user.key +COPY user.key /root/user.key RUN chmod +x /root/run.sh RUN chmod +x /root/miner.key RUN chmod +x /root/user.key diff --git a/infra/filecoin/run.sh b/infra/filecoin/run.sh index 7c0f8b41..e7bb1213 100644 --- a/infra/filecoin/run.sh +++ b/infra/filecoin/run.sh @@ -13,6 +13,7 @@ sleep 10 ./lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key ./lotus wallet import /root/miner.key + ./lotus wallet import /root/user.key ./lotus auth create-token --perm admin From 48ae34d4bad645296b8ca57f9bf1d69842a191d5 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 4 Sep 2020 00:10:26 +0530 Subject: [PATCH 043/335] (fix) nonce and gas-related params --- chain/filecoin/account.go | 13 +++++++------ chain/filecoin/filecoin_test.go | 15 ++++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index c11dbde3..5ff8af1f 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -134,13 +134,14 @@ func (tx Tx) Serialize() (pack.Bytes, error) { // broadcasted to the filecoin network. The TxBuilder is configured using a // gas price and gas limit. type TxBuilder struct { - gasPrice pack.U256 - gasLimit pack.U256 + gasFeeCap pack.U256 + gasLimit pack.U256 + gasPremium pack.U256 } // NewTxBuilder creates a new transaction builder. -func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { - return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} +func NewTxBuilder(gasFeeCap, gasLimit, gasPremium pack.U256) TxBuilder { + return TxBuilder{gasFeeCap: gasFeeCap, gasLimit: gasLimit, gasPremium: gasPremium} } // BuildTx receives transaction fields and constructs a new transaction. @@ -165,9 +166,9 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ To: filto, Value: big.Int{Int: value.Int()}, Nonce: nonce.Int().Uint64(), - GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, - GasPremium: big.Int{Int: pack.NewU256([32]byte{}).Int()}, + GasFeeCap: big.Int{Int: txBuilder.gasFeeCap.Int()}, GasLimit: txBuilder.gasLimit.Int().Int64(), + GasPremium: big.Int{Int: txBuilder.gasPremium.Int()}, Method: methodNum, Params: payload, }, diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 58d18e66..8ab24c65 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -68,14 +68,15 @@ var _ = Describe("Filecoin", func() { Expect(err).NotTo(HaveOccurred()) // construct the transaction builder - gasPrice := pack.NewU256FromU64(pack.NewU64(10000)) - gasLimit := pack.NewU256FromU64(pack.NewU64(10000000)) - amount := pack.NewU256FromU64(pack.NewU64(100)) - nonce := pack.NewU256FromU64(pack.NewU64(11)) - payload := pack.Bytes(nil) - filTxBuilder := filecoin.NewTxBuilder(gasPrice, gasLimit) + gasFeeCap := pack.NewU256FromU64(pack.NewU64(149838)) + gasLimit := pack.NewU256FromU64(pack.NewU64(495335)) + gasPremium := pack.NewU256FromU64(pack.NewU64(149514)) + filTxBuilder := filecoin.NewTxBuilder(gasFeeCap, gasLimit, gasPremium) // build the transaction + amount := pack.NewU256FromU64(pack.NewU64(100000000)) + nonce := pack.NewU256FromU64(pack.NewU64(0)) + payload := pack.Bytes(nil) tx, err := filTxBuilder.BuildTx( multichain.Address(pack.String(senderFilAddr.String())), multichain.Address(pack.String(recipientFilAddr.String())), @@ -104,7 +105,7 @@ var _ = Describe("Filecoin", func() { // submit the transaction txHash := tx.Hash() - txID, err := cid.Parse(txHash[:]) + txID, err := cid.Parse([]byte(txHash)) Expect(err).NotTo(HaveOccurred()) fmt.Printf("msgID = %v\n", txID) err = client.SubmitTx(ctx, tx) From bd49e9cbc3290cd8a024a21ab93049f1e7d33d06 Mon Sep 17 00:00:00 2001 From: Loong Date: Fri, 4 Sep 2020 14:01:30 +1000 Subject: [PATCH 044/335] add unspentoutput method to utxo clients --- api/utxo/utxo.go | 10 +++++++++- chain/bitcoin/bitcoin.go | 36 ++++++++++++++++++++++++++++++++++- chain/bitcoin/bitcoin_test.go | 9 ++++++++- go.sum | 9 +++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) diff --git a/api/utxo/utxo.go b/api/utxo/utxo.go index 8ae95a2d..11e0c872 100644 --- a/api/utxo/utxo.go +++ b/api/utxo/utxo.go @@ -83,9 +83,17 @@ type Client interface { // Output returns the transaction output identified by the given outpoint. // It also returns the number of confirmations for the output. If the output // cannot be found before the context is done, or the output is invalid, - // then an error should be returned. + // then an error should be returned. This method will not error, even if the + // output has been spent. Output(context.Context, Outpoint) (Output, pack.U64, error) + // UnspentOutput returns the unspent transaction output identified by the + // given outpoint. It also returns the number of confirmations for the + // output. If the output cannot be found before the context is done, the + // output is invalid, or the output has been spent, then an error should be + // returned. + UnspentOutput(context.Context, Outpoint) (Output, pack.U64, error) + // SubmitTx to the underlying chain. If the transaction cannot be found // before the context is done, or the transaction is invalid, then an error // should be returned. diff --git a/chain/bitcoin/bitcoin.go b/chain/bitcoin/bitcoin.go index 6840651d..ca66dc25 100644 --- a/chain/bitcoin/bitcoin.go +++ b/chain/bitcoin/bitcoin.go @@ -111,7 +111,7 @@ func (client *client) Output(ctx context.Context, outpoint utxo.Outpoint) (utxo. hash := chainhash.Hash{} copy(hash[:], outpoint.Hash) if err := client.send(ctx, &resp, "getrawtransaction", hash.String(), 1); err != nil { - return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad \"gettxout\": %v", err) + return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad \"getrawtransaction\": %v", err) } if outpoint.Index.Uint32() >= uint32(len(resp.Vout)) { return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad index: %v is out of range", outpoint.Index) @@ -136,6 +136,40 @@ func (client *client) Output(ctx context.Context, outpoint utxo.Outpoint) (utxo. return output, pack.NewU64(resp.Confirmations), nil } +// UnspentOutput returns the unspent transaction output identified by the +// given outpoint. It also returns the number of confirmations for the +// output. If the output cannot be found before the context is done, the +// output is invalid, or the output has been spent, then an error should be +// returned. +func (client *client) UnspentOutput(ctx context.Context, outpoint utxo.Outpoint) (utxo.Output, pack.U64, error) { + resp := btcjson.GetTxOutResult{} + hash := chainhash.Hash{} + copy(hash[:], outpoint.Hash) + if err := client.send(ctx, &resp, "gettxout", hash.String(), outpoint.Index.Uint32()); err != nil { + return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad \"gettxout\": %v", err) + } + amount, err := btcutil.NewAmount(resp.Value) + if err != nil { + return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad amount: %v", err) + } + if amount < 0 { + return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad amount: %v", amount) + } + if resp.Confirmations < 0 { + return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad confirmations: %v", resp.Confirmations) + } + pubKeyScript, err := hex.DecodeString(resp.ScriptPubKey.Hex) + if err != nil { + return utxo.Output{}, pack.NewU64(0), fmt.Errorf("bad pubkey script: %v", err) + } + output := utxo.Output{ + Outpoint: outpoint, + Value: pack.NewU256FromU64(pack.NewU64(uint64(amount))), + PubKeyScript: pack.NewBytes(pubKeyScript), + } + return output, pack.NewU64(uint64(resp.Confirmations)), nil +} + // SubmitTx to the Bitcoin network. func (client *client) SubmitTx(ctx context.Context, tx utxo.Tx) error { serial, err := tx.Serialize() diff --git a/chain/bitcoin/bitcoin_test.go b/chain/bitcoin/bitcoin_test.go index 690f70a6..a0a72bd6 100644 --- a/chain/bitcoin/bitcoin_test.go +++ b/chain/bitcoin/bitcoin_test.go @@ -59,6 +59,9 @@ var _ = Describe("Bitcoin", func() { output2, _, err := client.Output(context.Background(), output.Outpoint) Expect(err).ToNot(HaveOccurred()) Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) + output2, _, err = client.UnspentOutput(context.Background(), output.Outpoint) + Expect(err).ToNot(HaveOccurred()) + Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) // Build the transaction by consuming the outputs and spending // them to a set of recipients. @@ -122,11 +125,15 @@ var _ = Describe("Bitcoin", func() { confs, err := client.Confirmations(context.Background(), txHash) Expect(err).ToNot(HaveOccurred()) log.Printf(" %v/3 confirmations", confs) - if confs >= 3 { + if confs >= 1 { break } time.Sleep(10 * time.Second) } + ctxWithTimeout, cancelCtxWithTimeout := context.WithTimeout(context.Background(), time.Second) + defer cancelCtxWithTimeout() + _, _, err = client.UnspentOutput(ctxWithTimeout, output.Outpoint) + Expect(err).To(HaveOccurred()) // Check that we can load the output and that it is equal. // Otherwise, something strange is happening with the RPC diff --git a/go.sum b/go.sum index 690ddb94..9e5e089c 100644 --- a/go.sum +++ b/go.sum @@ -67,6 +67,7 @@ github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6Ro github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= @@ -117,9 +118,13 @@ github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+q github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd h1:qdGvebPBDuYDPGi1WCPjy1tGyMpmDK8IEapSsszn7HE= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723 h1:ZA/jbKoGcVAnER6pCHPEkGdZOV7U1oLUedErBHCUMs0= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= @@ -172,6 +177,7 @@ github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3E github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= @@ -602,6 +608,7 @@ github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZl github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= @@ -609,6 +616,7 @@ github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+ github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= @@ -632,6 +640,7 @@ github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFC github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= From 9f60bb7385432d49960e9a4465167ac2f8c506a3 Mon Sep 17 00:00:00 2001 From: Janet Liang Date: Fri, 4 Sep 2020 13:18:19 -0700 Subject: [PATCH 045/335] [api] Address API EncodeDecoder implementation --- chain/harmony/address.go | 47 +- go.mod | 30 +- go.sum | 1464 +------------------------------------- 3 files changed, 73 insertions(+), 1468 deletions(-) diff --git a/chain/harmony/address.go b/chain/harmony/address.go index 66d37d46..366fbdbf 100644 --- a/chain/harmony/address.go +++ b/chain/harmony/address.go @@ -1 +1,46 @@ -package harmony \ No newline at end of file +package harmony + +import ( + "github.com/btcsuite/btcutil/bech32" + "github.com/renproject/multichain/api/address" +) + +type EncoderDecoder struct { + address.Encoder + address.Decoder +} + +func NewEncoderDecoder() address.EncodeDecoder { + return EncoderDecoder{ + Encoder: NewEncoder(), + Decoder: NewDecoder(), + } +} + +type Encoder struct {} + +func (Encoder) EncodeAddress(addr address.RawAddress) (address.Address, error) { + encodedAddr, err := bech32.ConvertBits(addr, 8, 5, true) + if err != nil { + return nil, err + } + return address.Address(encodedAddr), nil +} + +type Decoder struct {} + +func (Decoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + _, decodedAddr, err := bech32.Decode(string(addr)) + if err != nil { + return nil, err + } + return decodedAddr[:], nil +} + +func NewEncoder() address.Encoder { + return Encoder{} +} + +func NewDecoder() address.Decoder { + return Decoder{} +} \ No newline at end of file diff --git a/go.mod b/go.mod index 9d1029f0..01a18591 100644 --- a/go.mod +++ b/go.mod @@ -6,32 +6,22 @@ require ( github.com/btcsuite/btcd v0.20.1-beta github.com/btcsuite/btcutil v1.0.2 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf - github.com/cosmos/cosmos-sdk v0.39.1 - github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect github.com/ethereum/go-ethereum v1.9.19 - github.com/filecoin-project/go-address v0.0.3 - github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect - github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-bitfield v0.1.0 // indirect - github.com/filecoin-project/go-data-transfer v0.5.0 // indirect - github.com/filecoin-project/go-fil-markets v0.3.2 // indirect - github.com/filecoin-project/lotus v0.4.1 - github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect - github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 - github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect - github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect - github.com/ipfs/go-hamt-ipld v0.1.1 // indirect - github.com/lib/pq v1.7.0 // indirect - github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 + github.com/kr/pretty v0.2.0 // indirect github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 - github.com/raulk/clock v1.1.0 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 github.com/renproject/surge v1.2.5 - github.com/tendermint/tendermint v0.33.8 - github.com/terra-project/core v0.3.7 - github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect + github.com/stretchr/testify v1.6.1 // indirect go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect + golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect + golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/protobuf v1.24.0 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + honnef.co/go/tools v0.0.1-2020.1.3 // indirect ) diff --git a/go.sum b/go.sum index 690ddb94..9d3c7e91 100644 --- a/go.sum +++ b/go.sum @@ -1,39 +1,4 @@ -bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -contrib.go.opencensus.io/exporter/jaeger v0.1.0/go.mod h1:VYianECmuFPwU37O699Vc1GOcy+y8kOsfaxHRImmjbA= -contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= -github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -47,73 +12,23 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= -github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= -github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= -github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.32.11/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= -github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= -github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= -github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= @@ -122,1004 +37,127 @@ github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVa github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.2.1-0.20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.37.14/go.mod h1:qKU3AzVJ0GGWARqImZj24CIX35Q4nJEE+WrXVU/CzFo= -github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= -github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= -github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= -github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= -github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= -github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= -github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= -github.com/dgraph-io/badger/v2 v2.0.3/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM= -github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= -github.com/drand/drand v0.9.2-0.20200616080806-a94e9c1636a4/go.mod h1:Bu8QYdU0YdB2ZQZezHxabmOIciddiwLRnyV4nuZ2HQE= -github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4/go.mod h1:SnqWL9jksIMK63UKkfmWI6f9PDN8ROoCgg+Z4zWk7hg= -github.com/drand/kyber v1.0.1-0.20200110225416-8de27ed8c0e2/go.mod h1:UpXoA0Upd1N9l4TvRPHr1qAUBBERj6JQ/mnKI3BPEmw= -github.com/drand/kyber v1.0.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.0/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.1/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber-bls12381 v0.1.0/go.mod h1:N1emiHpm+jj7kMlxEbu3MUyOiooTgNySln564cgD9mk= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= github.com/ethereum/go-ethereum v1.9.19 h1:c9IrhzqPKY+ZkS/YhXCO3rgNzlxsVrCYIRvrIAFmIWM= github.com/ethereum/go-ethereum v1.9.19/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= -github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= -github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200615191232-6be1a8c6ed09/go.mod h1:HEJn6kOXMNhCNBYNTO/lrEI7wSgqCOR6hN5ecfYUnC8= -github.com/filecoin-project/filecoin-ffi v0.0.0-20200326153646-e899cc1dd072/go.mod h1:PtH9YP0rURHUKHrKeEBeWg/BqIBMQOz8wtlXlVGREBE= -github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d/go.mod h1:vlQ7sDkbrtM70QMJFDvEyTDywY5SvIjadRCUB+76l90= -github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= -github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef/go.mod h1:SrA+pWVoUivqKOfC+ckVYbx41hWz++HxJcrlmHNnebU= -github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc/go.mod h1:KsFPWjF+UUYl6n9A+qbg4bjFgAOneicFZtDH/LQEX2U= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= -github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= -github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.1.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-data-transfer v0.3.0/go.mod h1:cONglGP4s/d+IUQw5mWZrQK+FQATQxr3AXzi4dRh0l4= -github.com/filecoin-project/go-data-transfer v0.5.0/go.mod h1:7yckbsPPMGuN3O1+SYNE/lowwheaUn5woGILpjN52UI= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= -github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= -github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= -github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= -github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200619205156-c7bf525c06ef/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= -github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= -github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlSclQamx+sQDKRMI= -github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= -github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= -github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= -github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= -github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= -github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= -github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -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= -github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1/go.mod h1:0eHX/BVySxPc6SE2mZRoppGq7qcEagxdmQnA3dzork8= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3vH7VqgtMxQ= -github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= -github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= -github.com/gxed/pubsub v0.0.0-20180201040156-26ebdf44f824/go.mod h1:OiEWyHgK+CWrmOlVquHaIK1vhpUJydC9m0Je6mhaiNE= -github.com/hannahhoward/cbor-gen-for v0.0.0-20191218204337-9ab7b1bcc099/go.mod h1:WVPCl0HO/0RAL5+vBH2GMxBomlxBF70MAS78+Lu1//k= -github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= -github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+gRZDtmTJkAs= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= -github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg= -github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis= -github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= -github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= -github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.8/go.mod h1:2Yjog0GMdH8+AsxkE0DI9D2mANaUTxbVVav0pPoZoug= -github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= -github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= -github.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI= -github.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So= -github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= -github.com/ipfs/go-blockservice v0.1.3/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= -github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= -github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.4-0.20191112011718-79e75dffeb10/go.mod h1:/BYOuUoxkE+0f6tGzlzMvycuN+5l35VOR4Bpg2sCmds= -github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= -github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= -github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= -github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= -github.com/ipfs/go-ds-badger v0.0.7/go.mod h1:qt0/fWzZDoPW6jpQeqUjR5kBfhDNB65jd9YlmAvpQBk= -github.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9DrGVwx/NOwE= -github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= -github.com/ipfs/go-ds-badger2 v0.1.0/go.mod h1:pbR1p817OZbdId9EvLOhKBgUVTM3BMCSTan78lDDVaw= -github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e/go.mod h1:lJnws7amT9Ehqzta0gwMrRsURU04caT0iRPr1W8AsOU= -github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= -github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZCg+cSZvYb8= -github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= -github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= -github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY= -github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= -github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= -github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200501020327-d53d20a7063e/go.mod h1:giiPqWYCnRBYpNTsJ/EX1ojldX5kTXrXYckSJQ7ko9M= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200605182717-0310ad2b0b1f/go.mod h1:phOFBB7W73N9dg1glcb1fQ9HtQFDUpeyJgatW8ns0bw= -github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= -github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= -github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= -github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= -github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= -github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= -github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= -github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= -github.com/ipfs/go-ipfs-cmds v0.1.0/go.mod h1:TiK4e7/V31tuEb8YWDF8lN3qrnDH+BS7ZqWIeYJlAs8= -github.com/ipfs/go-ipfs-config v0.0.11/go.mod h1:wveA8UT5ywN26oKStByzmz1CO6cXwLKKM6Jn/Hfw08I= -github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= -github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= -github.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE= -github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= -github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= -github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= -github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= -github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= -github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= -github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= -github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= -github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= -github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= -github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= -github.com/ipfs/go-ipld-cbor v0.0.1/go.mod h1:RXHr8s4k0NE0TKhnrxqZC9M888QfsBN9rhS5NjfKzY8= -github.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= -github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= -github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= -github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= -github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= -github.com/ipfs/go-ipns v0.0.2/go.mod h1:WChil4e0/m9cIINWLxZe1Jtf77oz5L05rO2ei/uKJ5U= -github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= -github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= -github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= -github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= -github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= -github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= -github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= -github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= -github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= -github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= -github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= -github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= -github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= -github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= -github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ= -github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY= -github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= -github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= -github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= -github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= -github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= -github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= -github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= -github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= -github.com/ipld/go-car v0.1.1-0.20200429200904-c222d793c339/go.mod h1:eajxljm6I8o3LitnFeVEmucwZmz7+yLSiKce9yYMefg= -github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= -github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= -github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= -github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= -github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= -github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= -github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= -github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM9UuLw1tXnhJWN3piypTUO3vCIHYmG15KE/dU= -github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= -github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= -github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= -github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kabukky/httpscerts v0.0.0-20150320125433-617593d7dcb3/go.mod h1:BYpt4ufZiIGv2nXn4gMxnfKV306n3mWXgNu/d2TqdTU= -github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= -github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= -github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= -github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= -github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= -github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= -github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= -github.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= -github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= -github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= -github.com/libp2p/go-eventbus v0.0.2/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk= -github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= -github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= -github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= -github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p v0.0.2/go.mod h1:Qu8bWqFXiocPloabFGUcVG4kk94fLvfC8mWTDdFC9wE= -github.com/libp2p/go-libp2p v0.0.30/go.mod h1:XWT8FGHlhptAv1+3V/+J5mEpzyui/5bvFsNuWYs611A= -github.com/libp2p/go-libp2p v0.1.0/go.mod h1:6D/2OBauqLUoqcADOJpn9WbKqvaM07tDw68qHM0BxUM= -github.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8= -github.com/libp2p/go-libp2p v0.3.1/go.mod h1:e6bwxbdYH1HqWTz8faTChKGR0BjPc8p+6SyP8GTTR7Y= -github.com/libp2p/go-libp2p v0.4.0/go.mod h1:9EsEIf9p2UDuwtPd0DwJsAl0qXVxgAnuDGRvHbfATfI= -github.com/libp2p/go-libp2p v0.6.0/go.mod h1:mfKWI7Soz3ABX+XEBR61lGbg+ewyMtJHVt043oWeqwg= -github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZkfEI5sT54= -github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= -github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= -github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= -github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQqBbYJ+BnA= -github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= -github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= -github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= -github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= -github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= -github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= -github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE= -github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI= -github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= -github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= -github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= -github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= -github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= -github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= -github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= -github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= -github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= -github.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE= -github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= -github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= -github.com/libp2p/go-libp2p-circuit v0.1.1/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= -github.com/libp2p/go-libp2p-circuit v0.1.3/go.mod h1:Xqh2TjSy8DD5iV2cCOMzdynd6h8OTBGoV1AWbWor3qM= -github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= -github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= -github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= -github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= -github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= -github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= -github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= -github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= -github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= -github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= -github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= -github.com/libp2p/go-libp2p-core v0.0.6/go.mod h1:0d9xmaYAVY5qmbp/fcgxHT3ZJsLjYeYPMJAUKpaCHrE= -github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= -github.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0= -github.com/libp2p/go-libp2p-core v0.2.3/go.mod h1:GqhyQqyIAPsxFYXHMjfXgMv03lxsvM0mFzuYA9Ib42A= -github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= -github.com/libp2p/go-libp2p-core v0.2.5/go.mod h1:6+5zJmKhsf7yHn1RbmYDu08qDUpIUxGdqHuEZckmZOA= -github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= -github.com/libp2p/go-libp2p-core v0.3.1/go.mod h1:thvWy0hvaSBhnVBaW37BvzgVV68OUhgJJLAa6almrII= -github.com/libp2p/go-libp2p-core v0.4.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= -github.com/libp2p/go-libp2p-core v0.5.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= -github.com/libp2p/go-libp2p-core v0.5.1/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.2/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.3/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM= -github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= -github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= -github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= -github.com/libp2p/go-libp2p-daemon v0.2.2/go.mod h1:kyrpsLB2JeNYR2rvXSVWyY0iZuRIMhqzWR3im9BV6NQ= -github.com/libp2p/go-libp2p-discovery v0.0.1/go.mod h1:ZkkF9xIFRLA1xCc7bstYFkd80gBGK8Fc1JqGoU2i+zI= -github.com/libp2p/go-libp2p-discovery v0.0.5/go.mod h1:YtF20GUxjgoKZ4zmXj8j3Nb2TUSBHFlOCetzYdbZL5I= -github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFTGElt8HnoDzwkFZm29g= -github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= -github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= -github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= -github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= -github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= -github.com/libp2p/go-libp2p-kad-dht v0.2.1/go.mod h1:k7ONOlup7HKzQ68dE6lSnp07cdxdkmnRa+6B4Fh9/w0= -github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= -github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= -github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= -github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= -github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= -github.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08= -github.com/libp2p/go-libp2p-mplex v0.1.1/go.mod h1:KUQWpGkCzfV7UIpi8SKsAVxyBgz1c9R5EvxgnwLsb/I= -github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3g+OtR+EMMODbKo= -github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= -github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= -github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= -github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= -github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= -github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= -github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= -github.com/libp2p/go-libp2p-net v0.0.1/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= -github.com/libp2p/go-libp2p-net v0.0.2/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= -github.com/libp2p/go-libp2p-netutil v0.0.1/go.mod h1:GdusFvujWZI9Vt0X5BKqwWWmZFxecf9Gt03cKxm2f/Q= -github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= -github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo= -github.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es= -github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY= -github.com/libp2p/go-libp2p-peerstore v0.0.1/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= -github.com/libp2p/go-libp2p-peerstore v0.0.6/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= -github.com/libp2p/go-libp2p-peerstore v0.1.0/go.mod h1:2CeHkQsr8svp4fZ+Oi9ykN1HBb6u0MOvdJ7YIsmcwtY= -github.com/libp2p/go-libp2p-peerstore v0.1.3/go.mod h1:BJ9sHlm59/80oSkpWgr1MyY1ciXAXV397W6h1GH/uKI= -github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= -github.com/libp2p/go-libp2p-peerstore v0.2.0/go.mod h1:N2l3eVIeAitSg3Pi2ipSrJYnqhVnMNQZo9nkSCuAbnQ= -github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= -github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= -github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= -github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= -github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= -github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= -github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q= -github.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= -github.com/libp2p/go-libp2p-pubsub v0.3.2/go.mod h1:Uss7/Cfz872KggNb+doCVPHeCDmXB7z500m/R8DaAUk= -github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= -github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= -github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= -github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= -github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= -github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= -github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= -github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE= -github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= -github.com/libp2p/go-libp2p-secio v0.0.1/go.mod h1:IdG6iQybdcYmbTzxp4J5dwtUEDTOvZrT0opIDVNPrJs= -github.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0= -github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= -github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= -github.com/libp2p/go-libp2p-secio v0.2.1/go.mod h1:cWtZpILJqkqrSkiYcDBh5lA3wbT2Q+hz3rJQq3iftD8= -github.com/libp2p/go-libp2p-secio v0.2.2/go.mod h1:wP3bS+m5AUnFA+OFO7Er03uO1mncHG0uVwGrwvjYlNY= -github.com/libp2p/go-libp2p-swarm v0.0.1/go.mod h1:mh+KZxkbd3lQnveQ3j2q60BM1Cw2mX36XXQqwfPOShs= -github.com/libp2p/go-libp2p-swarm v0.0.6/go.mod h1:s5GZvzg9xXe8sbeESuFpjt8CJPTCa8mhEusweJqyFy8= -github.com/libp2p/go-libp2p-swarm v0.1.0/go.mod h1:wQVsCdjsuZoc730CgOvh5ox6K8evllckjebkdiY5ta4= -github.com/libp2p/go-libp2p-swarm v0.2.1/go.mod h1:x07b4zkMFo2EvgPV2bMTlNmdQc8i+74Jjio7xGvsTgU= -github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaTNyBcHImCxRpPKU= -github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= -github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= -github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= -github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= -github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= -github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= -github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= -github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= -github.com/libp2p/go-libp2p-transport v0.0.5/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= -github.com/libp2p/go-libp2p-transport-upgrader v0.0.1/go.mod h1:NJpUAgQab/8K6K0m+JmZCe5RUXG10UMEx4kWe9Ipj5c= -github.com/libp2p/go-libp2p-transport-upgrader v0.0.4/go.mod h1:RGq+tupk+oj7PzL2kn/m1w6YXxcIAYJYeI90h6BGgUc= -github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= -github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= -github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8= -github.com/libp2p/go-libp2p-yamux v0.1.3/go.mod h1:VGSQVrqkh6y4nm0189qqxMtvyBft44MOYYPpYKXiVt4= -github.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8= -github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI= -github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= -github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= -github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= -github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= -github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= -github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= -github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= -github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= -github.com/libp2p/go-mplex v0.0.1/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= -github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= -github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= -github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= -github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= -github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= -github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= -github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= -github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= -github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= -github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= -github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= -github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= -github.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqXJyFvB0mR4A04sQ= -github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw= -github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= -github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= -github.com/libp2p/go-tcp-transport v0.0.1/go.mod h1:mnjg0o0O5TmXUaUIanYPUqkW4+u6mK0en8rlpA6BBTs= -github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o= -github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= -github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= -github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= -github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= -github.com/libp2p/go-ws-transport v0.0.1/go.mod h1:p3bKjDWHEgtuKKj+2OdPYs5dAPIjtpQGHF2tJfGz7Ww= -github.com/libp2p/go-ws-transport v0.0.5/go.mod h1:Qbl4BxPfXXhhd/o0wcrgoaItHqA9tnZjoFZnxykuaXU= -github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo= -github.com/libp2p/go-ws-transport v0.1.2/go.mod h1:dsh2Ld8F+XNmzpkaAijmg5Is+e9l6/1tK/6VFOdN69Y= -github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= -github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= -github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= -github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= -github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= -github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= -github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= -github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= -github.com/marten-seemann/qtls v0.9.1/go.mod h1:T1MmAdDPyISzxlK6kjRr0pcZFBVd1OZbBb/j3cvzHhk= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= -github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= -github.com/mdlayher/netlink v0.0.0-20190828143259-340058475d09/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= -github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= -github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= -github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= -github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= -github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.0.4/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= -github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= -github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= -github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.0.3/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.1.0/go.mod h1:01k2RAqtoXIuPa3DCavAE9/6jc6nM0H3EgZyfUhN2oY= -github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= -github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= -github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= -github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= -github.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= -github.com/multiformats/go-multiaddr-net v0.1.1/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= -github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQKME1qHfpYmyIjFVsSOY6Y= -github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= -github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= -github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= -github.com/multiformats/go-multihash v0.0.7/go.mod h1:XuKXPp8VHcTygube3OWZC+aZrA+H1IhmjoCDtJc7PXM= -github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= -github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c/go.mod h1:7qN3Y0BvzRUf4LofcoJplQL10lsFDb4PYlePTVwrP28= -github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= -github.com/opentracing-contrib/go-grpc v0.0.0-20191001143057-db30781987df/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= -github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/otiai10/copy v1.0.2/go.mod h1:c7RpqBkwMom4bYTSkLSym4VSJz/XtncWRAj/J4PEIMY= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= -github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.1.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= @@ -1128,558 +166,113 @@ github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20 github.com/renproject/surge v1.2.5 h1:P2qKZxWiKrC8hw7in/hXVtic+dGkhd1M0H/1Lj+fJnw= github.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= -github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= -github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= -github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= -github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.13/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= -github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.8/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= -github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= -github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= -github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= -github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= -github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY= -github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= -github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= -github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= -github.com/whyrusleeping/cbor-gen v0.0.0-20190917003517-d78d67427694/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20191212224538-d370462a7e8a/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200206220010-03c9665e2a66/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200402171437-3d27c146c105/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501014322-5f9941ef88e0/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501232601-351665a6e756/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= -github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= -github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= -github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= -github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= -github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= -github.com/whyrusleeping/go-logging v0.0.1/go.mod h1:lDPYj54zutzG1XYfHAhcc7oNXEburHQBn+Iqd4yS4vE= -github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8= -github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible/go.mod h1:34LEDbeKFZInPUrAG+bjuJmUXONGdEFW7XL0SpTY1y4= -github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible/go.mod h1:dRWHHvc4HDQSHh9gbKEBbUZ+f2Q8iZTPG3UOGYODxSQ= -github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= -github.com/whyrusleeping/go-smux-yamux v2.0.9+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= -github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= -github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= -github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= -github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= -github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= -github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= -github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= -github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= -go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= -go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg= -go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= -go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= -go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= -go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= -go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20190218023631-ce4c26f7be8e/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20190313082347-94abd6928b1d/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190228165749-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190302025703-b6889370fb10/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190524122548-abf6ff778158/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190524152521-dbbf3f1254d4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025090151-53bf42e6b339/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200427175716-29b57079015a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181130052023-1c3d964395ce/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108195415-316d2f248479/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 h1:kDtqNkeBrZb8B+atrj50B5XLHpzXXqcCdZPP/ApQ5NY= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200617041141-9a465503579e/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1688,53 +281,30 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8= -gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= From 05204a98c791928571447249c863a6885318c45f Mon Sep 17 00:00:00 2001 From: Janet Liang Date: Fri, 4 Sep 2020 13:18:19 -0700 Subject: [PATCH 046/335] [api] Address API EncodeDecoder implementation --- chain/harmony/address.go | 47 +- go.mod | 30 +- go.sum | 1464 +------------------------------------- 3 files changed, 73 insertions(+), 1468 deletions(-) diff --git a/chain/harmony/address.go b/chain/harmony/address.go index 66d37d46..366fbdbf 100644 --- a/chain/harmony/address.go +++ b/chain/harmony/address.go @@ -1 +1,46 @@ -package harmony \ No newline at end of file +package harmony + +import ( + "github.com/btcsuite/btcutil/bech32" + "github.com/renproject/multichain/api/address" +) + +type EncoderDecoder struct { + address.Encoder + address.Decoder +} + +func NewEncoderDecoder() address.EncodeDecoder { + return EncoderDecoder{ + Encoder: NewEncoder(), + Decoder: NewDecoder(), + } +} + +type Encoder struct {} + +func (Encoder) EncodeAddress(addr address.RawAddress) (address.Address, error) { + encodedAddr, err := bech32.ConvertBits(addr, 8, 5, true) + if err != nil { + return nil, err + } + return address.Address(encodedAddr), nil +} + +type Decoder struct {} + +func (Decoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + _, decodedAddr, err := bech32.Decode(string(addr)) + if err != nil { + return nil, err + } + return decodedAddr[:], nil +} + +func NewEncoder() address.Encoder { + return Encoder{} +} + +func NewDecoder() address.Decoder { + return Decoder{} +} \ No newline at end of file diff --git a/go.mod b/go.mod index 9d1029f0..01a18591 100644 --- a/go.mod +++ b/go.mod @@ -6,32 +6,22 @@ require ( github.com/btcsuite/btcd v0.20.1-beta github.com/btcsuite/btcutil v1.0.2 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf - github.com/cosmos/cosmos-sdk v0.39.1 - github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect github.com/ethereum/go-ethereum v1.9.19 - github.com/filecoin-project/go-address v0.0.3 - github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect - github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-bitfield v0.1.0 // indirect - github.com/filecoin-project/go-data-transfer v0.5.0 // indirect - github.com/filecoin-project/go-fil-markets v0.3.2 // indirect - github.com/filecoin-project/lotus v0.4.1 - github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect - github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 - github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect - github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect - github.com/ipfs/go-hamt-ipld v0.1.1 // indirect - github.com/lib/pq v1.7.0 // indirect - github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 + github.com/kr/pretty v0.2.0 // indirect github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 - github.com/raulk/clock v1.1.0 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 github.com/renproject/surge v1.2.5 - github.com/tendermint/tendermint v0.33.8 - github.com/terra-project/core v0.3.7 - github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect + github.com/stretchr/testify v1.6.1 // indirect go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect + golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect + golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/protobuf v1.24.0 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + honnef.co/go/tools v0.0.1-2020.1.3 // indirect ) diff --git a/go.sum b/go.sum index 690ddb94..9d3c7e91 100644 --- a/go.sum +++ b/go.sum @@ -1,39 +1,4 @@ -bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -contrib.go.opencensus.io/exporter/jaeger v0.1.0/go.mod h1:VYianECmuFPwU37O699Vc1GOcy+y8kOsfaxHRImmjbA= -contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= -github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -47,73 +12,23 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= -github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= -github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= -github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.32.11/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= -github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= -github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= -github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= @@ -122,1004 +37,127 @@ github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVa github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.2.1-0.20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.37.14/go.mod h1:qKU3AzVJ0GGWARqImZj24CIX35Q4nJEE+WrXVU/CzFo= -github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= -github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= -github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= -github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= -github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= -github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= -github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= -github.com/dgraph-io/badger/v2 v2.0.3/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM= -github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= -github.com/drand/drand v0.9.2-0.20200616080806-a94e9c1636a4/go.mod h1:Bu8QYdU0YdB2ZQZezHxabmOIciddiwLRnyV4nuZ2HQE= -github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4/go.mod h1:SnqWL9jksIMK63UKkfmWI6f9PDN8ROoCgg+Z4zWk7hg= -github.com/drand/kyber v1.0.1-0.20200110225416-8de27ed8c0e2/go.mod h1:UpXoA0Upd1N9l4TvRPHr1qAUBBERj6JQ/mnKI3BPEmw= -github.com/drand/kyber v1.0.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.0/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.1/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber-bls12381 v0.1.0/go.mod h1:N1emiHpm+jj7kMlxEbu3MUyOiooTgNySln564cgD9mk= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= github.com/ethereum/go-ethereum v1.9.19 h1:c9IrhzqPKY+ZkS/YhXCO3rgNzlxsVrCYIRvrIAFmIWM= github.com/ethereum/go-ethereum v1.9.19/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= -github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= -github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200615191232-6be1a8c6ed09/go.mod h1:HEJn6kOXMNhCNBYNTO/lrEI7wSgqCOR6hN5ecfYUnC8= -github.com/filecoin-project/filecoin-ffi v0.0.0-20200326153646-e899cc1dd072/go.mod h1:PtH9YP0rURHUKHrKeEBeWg/BqIBMQOz8wtlXlVGREBE= -github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d/go.mod h1:vlQ7sDkbrtM70QMJFDvEyTDywY5SvIjadRCUB+76l90= -github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= -github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef/go.mod h1:SrA+pWVoUivqKOfC+ckVYbx41hWz++HxJcrlmHNnebU= -github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc/go.mod h1:KsFPWjF+UUYl6n9A+qbg4bjFgAOneicFZtDH/LQEX2U= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= -github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= -github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.1.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-data-transfer v0.3.0/go.mod h1:cONglGP4s/d+IUQw5mWZrQK+FQATQxr3AXzi4dRh0l4= -github.com/filecoin-project/go-data-transfer v0.5.0/go.mod h1:7yckbsPPMGuN3O1+SYNE/lowwheaUn5woGILpjN52UI= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= -github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= -github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= -github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= -github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200619205156-c7bf525c06ef/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= -github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= -github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlSclQamx+sQDKRMI= -github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= -github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= -github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= -github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= -github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= -github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= -github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -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= -github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1/go.mod h1:0eHX/BVySxPc6SE2mZRoppGq7qcEagxdmQnA3dzork8= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3vH7VqgtMxQ= -github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= -github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= -github.com/gxed/pubsub v0.0.0-20180201040156-26ebdf44f824/go.mod h1:OiEWyHgK+CWrmOlVquHaIK1vhpUJydC9m0Je6mhaiNE= -github.com/hannahhoward/cbor-gen-for v0.0.0-20191218204337-9ab7b1bcc099/go.mod h1:WVPCl0HO/0RAL5+vBH2GMxBomlxBF70MAS78+Lu1//k= -github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= -github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+gRZDtmTJkAs= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= -github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg= -github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis= -github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= -github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= -github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.8/go.mod h1:2Yjog0GMdH8+AsxkE0DI9D2mANaUTxbVVav0pPoZoug= -github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= -github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= -github.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI= -github.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So= -github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= -github.com/ipfs/go-blockservice v0.1.3/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= -github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= -github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.4-0.20191112011718-79e75dffeb10/go.mod h1:/BYOuUoxkE+0f6tGzlzMvycuN+5l35VOR4Bpg2sCmds= -github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= -github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= -github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= -github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= -github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= -github.com/ipfs/go-ds-badger v0.0.7/go.mod h1:qt0/fWzZDoPW6jpQeqUjR5kBfhDNB65jd9YlmAvpQBk= -github.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9DrGVwx/NOwE= -github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= -github.com/ipfs/go-ds-badger2 v0.1.0/go.mod h1:pbR1p817OZbdId9EvLOhKBgUVTM3BMCSTan78lDDVaw= -github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e/go.mod h1:lJnws7amT9Ehqzta0gwMrRsURU04caT0iRPr1W8AsOU= -github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= -github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZCg+cSZvYb8= -github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= -github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= -github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY= -github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= -github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= -github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200501020327-d53d20a7063e/go.mod h1:giiPqWYCnRBYpNTsJ/EX1ojldX5kTXrXYckSJQ7ko9M= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200605182717-0310ad2b0b1f/go.mod h1:phOFBB7W73N9dg1glcb1fQ9HtQFDUpeyJgatW8ns0bw= -github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= -github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= -github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= -github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= -github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= -github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= -github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= -github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= -github.com/ipfs/go-ipfs-cmds v0.1.0/go.mod h1:TiK4e7/V31tuEb8YWDF8lN3qrnDH+BS7ZqWIeYJlAs8= -github.com/ipfs/go-ipfs-config v0.0.11/go.mod h1:wveA8UT5ywN26oKStByzmz1CO6cXwLKKM6Jn/Hfw08I= -github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= -github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= -github.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE= -github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= -github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= -github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= -github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= -github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= -github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= -github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= -github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= -github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= -github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= -github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= -github.com/ipfs/go-ipld-cbor v0.0.1/go.mod h1:RXHr8s4k0NE0TKhnrxqZC9M888QfsBN9rhS5NjfKzY8= -github.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= -github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= -github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= -github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= -github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= -github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= -github.com/ipfs/go-ipns v0.0.2/go.mod h1:WChil4e0/m9cIINWLxZe1Jtf77oz5L05rO2ei/uKJ5U= -github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= -github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= -github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= -github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= -github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= -github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= -github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= -github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= -github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= -github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= -github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= -github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= -github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= -github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= -github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ= -github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY= -github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= -github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= -github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= -github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= -github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= -github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= -github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= -github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= -github.com/ipld/go-car v0.1.1-0.20200429200904-c222d793c339/go.mod h1:eajxljm6I8o3LitnFeVEmucwZmz7+yLSiKce9yYMefg= -github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= -github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= -github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= -github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= -github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= -github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= -github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= -github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM9UuLw1tXnhJWN3piypTUO3vCIHYmG15KE/dU= -github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= -github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= -github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= -github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kabukky/httpscerts v0.0.0-20150320125433-617593d7dcb3/go.mod h1:BYpt4ufZiIGv2nXn4gMxnfKV306n3mWXgNu/d2TqdTU= -github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= -github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= -github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= -github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= -github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= -github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= -github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= -github.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= -github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= -github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= -github.com/libp2p/go-eventbus v0.0.2/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk= -github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= -github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= -github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= -github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p v0.0.2/go.mod h1:Qu8bWqFXiocPloabFGUcVG4kk94fLvfC8mWTDdFC9wE= -github.com/libp2p/go-libp2p v0.0.30/go.mod h1:XWT8FGHlhptAv1+3V/+J5mEpzyui/5bvFsNuWYs611A= -github.com/libp2p/go-libp2p v0.1.0/go.mod h1:6D/2OBauqLUoqcADOJpn9WbKqvaM07tDw68qHM0BxUM= -github.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8= -github.com/libp2p/go-libp2p v0.3.1/go.mod h1:e6bwxbdYH1HqWTz8faTChKGR0BjPc8p+6SyP8GTTR7Y= -github.com/libp2p/go-libp2p v0.4.0/go.mod h1:9EsEIf9p2UDuwtPd0DwJsAl0qXVxgAnuDGRvHbfATfI= -github.com/libp2p/go-libp2p v0.6.0/go.mod h1:mfKWI7Soz3ABX+XEBR61lGbg+ewyMtJHVt043oWeqwg= -github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZkfEI5sT54= -github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= -github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= -github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= -github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQqBbYJ+BnA= -github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= -github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= -github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= -github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= -github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= -github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= -github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE= -github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI= -github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= -github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= -github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= -github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= -github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= -github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= -github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= -github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= -github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= -github.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE= -github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= -github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= -github.com/libp2p/go-libp2p-circuit v0.1.1/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= -github.com/libp2p/go-libp2p-circuit v0.1.3/go.mod h1:Xqh2TjSy8DD5iV2cCOMzdynd6h8OTBGoV1AWbWor3qM= -github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= -github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= -github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= -github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= -github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= -github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= -github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= -github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= -github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= -github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= -github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= -github.com/libp2p/go-libp2p-core v0.0.6/go.mod h1:0d9xmaYAVY5qmbp/fcgxHT3ZJsLjYeYPMJAUKpaCHrE= -github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= -github.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0= -github.com/libp2p/go-libp2p-core v0.2.3/go.mod h1:GqhyQqyIAPsxFYXHMjfXgMv03lxsvM0mFzuYA9Ib42A= -github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= -github.com/libp2p/go-libp2p-core v0.2.5/go.mod h1:6+5zJmKhsf7yHn1RbmYDu08qDUpIUxGdqHuEZckmZOA= -github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= -github.com/libp2p/go-libp2p-core v0.3.1/go.mod h1:thvWy0hvaSBhnVBaW37BvzgVV68OUhgJJLAa6almrII= -github.com/libp2p/go-libp2p-core v0.4.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= -github.com/libp2p/go-libp2p-core v0.5.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= -github.com/libp2p/go-libp2p-core v0.5.1/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.2/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.3/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM= -github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= -github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= -github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= -github.com/libp2p/go-libp2p-daemon v0.2.2/go.mod h1:kyrpsLB2JeNYR2rvXSVWyY0iZuRIMhqzWR3im9BV6NQ= -github.com/libp2p/go-libp2p-discovery v0.0.1/go.mod h1:ZkkF9xIFRLA1xCc7bstYFkd80gBGK8Fc1JqGoU2i+zI= -github.com/libp2p/go-libp2p-discovery v0.0.5/go.mod h1:YtF20GUxjgoKZ4zmXj8j3Nb2TUSBHFlOCetzYdbZL5I= -github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFTGElt8HnoDzwkFZm29g= -github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= -github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= -github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= -github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= -github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= -github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= -github.com/libp2p/go-libp2p-kad-dht v0.2.1/go.mod h1:k7ONOlup7HKzQ68dE6lSnp07cdxdkmnRa+6B4Fh9/w0= -github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= -github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= -github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= -github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= -github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= -github.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08= -github.com/libp2p/go-libp2p-mplex v0.1.1/go.mod h1:KUQWpGkCzfV7UIpi8SKsAVxyBgz1c9R5EvxgnwLsb/I= -github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3g+OtR+EMMODbKo= -github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= -github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= -github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= -github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= -github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= -github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= -github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= -github.com/libp2p/go-libp2p-net v0.0.1/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= -github.com/libp2p/go-libp2p-net v0.0.2/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= -github.com/libp2p/go-libp2p-netutil v0.0.1/go.mod h1:GdusFvujWZI9Vt0X5BKqwWWmZFxecf9Gt03cKxm2f/Q= -github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= -github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo= -github.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es= -github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY= -github.com/libp2p/go-libp2p-peerstore v0.0.1/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= -github.com/libp2p/go-libp2p-peerstore v0.0.6/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= -github.com/libp2p/go-libp2p-peerstore v0.1.0/go.mod h1:2CeHkQsr8svp4fZ+Oi9ykN1HBb6u0MOvdJ7YIsmcwtY= -github.com/libp2p/go-libp2p-peerstore v0.1.3/go.mod h1:BJ9sHlm59/80oSkpWgr1MyY1ciXAXV397W6h1GH/uKI= -github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= -github.com/libp2p/go-libp2p-peerstore v0.2.0/go.mod h1:N2l3eVIeAitSg3Pi2ipSrJYnqhVnMNQZo9nkSCuAbnQ= -github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= -github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= -github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= -github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= -github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= -github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= -github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q= -github.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= -github.com/libp2p/go-libp2p-pubsub v0.3.2/go.mod h1:Uss7/Cfz872KggNb+doCVPHeCDmXB7z500m/R8DaAUk= -github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= -github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= -github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= -github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= -github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= -github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= -github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= -github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE= -github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= -github.com/libp2p/go-libp2p-secio v0.0.1/go.mod h1:IdG6iQybdcYmbTzxp4J5dwtUEDTOvZrT0opIDVNPrJs= -github.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0= -github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= -github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= -github.com/libp2p/go-libp2p-secio v0.2.1/go.mod h1:cWtZpILJqkqrSkiYcDBh5lA3wbT2Q+hz3rJQq3iftD8= -github.com/libp2p/go-libp2p-secio v0.2.2/go.mod h1:wP3bS+m5AUnFA+OFO7Er03uO1mncHG0uVwGrwvjYlNY= -github.com/libp2p/go-libp2p-swarm v0.0.1/go.mod h1:mh+KZxkbd3lQnveQ3j2q60BM1Cw2mX36XXQqwfPOShs= -github.com/libp2p/go-libp2p-swarm v0.0.6/go.mod h1:s5GZvzg9xXe8sbeESuFpjt8CJPTCa8mhEusweJqyFy8= -github.com/libp2p/go-libp2p-swarm v0.1.0/go.mod h1:wQVsCdjsuZoc730CgOvh5ox6K8evllckjebkdiY5ta4= -github.com/libp2p/go-libp2p-swarm v0.2.1/go.mod h1:x07b4zkMFo2EvgPV2bMTlNmdQc8i+74Jjio7xGvsTgU= -github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaTNyBcHImCxRpPKU= -github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= -github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= -github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= -github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= -github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= -github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= -github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= -github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= -github.com/libp2p/go-libp2p-transport v0.0.5/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= -github.com/libp2p/go-libp2p-transport-upgrader v0.0.1/go.mod h1:NJpUAgQab/8K6K0m+JmZCe5RUXG10UMEx4kWe9Ipj5c= -github.com/libp2p/go-libp2p-transport-upgrader v0.0.4/go.mod h1:RGq+tupk+oj7PzL2kn/m1w6YXxcIAYJYeI90h6BGgUc= -github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= -github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= -github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8= -github.com/libp2p/go-libp2p-yamux v0.1.3/go.mod h1:VGSQVrqkh6y4nm0189qqxMtvyBft44MOYYPpYKXiVt4= -github.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8= -github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI= -github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= -github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= -github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= -github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= -github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= -github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= -github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= -github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= -github.com/libp2p/go-mplex v0.0.1/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= -github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= -github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= -github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= -github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= -github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= -github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= -github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= -github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= -github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= -github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= -github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= -github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= -github.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqXJyFvB0mR4A04sQ= -github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw= -github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= -github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= -github.com/libp2p/go-tcp-transport v0.0.1/go.mod h1:mnjg0o0O5TmXUaUIanYPUqkW4+u6mK0en8rlpA6BBTs= -github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o= -github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= -github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= -github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= -github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= -github.com/libp2p/go-ws-transport v0.0.1/go.mod h1:p3bKjDWHEgtuKKj+2OdPYs5dAPIjtpQGHF2tJfGz7Ww= -github.com/libp2p/go-ws-transport v0.0.5/go.mod h1:Qbl4BxPfXXhhd/o0wcrgoaItHqA9tnZjoFZnxykuaXU= -github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo= -github.com/libp2p/go-ws-transport v0.1.2/go.mod h1:dsh2Ld8F+XNmzpkaAijmg5Is+e9l6/1tK/6VFOdN69Y= -github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= -github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= -github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= -github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= -github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= -github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= -github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= -github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= -github.com/marten-seemann/qtls v0.9.1/go.mod h1:T1MmAdDPyISzxlK6kjRr0pcZFBVd1OZbBb/j3cvzHhk= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= -github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= -github.com/mdlayher/netlink v0.0.0-20190828143259-340058475d09/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= -github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= -github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= -github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= -github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= -github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.0.4/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= -github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= -github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= -github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.0.3/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.1.0/go.mod h1:01k2RAqtoXIuPa3DCavAE9/6jc6nM0H3EgZyfUhN2oY= -github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= -github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= -github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= -github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= -github.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= -github.com/multiformats/go-multiaddr-net v0.1.1/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= -github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQKME1qHfpYmyIjFVsSOY6Y= -github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= -github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= -github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= -github.com/multiformats/go-multihash v0.0.7/go.mod h1:XuKXPp8VHcTygube3OWZC+aZrA+H1IhmjoCDtJc7PXM= -github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= -github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c/go.mod h1:7qN3Y0BvzRUf4LofcoJplQL10lsFDb4PYlePTVwrP28= -github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= -github.com/opentracing-contrib/go-grpc v0.0.0-20191001143057-db30781987df/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= -github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/otiai10/copy v1.0.2/go.mod h1:c7RpqBkwMom4bYTSkLSym4VSJz/XtncWRAj/J4PEIMY= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= -github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.1.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= @@ -1128,558 +166,113 @@ github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20 github.com/renproject/surge v1.2.5 h1:P2qKZxWiKrC8hw7in/hXVtic+dGkhd1M0H/1Lj+fJnw= github.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= -github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= -github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= -github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= -github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.13/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= -github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.8/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= -github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= -github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= -github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= -github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= -github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY= -github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= -github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= -github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= -github.com/whyrusleeping/cbor-gen v0.0.0-20190917003517-d78d67427694/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20191212224538-d370462a7e8a/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= -github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200206220010-03c9665e2a66/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200402171437-3d27c146c105/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501014322-5f9941ef88e0/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501232601-351665a6e756/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= -github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= -github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= -github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= -github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= -github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= -github.com/whyrusleeping/go-logging v0.0.1/go.mod h1:lDPYj54zutzG1XYfHAhcc7oNXEburHQBn+Iqd4yS4vE= -github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8= -github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible/go.mod h1:34LEDbeKFZInPUrAG+bjuJmUXONGdEFW7XL0SpTY1y4= -github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible/go.mod h1:dRWHHvc4HDQSHh9gbKEBbUZ+f2Q8iZTPG3UOGYODxSQ= -github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= -github.com/whyrusleeping/go-smux-yamux v2.0.9+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= -github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= -github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= -github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= -github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= -github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= -github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= -github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= -github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= -go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= -go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg= -go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= -go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= -go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= -go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= -go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20190218023631-ce4c26f7be8e/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20190313082347-94abd6928b1d/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190228165749-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190302025703-b6889370fb10/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190524122548-abf6ff778158/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190524152521-dbbf3f1254d4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025090151-53bf42e6b339/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200427175716-29b57079015a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181130052023-1c3d964395ce/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108195415-316d2f248479/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 h1:kDtqNkeBrZb8B+atrj50B5XLHpzXXqcCdZPP/ApQ5NY= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200617041141-9a465503579e/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1688,53 +281,30 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8= -gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= From b5e6f890ebea78668eed8dd102e528a9ac87b492 Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 18 Aug 2020 16:30:49 +1000 Subject: [PATCH 047/335] add filecoin code --- chain/filecoin/account.go | 223 +++++++++++++++++++++++++ chain/filecoin/account_test.go | 1 + chain/filecoin/address.go | 34 ++++ chain/filecoin/address_test.go | 1 + chain/filecoin/filecoin.go | 1 + chain/filecoin/filecoin_test.go | 1 + chain/filecoin/filecoint_suite_test.go | 1 + 7 files changed, 262 insertions(+) create mode 100644 chain/filecoin/account.go create mode 100644 chain/filecoin/account_test.go create mode 100644 chain/filecoin/address.go create mode 100644 chain/filecoin/address_test.go create mode 100644 chain/filecoin/filecoin.go create mode 100644 chain/filecoin/filecoin_test.go create mode 100644 chain/filecoin/filecoint_suite_test.go diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go new file mode 100644 index 00000000..2e1fa804 --- /dev/null +++ b/chain/filecoin/account.go @@ -0,0 +1,223 @@ +package filecoin + +import ( + "bytes" + "context" + "fmt" + + // filclient "github.com/filecoin-project/lotus/api/client" + filaddress "github.com/filecoin-project/go-address" + // "github.com/filecoin-project/go-jsonrpc" + // "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/types" + // "github.com/filecoin-project/lotus/cli" + "github.com/filecoin-project/specs-actors/actors/abi" + "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/minio/blake2b-simd" + "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" + "github.com/renproject/pack" +) + +const ( + DefaultClientMultiAddress = "" + DefaultClientAuthToken = "" +) + +type Tx struct { + msg types.Message + signature pack.Bytes65 +} + +// Hash returns the hash that uniquely identifies the transaction. +// Generally, hashes are irreversible hash functions that consume the +// content of the transaction. +func (tx Tx) Hash() pack.Bytes { + return pack.NewBytes(tx.msg.Cid().Hash()) +} + +// From returns the address that is sending the transaction. Generally, +// this is also the address that must sign the transaction. +func (tx Tx) From() address.Address { + return address.Address(tx.msg.From.String()) +} + +// To returns the address that is receiving the transaction. This can be the +// address of an external account, controlled by a private key, or it can be +// the address of a contract. +func (tx Tx) To() address.Address { + return address.Address(tx.msg.To.String()) +} + +// Value being sent from the sender to the receiver. +func (tx Tx) Value() pack.U256 { + return pack.NewU256FromInt(tx.msg.Value.Int) +} + +// Nonce returns the nonce used to order the transaction with respect to all +// other transactions signed and submitted by the sender. +func (tx Tx) Nonce() pack.U256 { + return pack.NewU256FromU64(pack.NewU64(tx.msg.Nonce)) +} + +// Payload returns arbitrary data that is associated with the transaction. +// Generally, this payload is used to send notes between external accounts, +// or invoke business logic on a contract. +func (tx Tx) Payload() contract.CallData { + if tx.msg.Method == 0 { + if len(tx.msg.Params) == 0 { + return contract.CallData([]byte{}) + } + return contract.CallData(append([]byte{0}, tx.msg.Params...)) + } + if len(tx.msg.Params) == 0 { + return contract.CallData([]byte{byte(tx.msg.Method)}) + } + return contract.CallData(append([]byte{byte(tx.msg.Method)}, tx.msg.Params...)) +} + +// Sighashes returns the digests that must be signed before the transaction +// can be submitted by the client. +func (tx Tx) Sighashes() ([]pack.Bytes32, error) { + return []pack.Bytes32{blake2b.Sum256(tx.Hash())}, nil +} + +// Sign the transaction by injecting signatures for the required sighashes. +// The serialized public key used to sign the sighashes must also be +// specified. +func (tx Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { + if len(signatures) != 1 { + return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) + } + tx.signature = signatures[0] + return nil +} + +// Serialize the transaction into bytes. Generally, this is the format in +// which the transaction will be submitted by the client. +func (tx Tx) Serialize() (pack.Bytes, error) { + buf := new(bytes.Buffer) + if err := tx.msg.MarshalCBOR(buf); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +type TxBuilder struct { + gasPrice pack.U256 + gasLimit pack.U256 +} + +func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { + return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} +} + +func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (account.Tx, error) { + filfrom, err := filaddress.NewFromString(string(from)) + if err != nil { + return nil, fmt.Errorf("bad from address '%v': %v", from, err) + } + filto, err := filaddress.NewFromString(string(to)) + if err != nil { + return nil, fmt.Errorf("bad to address '%v': %v", to, err) + } + methodNum := abi.MethodNum(0) + if len(payload) > 0 { + methodNum = abi.MethodNum(payload[0]) + payload = payload[1:] + } + return Tx{ + msg: types.Message{ + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: value.Int().Uint64(), + GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, + GasLimit: txBuilder.gasLimit.Int().Int64(), + Method: methodNum, + Params: payload, + }, + signature: pack.Bytes65{}, + }, nil +} + +// ClientOptions are used to parameterise the behaviour of the Client. +type ClientOptions struct { + MultiAddress string + AuthToken string +} + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the multi-address and authentication token should +// be changed. +func DefaultClientOptions() ClientOptions { + return ClientOptions{ + MultiAddress: DefaultClientMultiAddress, + AuthToken: DefaultClientAuthToken, + } +} + +// WithAddress returns a modified version of the options with the given API +// multi-address. +func (opts ClientOptions) WithAddress(multiAddr string) ClientOptions { + opts.MultiAddress = multiAddr + return opts +} + +// WithAuthToken returns a modified version of the options with the given +// authentication token. +func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { + opts.AuthToken = authToken + return opts +} + +type Client struct { + opts ClientOptions + // node api.FullNode + // closer jsonrpc.ClientCloser +} + +func NewClient(opts ClientOptions) (*Client, error) { + // authToken, err := hex.DecodeString(opts.AuthToken) + // if err != nil { + // return nil, fmt.Errorf("bad auth token '%v': %v", err) + // } + // multiAddr, err := multiaddr.NewMultiaddr(opts.MultiAddress) + // if err != nil { + // return nil, fmt.Errorf("bad multi-address '%v': %v", err) + // } + // info := cli.APIInfo{ + // Addr: multiAddr, + // Token: authToken, + // } + // dialArgs, err := info.DialArgs() + // if err != nil { + // return nil, err + // } + // authHeader := info.AuthHeader() + // node, closer, err := filclient.NewFullNodeRPC(dialArgs, authHeader) + // if err != nil { + // return nil, err + // } + + // return &Client{ + // opts: opts, + // node: node, + // closer: closer, + // }, nil + return nil, nil +} + +// Tx returns the transaction uniquely identified by the given transaction +// hash. It also returns the number of confirmations for the transaction. +func (client *Client) Tx(context.Context, pack.Bytes) (account.Tx, pack.U64, error) { + panic("unimplemented") +} + +// SubmitTx to the underlying blockchain network. +func (client *Client) SubmitTx(context.Context, account.Tx) error { + panic("unimplemented") +} diff --git a/chain/filecoin/account_test.go b/chain/filecoin/account_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/account_test.go @@ -0,0 +1 @@ +package filecoin_test diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go new file mode 100644 index 00000000..28023624 --- /dev/null +++ b/chain/filecoin/address.go @@ -0,0 +1,34 @@ +package filecoin + +import ( + filaddress "github.com/filecoin-project/go-address" + "github.com/renproject/multichain/api/address" +) + +type AddressEncoder struct{} + +func NewAddressEncoder() AddressEncoder { + return AddressEncoder{} +} + +func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) { + addr, err := filaddress.NewFromBytes([]byte(raw)) + if err != nil { + return address.Address(""), err + } + return address.Address(addr.String()), nil +} + +type AddressDecoder struct{} + +func NewAddressDecoder() AddressDecoder { + return AddressDecoder{} +} + +func (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + rawAddr, err := filaddress.NewFromString(string(addr)) + if err != nil { + return nil, err + } + return address.RawAddress(rawAddr.Bytes()), nil +} diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/address_test.go @@ -0,0 +1 @@ +package filecoin_test diff --git a/chain/filecoin/filecoin.go b/chain/filecoin/filecoin.go new file mode 100644 index 00000000..ee1662ba --- /dev/null +++ b/chain/filecoin/filecoin.go @@ -0,0 +1 @@ +package filecoin \ No newline at end of file diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go new file mode 100644 index 00000000..732971f8 --- /dev/null +++ b/chain/filecoin/filecoin_test.go @@ -0,0 +1 @@ +package filecoin_test \ No newline at end of file diff --git a/chain/filecoin/filecoint_suite_test.go b/chain/filecoin/filecoint_suite_test.go new file mode 100644 index 00000000..732971f8 --- /dev/null +++ b/chain/filecoin/filecoint_suite_test.go @@ -0,0 +1 @@ +package filecoin_test \ No newline at end of file From e42df5b9800e4b305cc977882f05b6367b05fd52 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 19 Aug 2020 15:13:23 +0530 Subject: [PATCH 048/335] testing address impl for filecoin --- chain/filecoin/address.go | 19 ++--- chain/filecoin/address_test.go | 96 ++++++++++++++++++++++++++ chain/filecoin/filecoin.go | 2 +- chain/filecoin/filecoin_test.go | 2 +- chain/filecoin/filecoint_suite_test.go | 14 +++- go.mod | 1 + 6 files changed, 123 insertions(+), 11 deletions(-) diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go index 28023624..afe9333f 100644 --- a/chain/filecoin/address.go +++ b/chain/filecoin/address.go @@ -5,10 +5,19 @@ import ( "github.com/renproject/multichain/api/address" ) +type AddressEncoderDecoder struct { + AddressEncoder + AddressDecoder +} + type AddressEncoder struct{} +type AddressDecoder struct{} -func NewAddressEncoder() AddressEncoder { - return AddressEncoder{} +func NewAddressEncoderDecoder() AddressEncoderDecoder { + return AddressEncoderDecoder{ + AddressEncoder: AddressEncoder{}, + AddressDecoder: AddressDecoder{}, + } } func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) { @@ -19,12 +28,6 @@ func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Add return address.Address(addr.String()), nil } -type AddressDecoder struct{} - -func NewAddressDecoder() AddressDecoder { - return AddressDecoder{} -} - func (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { rawAddr, err := filaddress.NewFromString(string(addr)) if err != nil { diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go index 0d419baa..b2c96db3 100644 --- a/chain/filecoin/address_test.go +++ b/chain/filecoin/address_test.go @@ -1 +1,97 @@ package filecoin_test + +import ( + "math/rand" + "testing/quick" + "time" + + filaddress "github.com/filecoin-project/go-address" + "github.com/multiformats/go-varint" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/filecoin" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Address", func() { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + + encoderDecoder := filecoin.NewAddressEncoderDecoder() + + Context("when encoding and decoding", func() { + Context("for ID protocol", func() { + It("should behave correctly without errors", func() { + f := func() bool { + x := varint.ToUvarint(r.Uint64()) + x = append([]byte{byte(filaddress.ID)}, x...) + + rawAddr := address.RawAddress(pack.NewBytes(x[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for Sepc protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.PayloadHashLength]byte) bool { + y := append([]byte{byte(filaddress.SECP256K1)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for Actor protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.PayloadHashLength]byte) bool { + y := append([]byte{byte(filaddress.Actor)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + + Context("for BLS protocol", func() { + It("should behave correctly without errors", func() { + f := func(x [filaddress.BlsPublicKeyBytes]byte) bool { + y := append([]byte{byte(filaddress.BLS)}, x[:]...) + + rawAddr := address.RawAddress(pack.NewBytes(y[:])) + addr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + + decodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + Expect(decodedAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) + }) +}) diff --git a/chain/filecoin/filecoin.go b/chain/filecoin/filecoin.go index ee1662ba..e0985944 100644 --- a/chain/filecoin/filecoin.go +++ b/chain/filecoin/filecoin.go @@ -1 +1 @@ -package filecoin \ No newline at end of file +package filecoin diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 732971f8..0d419baa 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -1 +1 @@ -package filecoin_test \ No newline at end of file +package filecoin_test diff --git a/chain/filecoin/filecoint_suite_test.go b/chain/filecoin/filecoint_suite_test.go index 732971f8..db0159ad 100644 --- a/chain/filecoin/filecoint_suite_test.go +++ b/chain/filecoin/filecoint_suite_test.go @@ -1 +1,13 @@ -package filecoin_test \ No newline at end of file +package filecoin_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestFilecoin(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Filecoin Suite") +} diff --git a/go.mod b/go.mod index 9d1029f0..5a9dec12 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( github.com/ipfs/go-hamt-ipld v0.1.1 // indirect github.com/lib/pq v1.7.0 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 + github.com/multiformats/go-varint v0.0.5 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/raulk/clock v1.1.0 // indirect From 923085355054ea71c62b1f35725ad26fbe729557 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 20 Aug 2020 10:55:41 +0530 Subject: [PATCH 049/335] todos for filecoin support --- .gitmodules | 3 ++ chain/filecoin/account.go | 90 +++++++++++++++++++++++---------------- go.mod | 3 ++ go.sum | 22 ++++++++++ 4 files changed, 81 insertions(+), 37 deletions(-) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..4488466e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "filecoin-ffi"] + path = chain/filecoin/filecoin-ffi + url = git@github.com:filecoin-project/filecoin-ffi.git diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 2e1fa804..503adf0a 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -4,15 +4,14 @@ import ( "bytes" "context" "fmt" + "net/http" - // filclient "github.com/filecoin-project/lotus/api/client" filaddress "github.com/filecoin-project/go-address" - // "github.com/filecoin-project/go-jsonrpc" - // "github.com/filecoin-project/lotus/api" + filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" - // "github.com/filecoin-project/lotus/cli" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -21,6 +20,7 @@ import ( ) const ( + AuthorizationKey = "Authorization" DefaultClientMultiAddress = "" DefaultClientAuthToken = "" ) @@ -175,49 +175,65 @@ func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { } type Client struct { - opts ClientOptions - // node api.FullNode - // closer jsonrpc.ClientCloser + opts ClientOptions + node api.FullNode + closer jsonrpc.ClientCloser } +// NewClient creates and returns a new JSON-RPC client to the Filecoin node func NewClient(opts ClientOptions) (*Client, error) { - // authToken, err := hex.DecodeString(opts.AuthToken) - // if err != nil { - // return nil, fmt.Errorf("bad auth token '%v': %v", err) - // } - // multiAddr, err := multiaddr.NewMultiaddr(opts.MultiAddress) - // if err != nil { - // return nil, fmt.Errorf("bad multi-address '%v': %v", err) - // } - // info := cli.APIInfo{ - // Addr: multiAddr, - // Token: authToken, - // } - // dialArgs, err := info.DialArgs() + requestHeaders := make(http.Header) + if opts.AuthToken != DefaultClientAuthToken { + requestHeaders.Add(AuthorizationKey, opts.AuthToken) + } + + node, closer, err := filclient.NewFullNodeRPC(opts.MultiAddress, requestHeaders) + if err != nil { + return nil, err + } + + return &Client{opts, node, closer}, nil +} + +// Tx returns the transaction uniquely identified by the given transaction +// hash. It also returns the number of confirmations for the transaction. +func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { + // parse the transaction ID to a message ID + // msgId, err := cid.Parse(txId.String()) // if err != nil { - // return nil, err + // return nil, nil, fmt.Errorf("parsing txId: %v", err) // } - // authHeader := info.AuthHeader() - // node, closer, err := filclient.NewFullNodeRPC(dialArgs, authHeader) + + // get message + // message, err := client.node.ChainGetMessage(ctx, msgId) // if err != nil { - // return nil, err + // return nil, nil, fmt.Errorf("fetching tx: %v", err) // } - // return &Client{ - // opts: opts, - // node: node, - // closer: closer, - // }, nil - return nil, nil -} + // TODO?: See if we can get a signed message -// Tx returns the transaction uniquely identified by the given transaction -// hash. It also returns the number of confirmations for the transaction. -func (client *Client) Tx(context.Context, pack.Bytes) (account.Tx, pack.U64, error) { - panic("unimplemented") + // TODO?: API call to get the block number for the above message + + // get most recent block number + // 1. get chain tipset + // 2. choose the most recent block from tipset.blks + // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 + // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 } // SubmitTx to the underlying blockchain network. -func (client *Client) SubmitTx(context.Context, account.Tx) error { - panic("unimplemented") +// TODO: should also return a transaction hash (pack.Bytes) ? +func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { + // construct crypto.Signature + // https://github.com/filecoin-project/specs-actors/blob/master/actors/crypto/signature.go + + // construct types.SignedMessage + // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/signedmessage.go + + // submit transaction to mempool + // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L169 + // msgId, err := client.node.MpoolPush(ctx, &signedMessage) + // if err != nil { + // return fmt.Errorf("pushing message to message pool: %v", err) + // } } diff --git a/go.mod b/go.mod index 5a9dec12..0bfeb41b 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect + github.com/ipfs/go-cid v0.0.6 github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect github.com/ipfs/go-hamt-ipld v0.1.1 // indirect github.com/lib/pq v1.7.0 // indirect @@ -36,3 +37,5 @@ require ( go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 ) + +replace github.com/filecoin-project/filecoin-ffi => /Users/rohitnarurkar/Develop/go-workspace/src/github.com/renproject/multichain/chain/filecoin/filecoin-ffi diff --git a/go.sum b/go.sum index 690ddb94..879bc13a 100644 --- a/go.sum +++ b/go.sum @@ -164,6 +164,7 @@ github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9 github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= @@ -255,6 +256,7 @@ github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= +github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= @@ -270,6 +272,7 @@ github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlS github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= +github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= @@ -279,6 +282,7 @@ github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8o github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -332,6 +336,7 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -423,11 +428,13 @@ github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a/go.mod h github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -531,6 +538,7 @@ github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjN github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= +github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6ZpusRg= github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= @@ -1120,6 +1128,7 @@ github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmO github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= @@ -1249,6 +1258,7 @@ github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6 github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -1307,9 +1317,12 @@ github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGw github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= +github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= @@ -1328,6 +1341,7 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1418,6 +1432,7 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1478,6 +1493,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1602,6 +1618,7 @@ golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1731,6 +1748,11 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 09e2ebc5e563073e9b27cf8b6c843885381ef7ae Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 26 Aug 2020 00:56:28 +0530 Subject: [PATCH 050/335] remove filecoin-ffi --- .gitmodules | 3 --- go.mod | 2 -- 2 files changed, 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4488466e..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "filecoin-ffi"] - path = chain/filecoin/filecoin-ffi - url = git@github.com:filecoin-project/filecoin-ffi.git diff --git a/go.mod b/go.mod index 0bfeb41b..d8339333 100644 --- a/go.mod +++ b/go.mod @@ -37,5 +37,3 @@ require ( go.uber.org/zap v1.15.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 ) - -replace github.com/filecoin-project/filecoin-ffi => /Users/rohitnarurkar/Develop/go-workspace/src/github.com/renproject/multichain/chain/filecoin/filecoin-ffi From 5ccb3196acab4a181e4b430eae7547fc42d3d4d6 Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 31 Aug 2020 14:39:01 +1000 Subject: [PATCH 051/335] fix deps --- .gitmodules | 3 + chain/filecoin/account.go | 21 +-- go.mod | 35 ++-- go.sum | 356 +++++++++++++++++++++----------------- 4 files changed, 223 insertions(+), 192 deletions(-) diff --git a/.gitmodules b/.gitmodules index e69de29b..ce71b4f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "chain/filecoin/filecoin-ffi"] + path = chain/filecoin/filecoin-ffi + url = https://github.com/filecoin-project/filecoin-ffi \ No newline at end of file diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 503adf0a..2e9c082a 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -7,11 +7,12 @@ import ( "net/http" filaddress "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/lotus/api" filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" - "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -129,15 +130,15 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U } return Tx{ msg: types.Message{ - Version: types.MessageVersion, - From: filfrom, - To: filto, - Value: big.Int{Int: value.Int()}, - Nonce: value.Int().Uint64(), - GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, - GasLimit: txBuilder.gasLimit.Int().Int64(), - Method: methodNum, - Params: payload, + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: value.Int().Uint64(), + GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, + GasFeeCap: txBuilder.gasLimit.Int().Int64(), + Method: methodNum, + Params: payload, }, signature: pack.Bytes65{}, }, nil diff --git a/go.mod b/go.mod index d8339333..835147d5 100644 --- a/go.mod +++ b/go.mod @@ -3,37 +3,24 @@ module github.com/renproject/multichain go 1.14 require ( - github.com/btcsuite/btcd v0.20.1-beta + github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcutil v1.0.2 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf - github.com/cosmos/cosmos-sdk v0.39.1 - github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 // indirect - github.com/ethereum/go-ethereum v1.9.19 + github.com/ethereum/go-ethereum v1.9.20 github.com/filecoin-project/go-address v0.0.3 - github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect - github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 // indirect - github.com/filecoin-project/go-bitfield v0.1.0 // indirect - github.com/filecoin-project/go-data-transfer v0.5.0 // indirect - github.com/filecoin-project/go-fil-markets v0.3.2 // indirect - github.com/filecoin-project/lotus v0.4.1 - github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df // indirect - github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30 - github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a // indirect - github.com/ipfs/go-cid v0.0.6 - github.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e // indirect - github.com/ipfs/go-hamt-ipld v0.1.1 // indirect - github.com/lib/pq v1.7.0 // indirect + github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 + github.com/filecoin-project/lotus v0.5.6 + github.com/filecoin-project/specs-actors v0.9.3 + github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 - github.com/multiformats/go-varint v0.0.5 + github.com/multiformats/go-varint v0.0.6 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 - github.com/raulk/clock v1.1.0 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 - github.com/renproject/surge v1.2.5 - github.com/tendermint/tendermint v0.33.8 - github.com/terra-project/core v0.3.7 - github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 // indirect + github.com/renproject/surge v1.2.6 go.uber.org/zap v1.15.0 - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a ) + +replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi diff --git a/go.sum b/go.sum index 879bc13a..ed7b6f42 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -31,9 +30,9 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -49,9 +48,9 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= +github.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -65,8 +64,7 @@ github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3o github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= @@ -92,10 +90,10 @@ github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.32.11/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -103,25 +101,27 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129/go.mod h1:u9UyCz2eTrSGy6fbupqJ54eY5c4IC8gREQ1053dK12U= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -141,26 +141,17 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.2.1-0.20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.37.14/go.mod h1:qKU3AzVJ0GGWARqImZj24CIX35Q4nJEE+WrXVU/CzFo= -github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= -github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -168,15 +159,18 @@ github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuv github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= +github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= @@ -194,21 +188,19 @@ github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= -github.com/drand/drand v0.9.2-0.20200616080806-a94e9c1636a4/go.mod h1:Bu8QYdU0YdB2ZQZezHxabmOIciddiwLRnyV4nuZ2HQE= github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4/go.mod h1:SnqWL9jksIMK63UKkfmWI6f9PDN8ROoCgg+Z4zWk7hg= github.com/drand/kyber v1.0.1-0.20200110225416-8de27ed8c0e2/go.mod h1:UpXoA0Upd1N9l4TvRPHr1qAUBBERj6JQ/mnKI3BPEmw= github.com/drand/kyber v1.0.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.0/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= github.com/drand/kyber v1.1.1/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= github.com/drand/kyber-bls12381 v0.1.0/go.mod h1:N1emiHpm+jj7kMlxEbu3MUyOiooTgNySln564cgD9mk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= @@ -217,79 +209,92 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/ethereum/go-ethereum v1.9.19 h1:c9IrhzqPKY+ZkS/YhXCO3rgNzlxsVrCYIRvrIAFmIWM= -github.com/ethereum/go-ethereum v1.9.19/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= +github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= +github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200615191232-6be1a8c6ed09/go.mod h1:HEJn6kOXMNhCNBYNTO/lrEI7wSgqCOR6hN5ecfYUnC8= +github.com/filecoin-project/chain-validation v0.0.6-0.20200813000554-40c22fe26eef/go.mod h1:SMj5VK1pYgqC8FXVEtOBRTc+9AIrYu+C+K3tAXi2Rk8= github.com/filecoin-project/filecoin-ffi v0.0.0-20200326153646-e899cc1dd072/go.mod h1:PtH9YP0rURHUKHrKeEBeWg/BqIBMQOz8wtlXlVGREBE= -github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d/go.mod h1:vlQ7sDkbrtM70QMJFDvEyTDywY5SvIjadRCUB+76l90= +github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d h1:YVh0Q+1iUvbv7SIfwA/alULOlWjQNOEnV72rgeYweLY= github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef/go.mod h1:SrA+pWVoUivqKOfC+ckVYbx41hWz++HxJcrlmHNnebU= +github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc/go.mod h1:KsFPWjF+UUYl6n9A+qbg4bjFgAOneicFZtDH/LQEX2U= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 h1:K6t4Hrs+rwUxBz2xg88Bdqeh4k5/rycQFdPseZhRyfE= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.2-0.20200629135455-587b27927d38/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.1.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= +github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-data-transfer v0.3.0/go.mod h1:cONglGP4s/d+IUQw5mWZrQK+FQATQxr3AXzi4dRh0l4= -github.com/filecoin-project/go-data-transfer v0.5.0/go.mod h1:7yckbsPPMGuN3O1+SYNE/lowwheaUn5woGILpjN52UI= +github.com/filecoin-project/go-data-transfer v0.6.1/go.mod h1:uRYBRKVBVM12CSusBtVrzDHkVw/3DKZpkxKJVP1Ydas= +github.com/filecoin-project/go-data-transfer v0.6.3 h1:7TLwm8nuodHYD/uiwJjKc/PGRR+LwqM8jmlZqgWuUfY= +github.com/filecoin-project/go-data-transfer v0.6.3/go.mod h1:PmBKVXkhh67/tnEdJXQwDHl5mT+7Tbcwe1NPninqhnM= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-markets v0.3.2-0.20200702145639-4034a18364e4/go.mod h1:UY+/zwNXHN73HcrN6HxNDpv6KKM6ehqfCuE9vK9khF8= -github.com/filecoin-project/go-fil-markets v0.3.2/go.mod h1:e/IofcotbwH7ftgeK+TjjdjFsrCDWrh5vvnr7k1OSH8= -github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= -github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= +github.com/filecoin-project/go-fil-markets v0.5.6-0.20200814234959-80b1788108ac/go.mod h1:umicPCaN99ysHTiYOmwhuLxTFbOwcsI+mdw/t96vvM4= +github.com/filecoin-project/go-fil-markets v0.5.6/go.mod h1:SJApXAKr5jyGpbzDEOhvemui0pih7hhT8r2MXJxCP1E= +github.com/filecoin-project/go-fil-markets v0.5.8 h1:uwl0QNUVmmSlUQfxshpj21Dmhh6WKTQNhnb1GMfdp18= +github.com/filecoin-project/go-fil-markets v0.5.8/go.mod h1:6ZX1vbZbnukbVQ8tCB/MmEizuW/bmRX7SpGAltU3KVg= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 h1:FXtCp0ybqdQL9knb3OGDpkNTaBbPxgkqPeWKotUwkH0= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= +github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= +github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200619205156-c7bf525c06ef/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 h1:Jbburj7Ih2iaJ/o5Q9A+EAeTabME6YII7FLi9SKUf5c= +github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= -github.com/filecoin-project/lotus v0.4.1/go.mod h1:uo3yDPhPlpHwdCKr0k41/a205WwlSclQamx+sQDKRMI= -github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= -github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= -github.com/filecoin-project/sector-storage v0.0.0-20200630180318-4c1968f62a8f/go.mod h1:r12d7tsmJKz8QDGoCvl65Ay2al6mOgDqxAGUxbyrgMs= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df h1:VDdWrCNUNx6qeHnGU9oAy+izuGM02it9V/5+MJyhZQw= -github.com/filecoin-project/sector-storage v0.0.0-20200723200950-ed2e57dde6df/go.mod h1:7EE+f7jM4kCy2MKHoiiwNDQGJSb+QQzZ+y+/17ugq4w= +github.com/filecoin-project/lotus v0.4.3-0.20200819133134-a21234cd54d5/go.mod h1:YYUqCqyv4odVgKSFQAnIdAl0v1cIfbEYnF9E118dMGQ= +github.com/filecoin-project/lotus v0.4.3-0.20200819134055-b13681df3205/go.mod h1:rooripL/X8ixwUngDPzphAv/RKZXWBprbyxxDW0EJi0= +github.com/filecoin-project/lotus v0.4.3-0.20200820203717-d1718369a182/go.mod h1:biFZPQ/YyQGfkHUmHMiaNf2hnD6zm1+OAXPQYQ61Zkg= +github.com/filecoin-project/lotus v0.5.6 h1:3Jea/vfZBs95KmNuqyXGEpB6h+uF69xyMz0OD+Igpi8= +github.com/filecoin-project/lotus v0.5.6/go.mod h1:JeT2ti5ArW4B69k1FMMFV1rj00wX4ooHMX6zS5MgY+w= +github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= +github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= +github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200702170846-2cd72643a5cf/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.6.2-0.20200724193152-534b25bdca30/go.mod h1:ppIYDlWQvcfzDW0zxar53Z1Ag69er4BmFvJAtV1uDMI= -github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= +github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= +github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= +github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= +github.com/filecoin-project/specs-actors v0.9.2/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= +github.com/filecoin-project/specs-actors v0.9.3 h1:Fi75G/UQ7R4eiIwnN+S6bBQ9LqKivyJdw62jJzTi6aE= +github.com/filecoin-project/specs-actors v0.9.3/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/storage-fsm v0.0.0-20200625160832-379a4655b044/go.mod h1:JD7fmV1BYADDcy4EYQnqFH/rUzXsh0Je0jXarCjZqSk= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/statediff v0.0.1/go.mod h1:qNWauolLFEzOiA4LNWermBRVNbaZHfPcPevumZeh+hE= +github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= +github.com/filecoin-project/test-vectors v0.0.0-20200819133914-e20cc29cc926/go.mod h1:ou1Im2BTyrYTnXX8yj5VvC+DTfbIrwESJjKDxbh31nA= +github.com/filecoin-project/test-vectors v0.0.0-20200826113833-9ffe6524729d/go.mod h1:hY/JN3OFRtykBrMByFjTonUFEOW2bRJjyR5YMUh3jLw= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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= -github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -297,6 +302,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0= github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1/go.mod h1:0eHX/BVySxPc6SE2mZRoppGq7qcEagxdmQnA3dzork8= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -305,7 +311,6 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -319,7 +324,6 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -328,23 +332,24 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -370,9 +375,9 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= +github.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -381,6 +386,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= @@ -392,33 +398,26 @@ github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORR github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3vH7VqgtMxQ= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= @@ -446,6 +445,7 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -464,6 +464,7 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= +github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= github.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg= github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis= @@ -471,12 +472,15 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= github.com/ipfs/go-bitswap v0.2.8/go.mod h1:2Yjog0GMdH8+AsxkE0DI9D2mANaUTxbVVav0pPoZoug= +github.com/ipfs/go-bitswap v0.2.20/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= +github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI= github.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So= github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= github.com/ipfs/go-blockservice v0.1.3/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= +github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834 h1:hFJoI1D2a3MqiNkSb4nKwrdkhCngUxUTFNwVwovZX2s= github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -486,6 +490,8 @@ github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= +github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= @@ -495,6 +501,8 @@ github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRV github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= @@ -509,19 +517,24 @@ github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZ github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY= +github.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEPb0= github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= -github.com/ipfs/go-graphsync v0.0.6-0.20200504202014-9d5f2c26a103/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-graphsync v0.0.6-0.20200715204712-ef06b3d32e83/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-fs-lock v0.0.6/go.mod h1:OTR+Rj9sHiRubJh3dRhD15Juhd/+w6VPOY28L7zESmM= +github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.1.1/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= +github.com/ipfs/go-graphsync v0.1.2 h1:25Ll9kIXCE+DY0dicvfS3KMw+U5sd01b/FJbA7KAbhg= +github.com/ipfs/go-graphsync v0.1.2/go.mod h1:sLXVXm1OxtE2XYPw62MuXCdAuNwkAdsbnfrmos5odbA= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200501020327-d53d20a7063e/go.mod h1:giiPqWYCnRBYpNTsJ/EX1ojldX5kTXrXYckSJQ7ko9M= -github.com/ipfs/go-hamt-ipld v0.1.1-0.20200605182717-0310ad2b0b1f/go.mod h1:phOFBB7W73N9dg1glcb1fQ9HtQFDUpeyJgatW8ns0bw= +github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= +github.com/ipfs/go-ipfs-blockstore v1.0.1 h1:fnuVj4XdZp4yExhd0CnUwAiMNJHiPnfInhiuwz4lW1w= +github.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= @@ -531,8 +544,11 @@ github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1Y github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= +github.com/ipfs/go-ipfs-ds-help v1.0.0 h1:bEQ8hMGs80h0sR8O4tfDgV6B01aaF9qeTrujrTLYV3g= github.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE= +github.com/ipfs/go-ipfs-exchange-interface v0.0.1 h1:LJXIo9W7CAmugqI+uofioIpRb6rY30GUu7G6LUfpMvM= github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= +github.com/ipfs/go-ipfs-exchange-offline v0.0.1 h1:P56jYKZF7lDDOLx5SotVh5KFxoY6C81I1NSHW1FxGew= github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= @@ -542,21 +558,25 @@ github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6Zpu github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= +github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= +github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= github.com/ipfs/go-ipld-cbor v0.0.1/go.mod h1:RXHr8s4k0NE0TKhnrxqZC9M888QfsBN9rhS5NjfKzY8= github.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc= github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= +github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf h1:PRCy+w3GocY77CBEwTprp6hn7PLiEU1YToKe7B+1FVk= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= +github.com/ipfs/go-ipld-format v0.2.0 h1:xGlJKkArkmBvowr+GMCX0FEZtkro71K1AwiKnL37mwA= github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= github.com/ipfs/go-ipns v0.0.2/go.mod h1:WChil4e0/m9cIINWLxZe1Jtf77oz5L05rO2ei/uKJ5U= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= @@ -564,17 +584,23 @@ github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSI github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= +github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= +github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= +github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4 h1:3bijxqzQ1O9yg7gd7Aqk80oaEvsJ+uXw0zSvi2qR3Jw= github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= +github.com/ipfs/go-merkledag v0.3.2 h1:MRqj40QkrWkvPswXs4EfSslhZ4RVPRbxwX11js0t1xY= +github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= +github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= @@ -586,14 +612,17 @@ github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= +github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= -github.com/ipld/go-car v0.1.1-0.20200429200904-c222d793c339/go.mod h1:eajxljm6I8o3LitnFeVEmucwZmz7+yLSiKce9yYMefg= github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= +github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef h1:/yPelt/0CuzZsmRkYzBBnJ499JnAOGaIaAXHujx96ic= +github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= +github.com/ipld/go-ipld-prime-proto v0.0.0-20200828231332-ae0aea07222b/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -607,13 +636,14 @@ github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -635,7 +665,6 @@ github.com/kabukky/httpscerts v0.0.0-20150320125433-617593d7dcb3/go.mod h1:BYpt4 github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -652,11 +681,11 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= +github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= @@ -680,10 +709,11 @@ github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZk github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= -github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQqBbYJ+BnA= github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= +github.com/libp2p/go-libp2p v0.10.3/go.mod h1:0ER6iPSaPeQjryNgOnm9bLNpMJCYmuw54xJXsVR17eE= +github.com/libp2p/go-libp2p v0.11.0/go.mod h1:3/ogJDXsbbepEfqtZKBR/DedzxJXCeK17t2Z9RE9bEE= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= @@ -692,12 +722,14 @@ github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQ github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= +github.com/libp2p/go-libp2p-autonat v0.3.2/go.mod h1:0OzOi1/cVc7UcxfOddemYD5vzEqi4fwRbnZcJGLi68U= github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= +github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= github.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE= github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= @@ -707,6 +739,7 @@ github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3 github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= +github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= @@ -732,6 +765,8 @@ github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqe github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= +github.com/libp2p/go-libp2p-core v0.6.1 h1:XS+Goh+QegCDojUZp00CaPMfiEADCrLjNZskWE7pvqs= +github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= @@ -742,6 +777,8 @@ github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFT github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= +github.com/libp2p/go-libp2p-discovery v0.5.0 h1:Qfl+e5+lfDgwdrXdu4YNCWyEo3fWuP+WgN9mN0iWviQ= +github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= @@ -749,7 +786,7 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= github.com/libp2p/go-libp2p-kad-dht v0.2.1/go.mod h1:k7ONOlup7HKzQ68dE6lSnp07cdxdkmnRa+6B4Fh9/w0= -github.com/libp2p/go-libp2p-kad-dht v0.8.1/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= +github.com/libp2p/go-libp2p-kad-dht v0.8.3/go.mod h1:HnYYy8taJWESkqiESd1ngb9XX/XGGsMA5G0Vj2HoSh4= github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= @@ -760,6 +797,7 @@ github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3 github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= +github.com/libp2p/go-libp2p-mplex v0.2.4/go.mod h1:mI7iOezdWFOisvUwaYd3IDrJ4oVmgoXK8H331ui39CE= github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= @@ -782,19 +820,26 @@ github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRj github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= +github.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q= github.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= -github.com/libp2p/go-libp2p-pubsub v0.3.2/go.mod h1:Uss7/Cfz872KggNb+doCVPHeCDmXB7z500m/R8DaAUk= +github.com/libp2p/go-libp2p-pubsub v0.3.4/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.5-0.20200820194335-bfc96c2cd081/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.5 h1:iF75GWpcxKEUQU8tTkgLy69qIQvfhL+t6U6ndQrB6ho= +github.com/libp2p/go-libp2p-pubsub v0.3.5/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= +github.com/libp2p/go-libp2p-quic-transport v0.7.1/go.mod h1:TD31to4E5exogR/GWHClXCfkktigjAl5rXSt7HoxNvY= +github.com/libp2p/go-libp2p-quic-transport v0.8.0/go.mod h1:F2FG/6Bzz0U6essUVxDzE0s9CrY4XGLbl7QEmDNvU7A= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= +github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= @@ -812,12 +857,14 @@ github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaT github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= +github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= +github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= @@ -849,18 +896,24 @@ github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+ github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= +github.com/libp2p/go-msgio v0.0.6 h1:lQ7Uc0kS1wb1EfRxO2Eir/RJoHkHn7t6o+EiwsYIKJA= +github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= +github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= +github.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw= github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= @@ -873,6 +926,7 @@ github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19 github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= +github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= github.com/libp2p/go-ws-transport v0.0.1/go.mod h1:p3bKjDWHEgtuKKj+2OdPYs5dAPIjtpQGHF2tJfGz7Ww= @@ -894,16 +948,20 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.17.3/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.18.0/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= +github.com/marten-seemann/qpack v0.2.0/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/marten-seemann/qtls v0.9.1/go.mod h1:T1MmAdDPyISzxlK6kjRr0pcZFBVd1OZbBb/j3cvzHhk= +github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= +github.com/marten-seemann/qtls-go1-15 v0.1.0/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -915,7 +973,6 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -937,16 +994,19 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= @@ -961,7 +1021,11 @@ github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVq github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= +github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= +github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= @@ -971,12 +1035,17 @@ github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= +github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= +github.com/multiformats/go-multiaddr v0.3.1 h1:1bxa+W7j9wZKTZREySx1vPMs2TqrYWjVZ7zE6/XLG1I= +github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.3/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.1.0/go.mod h1:01k2RAqtoXIuPa3DCavAE9/6jc6nM0H3EgZyfUhN2oY= +github.com/multiformats/go-multiaddr-dns v0.2.0 h1:YWJoIDwLePniH7OU5hBnDZV6SWuvJqJ0YtN6pLeH9zA= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= +github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= github.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= @@ -985,8 +1054,11 @@ github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQ github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= +github.com/multiformats/go-multiaddr-net v0.2.0 h1:MSXRGN0mFymt6B1yo/6BPnIRpLPEnKgQNvVfCX5VDJk= +github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA= github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= @@ -995,14 +1067,19 @@ github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= +github.com/multiformats/go-multistream v0.1.2 h1:knyamLYMPFPngQjGQ0lhnlys3jtVR/3xV6TREUJr+fE= +github.com/multiformats/go-multistream v0.1.2/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= +github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= @@ -1034,6 +1111,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -1050,46 +1128,42 @@ github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NH github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/otiai10/copy v1.0.2/go.mod h1:c7RpqBkwMom4bYTSkLSym4VSJz/XtncWRAj/J4PEIMY= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= -github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= +github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M= github.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1098,11 +1172,9 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -1114,38 +1186,34 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y= github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= github.com/renproject/pack v0.2.3/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= -github.com/renproject/surge v1.2.5 h1:P2qKZxWiKrC8hw7in/hXVtic+dGkhd1M0H/1Lj+fJnw= github.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= +github.com/renproject/surge v1.2.6 h1:4EV2jbBPvQM8Wnv5zL1N1X/UbaH6AZiRUv7r4xZ8ncA= +github.com/renproject/surge v1.2.6/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -1189,7 +1257,6 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= @@ -1198,25 +1265,16 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4= -github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= @@ -1233,40 +1291,18 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/supranational/blst v0.1.1/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= -github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= -github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.13/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E= -github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.8/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= -github.com/terra-project/core v0.3.7/go.mod h1:YAzVMRCDjmgFlAgLF3h1CAHZjtWuK4CmmsjWkqSg5s0= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -1284,19 +1320,20 @@ github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= -github.com/whyrusleeping/cbor-gen v0.0.0-20190917003517-d78d67427694/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191212224538-d370462a7e8a/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200206220010-03c9665e2a66/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200402171437-3d27c146c105/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501014322-5f9941ef88e0/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200501232601-351665a6e756/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee h1:U7zWWvvAjT76EiuWPSOiZlQDnaQYPxPoxugTtTAcJK0= +github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= @@ -1312,25 +1349,29 @@ github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84 github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= +github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= +github.com/willscott/go-cmp v0.5.2-0.20200812183318-8affb9542345/go.mod h1:D7hA8H5pyQx7Y5Em7IWx1R4vNJzfon3gpG9nxjkITjQ= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= +github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg= go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= @@ -1341,8 +1382,9 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1350,6 +1392,7 @@ go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= +go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1366,6 +1409,7 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20190218023631-ce4c26f7be8e/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20190313082347-94abd6928b1d/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1394,14 +1438,15 @@ golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1434,6 +1479,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1459,7 +1505,6 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1476,8 +1521,9 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1506,7 +1552,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1527,7 +1572,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1619,6 +1663,7 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1675,7 +1720,6 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1684,7 +1728,6 @@ google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLD google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -1693,9 +1736,7 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200617041141-9a465503579e/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1716,7 +1757,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1732,7 +1772,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1746,6 +1785,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= From 5cfc7e05d5d6879e8b3bca3ab8b11190b92d154e Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 31 Aug 2020 14:41:01 +1000 Subject: [PATCH 052/335] fix comp errs --- chain/filecoin/account.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 2e9c082a..6876f55a 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -135,8 +135,8 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U To: filto, Value: big.Int{Int: value.Int()}, Nonce: value.Int().Uint64(), - GasPrice: big.Int{Int: txBuilder.gasPrice.Int()}, - GasFeeCap: txBuilder.gasLimit.Int().Int64(), + GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, + GasLimit: txBuilder.gasLimit.Int().Int64(), Method: methodNum, Params: payload, }, @@ -188,7 +188,7 @@ func NewClient(opts ClientOptions) (*Client, error) { requestHeaders.Add(AuthorizationKey, opts.AuthToken) } - node, closer, err := filclient.NewFullNodeRPC(opts.MultiAddress, requestHeaders) + node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.MultiAddress, requestHeaders) if err != nil { return nil, err } @@ -220,6 +220,7 @@ func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack // 2. choose the most recent block from tipset.blks // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 + panic("unimplemented") } // SubmitTx to the underlying blockchain network. @@ -237,4 +238,5 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // if err != nil { // return fmt.Errorf("pushing message to message pool: %v", err) // } + panic("unimplemented") } From 0c0afb9d13d90aa28ef87f3284113e6bb92d98e0 Mon Sep 17 00:00:00 2001 From: Loong Date: Mon, 31 Aug 2020 14:44:18 +1000 Subject: [PATCH 053/335] fix nil err --- chain/filecoin/filecoin-ffi | 1 + 1 file changed, 1 insertion(+) create mode 160000 chain/filecoin/filecoin-ffi diff --git a/chain/filecoin/filecoin-ffi b/chain/filecoin/filecoin-ffi new file mode 160000 index 00000000..777a6fbf --- /dev/null +++ b/chain/filecoin/filecoin-ffi @@ -0,0 +1 @@ +Subproject commit 777a6fbf4446b1112adfd4fa5dd88e0c88974122 From b685c5360883de5d82fb654329193eebcc5915aa Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 11:23:10 +0530 Subject: [PATCH 054/335] implement account API for filecoin --- .gitmodules | 2 +- chain/filecoin/account.go | 76 +++++++++++++++++++++++---------------- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/.gitmodules b/.gitmodules index ce71b4f5..e1b9bf3c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "chain/filecoin/filecoin-ffi"] path = chain/filecoin/filecoin-ffi - url = https://github.com/filecoin-project/filecoin-ffi \ No newline at end of file + url = https://github.com/filecoin-project/filecoin-ffi diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 6876f55a..8edc34da 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -13,6 +13,8 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" + "github.com/filecoin-project/specs-actors/actors/crypto" + "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -200,43 +202,57 @@ func NewClient(opts ClientOptions) (*Client, error) { // hash. It also returns the number of confirmations for the transaction. func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { // parse the transaction ID to a message ID - // msgId, err := cid.Parse(txId.String()) - // if err != nil { - // return nil, nil, fmt.Errorf("parsing txId: %v", err) - // } + msgId, err := cid.Parse(txId.String()) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("parsing txId: %v", err) + } - // get message - // message, err := client.node.ChainGetMessage(ctx, msgId) - // if err != nil { - // return nil, nil, fmt.Errorf("fetching tx: %v", err) - // } + // lookup message receipt to get its height + messageLookup, err := client.node.StateSearchMsg(ctx, msgId) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("searching msg: %v", err) + } - // TODO?: See if we can get a signed message + // get the most recent tipset and its height + headTipset, err := client.node.ChainHead(ctx) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching head: %v", err) + } + confs := headTipset.Height() - messageLookup.Height + 1 - // TODO?: API call to get the block number for the above message + // get the message + msg, err := client.node.ChainGetMessage(ctx, msgId) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching msg: %v", err) + } - // get most recent block number - // 1. get chain tipset - // 2. choose the most recent block from tipset.blks - // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/tipset.go#L22 - // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L41 - panic("unimplemented") + return &Tx{msg: *msg}, pack.NewU64(uint64(confs)), nil } // SubmitTx to the underlying blockchain network. // TODO: should also return a transaction hash (pack.Bytes) ? func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { - // construct crypto.Signature - // https://github.com/filecoin-project/specs-actors/blob/master/actors/crypto/signature.go - - // construct types.SignedMessage - // https://github.com/filecoin-project/lotus/blob/80e6e56a824599e7b8a71241197a7dfa04d14cfc/chain/types/signedmessage.go - - // submit transaction to mempool - // https://github.com/filecoin-project/lotus/blob/master/api/api_full.go#L169 - // msgId, err := client.node.MpoolPush(ctx, &signedMessage) - // if err != nil { - // return fmt.Errorf("pushing message to message pool: %v", err) - // } - panic("unimplemented") + switch tx := tx.(type) { + case Tx: + // construct crypto.Signature + signature := crypto.Signature{ + Type: crypto.SigTypeSecp256k1, + Data: tx.signature.Bytes(), + } + + // construct types.SignedMessage + signedMessage := types.SignedMessage{ + Message: tx.msg, + Signature: signature, + } + + // submit transaction to mempool + _, err := client.node.MpoolPush(ctx, &signedMessage) + if err != nil { + return fmt.Errorf("pushing msg to mpool: %v", err) + } + return nil + default: + return fmt.Errorf("invalid tx type: %v", tx) + } } From 87e6e60faf98a6061e021c9b8883e87e3ced6a92 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 Aug 2020 12:35:40 +0530 Subject: [PATCH 055/335] acala docker setup and compiling code (not tested) --- chain/acala/acala.go | 270 ++++++++++++++++++++++++++++ chain/acala/acala_suite_test.go | 13 ++ chain/acala/acala_test.go | 36 ++++ chain/acala/address.go | 38 ++++ chain/acala/decode.go | 309 ++++++++++++++++++++++++++++++++ go.mod | 2 + go.sum | 12 +- infra/acala/Dockerfile | 38 ++++ infra/acala/run.sh | 10 ++ infra/docker-compose.yaml | 13 ++ 10 files changed, 737 insertions(+), 4 deletions(-) create mode 100644 chain/acala/acala.go create mode 100644 chain/acala/acala_suite_test.go create mode 100644 chain/acala/acala_test.go create mode 100644 chain/acala/address.go create mode 100644 chain/acala/decode.go create mode 100644 infra/acala/Dockerfile create mode 100644 infra/acala/run.sh diff --git a/chain/acala/acala.go b/chain/acala/acala.go new file mode 100644 index 00000000..6daf885e --- /dev/null +++ b/chain/acala/acala.go @@ -0,0 +1,270 @@ +package acala + +import ( + "context" + "fmt" + + gsrpc "github.com/centrifuge/go-substrate-rpc-client" + "github.com/centrifuge/go-substrate-rpc-client/types" + "github.com/renproject/multichain" + "github.com/renproject/pack" + "go.uber.org/zap" +) + +const DefaultClientRPCURL = "ws://127.0.0.1:9933" + +type ClientOptions struct { + Logger *zap.Logger + rpcURL pack.String +} + +func DefaultClientOptions() ClientOptions { + logger, err := zap.NewDevelopment() + if err != nil { + panic(err) + } + return ClientOptions{ + Logger: logger, + rpcURL: DefaultClientRPCURL, + } +} + +func (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions { + opts.rpcURL = rpcURL + return opts +} + +type Client struct { + opts ClientOptions + api gsrpc.SubstrateAPI +} + +func NewClient(opts ClientOptions) (*Client, error) { + substrateAPI, err := gsrpc.NewSubstrateAPI(string(opts.rpcURL)) + if err != nil { + return nil, err + } + + return &Client{ + opts: opts, + api: *substrateAPI, + }, nil +} + +func printEvents(meta *types.Metadata, data *types.StorageDataRaw, nhBlock types.Hash) error { + // key, err := types.CreateStorageKey(meta, "RenToken", "Events", nil, nil) + // if err != nil { + // return err + // } + + fmt.Printf("Meta: %#v\n", meta) + + // var er EventRecordsRaw + // err = est.getStorage(key, &er, nhBlock) + // if err != nil { + // return err + // } + + fmt.Printf("data: %#v\n", data) + + er := types.EventRecordsRaw(*data) + + e := EventsWithMint{} + err := DecodeEvents(&er, meta, &e) + if err != nil { + return err + } + + // decoder := scale.NewDecoder(bytes.NewReader(er)) + + // // determine number of events + // n, err := decoder.DecodeUintCompact() + // if err != nil { + // return err + // } + + // fmt.Printf("found %v events", n) + + // // iterate over events + // for i := uint64(0); i < n.Uint64(); i++ { + // fmt.Printf("decoding event #%v\n", i) + + // // decode Phase + // phase := types.Phase{} + // err := decoder.Decode(&phase) + // if err != nil { + // return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) + // } + + // // decode EventID + // id := types.EventID{} + // err = decoder.Decode(&id) + // if err != nil { + // return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) + // } + + // fmt.Printf("event #%v has EventID %v\n", i, id) + + // } + + // events := types.EventRecords{} + // err := EventRecordsRaw(*data).DecodeEventRecords(meta, &events) + // if err != nil { + // panic(err) + // } + + // Show what we are busy with + for _, e := range e.RenToken_AssetsMinted { + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Phase) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Who) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Currency) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Amount) + fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Topics) + } + // for _, e := range e.Balances_Endowed { + // fmt.Printf("[EVENT] Balances:Endowed:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) + // } + // for _, e := range e.Balances_DustLost { + // fmt.Printf("[EVENT] Balances:DustLost:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) + // } + // for _, e := range e.Balances_Transfer { + // fmt.Printf("[EVENT] Balances:Transfer:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v, %v, %v\n", e.From, e.To, e.Value) + // } + // for _, e := range e.Balances_BalanceSet { + // fmt.Printf("[EVENT] Balances:BalanceSet:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v, %v, %v\n", e.Who, e.Free, e.Reserved) + // } + // for _, e := range e.Balances_Deposit { + // fmt.Printf("[EVENT] Balances:Deposit:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v, %v\n", e.Who, e.Balance) + // } + // for _, e := range e.Grandpa_NewAuthorities { + // fmt.Printf("[EVENT] Grandpa:NewAuthorities:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.NewAuthorities) + // } + // for _, e := range e.Grandpa_Paused { + // fmt.Printf("[EVENT] Grandpa:Paused:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.Grandpa_Resumed { + // fmt.Printf("[EVENT] Grandpa:Resumed:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.ImOnline_HeartbeatReceived { + // fmt.Printf("[EVENT] ImOnline:HeartbeatReceived:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x\n", e.AuthorityID) + // } + // for _, e := range e.ImOnline_AllGood { + // fmt.Printf("[EVENT] ImOnline:AllGood:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.ImOnline_SomeOffline { + // fmt.Printf("[EVENT] ImOnline:SomeOffline:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.IdentificationTuples) + // } + // for _, e := range e.Indices_IndexAssigned { + // fmt.Printf("[EVENT] Indices:IndexAssigned:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x%v\n", e.AccountID, e.AccountIndex) + // } + // for _, e := range e.Indices_IndexFreed { + // fmt.Printf("[EVENT] Indices:IndexFreed:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.AccountIndex) + // } + // for _, e := range e.Offences_Offence { + // fmt.Printf("[EVENT] Offences:Offence:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v%v\n", e.Kind, e.OpaqueTimeSlot) + // } + // for _, e := range e.Session_NewSession { + // fmt.Printf("[EVENT] Session:NewSession:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.SessionIndex) + // } + // for _, e := range e.Staking_Reward { + // fmt.Printf("[EVENT] Staking:Reward:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.Balance) + // } + // for _, e := range e.Staking_Slash { + // fmt.Printf("[EVENT] Staking:Slash:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x%v\n", e.AccountID, e.Balance) + // } + // for _, e := range e.Staking_OldSlashingReportDiscarded { + // fmt.Printf("[EVENT] Staking:OldSlashingReportDiscarded:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.SessionIndex) + // } + // for _, e := range e.System_ExtrinsicSuccess { + // fmt.Printf("[EVENT] System:ExtrinsicSuccess:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.System_ExtrinsicFailed { + // fmt.Printf("[EVENT] System:ErtrinsicFailed:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%v\n", e.DispatchError) + // } + // for _, e := range e.System_CodeUpdated { + // fmt.Printf("[EVENT] System:CodeUpdated:: (phase=%#v)\n", e.Phase) + // } + // for _, e := range e.System_NewAccount { + // fmt.Printf("[EVENT] System:NewAccount:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#x\n", e.Who) + // } + // for _, e := range e.System_KilledAccount { + // fmt.Printf("[EVENT] System:KilledAccount:: (phase=%#v)\n", e.Phase) + // fmt.Printf("\t%#X\n", e.Who) + // } + + return nil +} + +func (client *Client) BurnEvent(ctx context.Context, asset multichain.Asset, nonce pack.Bytes32, blockheight pack.U64) (amount pack.U256, to pack.String, confs int64, err error) { + + meta, err := client.api.RPC.State.GetMetadataLatest() + if err != nil { + panic(err) + } + + // fmt.Printf("%#v\n", meta) + + // Subscribe to system events via storage + key, err := types.CreateStorageKey(meta, "System", "Events", nil, nil) + if err != nil { + panic(err) + } + + blockhash, err := client.api.RPC.Chain.GetBlockHash(blockheight.Uint64()) + if err != nil { + panic(err) + } + + fmt.Printf("blockhash: %#v\n", blockhash.Hex()) + + data, err := client.api.RPC.State.GetStorageRaw(key, blockhash) + + if err = printEvents(meta, data, blockhash); err != nil { + panic(err) + } + + fmt.Printf("\nLive events:\n") + + // fmt.Printf("data: %#v\n", data) + + // panic("unimplemented") + + sub, err := client.api.RPC.State.SubscribeStorageRaw([]types.StorageKey{key}) + if err != nil { + panic(err) + } + defer sub.Unsubscribe() + + // outer for loop for subscription notifications + for { + set := <-sub.Chan() + // inner loop for the changes within one of those notifications + for _, chng := range set.Changes { + if !types.Eq(chng.StorageKey, key) || !chng.HasStorageData { + // skip, we are only interested in events with content + continue + } + + // printEvents(meta, &chng.StorageData) + } + } + + // return pack.U256{}, pack.String(""), 0, fmt.Errorf("unimplemented") +} diff --git a/chain/acala/acala_suite_test.go b/chain/acala/acala_suite_test.go new file mode 100644 index 00000000..f91d1e63 --- /dev/null +++ b/chain/acala/acala_suite_test.go @@ -0,0 +1,13 @@ +package acala_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestSubstratecompat(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Acala Suite") +} diff --git a/chain/acala/acala_test.go b/chain/acala/acala_test.go new file mode 100644 index 00000000..edc6f3d5 --- /dev/null +++ b/chain/acala/acala_test.go @@ -0,0 +1,36 @@ +package acala_test + +import ( + "context" + "fmt" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/acala" + "github.com/renproject/pack" +) + +var _ = Describe("Substrate client", func() { + Context("when verifying burns", func() { + It("should verify a valid burn", func() { + client, err := acala.NewClient(acala.DefaultClientOptions()) + if err != nil { + panic(err) + } + + nonce := [32]byte{0} + amount, to, confs, err := client.BurnEvent(context.Background(), multichain.BTC, pack.NewBytes32(nonce), pack.NewU64(3047)) + if err != nil { + panic(err) + } + + fmt.Printf("Amount: %v\n", amount) + fmt.Printf("To: %v\n", to) + fmt.Printf("Confs: %v\n", confs) + + Expect(amount).Should(Equal(6000)) + }) + }) +}) diff --git a/chain/acala/address.go b/chain/acala/address.go new file mode 100644 index 00000000..5a0a49dc --- /dev/null +++ b/chain/acala/address.go @@ -0,0 +1,38 @@ +package acala + +import ( + "fmt" + + "github.com/btcsuite/btcutil/base58" + "github.com/renproject/pack" +) + +// An Address represents a public address on a Substrate blockchain. It can be +// the address of an external account, or the address of a smart contract. +type Address pack.Bytes + +// The AddressDecoder defines an interface for decoding string representations +// of Substrate address into the concrete Address type. +type AddressDecoder interface { + DecodeAddress(pack.String) (Address, error) +} + +type addressDecoder struct{} + +// NewAddressDecoder returns the default AddressDecoder for Substract chains. It +// uses the Bitcoin base58 alphabet to decode the string, and interprets the +// result as a 2-byte address type, 32-byte array, and 1-byte checksum. +func NewAddressDecoder() AddressDecoder { + return addressDecoder{} +} + +// DecodeAddress the string using the Bitcoin base58 alphabet. If the string +// does not a 2-byte address type, 32-byte array, and 1-byte checksum, then an +// error is returned. +func (addressDecoder) DecodeAddress(encoded pack.String) (Address, error) { + data := base58.Decode(encoded.String()) + if len(data) != 35 { + return Address{}, fmt.Errorf("expected 35 bytes, got %v bytes", len(data)) + } + return Address(data), nil +} diff --git a/chain/acala/decode.go b/chain/acala/decode.go new file mode 100644 index 00000000..6fff7eca --- /dev/null +++ b/chain/acala/decode.go @@ -0,0 +1,309 @@ +package acala + +import ( + "bytes" + "errors" + "fmt" + "reflect" + + "github.com/centrifuge/go-substrate-rpc-client/scale" + "github.com/centrifuge/go-substrate-rpc-client/types" +) + +type eventAssetsMinted struct { + Phase types.Phase + Who types.AccountID + Currency types.U8 + Amount types.U128 + Topics []types.Hash +} + +type EventsWithMint struct { + types.EventRecords + RenToken_AssetsMinted []eventAssetsMinted //nolint:stylecheck,golint +} + +func FindEventForEventID(m types.MetadataV10, eventID types.EventID) (*types.EventMetadataV4, error) { + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mi != eventID[0] { + mi++ + continue + } + if int(eventID[1]) >= len(mod.Events) { + return nil, fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return &mod.Events[eventID[1]], nil + } + return nil, fmt.Errorf("module index %v out of range", eventID[0]) +} + +// DecodeEventRecords decodes the events records from an EventRecordRaw into a target t using the given Metadata m +// If this method returns an error like `unable to decode Phase for event #x: EOF`, it is likely that you have defined +// a custom event record with a wrong type. For example your custom event record has a field with a length prefixed +// type, such as types.Bytes, where your event in reallity contains a fixed width type, such as a types.U32. +func DecodeEvents(e *types.EventRecordsRaw, m *types.Metadata, t interface{}) error { + // ensure t is a pointer + ttyp := reflect.TypeOf(t) + if ttyp.Kind() != reflect.Ptr { + return errors.New("target must be a pointer, but is " + fmt.Sprint(ttyp)) + } + // ensure t is not a nil pointer + tval := reflect.ValueOf(t) + if tval.IsNil() { + return errors.New("target is a nil pointer") + } + val := tval.Elem() + typ := val.Type() + // ensure val can be set + if !val.CanSet() { + return fmt.Errorf("unsettable value %v", typ) + } + // ensure val points to a struct + if val.Kind() != reflect.Struct { + return fmt.Errorf("target must point to a struct, but is " + fmt.Sprint(typ)) + } + + decoder := scale.NewDecoder(bytes.NewReader(*e)) + + // determine number of events + n, err := decoder.DecodeUintCompact() + if err != nil { + return err + } + + fmt.Println(fmt.Sprintf("found %v events", n)) + + // iterate over events + for i := uint64(0); i < n; i++ { + fmt.Println(fmt.Sprintf("decoding event #%v", i)) + + // decode Phase + phase := types.Phase{} + err := decoder.Decode(&phase) + if err != nil { + return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) + } + + // decode EventID + id := types.EventID{} + err = decoder.Decode(&id) + if err != nil { + return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) + } + + fmt.Println(fmt.Sprintf("event #%v has EventID %v", i, id)) + + // ask metadata for method & event name for event + moduleName, eventName, err := m.FindEventNamesForEventID(id) + // moduleName, eventName, err := "System", "ExtrinsicSuccess", nil + if err != nil { + fmt.Printf("unable to find event with EventID %v in metadata for event #%v: %s\n", id, i, err) + continue + // return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) + } + + fmt.Println(fmt.Sprintf("event #%v is in module %v with event name %v", i, moduleName, eventName)) + + // check whether name for eventID exists in t + field := val.FieldByName(fmt.Sprintf("%v_%v", moduleName, eventName)) + if !field.IsValid() { + eventParams, err := FindEventForEventID(m.AsMetadataV10, id) + if err != nil { + return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) + } + + for j := 0; j < len(eventParams.Args); j++ { + fmt.Printf("decoding field: %v (%v)\n", j, eventParams.Args[j]) + switch eventParams.Args[j] { + case "u8": + param := types.U8(0) + err = decoder.Decode(param) + case "u16": + param := types.U16(0) + err = decoder.Decode(param) + case "u32": + param := types.U32(0) + err = decoder.Decode(param) + case "u64": + param := types.U64(0) + err = decoder.Decode(param) + case "u128": + param := types.U128{} + err = decoder.Decode(param) + case "u256": + param := types.U256{} + err = decoder.Decode(param) + case "Phase": + param := types.Phase{} + err = decoder.Decode(param) + case "DispatchInfo": + param := types.DispatchInfo{} + err = decoder.Decode(param) + case "DispatchError": + param := types.DispatchError{} + err = decoder.Decode(param) + case "AccountId": + param := types.AccountID{} + err = decoder.Decode(param) + case "AccountIndex": + param := types.AccountIndex(0) + err = decoder.Decode(param) + // case "Balance": + // param := types.Balance{} + // err = decoder.Decode(param) + // case "Status": + // param := types.Status{} + // err = decoder.Decode(param) + case "bool": + param := types.Bool(false) + err = decoder.Decode(param) + // case "CallHash": + // param := types.CallHash{} + // err = decoder.Decode(param) + // case "Timepoint": + // param := types.Timepoint{} + // err = decoder.Decode(param) + // case "ProposalIndex": + // param := types.ProposalIndex{} + // err = decoder.Decode(param) + case "Hash": + param := types.Hash{} + err = decoder.Decode(param) + // case "EraIndex": + // param := types.EraIndex{} + // err = decoder.Decode(param) + // case "SessionIndex": + // param := types.SessionIndex{} + // err = decoder.Decode(param) + // case "ElectionCompute": + // param := types.ElectionCompute{} + // err = decoder.Decode(param) + // case "MemberCount": + // param := types.MemberCount{} + // err = decoder.Decode(param) + // case "sp_std": + // param := // types.sp_std::marker::PhantomData<(AccountId, Event)>{} + // err = decoder.Decode(param) + // case "Vec": + // param := // types.Vec<(OracleKey, OracleValue)>{} + // err = decoder.Decode(param) + // case "CurrencyId": + // param := types.CurrencyId{} + // err = decoder.Decode(param) + // case "Amount": + // param := types.Amount{} + // err = decoder.Decode(param) + // case "VestingSchedule": + // param := types.VestingSchedule{} + // err = decoder.Decode(param) + case "BlockNumber": + param := types.BlockNumber(0) + err = decoder.Decode(param) + // case "DispatchId": + // param := types.DispatchId{} + // err = decoder.Decode(param) + case "StorageKey": + param := types.StorageKey{} + err = decoder.Decode(param) + // case "StorageValue": + // param := types.StorageValue{} + // err = decoder.Decode(param) + // case "AuctionId": + // param := types.AuctionId{} + // err = decoder.Decode(param) + // case "Price": + // param := types.Price{} + // err = decoder.Decode(param) + // case "DebitAmount": + // param := types.DebitAmount{} + // err = decoder.Decode(param) + // case "DebitBalance": + // param := types.DebitBalance{} + // err = decoder.Decode(param) + // case "Share": + // param := types.Share{} + // err = decoder.Decode(param) + // case "LiquidationStrategy": + // param := types.LiquidationStrategy{} + // err = decoder.Decode(param) + // case "Option": + // param := types.Option{} + // err = decoder.Decode(param) + // case "Option": + // param := types.Option{} + // err = decoder.Decode(param) + // case "Rate": + // param := types.Rate{} + // err = decoder.Decode(param) + // case "Vec": + // param := // types.Vec<(CurrencyId, Balance)>{} + // err = decoder.Decode(param) + // case "AirDropCurrencyId": + // param := types.AirDropCurrencyId{} + // err = decoder.Decode(param) + // case "Vec": + // param := // types.Vec{} + // err = decoder.Decode(param) + + case "AuthorityList": + param := []struct { + AuthorityID types.AuthorityID + AuthorityWeight types.U64 + }{} + err = decoder.Decode(param) + default: + return fmt.Errorf("unable to decode field %v_%v arg #%v %v", moduleName, + eventName, j, eventParams.Args[j]) + } + } + + fmt.Printf("unable to find field %v_%v for event #%v with EventID %v\n", moduleName, eventName, i, id) + continue + // return fmt.Errorf("unable to find field %v_%v for event #%v with EventID %v", moduleName, eventName, i, id) + } + + // create a pointer to with the correct type that will hold the decoded event + holder := reflect.New(field.Type().Elem()) + + // ensure first field is for Phase, last field is for Topics + numFields := holder.Elem().NumField() + fmt.Printf("numFields: %v\n", numFields) + if numFields < 2 { + return fmt.Errorf("expected event #%v with EventID %v, field %v_%v to have at least 2 fields "+ + "(for Phase and Topics), but has %v fields", i, id, moduleName, eventName, numFields) + } + phaseField := holder.Elem().FieldByIndex([]int{0}) + if phaseField.Type() != reflect.TypeOf(phase) { + return fmt.Errorf("expected the first field of event #%v with EventID %v, field %v_%v to be of type "+ + "types.Phase, but got %v", i, id, moduleName, eventName, phaseField.Type()) + } + topicsField := holder.Elem().FieldByIndex([]int{numFields - 1}) + if topicsField.Type() != reflect.TypeOf([]types.Hash{}) { + return fmt.Errorf("expected the last field of event #%v with EventID %v, field %v_%v to be of type "+ + "[]types.Hash for Topics, but got %v", i, id, moduleName, eventName, topicsField.Type()) + } + + // set the phase we decoded earlier + phaseField.Set(reflect.ValueOf(phase)) + + // set the remaining fields + for j := 1; j < numFields; j++ { + fmt.Printf("decoding field: %v\n", j) + err = decoder.Decode(holder.Elem().FieldByIndex([]int{j}).Addr().Interface()) + if err != nil { + return fmt.Errorf("unable to decode field %v event #%v with EventID %v, field %v_%v: %v", j, i, id, moduleName, + eventName, err) + } + } + + // add the decoded event to the slice + field.Set(reflect.Append(field, holder.Elem())) + + fmt.Println(fmt.Sprintf("decoded event #%v", i)) + } + return nil +} diff --git a/go.mod b/go.mod index 835147d5..e83ddd6c 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.14 require ( github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcutil v1.0.2 + github.com/centrifuge/go-substrate-rpc-client v1.1.0 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf github.com/ethereum/go-ethereum v1.9.20 github.com/filecoin-project/go-address v0.0.3 @@ -16,6 +17,7 @@ require ( github.com/multiformats/go-varint v0.0.6 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 + github.com/pierrec/xxHash v0.1.5 // indirect github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.3 github.com/renproject/surge v1.2.6 diff --git a/go.sum b/go.sum index ed7b6f42..7d2a777f 100644 --- a/go.sum +++ b/go.sum @@ -78,6 +78,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -126,6 +127,8 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/centrifuge/go-substrate-rpc-client v1.1.0 h1:cpfG7KKwy+n7FRb1LkiMYwi6e4gwzaooGfPIzXXQj6w= +github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -168,6 +171,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= @@ -218,9 +222,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= github.com/filecoin-project/chain-validation v0.0.6-0.20200813000554-40c22fe26eef/go.mod h1:SMj5VK1pYgqC8FXVEtOBRTc+9AIrYu+C+K3tAXi2Rk8= -github.com/filecoin-project/filecoin-ffi v0.0.0-20200326153646-e899cc1dd072/go.mod h1:PtH9YP0rURHUKHrKeEBeWg/BqIBMQOz8wtlXlVGREBE= -github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d h1:YVh0Q+1iUvbv7SIfwA/alULOlWjQNOEnV72rgeYweLY= -github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= @@ -276,7 +277,6 @@ github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= -github.com/filecoin-project/specs-actors v0.0.0-20200226200336-94c9b92b2775/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= @@ -322,6 +322,7 @@ github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNI github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -1144,6 +1145,8 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= +github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1209,6 +1212,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= diff --git a/infra/acala/Dockerfile b/infra/acala/Dockerfile new file mode 100644 index 00000000..a988fb74 --- /dev/null +++ b/infra/acala/Dockerfile @@ -0,0 +1,38 @@ +FROM ubuntu:xenial + +RUN apt-get update && apt-get install --yes --fix-missing software-properties-common curl git clang +RUN apt-get install --yes --fix-missing --no-install-recommends build-essential + +# Install Rust +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + +# Clone repository +RUN git clone https://github.com/AcalaNetwork/Acala.git + +RUN mv Acala /app +WORKDIR /app + +# TEMPORARY: use the branch that has a good reference to the submodules +# TODO: remove when the `master` branch of Acala is updated +RUN git fetch +RUN git checkout update-orml +RUN git pull + +# Make sure submodule.recurse is set to true to make life with submodule easier. +RUN git config --global submodule.recurse true + +# Build +RUN make init +RUN make build + +WORKDIR / +COPY run.sh /root/ +RUN chmod +x /root/run.sh + +# rpc port +EXPOSE 9933 +# ws port +EXPOSE 9944 + +ENTRYPOINT ["./root/run.sh"] diff --git a/infra/acala/run.sh b/infra/acala/run.sh new file mode 100644 index 00000000..a48318f1 --- /dev/null +++ b/infra/acala/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash +ADDRESS=$1 + +# Start +cd /app +make run +sleep 10 + +# Print setup +echo "ACALA_ADDRESS=$ADDRESS" diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 513c7e7b..055e0b7d 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -1,5 +1,18 @@ version: "2" services: + # + # Acala + # + acala: + build: + context: ./acala + ports: + - "0.0.0.0:9933:9933" + - "0.0.0.0:9944:9944" + entrypoint: + - "./root/run.sh" + - "${ACALA_ADDRESS}" + # # Bitcoin # From 2de671e887e24ae57dc88442b16b2dfde8e864af Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 Aug 2020 20:21:14 +0530 Subject: [PATCH 056/335] clean up | binance smart chain docker setup --- chain/acala/acala.go | 144 +------------------------------- chain/acala/acala_test.go | 23 +---- infra/.env | 7 ++ infra/binance/Dockerfile | 15 ++++ infra/binance/Dockerfile-riolta | 23 +++++ infra/binance/run.sh | 11 +++ infra/docker-compose.yaml | 13 +++ 7 files changed, 72 insertions(+), 164 deletions(-) create mode 100644 infra/binance/Dockerfile create mode 100644 infra/binance/Dockerfile-riolta create mode 100644 infra/binance/run.sh diff --git a/chain/acala/acala.go b/chain/acala/acala.go index 6daf885e..3452b7c2 100644 --- a/chain/acala/acala.go +++ b/chain/acala/acala.go @@ -11,7 +11,7 @@ import ( "go.uber.org/zap" ) -const DefaultClientRPCURL = "ws://127.0.0.1:9933" +const DefaultClientRPCURL = "http://127.0.0.1:9944" type ClientOptions struct { Logger *zap.Logger @@ -52,68 +52,13 @@ func NewClient(opts ClientOptions) (*Client, error) { } func printEvents(meta *types.Metadata, data *types.StorageDataRaw, nhBlock types.Hash) error { - // key, err := types.CreateStorageKey(meta, "RenToken", "Events", nil, nil) - // if err != nil { - // return err - // } - - fmt.Printf("Meta: %#v\n", meta) - - // var er EventRecordsRaw - // err = est.getStorage(key, &er, nhBlock) - // if err != nil { - // return err - // } - - fmt.Printf("data: %#v\n", data) - er := types.EventRecordsRaw(*data) - e := EventsWithMint{} err := DecodeEvents(&er, meta, &e) if err != nil { return err } - // decoder := scale.NewDecoder(bytes.NewReader(er)) - - // // determine number of events - // n, err := decoder.DecodeUintCompact() - // if err != nil { - // return err - // } - - // fmt.Printf("found %v events", n) - - // // iterate over events - // for i := uint64(0); i < n.Uint64(); i++ { - // fmt.Printf("decoding event #%v\n", i) - - // // decode Phase - // phase := types.Phase{} - // err := decoder.Decode(&phase) - // if err != nil { - // return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) - // } - - // // decode EventID - // id := types.EventID{} - // err = decoder.Decode(&id) - // if err != nil { - // return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) - // } - - // fmt.Printf("event #%v has EventID %v\n", i, id) - - // } - - // events := types.EventRecords{} - // err := EventRecordsRaw(*data).DecodeEventRecords(meta, &events) - // if err != nil { - // panic(err) - // } - - // Show what we are busy with for _, e := range e.RenToken_AssetsMinted { fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Phase) fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Who) @@ -121,93 +66,6 @@ func printEvents(meta *types.Metadata, data *types.StorageDataRaw, nhBlock types fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Amount) fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Topics) } - // for _, e := range e.Balances_Endowed { - // fmt.Printf("[EVENT] Balances:Endowed:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) - // } - // for _, e := range e.Balances_DustLost { - // fmt.Printf("[EVENT] Balances:DustLost:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x, %v\n", e.Who, e.Balance) - // } - // for _, e := range e.Balances_Transfer { - // fmt.Printf("[EVENT] Balances:Transfer:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v, %v, %v\n", e.From, e.To, e.Value) - // } - // for _, e := range e.Balances_BalanceSet { - // fmt.Printf("[EVENT] Balances:BalanceSet:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v, %v, %v\n", e.Who, e.Free, e.Reserved) - // } - // for _, e := range e.Balances_Deposit { - // fmt.Printf("[EVENT] Balances:Deposit:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v, %v\n", e.Who, e.Balance) - // } - // for _, e := range e.Grandpa_NewAuthorities { - // fmt.Printf("[EVENT] Grandpa:NewAuthorities:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.NewAuthorities) - // } - // for _, e := range e.Grandpa_Paused { - // fmt.Printf("[EVENT] Grandpa:Paused:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.Grandpa_Resumed { - // fmt.Printf("[EVENT] Grandpa:Resumed:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.ImOnline_HeartbeatReceived { - // fmt.Printf("[EVENT] ImOnline:HeartbeatReceived:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x\n", e.AuthorityID) - // } - // for _, e := range e.ImOnline_AllGood { - // fmt.Printf("[EVENT] ImOnline:AllGood:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.ImOnline_SomeOffline { - // fmt.Printf("[EVENT] ImOnline:SomeOffline:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.IdentificationTuples) - // } - // for _, e := range e.Indices_IndexAssigned { - // fmt.Printf("[EVENT] Indices:IndexAssigned:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x%v\n", e.AccountID, e.AccountIndex) - // } - // for _, e := range e.Indices_IndexFreed { - // fmt.Printf("[EVENT] Indices:IndexFreed:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.AccountIndex) - // } - // for _, e := range e.Offences_Offence { - // fmt.Printf("[EVENT] Offences:Offence:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v%v\n", e.Kind, e.OpaqueTimeSlot) - // } - // for _, e := range e.Session_NewSession { - // fmt.Printf("[EVENT] Session:NewSession:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.SessionIndex) - // } - // for _, e := range e.Staking_Reward { - // fmt.Printf("[EVENT] Staking:Reward:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.Balance) - // } - // for _, e := range e.Staking_Slash { - // fmt.Printf("[EVENT] Staking:Slash:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x%v\n", e.AccountID, e.Balance) - // } - // for _, e := range e.Staking_OldSlashingReportDiscarded { - // fmt.Printf("[EVENT] Staking:OldSlashingReportDiscarded:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.SessionIndex) - // } - // for _, e := range e.System_ExtrinsicSuccess { - // fmt.Printf("[EVENT] System:ExtrinsicSuccess:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.System_ExtrinsicFailed { - // fmt.Printf("[EVENT] System:ErtrinsicFailed:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%v\n", e.DispatchError) - // } - // for _, e := range e.System_CodeUpdated { - // fmt.Printf("[EVENT] System:CodeUpdated:: (phase=%#v)\n", e.Phase) - // } - // for _, e := range e.System_NewAccount { - // fmt.Printf("[EVENT] System:NewAccount:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#x\n", e.Who) - // } - // for _, e := range e.System_KilledAccount { - // fmt.Printf("[EVENT] System:KilledAccount:: (phase=%#v)\n", e.Phase) - // fmt.Printf("\t%#X\n", e.Who) - // } return nil } diff --git a/chain/acala/acala_test.go b/chain/acala/acala_test.go index edc6f3d5..55021661 100644 --- a/chain/acala/acala_test.go +++ b/chain/acala/acala_test.go @@ -1,36 +1,17 @@ package acala_test import ( - "context" - "fmt" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/renproject/multichain" "github.com/renproject/multichain/chain/acala" - "github.com/renproject/pack" ) var _ = Describe("Substrate client", func() { Context("when verifying burns", func() { It("should verify a valid burn", func() { - client, err := acala.NewClient(acala.DefaultClientOptions()) - if err != nil { - panic(err) - } - - nonce := [32]byte{0} - amount, to, confs, err := client.BurnEvent(context.Background(), multichain.BTC, pack.NewBytes32(nonce), pack.NewU64(3047)) - if err != nil { - panic(err) - } - - fmt.Printf("Amount: %v\n", amount) - fmt.Printf("To: %v\n", to) - fmt.Printf("Confs: %v\n", confs) - - Expect(amount).Should(Equal(6000)) + _, err := acala.NewClient(acala.DefaultClientOptions()) + Expect(err).ToNot(HaveOccurred()) }) }) }) diff --git a/infra/.env b/infra/.env index bf2515ac..be8dd432 100644 --- a/infra/.env +++ b/infra/.env @@ -1,3 +1,10 @@ +# +# Binance Smart Chain +# + +export BINANCE_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" +export BINANCE_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A + # # Bitcoin # diff --git a/infra/binance/Dockerfile b/infra/binance/Dockerfile new file mode 100644 index 00000000..f8646aa1 --- /dev/null +++ b/infra/binance/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:xenial + +RUN apt-get update --fix-missing +RUN apt-get install --yes curl + +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - +RUN apt-get install --yes nodejs +RUN npm install -g ganache-cli + +COPY run.sh /root/run.sh +RUN chmod +x /root/run.sh + +EXPOSE 8575 + +ENTRYPOINT ["./root/run.sh"] diff --git a/infra/binance/Dockerfile-riolta b/infra/binance/Dockerfile-riolta new file mode 100644 index 00000000..a63ce80c --- /dev/null +++ b/infra/binance/Dockerfile-riolta @@ -0,0 +1,23 @@ +# Build Geth in a stock Go builder container +FROM golang:1.14-alpine as builder + +RUN apk add --no-cache make gcc musl-dev linux-headers git + +WORKDIR /app +RUN git clone -b 1.0.1.beta.2 https://github.com/binance-chain/bsc +WORKDIR /app/bsc + +RUN make geth + +RUN touch genesis.json +RUN touch config.yaml +RUN wget -q -O genesis.json https://github.com/binance-chain/bsc/releases/download/v1.0.0-beta.1/genesis.json +RUN wget -q -O config.yaml https://github.com/binance-chain/bsc/releases/download/v1.0.0-beta.1/config.toml + +# RPC port +EXPOSE 8575 + +# init the node with genesis file +RUN ./build/bin/geth --datadir node init genesis.json + +ENTRYPOINT ["./build/bin/geth", "--config", "./config.yaml", "--datadir", "./node", "--rpc", "--rpcport", "8575"] diff --git a/infra/binance/run.sh b/infra/binance/run.sh new file mode 100644 index 00000000..2114daf0 --- /dev/null +++ b/infra/binance/run.sh @@ -0,0 +1,11 @@ +#!/bin/bash +MNEMONIC=$1 +ADDRESS=$2 + +ganache-cli \ + -h 0.0.0.0 \ + -k muirGlacier \ + -i 420 \ + -m "$MNEMONIC" \ + -p 8575 \ + -u $ADDRESS diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 055e0b7d..d6c54ad2 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -13,6 +13,19 @@ services: - "./root/run.sh" - "${ACALA_ADDRESS}" + # + # Binance Smart Chain + # + binance: + build: + context: ./binance + ports: + - "0.0.0.0:8575:8575" + # entrypoint: + # - "./root/run.sh" + # - "${BINANCE_MNEMONIC}" + # - "${BINANCE_ADDRESS}" + # # Bitcoin # From 4c171f6ebb8adfbc39a185cc953b3e88d4ea5780 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 Aug 2020 20:32:12 +0530 Subject: [PATCH 057/335] (fix) uncomment the entrypoint for binance dev docker setup --- infra/docker-compose.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index d6c54ad2..fd515594 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -21,10 +21,10 @@ services: context: ./binance ports: - "0.0.0.0:8575:8575" - # entrypoint: - # - "./root/run.sh" - # - "${BINANCE_MNEMONIC}" - # - "${BINANCE_ADDRESS}" + entrypoint: + - "./root/run.sh" + - "${BINANCE_MNEMONIC}" + - "${BINANCE_ADDRESS}" # # Bitcoin From 1c86cf2db3c989304ca7d6c35cba83995e819ed1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 27 Aug 2020 23:04:08 +0530 Subject: [PATCH 058/335] implement the account API for Ethereum --- api/account/account.go | 4 +- chain/ethereum/account.go | 89 +++++++++++++++++++++++++++++++++++++++ chain/ethereum/gas.go | 31 ++++++++++++++ go.sum | 7 +++ multichain.go | 11 +++++ 5 files changed, 140 insertions(+), 2 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 7d309721..c4114d37 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -39,12 +39,12 @@ type Tx interface { // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighashes() ([]pack.Bytes32, error) + Sighashes() (pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign([]pack.Bytes65, pack.Bytes) error + Sign(pack.Bytes65, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 59dd7210..49f31805 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -1 +1,90 @@ package ethereum + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" + "github.com/renproject/pack" +) + +type TxBuilder struct { + config *params.ChainConfig +} + +func NewTxBuilder(config *params.ChainConfig) TxBuilder { + return TxBuilder{config: config} +} + +func (txBuilder TxBuilder) BuildTx( + from, to address.Address, + value, nonce pack.U256, + payload pack.Bytes, +) (account.Tx, error) { + panic("unimplemented") +} + +type Tx struct { + from Address + + tx *types.Transaction + + signer types.Signer + signed bool +} + +func (tx *Tx) Hash() pack.Bytes { + return pack.NewBytes(tx.tx.Hash().Bytes()) +} + +func (tx *Tx) From() address.Address { + return address.Address(tx.from.String()) +} + +func (tx *Tx) To() address.Address { + return address.Address(tx.tx.To().String()) +} + +func (tx *Tx) Value() pack.U256 { + return pack.NewU256FromInt(tx.tx.Value()) +} + +func (tx *Tx) Nonce() pack.U256 { + return pack.NewU256FromU64(pack.NewU64(tx.tx.Nonce())) +} + +func (tx *Tx) Payload() contract.CallData { + return contract.CallData(pack.NewBytes(tx.tx.Data())) +} + +func (tx *Tx) Sighashes() (pack.Bytes32, error) { + sighash := tx.signer.Hash(tx.tx) + return pack.NewBytes32(sighash), nil +} + +func (tx *Tx) Sign(signature pack.Bytes65, pubKey pack.Bytes) error { + if tx.signed { + return fmt.Errorf("already signed") + } + + signedTx, err := tx.tx.WithSignature(tx.signer, signature.Bytes()) + if err != nil { + return err + } + + tx.tx = signedTx + tx.signed = true + return nil +} + +func (tx *Tx) Serialize() (pack.Bytes, error) { + serialized, err := tx.tx.MarshalJSON() + if err != nil { + return pack.Bytes{}, err + } + + return pack.NewBytes(serialized), nil +} diff --git a/chain/ethereum/gas.go b/chain/ethereum/gas.go index 59dd7210..f091bb6d 100644 --- a/chain/ethereum/gas.go +++ b/chain/ethereum/gas.go @@ -1 +1,32 @@ package ethereum + +import ( + "context" + + "github.com/renproject/pack" +) + +// A GasEstimator returns the gas price (in wei) that is needed in order to +// confirm transactions with an estimated maximum delay of one block. In +// distributed networks that collectively build, sign, and submit transactions, +// it is important that all nodes in the network have reached consensus on the +// gas price. +type GasEstimator struct { + wei pack.U256 +} + +// NewGasEstimator returns a simple gas estimator that always returns the given +// gas price (in wei) to be used for broadcasting an Ethereum transaction. +func NewGasEstimator(wei pack.U256) GasEstimator { + return GasEstimator{ + wei: wei, + } +} + +// EstimateGasPrice returns the number of wei that is needed in order to confirm +// transactions with an estimated maximum delay of one block. It is the +// responsibility of the caller to know the number of bytes in their +// transaction. +func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { + return gasEstimator.wei, nil +} diff --git a/go.sum b/go.sum index 7d2a777f..15f08c68 100644 --- a/go.sum +++ b/go.sum @@ -62,6 +62,7 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= +github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= @@ -130,7 +131,9 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/centrifuge/go-substrate-rpc-client v1.1.0 h1:cpfG7KKwy+n7FRb1LkiMYwi6e4gwzaooGfPIzXXQj6w= github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -367,6 +370,7 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 h1:lMm2hD9Fy0ynom5+85/pbdkiYcBqM1JWmhpAXLmy0fw= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -1225,6 +1229,7 @@ github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJP github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= @@ -1281,7 +1286,9 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= +github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= diff --git a/multichain.go b/multichain.go index e20f8a6f..32b7b292 100644 --- a/multichain.go +++ b/multichain.go @@ -98,6 +98,17 @@ func (asset Asset) OriginChain() Chain { } } +func (asset Asset) ChainType() ChainType { + switch asset { + case BCH, BTC, DGB, DOGE, ZEC: + return ChainTypeUTXOBased + case BNB, ETH: + return ChainTypeAccountBased + default: + return ChainType("") + } +} + // SizeHint returns the number of bytes required to represent the asset in // binary. func (asset Asset) SizeHint() int { From 37d1cb45760215b8dbc203317df168d3aadce7b6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 28 Aug 2020 03:16:09 +0530 Subject: [PATCH 059/335] an account-based tx has a single sighash --- api/account/account.go | 4 ++-- chain/ethereum/account.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index c4114d37..5e5ecdfd 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -37,9 +37,9 @@ type Tx interface { // call functions on a contract. Payload() contract.CallData - // Sighashes that must be signed before the transaction can be submitted by + // Sighash that must be signed before the transaction can be submitted by // the client. - Sighashes() (pack.Bytes32, error) + Sighash() (pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 49f31805..e8f6bfea 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -60,7 +60,7 @@ func (tx *Tx) Payload() contract.CallData { return contract.CallData(pack.NewBytes(tx.tx.Data())) } -func (tx *Tx) Sighashes() (pack.Bytes32, error) { +func (tx *Tx) Sighash() (pack.Bytes32, error) { sighash := tx.signer.Hash(tx.tx) return pack.NewBytes32(sighash), nil } From eb1d24e4a849b1e52bd419d0d490f0f6e852adbc Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 00:38:10 +0530 Subject: [PATCH 060/335] add gas limit, fetching tx --- api/account/account.go | 2 +- api/gas/gas.go | 9 ++++++ chain/bitcoin/gas.go | 7 +++++ chain/ethereum/account.go | 59 ++++++++++++++++++++++++++++++++++++++- chain/ethereum/gas.go | 12 ++++++++ 5 files changed, 87 insertions(+), 2 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 5e5ecdfd..d530863d 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -56,7 +56,7 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { - BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (Tx, error) + BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } // The Client interface defines the functionality required to interact with a diff --git a/api/gas/gas.go b/api/gas/gas.go index 2578fc80..36d94b43 100644 --- a/api/gas/gas.go +++ b/api/gas/gas.go @@ -10,6 +10,12 @@ import ( "github.com/renproject/pack" ) +type TxType uint8 + +const ( + ETHTransfer = TxType(0) +) + // The Estimator interface defines the functionality required to know the // current recommended gas prices. type Estimator interface { @@ -22,4 +28,7 @@ type Estimator interface { // required to get a transaction into one of the next few blocks (because // blocks happen a lot faster). EstimateGasPrice(context.Context) (pack.U256, error) + + // EstimateGasLimit ... + EstimateGasLimit(TxType) (pack.U256, error) } diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index 40207885..e901fc1e 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -3,6 +3,7 @@ package bitcoin import ( "context" + "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -30,3 +31,9 @@ func NewGasEstimator(satsPerByte pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.satsPerByte, nil } + +// EstimateGasLimit returns the gas limit for a transaction. This is not relevant +// for UTXO type of chains +func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { + return pack.NewU256([32]byte{}), nil +} diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index e8f6bfea..cc66b22c 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -1,9 +1,12 @@ package ethereum import ( + "context" "fmt" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/params" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -22,9 +25,24 @@ func NewTxBuilder(config *params.ChainConfig) TxBuilder { func (txBuilder TxBuilder) BuildTx( from, to address.Address, value, nonce pack.U256, + gasPrice, gasLimit pack.U256, payload pack.Bytes, ) (account.Tx, error) { - panic("unimplemented") + toAddr, err := NewAddressFromHex(string(to)) + if err != nil { + return nil, fmt.Errorf("decoding address: %v", err) + } + fromAddr, err := NewAddressFromHex(string(from)) + if err != nil { + return nil, fmt.Errorf("decoding address: %v", err) + } + + tx := types.NewTransaction(nonce.Int().Uint64(), common.Address(toAddr), value.Int(), gasLimit.Int().Uint64(), gasPrice.Int(), []byte(payload)) + + signer := types.MakeSigner(txBuilder.config, nil) + signed := false + + return &Tx{fromAddr, tx, signer, signed}, nil } type Tx struct { @@ -88,3 +106,42 @@ func (tx *Tx) Serialize() (pack.Bytes, error) { return pack.NewBytes(serialized), nil } + +type EthClient struct { + client *ethclient.Client +} + +func NewClient(rpcURL pack.String) (account.Client, error) { + client, err := ethclient.Dial(string(rpcURL)) + if err != nil { + return nil, fmt.Errorf("dialing RPC URL %v: %v", rpcURL, err) + } + + return EthClient{client}, nil +} + +func (client EthClient) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { + txHash := common.BytesToHash(txId) + tx, isPending, err := client.client.TransactionByHash(ctx, txHash) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching tx: %v", err) + } + if isPending { + return nil, pack.NewU64(0), fmt.Errorf("tx not confirmed") + } + txReceipt, err := client.client.TransactionReceipt(ctx, txHash) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching tx receipt: %v", err) + } + block, err := client.client.BlockByNumber(ctx, nil) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("fetching current block: %v", err) + } + confs := block.NumberU64() - txReceipt.BlockNumber.Uint64() + 1 + + return &Tx{tx: tx}, pack.NewU64(confs), nil +} + +func (client EthClient) SubmitTx(ctx context.Context, tx account.Tx) error { + panic("unimplemented") +} diff --git a/chain/ethereum/gas.go b/chain/ethereum/gas.go index f091bb6d..c2c9addb 100644 --- a/chain/ethereum/gas.go +++ b/chain/ethereum/gas.go @@ -2,7 +2,9 @@ package ethereum import ( "context" + "fmt" + "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -30,3 +32,13 @@ func NewGasEstimator(wei pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.wei, nil } + +// EstimateGasLimit returns the gas limit depending on what type of transaction we wish to do +func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { + switch txType { + case gas.ETHTransfer: + return pack.NewU256FromU64(pack.NewU64(21000)), nil + default: + return pack.NewU256([32]byte{}), fmt.Errorf("non-exhaustive transaction type: %v", txType) + } +} From 659ce3b54f830884108538edfb2dda5ff0fd853d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 09:57:25 +0530 Subject: [PATCH 061/335] add support for filecoin | compilation issues --- chain/filecoin/filecoin_suite_test.go | 13 +++++++++++++ go.sum | 6 ------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 chain/filecoin/filecoin_suite_test.go diff --git a/chain/filecoin/filecoin_suite_test.go b/chain/filecoin/filecoin_suite_test.go new file mode 100644 index 00000000..db0159ad --- /dev/null +++ b/chain/filecoin/filecoin_suite_test.go @@ -0,0 +1,13 @@ +package filecoin_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestFilecoin(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Filecoin Suite") +} diff --git a/go.sum b/go.sum index 15f08c68..f7263269 100644 --- a/go.sum +++ b/go.sum @@ -62,7 +62,6 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= -github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= @@ -131,9 +130,7 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/centrifuge/go-substrate-rpc-client v1.1.0 h1:cpfG7KKwy+n7FRb1LkiMYwi6e4gwzaooGfPIzXXQj6w= github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -370,7 +367,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 h1:lMm2hD9Fy0ynom5+85/pbdkiYcBqM1JWmhpAXLmy0fw= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -1286,9 +1282,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= -github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= From 96591800663dae5ccd3509f6fbb6becf3c2fbac3 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 14:19:26 +0530 Subject: [PATCH 062/335] copy over filecoin account api impl --- api/account/account.go | 6 +++--- chain/ethereum/account.go | 12 ++++++++---- chain/filecoin/filecoint_suite_test.go | 13 ------------- 3 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 chain/filecoin/filecoint_suite_test.go diff --git a/api/account/account.go b/api/account/account.go index d530863d..858b6753 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -37,14 +37,14 @@ type Tx interface { // call functions on a contract. Payload() contract.CallData - // Sighash that must be signed before the transaction can be submitted by + // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighash() (pack.Bytes32, error) + Sighashes() ([]pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign(pack.Bytes65, pack.Bytes) error + Sign([]pack.Bytes65, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index cc66b22c..907adc21 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -78,17 +78,21 @@ func (tx *Tx) Payload() contract.CallData { return contract.CallData(pack.NewBytes(tx.tx.Data())) } -func (tx *Tx) Sighash() (pack.Bytes32, error) { +func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighash := tx.signer.Hash(tx.tx) - return pack.NewBytes32(sighash), nil + return []pack.Bytes32{pack.NewBytes32(sighash)}, nil } -func (tx *Tx) Sign(signature pack.Bytes65, pubKey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") } - signedTx, err := tx.tx.WithSignature(tx.signer, signature.Bytes()) + if len(signatures) != 1 { + return fmt.Errorf("expected exactly signature") + } + + signedTx, err := tx.tx.WithSignature(tx.signer, signatures[0].Bytes()) if err != nil { return err } diff --git a/chain/filecoin/filecoint_suite_test.go b/chain/filecoin/filecoint_suite_test.go deleted file mode 100644 index db0159ad..00000000 --- a/chain/filecoin/filecoint_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package filecoin_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestFilecoin(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Filecoin Suite") -} From 9d72df3a3fb49459fe01f4099894656e9c164785 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 21:44:51 +0530 Subject: [PATCH 063/335] docker run script fix, add filecoin to chain types --- infra/filecoin/run.sh | 10 +++++++--- multichain.go | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/infra/filecoin/run.sh b/infra/filecoin/run.sh index 1e2ec3e3..f56620e2 100644 --- a/infra/filecoin/run.sh +++ b/infra/filecoin/run.sh @@ -1,5 +1,9 @@ #!/bin/bash +cd /app/ + +export LOTUS_SKIP_GENESIS_CHECK=_yes_ + ./lotus daemon --lotus-make-genesis=dev.gen --genesis-template=localnet.json --bootstrap=false & PID=$! @@ -41,13 +45,13 @@ Timeout = "30s" # HeadNotifs = false #' > ~/.lotus/config.toml -./lotus daemon --lotus-make-genesis=/root/dev.gen --genesis-template=/root/localnet.json --bootstrap=false & +./lotus daemon --lotus-make-genesis=/root/dev.gen --genesis-template=/app/localnet.json --bootstrap=false & sleep 5 -./lotus-storage-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync +./lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync -./lotus-storage-miner run --nosync & +./lotus-miner run --nosync & sleep 15 diff --git a/multichain.go b/multichain.go index 32b7b292..ea9ec6d5 100644 --- a/multichain.go +++ b/multichain.go @@ -102,7 +102,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case BNB, ETH: + case BNB, ETH, FIL: return ChainTypeAccountBased default: return ChainType("") @@ -169,7 +169,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum: + case BinanceSmartChain, Ethereum, Filecoin: return ChainTypeAccountBased default: return ChainType("") From 34fd0b0279094bfd106b7433fc6aa580abe417eb Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 21:56:06 +0530 Subject: [PATCH 064/335] minor modifications --- chain/filecoin/account.go | 2 +- chain/filecoin/address.go | 6 +++--- chain/filecoin/address_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 8edc34da..bfbc314d 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -116,7 +116,7 @@ func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} } -func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce pack.U256, payload pack.Bytes) (account.Tx, error) { +func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ pack.U256, payload pack.Bytes) (account.Tx, error) { filfrom, err := filaddress.NewFromString(string(from)) if err != nil { return nil, fmt.Errorf("bad from address '%v': %v", from, err) diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go index afe9333f..06a36b12 100644 --- a/chain/filecoin/address.go +++ b/chain/filecoin/address.go @@ -5,7 +5,7 @@ import ( "github.com/renproject/multichain/api/address" ) -type AddressEncoderDecoder struct { +type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } @@ -13,8 +13,8 @@ type AddressEncoderDecoder struct { type AddressEncoder struct{} type AddressDecoder struct{} -func NewAddressEncoderDecoder() AddressEncoderDecoder { - return AddressEncoderDecoder{ +func NewAddressEncodeDecoder() AddressEncodeDecoder { + return AddressEncodeDecoder{ AddressEncoder: AddressEncoder{}, AddressDecoder: AddressDecoder{}, } diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go index b2c96db3..a62ea715 100644 --- a/chain/filecoin/address_test.go +++ b/chain/filecoin/address_test.go @@ -18,7 +18,7 @@ import ( var _ = Describe("Address", func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) - encoderDecoder := filecoin.NewAddressEncoderDecoder() + encoderDecoder := filecoin.NewAddressEncodeDecoder() Context("when encoding and decoding", func() { Context("for ID protocol", func() { From e653a22869a71fa60980c3975e2f2a1e67b168c3 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 31 Aug 2020 21:59:59 +0530 Subject: [PATCH 065/335] better performance for docker file --- infra/filecoin/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index aa8c623b..d802e50a 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -8,11 +8,6 @@ RUN wget -c https://golang.org/dl/go1.14.6.linux-amd64.tar.gz RUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz ENV PATH=$PATH:/usr/local/go/bin -COPY run.sh /root/run.sh -COPY miner.key /root/miner.key -RUN chmod +x /root/run.sh -RUN chmod +x /root/miner.key - WORKDIR /app RUN git clone https://github.com/filecoin-project/lotus . @@ -22,6 +17,11 @@ RUN ./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 RUN ./lotus-seed genesis new localnet.json RUN ./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json +COPY run.sh /root/run.sh +COPY miner.key /root/miner.key +RUN chmod +x /root/run.sh +RUN chmod +x /root/miner.key + EXPOSE 1234 CMD /root/run.sh From 3f3630e5b6b48ed0aa777445c061af641964efec Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 1 Sep 2020 00:19:52 +0530 Subject: [PATCH 066/335] add command to create new auth token --- infra/filecoin/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infra/filecoin/run.sh b/infra/filecoin/run.sh index f56620e2..0638fbc2 100644 --- a/infra/filecoin/run.sh +++ b/infra/filecoin/run.sh @@ -14,6 +14,8 @@ sleep 10 ./lotus wallet import /root/miner.key +./lotus auth create-token --perm admin + kill $PID echo ' From bf6eda6a78714bad61cfa7b69c525dd2565c07dd Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 1 Sep 2020 16:19:09 +0530 Subject: [PATCH 067/335] lint and cleanup --- api/account/account.go | 2 ++ api/gas/gas.go | 9 --------- chain/bitcoin/address.go | 13 +++++++++++++ chain/bitcoin/gas.go | 7 ------- chain/bitcoin/utxo.go | 8 +++++++- chain/bitcoincash/address.go | 1 + chain/bitcoincash/gas.go | 7 +++++++ chain/bitcoincash/utxo.go | 20 ++++++++++++++++++++ chain/celo/address.go | 2 ++ chain/digibyte/address.go | 7 +++++++ chain/digibyte/digibyte.go | 8 ++++---- chain/digibyte/gas.go | 5 +++++ chain/digibyte/utxo.go | 25 ++++++++++++++++++++----- chain/ethereum/account.go | 33 +++++++++++++++++++++++++++++++-- chain/ethereum/address.go | 6 ++++++ chain/ethereum/gas.go | 12 ------------ chain/filecoin/account.go | 33 +++++++++++++++++++++++++-------- chain/filecoin/address.go | 9 +++++++++ chain/zcash/address.go | 2 ++ chain/zcash/gas.go | 2 ++ chain/zcash/utxo.go | 17 +++++++++++++++++ chain/zcash/zcash.go | 7 +++++++ 22 files changed, 187 insertions(+), 48 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 858b6753..27341cb0 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -56,6 +56,8 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { + // BuildTx consumes transaction fields to construct and return a transaction + // that implements the multichain.AccountTx interface BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } diff --git a/api/gas/gas.go b/api/gas/gas.go index 36d94b43..2578fc80 100644 --- a/api/gas/gas.go +++ b/api/gas/gas.go @@ -10,12 +10,6 @@ import ( "github.com/renproject/pack" ) -type TxType uint8 - -const ( - ETHTransfer = TxType(0) -) - // The Estimator interface defines the functionality required to know the // current recommended gas prices. type Estimator interface { @@ -28,7 +22,4 @@ type Estimator interface { // required to get a transaction into one of the next few blocks (because // blocks happen a lot faster). EstimateGasPrice(context.Context) (pack.U256, error) - - // EstimateGasLimit ... - EstimateGasLimit(TxType) (pack.U256, error) } diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 3547eaeb..44038866 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -8,11 +8,14 @@ import ( "github.com/renproject/pack" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the +// chain specific configurations func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(params), @@ -20,14 +23,19 @@ func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { } } +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder struct { params *chaincfg.Params } +// NewAddressEncoder constructs a new AddressEncoder with the chain specific +// configurations func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { return AddressEncoder{params: params} } +// EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { encodedAddr := base58.Encode([]byte(rawAddr)) if _, err := btcutil.DecodeAddress(encodedAddr, encoder.params); err != nil { @@ -37,14 +45,19 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address return address.Address(encodedAddr), nil } +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder struct { params *chaincfg.Params } +// NewAddressDecoder constructs a new AddressDecoder with the chain specific +// configurations func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { return AddressDecoder{params: params} } +// DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (pack.Bytes, error) { if _, err := btcutil.DecodeAddress(string(addr), decoder.params); err != nil { // Check that the address is valid. diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index e901fc1e..40207885 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -3,7 +3,6 @@ package bitcoin import ( "context" - "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -31,9 +30,3 @@ func NewGasEstimator(satsPerByte pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.satsPerByte, nil } - -// EstimateGasLimit returns the gas limit for a transaction. This is not relevant -// for UTXO type of chains -func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { - return pack.NewU256([32]byte{}), nil -} diff --git a/chain/bitcoin/utxo.go b/chain/bitcoin/utxo.go index 367365e9..119e5880 100644 --- a/chain/bitcoin/utxo.go +++ b/chain/bitcoin/utxo.go @@ -81,15 +81,18 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given underlying transaction. func (tx *Tx) Hash() (pack.Bytes, error) { txhash := tx.msgTx.TxHash() return pack.NewBytes(txhash[:]), nil } +// Inputs returns the UTXO inputs in the underlying transaction. func (tx *Tx) Inputs() ([]utxo.Input, error) { return tx.inputs, nil } +// Outputs returns the UTXO outputs in the underlying transaction. func (tx *Tx) Outputs() ([]utxo.Output, error) { hash, err := tx.Hash() if err != nil { @@ -111,7 +114,7 @@ func (tx *Tx) Outputs() ([]utxo.Output, error) { } // Sighashes returns the digests that must be signed before the transaction -// can be submitted by the client. All transactions assume that the f +// can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighashes := make([]pack.Bytes32, len(tx.inputs)) @@ -150,6 +153,8 @@ func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { return sighashes, nil } +// Sign consumes a list of signatures, and adds them to the list of UTXOs in +// the underlying transactions. func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -201,6 +206,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the UTXO transaction to bytes func (tx *Tx) Serialize() (pack.Bytes, error) { buf := new(bytes.Buffer) if err := tx.msgTx.Serialize(buf); err != nil { diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index 89722d20..efcebd83 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -176,6 +176,7 @@ func EncodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, return EncodeToString(AppendChecksum(AddressPrefix(params), data)), nil } +// DecodeAddress implements the address.Decoder interface func DecodeAddress(addr string, params *chaincfg.Params) (Address, error) { // Legacy address decoding if address, err := btcutil.DecodeAddress(addr, params); err == nil { diff --git a/chain/bitcoincash/gas.go b/chain/bitcoincash/gas.go index 1658a0fe..b2b5369d 100644 --- a/chain/bitcoincash/gas.go +++ b/chain/bitcoincash/gas.go @@ -2,6 +2,13 @@ package bitcoincash import "github.com/renproject/multichain/chain/bitcoin" +// A GasEstimator returns the SATs-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// SATs-per-byte. type GasEstimator = bitcoin.GasEstimator +// NewGasEstimator returns a simple gas estimator that always returns the given +// number of SATs-per-byte. var NewGasEstimator = bitcoin.NewGasEstimator diff --git a/chain/bitcoincash/utxo.go b/chain/bitcoincash/utxo.go index 6dfddc54..2880be16 100644 --- a/chain/bitcoincash/utxo.go +++ b/chain/bitcoincash/utxo.go @@ -26,16 +26,25 @@ const SighashMask = txscript.SigHashType(0x1F) // Version of Bitcoin Cash transactions supported by the multichain. const Version int32 = 1 +// ClientOptions are used to parameterise the behaviour of the Client. type ClientOptions = bitcoin.ClientOptions +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. func DefaultClientOptions() ClientOptions { return bitcoin.DefaultClientOptions().WithHost("http://127.0.0.1:19443") } +// A Client interacts with an instance of the Bitcoin network using the RPC +// interface exposed by a Bitcoin node. type Client = bitcoin.Client +// NewClient returns a new Client. var NewClient = bitcoin.NewClient +// The TxBuilder is an implementation of a UTXO-compatible transaction builder +// for Bitcoin. type TxBuilder struct { params *chaincfg.Params } @@ -103,15 +112,21 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given underlying transaction. It +// implements the multichain.UTXOTx interface func (tx *Tx) Hash() (pack.Bytes, error) { txhash := tx.msgTx.TxHash() return pack.NewBytes(txhash[:]), nil } +// Inputs returns the UTXO inputs in the underlying transaction. It implements +// the multichain.UTXOTx interface func (tx *Tx) Inputs() ([]utxo.Input, error) { return tx.inputs, nil } +// Outputs returns the UTXO outputs in the underlying transaction. It implements +// the multichain.UTXOTx interface func (tx *Tx) Outputs() ([]utxo.Output, error) { hash, err := tx.Hash() if err != nil { @@ -132,6 +147,8 @@ func (tx *Tx) Outputs() ([]utxo.Output, error) { return outputs, nil } +// Sighashes returns the digests that must be signed before the transaction +// can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighashes := make([]pack.Bytes32, len(tx.inputs)) @@ -157,6 +174,8 @@ func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { return sighashes, nil } +// Sign consumes a list of signatures, and adds them to the list of UTXOs in +// the underlying transactions. It implements the multichain.UTXOTx interface func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -190,6 +209,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the UTXO transaction to bytes func (tx *Tx) Serialize() (pack.Bytes, error) { buf := new(bytes.Buffer) if err := tx.msgTx.Serialize(buf); err != nil { diff --git a/chain/celo/address.go b/chain/celo/address.go index b4a448f9..a5c6995c 100644 --- a/chain/celo/address.go +++ b/chain/celo/address.go @@ -19,5 +19,7 @@ type AddressDecoder = ethereum.AddressDecoder type AddressEncodeDecoder = ethereum.AddressEncodeDecoder var ( + // NewAddressEncodeDecoder creates a new address encode-decoder that + // implements the address.Encoder and address.Decoder interfaces NewAddressEncodeDecoder = ethereum.NewAddressEncodeDecoder ) diff --git a/chain/digibyte/address.go b/chain/digibyte/address.go index 9712b843..e2f26874 100644 --- a/chain/digibyte/address.go +++ b/chain/digibyte/address.go @@ -2,6 +2,13 @@ package digibyte import "github.com/renproject/multichain/chain/bitcoin" +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder = bitcoin.AddressEncoder + +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder = bitcoin.AddressDecoder + +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder = bitcoin.AddressEncodeDecoder diff --git a/chain/digibyte/digibyte.go b/chain/digibyte/digibyte.go index 7ff5c2de..48ba765b 100644 --- a/chain/digibyte/digibyte.go +++ b/chain/digibyte/digibyte.go @@ -14,7 +14,7 @@ func init() { } if err := chaincfg.Register(&TestnetParams); err != nil { panic(err) - } + } if err := chaincfg.Register(&RegressionNetParams); err != nil { panic(err) } @@ -127,13 +127,13 @@ var MainNetParams = chaincfg.Params{ } var TestnetParams = chaincfg.Params{ - Name: "testnet", + Name: "testnet", // DigiByte has 0xdab5bffa as RegTest (same as Bitcoin's RegTest). // Setting it to an arbitrary value (leet_hex(digibyte)), so that we can // register the regtest network. // DigiByte Core Developers will change this soon. - Net: 0xddbdc8fd, + Net: 0xddbdc8fd, DefaultPort: "12026", // Chain parameters @@ -167,7 +167,7 @@ var RegressionNetParams = chaincfg.Params{ // Setting it to an arbitrary value (leet_hex(digibyte)), so that we can // register the regtest network. // DigiByte Core Developers will change this soon. - Net: 0xd191841e, + Net: 0xd191841e, DefaultPort: "18444", // Chain parameters diff --git a/chain/digibyte/gas.go b/chain/digibyte/gas.go index 9750c922..fdc69082 100644 --- a/chain/digibyte/gas.go +++ b/chain/digibyte/gas.go @@ -2,4 +2,9 @@ package digibyte import "github.com/renproject/multichain/chain/bitcoin" +// A GasEstimator returns the SATs-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// SATs-per-byte. type GasEstimator = bitcoin.GasEstimator diff --git a/chain/digibyte/utxo.go b/chain/digibyte/utxo.go index afde227d..76604833 100644 --- a/chain/digibyte/utxo.go +++ b/chain/digibyte/utxo.go @@ -3,14 +3,29 @@ package digibyte import "github.com/renproject/multichain/chain/bitcoin" type ( - Tx = bitcoin.Tx - TxBuilder = bitcoin.TxBuilder - Client = bitcoin.Client + // Tx represents a simple Bitcoin transaction that implements the Bitcoin Compat + // API. + Tx = bitcoin.Tx + + // The TxBuilder is an implementation of a UTXO-compatible transaction builder + // for Bitcoin. + TxBuilder = bitcoin.TxBuilder + + // A Client interacts with an instance of the Bitcoin network using the RPC + // interface exposed by a Bitcoin node. + Client = bitcoin.Client + + // ClientOptions are used to parameterise the behaviour of the Client. ClientOptions = bitcoin.ClientOptions ) var ( - NewTxBuilder = bitcoin.NewTxBuilder - NewClient = bitcoin.NewClient + // NewTxBuilder re-exports bitoin.NewTxBuilder + NewTxBuilder = bitcoin.NewTxBuilder + + // NewClient re-exports bitcoin.NewClient + NewClient = bitcoin.NewClient + + // DefaultClientOptions re-exports bitcoin.DefaultClientOptions DefaultClientOptions = bitcoin.DefaultClientOptions ) diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 907adc21..7e2b83ea 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -14,14 +14,21 @@ import ( "github.com/renproject/pack" ) +// The TxBuilder is an implementation of a Account-based chains compatible +// transaction builder for Ethereum. type TxBuilder struct { config *params.ChainConfig } +// NewTxBuilder returns a transaction builder that builds Account-compatible +// Ethereum transactions for the given chain configuration. func NewTxBuilder(config *params.ChainConfig) TxBuilder { return TxBuilder{config: config} } +// BuildTx returns an Ethereum transaction that transfers value from an address +// to another address, with other transaction-specific fields. The returned +// transaction implements the multichain.AccountTx interface. func (txBuilder TxBuilder) BuildTx( from, to address.Address, value, nonce pack.U256, @@ -45,6 +52,8 @@ func (txBuilder TxBuilder) BuildTx( return &Tx{fromAddr, tx, signer, signed}, nil } +// Tx represents an Ethereum transaction that implements the +// multichain.AccountTx interface type Tx struct { from Address @@ -54,35 +63,48 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given transaction. func (tx *Tx) Hash() pack.Bytes { return pack.NewBytes(tx.tx.Hash().Bytes()) } +// From returns the sender of the transaction. func (tx *Tx) From() address.Address { return address.Address(tx.from.String()) } +// To returns the recipient of the transaction. func (tx *Tx) To() address.Address { return address.Address(tx.tx.To().String()) } +// Value returns the value (in native tokens) that is being transferred in the +// transaction. func (tx *Tx) Value() pack.U256 { return pack.NewU256FromInt(tx.tx.Value()) } +// Nonce returns the transaction nonce for the transaction sender. This is a +// one-time use incremental identifier to protect against double spending. func (tx *Tx) Nonce() pack.U256 { return pack.NewU256FromU64(pack.NewU64(tx.tx.Nonce())) } +// Payload returns the data/payload attached in the transaction. func (tx *Tx) Payload() contract.CallData { return contract.CallData(pack.NewBytes(tx.tx.Data())) } +// Sighashes returns the digest that must be signed by the sender before the +// transaction can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighash := tx.signer.Hash(tx.tx) return []pack.Bytes32{pack.NewBytes32(sighash)}, nil } +// Sign consumes a list of signatures, and adds them to the underlying +// Ethereum transaction. In case of Ethereum, we expect only a single signature +// per transaction. func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -102,6 +124,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the transaction to bytes. func (tx *Tx) Serialize() (pack.Bytes, error) { serialized, err := tx.tx.MarshalJSON() if err != nil { @@ -111,10 +134,13 @@ func (tx *Tx) Serialize() (pack.Bytes, error) { return pack.NewBytes(serialized), nil } +// EthClient interacts with an instance of the Ethereum network using the RPC +// interface exposed by an Ethereum node. type EthClient struct { client *ethclient.Client } +// NewClient returns a new Client. func NewClient(rpcURL pack.String) (account.Client, error) { client, err := ethclient.Dial(string(rpcURL)) if err != nil { @@ -124,8 +150,10 @@ func NewClient(rpcURL pack.String) (account.Client, error) { return EthClient{client}, nil } -func (client EthClient) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { - txHash := common.BytesToHash(txId) +// Tx queries the Ethereum node to fetch a transaction with the provided tx ID +// and also returns the number of block confirmations for the transaction. +func (client EthClient) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { + txHash := common.BytesToHash(txID) tx, isPending, err := client.client.TransactionByHash(ctx, txHash) if err != nil { return nil, pack.NewU64(0), fmt.Errorf("fetching tx: %v", err) @@ -146,6 +174,7 @@ func (client EthClient) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pa return &Tx{tx: tx}, pack.NewU64(confs), nil } +// SubmitTx submits a signed transaction to the Ethereum network. func (client EthClient) SubmitTx(ctx context.Context, tx account.Tx) error { panic("unimplemented") } diff --git a/chain/ethereum/address.go b/chain/ethereum/address.go index 7a1ebb46..dd3dae5b 100644 --- a/chain/ethereum/address.go +++ b/chain/ethereum/address.go @@ -12,17 +12,20 @@ import ( "github.com/renproject/surge" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// AddressEncoder implements the address.Encoder interface. type AddressEncoder interface { EncodeAddress(address.RawAddress) (address.Address, error) } type addressEncoder struct{} +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder. func NewAddressEncodeDecoder() address.EncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(), @@ -30,16 +33,19 @@ func NewAddressEncodeDecoder() address.EncodeDecoder { } } +// AddressDecoder implements the address.Decoder interface. type AddressDecoder interface { DecodeAddress(address.Address) (address.RawAddress, error) } type addressDecoder struct{} +// NewAddressDecoder constructs a new AddressDecoder. func NewAddressDecoder() AddressDecoder { return addressDecoder{} } +// NewAddressEncoder constructs a new AddressEncoder. func NewAddressEncoder() AddressEncoder { return addressEncoder{} } diff --git a/chain/ethereum/gas.go b/chain/ethereum/gas.go index c2c9addb..f091bb6d 100644 --- a/chain/ethereum/gas.go +++ b/chain/ethereum/gas.go @@ -2,9 +2,7 @@ package ethereum import ( "context" - "fmt" - "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) @@ -32,13 +30,3 @@ func NewGasEstimator(wei pack.U256) GasEstimator { func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { return gasEstimator.wei, nil } - -// EstimateGasLimit returns the gas limit depending on what type of transaction we wish to do -func (gasEstimator GasEstimator) EstimateGasLimit(txType gas.TxType) (pack.U256, error) { - switch txType { - case gas.ETHTransfer: - return pack.NewU256FromU64(pack.NewU64(21000)), nil - default: - return pack.NewU256([32]byte{}), fmt.Errorf("non-exhaustive transaction type: %v", txType) - } -} diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index bfbc314d..233ed900 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -23,11 +23,21 @@ import ( ) const ( - AuthorizationKey = "Authorization" - DefaultClientMultiAddress = "" - DefaultClientAuthToken = "" + // AuthorizationKey is the header key used for authorization + AuthorizationKey = "Authorization" + + // DefaultClientMultiAddress is the RPC websocket URL used by default, to + // interact with the filecoin lotus node. + DefaultClientMultiAddress = "ws://127.0.0.1:1234/rpc/v0" + + // DefaultClientAuthToken is the auth token used to instantiate the lotus + // client. A valid lotus auth token is required to write messages to the + // filecoin storage. To do read-only queries, auth token is not required. + DefaultClientAuthToken = "" ) +// Tx represents a filecoin transaction, encapsulating a message and its +// signature. type Tx struct { msg types.Message signature pack.Bytes65 @@ -107,15 +117,20 @@ func (tx Tx) Serialize() (pack.Bytes, error) { return buf.Bytes(), nil } +// TxBuilder represents a transaction builder that builds transactions to be +// broadcasted to the filecoin network. The TxBuilder is configured using a +// gas price and gas limit. type TxBuilder struct { gasPrice pack.U256 gasLimit pack.U256 } +// NewTxBuilder creates a new transaction builder. func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} } +// BuildTx receives transaction fields and constructs a new transaction. func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ pack.U256, payload pack.Bytes) (account.Tx, error) { filfrom, err := filaddress.NewFromString(string(from)) if err != nil { @@ -177,6 +192,8 @@ func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { return opts } +// Client holds options to connect to a filecoin lotus node, and the underlying +// RPC client instance. type Client struct { opts ClientOptions node api.FullNode @@ -200,15 +217,15 @@ func NewClient(opts ClientOptions) (*Client, error) { // Tx returns the transaction uniquely identified by the given transaction // hash. It also returns the number of confirmations for the transaction. -func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack.U64, error) { +func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { // parse the transaction ID to a message ID - msgId, err := cid.Parse(txId.String()) + msgID, err := cid.Parse(txID.String()) if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("parsing txId: %v", err) + return nil, pack.NewU64(0), fmt.Errorf("parsing txID: %v", err) } // lookup message receipt to get its height - messageLookup, err := client.node.StateSearchMsg(ctx, msgId) + messageLookup, err := client.node.StateSearchMsg(ctx, msgID) if err != nil { return nil, pack.NewU64(0), fmt.Errorf("searching msg: %v", err) } @@ -221,7 +238,7 @@ func (client *Client) Tx(ctx context.Context, txId pack.Bytes) (account.Tx, pack confs := headTipset.Height() - messageLookup.Height + 1 // get the message - msg, err := client.node.ChainGetMessage(ctx, msgId) + msg, err := client.node.ChainGetMessage(ctx, msgID) if err != nil { return nil, pack.NewU64(0), fmt.Errorf("fetching msg: %v", err) } diff --git a/chain/filecoin/address.go b/chain/filecoin/address.go index 06a36b12..cb34c5a6 100644 --- a/chain/filecoin/address.go +++ b/chain/filecoin/address.go @@ -5,14 +5,19 @@ import ( "github.com/renproject/multichain/api/address" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// AddressEncoder implements the address.Encoder interface. type AddressEncoder struct{} + +// AddressDecoder implements the address.Decoder interface. type AddressDecoder struct{} +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder. func NewAddressEncodeDecoder() AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: AddressEncoder{}, @@ -20,6 +25,8 @@ func NewAddressEncodeDecoder() AddressEncodeDecoder { } } +// EncodeAddress implements the address.Encoder interface. It receives a raw +// address and encodes it to a human-readable stringified address. func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) { addr, err := filaddress.NewFromBytes([]byte(raw)) if err != nil { @@ -28,6 +35,8 @@ func (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Add return address.Address(addr.String()), nil } +// DecodeAddress implements the address.Decoder interface. It receives a human +// readable address and decodes it to an address represented by raw bytes. func (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { rawAddr, err := filaddress.NewFromString(string(addr)) if err != nil { diff --git a/chain/zcash/address.go b/chain/zcash/address.go index 794b0be6..c1ae2851 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -122,6 +122,8 @@ func (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool { return addr.AddressScriptHash.IsForNet(params) } +// DecodeAddress decodes a string-representation of an address to an address +// type that implements the zcash.Address interface func DecodeAddress(addr string) (Address, error) { var decoded = base58.Decode(addr) if len(decoded) != 26 && len(decoded) != 25 { diff --git a/chain/zcash/gas.go b/chain/zcash/gas.go index 6b864739..ce366b71 100644 --- a/chain/zcash/gas.go +++ b/chain/zcash/gas.go @@ -2,6 +2,8 @@ package zcash import "github.com/renproject/multichain/chain/bitcoin" +// GasEstimator re-exports bitcoin.GasEstimator type GasEstimator = bitcoin.GasEstimator +// NewGasEstimator re-exports bitcoin.NewGasEstimator var NewGasEstimator = bitcoin.NewGasEstimator diff --git a/chain/zcash/utxo.go b/chain/zcash/utxo.go index aa4dee7b..ec852dd3 100644 --- a/chain/zcash/utxo.go +++ b/chain/zcash/utxo.go @@ -21,16 +21,24 @@ import ( // Version of Zcash transactions supported by the multichain. const Version int32 = 4 +// ClientOptions are used to parameterise the behaviour of the Client. type ClientOptions = bitcoin.ClientOptions +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. func DefaultClientOptions() ClientOptions { return bitcoin.DefaultClientOptions().WithHost("http://127.0.0.1:18232") } +// Client re-exports bitcoin.Client. type Client = bitcoin.Client +// NewClient re-exports bitcoin.Client var NewClient = bitcoin.NewClient +// The TxBuilder is an implementation of a UTXO-compatible transaction builder +// for Bitcoin. type TxBuilder struct { params *Params expiryHeight uint32 @@ -100,6 +108,7 @@ type Tx struct { signed bool } +// Hash returns the transaction hash of the given underlying transaction. func (tx *Tx) Hash() (pack.Bytes, error) { serial, err := tx.Serialize() if err != nil { @@ -109,9 +118,12 @@ func (tx *Tx) Hash() (pack.Bytes, error) { return pack.NewBytes(txhash[:]), nil } +// Inputs returns the UTXO inputs in the underlying transaction. func (tx *Tx) Inputs() ([]utxo.Input, error) { return tx.inputs, nil } + +// Outputs returns the UTXO outputs in the underlying transaction. func (tx *Tx) Outputs() ([]utxo.Output, error) { hash, err := tx.Hash() if err != nil { @@ -132,6 +144,8 @@ func (tx *Tx) Outputs() ([]utxo.Output, error) { return outputs, nil } +// Sighashes returns the digests that must be signed before the transaction +// can be submitted by the client. func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { sighashes := make([]pack.Bytes32, len(tx.inputs)) for i, txin := range tx.inputs { @@ -160,6 +174,8 @@ func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { return sighashes, nil } +// Sign consumes a list of signatures, and adds them to the list of UTXOs in +// the underlying transactions. func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") @@ -192,6 +208,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return nil } +// Serialize serializes the UTXO transaction to bytes. func (tx *Tx) Serialize() (pack.Bytes, error) { w := new(bytes.Buffer) pver := uint32(0) diff --git a/chain/zcash/zcash.go b/chain/zcash/zcash.go index f76d1081..d5a98847 100644 --- a/chain/zcash/zcash.go +++ b/chain/zcash/zcash.go @@ -17,6 +17,7 @@ const ( versionSaplingGroupID = 0x892f2085 ) +// Params signifies the chain specific parameters of the Zcash network. type Params struct { // TODO: We do not actually need to embed the entire chaincfg params object. *chaincfg.Params @@ -26,6 +27,7 @@ type Params struct { Upgrades []ParamsUpgrade } +// ParamsUpgrade ... type ParamsUpgrade struct { ActivationHeight uint32 BranchID []byte @@ -34,6 +36,7 @@ type ParamsUpgrade struct { var ( witnessMarkerBytes = []byte{0x00, 0x01} + // MainNetParams defines the mainnet configuration. MainNetParams = Params{ Params: &chaincfg.MainNetParams, @@ -46,6 +49,8 @@ var ( {653600, []byte{0x60, 0x0E, 0xB4, 0x2B}}, }, } + + // TestNet3Params defines the testnet configuration. TestNet3Params = Params{ Params: &chaincfg.TestNet3Params, @@ -58,6 +63,8 @@ var ( {584000, []byte{0x60, 0x0E, 0xB4, 0x2B}}, }, } + + // RegressionNetParams defines a devet/regnet configuration. RegressionNetParams = Params{ Params: &chaincfg.RegressionNetParams, From 497742f75789b50041aefdc2c39118c42628b2e2 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 2 Sep 2020 09:57:01 +1000 Subject: [PATCH 068/335] add better logs and fixmes --- chain/ethereum/account.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index 7e2b83ea..f7f8eb3b 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -111,7 +111,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { } if len(signatures) != 1 { - return fmt.Errorf("expected exactly signature") + return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } signedTx, err := tx.tx.WithSignature(tx.signer, signatures[0].Bytes()) @@ -126,6 +126,10 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { // Serialize serializes the transaction to bytes. func (tx *Tx) Serialize() (pack.Bytes, error) { + // FIXME: I am pretty sure that this is not the format the Ethereum expects + // transactions to be serialised to on the network. Although the client + // might expect to send JSON objects, that is different from serialization, + // and can better represented by implementing MarshalJSON on this type. serialized, err := tx.tx.MarshalJSON() if err != nil { return pack.Bytes{}, err From 1a82ce36a671ab78cf4755041ab42ae52577891a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Sep 2020 10:15:47 +0530 Subject: [PATCH 069/335] sign method should be defined for pointer --- chain/filecoin/account.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 233ed900..f3716b15 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -99,7 +99,7 @@ func (tx Tx) Sighashes() ([]pack.Bytes32, error) { // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes must also be // specified. -func (tx Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { if len(signatures) != 1 { return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } @@ -145,7 +145,7 @@ func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ methodNum = abi.MethodNum(payload[0]) payload = payload[1:] } - return Tx{ + return &Tx{ msg: types.Message{ Version: types.MessageVersion, From: filfrom, @@ -250,7 +250,7 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack // TODO: should also return a transaction hash (pack.Bytes) ? func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { switch tx := tx.(type) { - case Tx: + case *Tx: // construct crypto.Signature signature := crypto.Signature{ Type: crypto.SigTypeSecp256k1, From 6a934bff8c8ac906b9143169cc11620b016284d2 Mon Sep 17 00:00:00 2001 From: Loong Date: Thu, 3 Sep 2020 10:30:59 +1000 Subject: [PATCH 070/335] use bytes for cid, not hash --- chain/filecoin/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index f3716b15..92f43a67 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -47,7 +47,7 @@ type Tx struct { // Generally, hashes are irreversible hash functions that consume the // content of the transaction. func (tx Tx) Hash() pack.Bytes { - return pack.NewBytes(tx.msg.Cid().Hash()) + return pack.NewBytes(tx.msg.Cid().Bytes()) } // From returns the address that is sending the transaction. Generally, From 9eac3625e9aa908bff8a2a5016272359d72c972f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 00:03:43 +0530 Subject: [PATCH 071/335] signature and sighash to be bytes instead of fixed sized --- api/account/account.go | 4 ++-- chain/ethereum/account.go | 15 ++++++++++----- chain/filecoin/account.go | 21 +++++++++++++++++---- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 27341cb0..47f8394f 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -39,12 +39,12 @@ type Tx interface { // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighashes() ([]pack.Bytes32, error) + Sighashes() ([]pack.Bytes, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign([]pack.Bytes65, pack.Bytes) error + Sign([]pack.Bytes, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go index f7f8eb3b..f92add87 100644 --- a/chain/ethereum/account.go +++ b/chain/ethereum/account.go @@ -97,15 +97,16 @@ func (tx *Tx) Payload() contract.CallData { // Sighashes returns the digest that must be signed by the sender before the // transaction can be submitted by the client. -func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { - sighash := tx.signer.Hash(tx.tx) - return []pack.Bytes32{pack.NewBytes32(sighash)}, nil +func (tx *Tx) Sighashes() ([]pack.Bytes, error) { + sighash32 := tx.signer.Hash(tx.tx) + sighash := sighash32[:] + return []pack.Bytes{pack.NewBytes(sighash)}, nil } // Sign consumes a list of signatures, and adds them to the underlying // Ethereum transaction. In case of Ethereum, we expect only a single signature // per transaction. -func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes, pubKey pack.Bytes) error { if tx.signed { return fmt.Errorf("already signed") } @@ -114,7 +115,11 @@ func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } - signedTx, err := tx.tx.WithSignature(tx.signer, signatures[0].Bytes()) + if len(signatures[0]) != 65 { + return fmt.Errorf("expected signature to be 65 bytes, got %v bytes", len(signatures[0])) + } + + signedTx, err := tx.tx.WithSignature(tx.signer, []byte(signatures[0])) if err != nil { return err } diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 92f43a67..6131fefd 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -92,18 +92,31 @@ func (tx Tx) Payload() contract.CallData { // Sighashes returns the digests that must be signed before the transaction // can be submitted by the client. -func (tx Tx) Sighashes() ([]pack.Bytes32, error) { - return []pack.Bytes32{blake2b.Sum256(tx.Hash())}, nil +func (tx Tx) Sighashes() ([]pack.Bytes, error) { + sighash32 := blake2b.Sum256(tx.Hash()) + sighash := sighash32[:] + return []pack.Bytes{pack.NewBytes(sighash)}, nil } // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes must also be // specified. -func (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes, pubkey pack.Bytes) error { if len(signatures) != 1 { return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } - tx.signature = signatures[0] + + if len(signatures[0]) != 65 { + return fmt.Errorf("expected signature to be 65 bytes, got %v bytes", len(signatures[0])) + } + + // we are sure there are exactly 65 bytes in the signature, so this is safe + sig := [65]byte{} + for i := range sig { + sig[i] = signatures[0][i] + } + + tx.signature = pack.NewBytes65(sig) return nil } From d6eab9e77cfeeb571a1322390147c5140a063d54 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Sep 2020 00:14:33 +0530 Subject: [PATCH 072/335] (fix) limit varint input to be uint63 --- chain/filecoin/address_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/filecoin/address_test.go b/chain/filecoin/address_test.go index a62ea715..670419ef 100644 --- a/chain/filecoin/address_test.go +++ b/chain/filecoin/address_test.go @@ -24,7 +24,7 @@ var _ = Describe("Address", func() { Context("for ID protocol", func() { It("should behave correctly without errors", func() { f := func() bool { - x := varint.ToUvarint(r.Uint64()) + x := varint.ToUvarint(uint64(r.Int63())) x = append([]byte{byte(filaddress.ID)}, x...) rawAddr := address.RawAddress(pack.NewBytes(x[:])) From 813305bbe6593db905645a8391df1225ce267b8d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Sep 2020 10:12:23 +0530 Subject: [PATCH 073/335] (squash commits) Filecoin impl/fixes/review changes --- chain/filecoin/account.go | 224 ++++++-------------------------- chain/filecoin/client.go | 148 +++++++++++++++++++++ chain/filecoin/client_test.go | 1 + chain/filecoin/filecoin_test.go | 121 +++++++++++++++++ infra/.env | 4 +- infra/filecoin/Dockerfile | 2 + infra/filecoin/miner.key | 2 +- infra/filecoin/run.sh | 4 +- infra/filecoin/user.key | 1 + 9 files changed, 321 insertions(+), 186 deletions(-) create mode 100644 chain/filecoin/client.go create mode 100644 chain/filecoin/client_test.go create mode 100644 infra/filecoin/user.key diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 6131fefd..a803ac76 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -2,19 +2,12 @@ package filecoin import ( "bytes" - "context" "fmt" - "net/http" filaddress "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/lotus/api" - filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" - "github.com/filecoin-project/specs-actors/actors/crypto" - "github.com/ipfs/go-cid" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" @@ -22,19 +15,49 @@ import ( "github.com/renproject/pack" ) -const ( - // AuthorizationKey is the header key used for authorization - AuthorizationKey = "Authorization" +// TxBuilder represents a transaction builder that builds transactions to be +// broadcasted to the filecoin network. The TxBuilder is configured using a +// gas price and gas limit. +type TxBuilder struct { + gasPremium pack.U256 +} - // DefaultClientMultiAddress is the RPC websocket URL used by default, to - // interact with the filecoin lotus node. - DefaultClientMultiAddress = "ws://127.0.0.1:1234/rpc/v0" +// NewTxBuilder creates a new transaction builder. +func NewTxBuilder(gasPremium pack.U256) TxBuilder { + return TxBuilder{gasPremium} +} - // DefaultClientAuthToken is the auth token used to instantiate the lotus - // client. A valid lotus auth token is required to write messages to the - // filecoin storage. To do read-only queries, auth token is not required. - DefaultClientAuthToken = "" -) +// BuildTx receives transaction fields and constructs a new transaction. +func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, gasLimit, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) { + filfrom, err := filaddress.NewFromString(string(from)) + if err != nil { + return nil, fmt.Errorf("bad from address '%v': %v", from, err) + } + filto, err := filaddress.NewFromString(string(to)) + if err != nil { + return nil, fmt.Errorf("bad to address '%v': %v", to, err) + } + methodNum := abi.MethodNum(0) + if len(payload) > 0 { + methodNum = abi.MethodNum(payload[0]) + payload = payload[1:] + } + return &Tx{ + msg: types.Message{ + Version: types.MessageVersion, + From: filfrom, + To: filto, + Value: big.Int{Int: value.Int()}, + Nonce: nonce.Int().Uint64(), + GasFeeCap: big.Int{Int: gasFeeCap.Int()}, + GasLimit: gasLimit.Int().Int64(), + GasPremium: big.Int{Int: txBuilder.gasPremium.Int()}, + Method: methodNum, + Params: payload, + }, + signature: pack.Bytes65{}, + }, nil +} // Tx represents a filecoin transaction, encapsulating a message and its // signature. @@ -110,13 +133,7 @@ func (tx *Tx) Sign(signatures []pack.Bytes, pubkey pack.Bytes) error { return fmt.Errorf("expected signature to be 65 bytes, got %v bytes", len(signatures[0])) } - // we are sure there are exactly 65 bytes in the signature, so this is safe - sig := [65]byte{} - for i := range sig { - sig[i] = signatures[0][i] - } - - tx.signature = pack.NewBytes65(sig) + copy(tx.signature[:], signatures[0]) return nil } @@ -129,160 +146,3 @@ func (tx Tx) Serialize() (pack.Bytes, error) { } return buf.Bytes(), nil } - -// TxBuilder represents a transaction builder that builds transactions to be -// broadcasted to the filecoin network. The TxBuilder is configured using a -// gas price and gas limit. -type TxBuilder struct { - gasPrice pack.U256 - gasLimit pack.U256 -} - -// NewTxBuilder creates a new transaction builder. -func NewTxBuilder(gasPrice, gasLimit pack.U256) TxBuilder { - return TxBuilder{gasPrice: gasPrice, gasLimit: gasLimit} -} - -// BuildTx receives transaction fields and constructs a new transaction. -func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, _, _ pack.U256, payload pack.Bytes) (account.Tx, error) { - filfrom, err := filaddress.NewFromString(string(from)) - if err != nil { - return nil, fmt.Errorf("bad from address '%v': %v", from, err) - } - filto, err := filaddress.NewFromString(string(to)) - if err != nil { - return nil, fmt.Errorf("bad to address '%v': %v", to, err) - } - methodNum := abi.MethodNum(0) - if len(payload) > 0 { - methodNum = abi.MethodNum(payload[0]) - payload = payload[1:] - } - return &Tx{ - msg: types.Message{ - Version: types.MessageVersion, - From: filfrom, - To: filto, - Value: big.Int{Int: value.Int()}, - Nonce: value.Int().Uint64(), - GasFeeCap: big.Int{Int: txBuilder.gasPrice.Int()}, - GasLimit: txBuilder.gasLimit.Int().Int64(), - Method: methodNum, - Params: payload, - }, - signature: pack.Bytes65{}, - }, nil -} - -// ClientOptions are used to parameterise the behaviour of the Client. -type ClientOptions struct { - MultiAddress string - AuthToken string -} - -// DefaultClientOptions returns ClientOptions with the default settings. These -// settings are valid for use with the default local deployment of the -// multichain. In production, the multi-address and authentication token should -// be changed. -func DefaultClientOptions() ClientOptions { - return ClientOptions{ - MultiAddress: DefaultClientMultiAddress, - AuthToken: DefaultClientAuthToken, - } -} - -// WithAddress returns a modified version of the options with the given API -// multi-address. -func (opts ClientOptions) WithAddress(multiAddr string) ClientOptions { - opts.MultiAddress = multiAddr - return opts -} - -// WithAuthToken returns a modified version of the options with the given -// authentication token. -func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { - opts.AuthToken = authToken - return opts -} - -// Client holds options to connect to a filecoin lotus node, and the underlying -// RPC client instance. -type Client struct { - opts ClientOptions - node api.FullNode - closer jsonrpc.ClientCloser -} - -// NewClient creates and returns a new JSON-RPC client to the Filecoin node -func NewClient(opts ClientOptions) (*Client, error) { - requestHeaders := make(http.Header) - if opts.AuthToken != DefaultClientAuthToken { - requestHeaders.Add(AuthorizationKey, opts.AuthToken) - } - - node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.MultiAddress, requestHeaders) - if err != nil { - return nil, err - } - - return &Client{opts, node, closer}, nil -} - -// Tx returns the transaction uniquely identified by the given transaction -// hash. It also returns the number of confirmations for the transaction. -func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { - // parse the transaction ID to a message ID - msgID, err := cid.Parse(txID.String()) - if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("parsing txID: %v", err) - } - - // lookup message receipt to get its height - messageLookup, err := client.node.StateSearchMsg(ctx, msgID) - if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("searching msg: %v", err) - } - - // get the most recent tipset and its height - headTipset, err := client.node.ChainHead(ctx) - if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("fetching head: %v", err) - } - confs := headTipset.Height() - messageLookup.Height + 1 - - // get the message - msg, err := client.node.ChainGetMessage(ctx, msgID) - if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("fetching msg: %v", err) - } - - return &Tx{msg: *msg}, pack.NewU64(uint64(confs)), nil -} - -// SubmitTx to the underlying blockchain network. -// TODO: should also return a transaction hash (pack.Bytes) ? -func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { - switch tx := tx.(type) { - case *Tx: - // construct crypto.Signature - signature := crypto.Signature{ - Type: crypto.SigTypeSecp256k1, - Data: tx.signature.Bytes(), - } - - // construct types.SignedMessage - signedMessage := types.SignedMessage{ - Message: tx.msg, - Signature: signature, - } - - // submit transaction to mempool - _, err := client.node.MpoolPush(ctx, &signedMessage) - if err != nil { - return fmt.Errorf("pushing msg to mpool: %v", err) - } - return nil - default: - return fmt.Errorf("invalid tx type: %v", tx) - } -} diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go new file mode 100644 index 00000000..953fc975 --- /dev/null +++ b/chain/filecoin/client.go @@ -0,0 +1,148 @@ +package filecoin + +import ( + "context" + "fmt" + "net/http" + + "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/lotus/api" + filclient "github.com/filecoin-project/lotus/api/client" + "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/specs-actors/actors/crypto" + "github.com/ipfs/go-cid" + "github.com/renproject/multichain/api/account" + "github.com/renproject/pack" +) + +const ( + // AuthorizationKey is the header key used for authorization + AuthorizationKey = "Authorization" + + // DefaultClientRpcURL is the RPC websocket URL used by default, to + // interact with the filecoin lotus node. + DefaultClientRpcURL = "ws://127.0.0.1:1234/rpc/v0" + + // DefaultClientAuthToken is the auth token used to instantiate the lotus + // client. A valid lotus auth token is required to write messages to the + // filecoin storage. To do read-only queries, auth token is not required. + DefaultClientAuthToken = "" +) + +// ClientOptions are used to parameterise the behaviour of the Client. +type ClientOptions struct { + RpcURL string + AuthToken string +} + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the rpc-url and authentication token should be +// changed. +func DefaultClientOptions() ClientOptions { + return ClientOptions{ + RpcURL: DefaultClientRpcURL, + AuthToken: DefaultClientAuthToken, + } +} + +// WithRpcURL returns a modified version of the options with the given API +// rpc-url +func (opts ClientOptions) WithRpcURL(rpcURL string) ClientOptions { + opts.RpcURL = rpcURL + return opts +} + +// WithAuthToken returns a modified version of the options with the given +// authentication token. +func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { + opts.AuthToken = authToken + return opts +} + +// Client holds options to connect to a filecoin lotus node, and the underlying +// RPC client instance. +type Client struct { + opts ClientOptions + node api.FullNode + closer jsonrpc.ClientCloser +} + +// NewClient creates and returns a new JSON-RPC client to the Filecoin node +func NewClient(opts ClientOptions) (*Client, error) { + requestHeaders := make(http.Header) + if opts.AuthToken != DefaultClientAuthToken { + requestHeaders.Add(AuthorizationKey, opts.AuthToken) + } + + node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.RpcURL, requestHeaders) + if err != nil { + return nil, err + } + + return &Client{opts, node, closer}, nil +} + +// Tx returns the transaction uniquely identified by the given transaction +// hash. It also returns the number of confirmations for the transaction. +func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { + // parse the transaction ID to a message ID + msgID, err := cid.Parse([]byte(txID)) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("parsing txid: %v", err) + } + + // lookup message receipt to get its height + messageLookup, err := client.node.StateSearchMsg(ctx, msgID) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("searching state for txid: %v", err) + } + if messageLookup == nil { + return nil, pack.NewU64(0), fmt.Errorf("searching state for txid %v: not found", msgID) + } + + // get the most recent tipset and its height + headTipset, err := client.node.ChainHead(ctx) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("getting head from chain: %v", err) + } + confs := headTipset.Height() - messageLookup.Height + 1 + if confs < 0 { + return nil, pack.NewU64(0), fmt.Errorf("getting head from chain: negative confirmations") + } + + // get the message + msg, err := client.node.ChainGetMessage(ctx, msgID) + if err != nil { + return nil, pack.NewU64(0), fmt.Errorf("getting txid %v from chain: %v", msgID, err) + } + + return &Tx{msg: *msg}, pack.NewU64(uint64(confs)), nil +} + +// SubmitTx to the underlying blockchain network. +func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { + switch tx := tx.(type) { + case *Tx: + // construct crypto.Signature + signature := crypto.Signature{ + Type: crypto.SigTypeSecp256k1, + Data: tx.signature.Bytes(), + } + + // construct types.SignedMessage + signedMessage := types.SignedMessage{ + Message: tx.msg, + Signature: signature, + } + + // submit transaction to mempool + msgID, err := client.node.MpoolPush(ctx, &signedMessage) + if err != nil { + return fmt.Errorf("pushing txid %v to mpool: %v", msgID, err) + } + return nil + default: + return fmt.Errorf("expected type %T, got type %T", new(Tx), tx) + } +} diff --git a/chain/filecoin/client_test.go b/chain/filecoin/client_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/client_test.go @@ -0,0 +1 @@ +package filecoin_test diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 0d419baa..63e48366 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -1 +1,122 @@ package filecoin_test + +import ( + "context" + "encoding/hex" + "encoding/json" + "fmt" + "os" + "time" + + filaddress "github.com/filecoin-project/go-address" + filtypes "github.com/filecoin-project/lotus/chain/types" + "github.com/ipfs/go-cid" + "github.com/renproject/id" + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/filecoin" + "github.com/renproject/pack" + "github.com/renproject/surge" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Filecoin", func() { + Context("when broadcasting a tx", func() { + It("should work", func() { + // create context for the test + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + // instantiate the client + client, err := filecoin.NewClient( + filecoin.DefaultClientOptions(). + WithRpcURL("ws://127.0.0.1:1234/rpc/v0"). + WithAuthToken("Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.673MLa4AmbhNeC1Hj2Bn6c4t_ci68I0amkqAEHea8ik"), + ) + Expect(err).ToNot(HaveOccurred()) + + // read the private key that we will send transactions from + senderPrivKeyStr := os.Getenv("FILECOIN_PK") + if senderPrivKeyStr == "" { + panic("FILECOIN_PK is undefined") + } + var ki filtypes.KeyInfo + data, err := hex.DecodeString(senderPrivKeyStr) + Expect(err).NotTo(HaveOccurred()) + err = json.Unmarshal(data, &ki) + Expect(err).NotTo(HaveOccurred()) + senderPrivKey := id.PrivKey{} + err = surge.FromBinary(&senderPrivKey, ki.PrivateKey) + Expect(err).NotTo(HaveOccurred()) + + // read sender's address into the filecoin-compatible format + senderAddr := os.Getenv("FILECOIN_ADDRESS") + if senderAddr == "" { + panic("FILECOIN_ADDRESS is undefined") + } + senderFilAddr, err := filaddress.NewFromString(string(senderAddr)) + Expect(err).NotTo(HaveOccurred()) + + // random recipient + recipientPK := id.NewPrivKey() + recipientPubKey := recipientPK.PubKey() + recipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey) + Expect(err).NotTo(HaveOccurred()) + recipientFilAddr, err := filaddress.NewSecp256k1Address(recipientPubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) + + // construct the transaction builder + gasPremium := pack.NewU256FromU64(pack.NewU64(149514)) + filTxBuilder := filecoin.NewTxBuilder(gasPremium) + + // build the transaction + tx, err := filTxBuilder.BuildTx( + multichain.Address(pack.String(senderFilAddr.String())), + multichain.Address(pack.String(recipientFilAddr.String())), + pack.NewU256FromU64(pack.NewU64(100000000)), // amount + pack.NewU256FromU64(pack.NewU64(0)), // nonce + pack.NewU256FromU64(pack.NewU64(495335)), // gasFeeCap + pack.NewU256FromU64(pack.NewU64(149838)), // gasPrice + pack.Bytes(nil), // payload + ) + Expect(err).ToNot(HaveOccurred()) + + // Sign the filecoin-side lock transaction + txSighashes, err := tx.Sighashes() + Expect(err).ToNot(HaveOccurred()) + Expect(len(txSighashes)).To(Equal(1)) + Expect(len(txSighashes[0])).To(Equal(32)) + sighash32 := [32]byte{} + for i, b := range []byte(txSighashes[0]) { + sighash32[i] = b + } + hash := id.Hash(sighash32) + sig, err := senderPrivKey.Sign(&hash) + Expect(err).NotTo(HaveOccurred()) + sigBytes, err := surge.ToBinary(sig) + Expect(err).NotTo(HaveOccurred()) + txSignature := pack.NewBytes(sigBytes) + Expect(tx.Sign([]pack.Bytes{txSignature}, []byte{})).To(Succeed()) + + // submit the transaction + txHash := tx.Hash() + txID, err := cid.Parse([]byte(txHash)) + Expect(err).NotTo(HaveOccurred()) + fmt.Printf("msgID = %v\n", txID) + err = client.SubmitTx(ctx, tx) + Expect(err).ToNot(HaveOccurred()) + + // wait for the transaction to be included in a block + for { + time.Sleep(2 * time.Second) + fetchedTx, confs, err := client.Tx(ctx, txHash) + Expect(err).ToNot(HaveOccurred()) + if fetchedTx != nil { + Expect(confs).To(BeNumerically(">=", 0)) + break + } + } + }) + }) +}) diff --git a/infra/.env b/infra/.env index be8dd432..2a3da981 100644 --- a/infra/.env +++ b/infra/.env @@ -55,8 +55,8 @@ export ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A # # Filecoin # -export FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a223168436f364f617442746f58636d304f6565665849473873374e505573576472372f6666735a58755964493d227d -export FILECOIN_ADDRESS=t17lz42vyixtlfs4a3j76cw53w32qb57w7g4g6qua +export FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d +export FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa # # Terra diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index d802e50a..d816630f 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -19,8 +19,10 @@ RUN ./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01 COPY run.sh /root/run.sh COPY miner.key /root/miner.key +COPY user.key /root/user.key RUN chmod +x /root/run.sh RUN chmod +x /root/miner.key +RUN chmod +x /root/user.key EXPOSE 1234 diff --git a/infra/filecoin/miner.key b/infra/filecoin/miner.key index e4d811cd..2c0c1e21 100644 --- a/infra/filecoin/miner.key +++ b/infra/filecoin/miner.key @@ -1 +1 @@ -7b2254797065223a22736563703235366b31222c22507269766174654b6579223a223168436f364f617442746f58636d304f6565665849473873374e505573576472372f6666735a58755964493d227d \ No newline at end of file +7b2254797065223a22736563703235366b31222c22507269766174654b6579223a223168436f364f617442746f58636d304f6565665849473873374e505573576472372f6666735a58755964493d227d diff --git a/infra/filecoin/run.sh b/infra/filecoin/run.sh index 0638fbc2..e7bb1213 100644 --- a/infra/filecoin/run.sh +++ b/infra/filecoin/run.sh @@ -14,6 +14,8 @@ sleep 10 ./lotus wallet import /root/miner.key +./lotus wallet import /root/user.key + ./lotus auth create-token --perm admin kill $PID @@ -59,7 +61,7 @@ sleep 15 MAIN_WALLET="$(jq -r '.t01000.Owner' ~/.genesis-sectors/pre-seal-t01000.json)" -./lotus send --from $MAIN_WALLET t17lz42vyixtlfs4a3j76cw53w32qb57w7g4g6qua 1000000 +./lotus send --from $MAIN_WALLET t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa 1000000 while : do diff --git a/infra/filecoin/user.key b/infra/filecoin/user.key new file mode 100644 index 00000000..cd4bb900 --- /dev/null +++ b/infra/filecoin/user.key @@ -0,0 +1 @@ +7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d From 14fb930565c1e2298cfb691b3b26246e487a65ed Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Sep 2020 10:26:39 +0530 Subject: [PATCH 074/335] formatting digibyte --- chain/digibyte/digibyte.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/chain/digibyte/digibyte.go b/chain/digibyte/digibyte.go index 48ba765b..ca732ba4 100644 --- a/chain/digibyte/digibyte.go +++ b/chain/digibyte/digibyte.go @@ -96,15 +96,14 @@ func newHashFromStr(hexStr string) *chainhash.Hash { return hash } - var MainNetParams = chaincfg.Params{ Name: "mainnet", Net: 0xdab6c3fa, DefaultPort: "12024", // Chain parameters - GenesisBlock: &genesisBlock, - GenesisHash: &genesisHash, + GenesisBlock: &genesisBlock, + GenesisHash: &genesisHash, // Human-readable part for Bech32 encoded segwit addresses, as defined in // BIP 173. @@ -137,8 +136,8 @@ var TestnetParams = chaincfg.Params{ DefaultPort: "12026", // Chain parameters - GenesisBlock: &genesisBlock, - GenesisHash: &genesisHash, + GenesisBlock: &genesisBlock, + GenesisHash: &genesisHash, // Human-readable part for Bech32 encoded segwit addresses, as defined in // BIP 173. @@ -161,7 +160,7 @@ var TestnetParams = chaincfg.Params{ } var RegressionNetParams = chaincfg.Params{ - Name: "regtest", + Name: "regtest", // DigiByte has 0xdab5bffa as RegTest (same as Bitcoin's RegTest). // Setting it to an arbitrary value (leet_hex(digibyte)), so that we can @@ -171,8 +170,8 @@ var RegressionNetParams = chaincfg.Params{ DefaultPort: "18444", // Chain parameters - GenesisBlock: &genesisBlock, - GenesisHash: &genesisHash, + GenesisBlock: &genesisBlock, + GenesisHash: &genesisHash, // Human-readable part for Bech32 encoded segwit addresses, as defined in // BIP 173. From 0538def9445ce9d18cb2bd06a623a83dc1a0579e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Sep 2020 10:52:32 +0530 Subject: [PATCH 075/335] linting --- chain/filecoin/client.go | 16 ++--- chain/filecoin/filecoin_test.go | 4 +- multichain.go | 101 +++++++++++++++++++++++++++----- 3 files changed, 97 insertions(+), 24 deletions(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 953fc975..23758eca 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -19,9 +19,9 @@ const ( // AuthorizationKey is the header key used for authorization AuthorizationKey = "Authorization" - // DefaultClientRpcURL is the RPC websocket URL used by default, to + // DefaultClientRPCURL is the RPC websocket URL used by default, to // interact with the filecoin lotus node. - DefaultClientRpcURL = "ws://127.0.0.1:1234/rpc/v0" + DefaultClientRPCURL = "ws://127.0.0.1:1234/rpc/v0" // DefaultClientAuthToken is the auth token used to instantiate the lotus // client. A valid lotus auth token is required to write messages to the @@ -31,7 +31,7 @@ const ( // ClientOptions are used to parameterise the behaviour of the Client. type ClientOptions struct { - RpcURL string + RPCURL string AuthToken string } @@ -41,15 +41,15 @@ type ClientOptions struct { // changed. func DefaultClientOptions() ClientOptions { return ClientOptions{ - RpcURL: DefaultClientRpcURL, + RPCURL: DefaultClientRPCURL, AuthToken: DefaultClientAuthToken, } } -// WithRpcURL returns a modified version of the options with the given API +// WithRPCURL returns a modified version of the options with the given API // rpc-url -func (opts ClientOptions) WithRpcURL(rpcURL string) ClientOptions { - opts.RpcURL = rpcURL +func (opts ClientOptions) WithRPCURL(rpcURL string) ClientOptions { + opts.RPCURL = rpcURL return opts } @@ -75,7 +75,7 @@ func NewClient(opts ClientOptions) (*Client, error) { requestHeaders.Add(AuthorizationKey, opts.AuthToken) } - node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.RpcURL, requestHeaders) + node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.RPCURL, requestHeaders) if err != nil { return nil, err } diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 63e48366..528d44c4 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -31,7 +31,7 @@ var _ = Describe("Filecoin", func() { // instantiate the client client, err := filecoin.NewClient( filecoin.DefaultClientOptions(). - WithRpcURL("ws://127.0.0.1:1234/rpc/v0"). + WithRPCURL("ws://127.0.0.1:1234/rpc/v0"). WithAuthToken("Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.673MLa4AmbhNeC1Hj2Bn6c4t_ci68I0amkqAEHea8ik"), ) Expect(err).ToNot(HaveOccurred()) @@ -111,8 +111,8 @@ var _ = Describe("Filecoin", func() { for { time.Sleep(2 * time.Second) fetchedTx, confs, err := client.Tx(ctx, txHash) - Expect(err).ToNot(HaveOccurred()) if fetchedTx != nil { + Expect(err).ToNot(HaveOccurred()) Expect(confs).To(BeNumerically(">=", 0)) break } diff --git a/multichain.go b/multichain.go index ea9ec6d5..f31b1778 100644 --- a/multichain.go +++ b/multichain.go @@ -13,34 +13,88 @@ import ( ) type ( - Address = address.Address - AddressEncodeDecoder = address.EncodeDecoder + // An Address is a human-readable representation of a public identity. It can + // be the address of an external account, contract, or script. + Address = address.Address + + // The AddressEncodeDecoder interfaces combines encoding and decoding + // functionality into one interface. + AddressEncodeDecoder = address.EncodeDecoder + + // An EthereumCompatAddress represents a public address on the Ethereum + // blockchain. It can be the address of an external account, or the address of + // a smart contract. EthereumCompatAddress = ethereum.Address - RawAddress = address.RawAddress + + // RawAddress is an address that has been decoded into its binary form. + RawAddress = address.RawAddress ) type ( - AccountTx = account.Tx + // The AccountTx interface defines the functionality that must be exposed by + // account-based transactions. + AccountTx = account.Tx + + // The AccountTxBuilder interface defines the functionality required to build + // account-based transactions. Most chain implementations require additional + // information, and this should be accepted during the construction of the + // chain-specific transaction builder. AccountTxBuilder = account.TxBuilder - AccountClient = account.Client + + // The AccountClient interface defines the functionality required to interact + // with a chain over RPC. + AccountClient = account.Client ) type ( - UTXOutpoint = utxo.Outpoint - UTXOutput = utxo.Output - UTXOInput = utxo.Input + // A UTXOutpoint identifies a specific output produced by a transaction. + UTXOutpoint = utxo.Outpoint + + // A UTXOutput is produced by a transaction. It includes the conditions + // required to spend the output (called the pubkey script, based on Bitcoin). + UTXOutput = utxo.Output + + // A UTXOInput specifies an existing output, produced by a previous + // transaction, to be consumed by another transaction. It includes the script + // that meets the conditions specified by the consumed output (called the sig + // script, based on Bitcoin). + UTXOInput = utxo.Input + + // A UTXORecipient specifies an address, and an amount, for which a + // transaction will produce an output. Depending on the output, the address + // can take on different formats (e.g. in Bitcoin, addresses can be P2PK, + // P2PKH, or P2SH). UTXORecipient = utxo.Recipient - UTXOTx = utxo.Tx + + // A UTXOTx interfaces defines the functionality that must be exposed by + // utxo-based transactions. + UTXOTx = utxo.Tx + + // A UTXOTxBuilder interface defines the functionality required to build + // account-based transactions. Most chain implementations require additional + // information, and this should be accepted during the construction of the + // chain-specific transaction builder. UTXOTxBuilder = utxo.TxBuilder - UTXOClient = utxo.Client + + // A UTXOClient interface defines the functionality required to interact with + // a chain over RPC. + UTXOClient = utxo.Client ) type ( + // ContractCallData is used to specify a function and its parameters when + // invoking business logic on a contract. ContractCallData = contract.CallData - ContractCaller = contract.Caller + + // The ContractCaller interface defines the functionality required to call + // readonly functions on a contract. Calling functions that mutate contract + // state should be done using the Account API. + ContractCaller = contract.Caller ) type ( + // The GasEstimator interface defines the functionality required to know the + // current recommended gas prices. GasEstimator = gas.Estimator ) @@ -98,6 +152,7 @@ func (asset Asset) OriginChain() Chain { } } +// ChainType returns the chain-type (Account or UTXO) for the given asset func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: @@ -165,6 +220,8 @@ func (chain *Chain) Unmarshal(buf []byte, rem int) ([]byte, int, error) { return surge.UnmarshalString((*string)(chain), buf, rem) } +// ChainType returns the chain type (whether account-based or utxo-based chain) +// for the chain. func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: @@ -176,19 +233,29 @@ func (chain Chain) ChainType() ChainType { } } +// IsAccountBased returns true when invoked on an account-based chain, otherwise +// returns false. func (chain Chain) IsAccountBased() bool { return chain.ChainType() == ChainTypeAccountBased } +// IsUTXOBased returns true when invoked on a utxo-based chain, otherwise +// returns false. func (chain Chain) IsUTXOBased() bool { return chain.ChainType() == ChainTypeUTXOBased } +// ChainType represents the type of chain (whether account-based or utxo-based) type ChainType string const ( + // ChainTypeAccountBased is an identifier for all account-based chains, + // namely, BinanceSmartChain, Ethereum, Filecoin, and so on. ChainTypeAccountBased = ChainType("Account") - ChainTypeUTXOBased = ChainType("UTXO") + + // ChainTypeUTXOBased is an identifier for all utxo-based chains, namely, + // Bitcoin, BitcoinCash, DigiByte, and so on. + ChainTypeUTXOBased = ChainType("UTXO") ) // SizeHint returns the number of bytes required to represent the chain type in @@ -209,12 +276,18 @@ func (chainType *ChainType) Unmarshal(buf []byte, rem int) ([]byte, int, error) return surge.UnmarshalString((*string)(chainType), buf, rem) } +// Network identifies the network type for the multichain deployment type Network string const ( + // NetworkLocalnet represents a locally deployed network for chains NetworkLocalnet = Network("localnet") - NetworkTestnet = Network("testnet") - NetworkMainnet = Network("mainnet") + + // NetworkTestnet represents the test network for chains + NetworkTestnet = Network("testnet") + + // NetworkMainnet represents the main network for chains + NetworkMainnet = Network("mainnet") ) // SizeHint returns the number of bytes required to represent the network in From ff9e7606d6566f817badaa6cdedcb43c7b7cf1b2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Sep 2020 11:45:02 +0530 Subject: [PATCH 076/335] changes based on PR review --- chain/cosmos/address.go | 3 ++- chain/cosmos/client.go | 44 +++++-------------------------- chain/cosmos/cosmos_suite_test.go | 18 ++++++------- chain/cosmos/gas.go | 32 +++++++++------------- chain/terra/terra.go | 2 +- chain/terra/terra_test.go | 18 ++++++------- 6 files changed, 38 insertions(+), 79 deletions(-) diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index 201f43cd..57a555d1 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -67,5 +67,6 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd // EncodeAddress consumes raw bytes and encodes them to a human-readable // address format. func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { - panic("unimplemented") + bech32Addr := sdk.AccAddress(rawAddr) + return address.Address(bech32Addr.String()), nil } diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index f4876f03..967db076 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -58,23 +58,15 @@ func (opts ClientOptions) WithHost(host pack.String) ClientOptions { return opts } -// A Client interacts with an instance of the Cosmos based network using the REST +// Client interacts with an instance of the Cosmos based network using the REST // interface exposed by a lightclient node. -type Client interface { - // Account query account with address - Account(address Address) (Account, error) - - // Client interface from account.Client - account.Client -} - -type client struct { +type Client struct { opts ClientOptions cliCtx cliContext.CLIContext } // NewClient returns a new Client. -func NewClient(opts ClientOptions, cdc *codec.Codec) Client { +func NewClient(opts ClientOptions, cdc *codec.Codec) account.Client { httpClient, err := rpchttp.NewWithTimeout(opts.Host.String(), "websocket", uint(opts.Timeout/time.Second)) if err != nil { panic(err) @@ -82,38 +74,14 @@ func NewClient(opts ClientOptions, cdc *codec.Codec) Client { cliCtx := cliContext.NewCLIContext().WithCodec(cdc).WithClient(httpClient).WithTrustNode(true) - return &client{ + return &Client{ opts: opts, cliCtx: cliCtx, } } -// Account contains necessary info for sdk.Account -type Account struct { - Address Address `json:"address"` - AccountNumber pack.U64 `json:"account_number"` - SequenceNumber pack.U64 `json:"sequence_number"` - Coins Coins `json:"coins"` -} - -// Account query account with address -func (client *client) Account(addr Address) (Account, error) { - accGetter := auth.NewAccountRetriever(client.cliCtx) - acc, err := accGetter.GetAccount(addr.AccAddress()) - if err != nil { - return Account{}, err - } - - return Account{ - Address: addr, - AccountNumber: pack.U64(acc.GetAccountNumber()), - SequenceNumber: pack.U64(acc.GetSequence()), - Coins: parseCoins(acc.GetCoins()), - }, nil -} - // Tx query transaction with txHash -func (client *client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) { +func (client *Client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) { res, err := utils.QueryTx(client.cliCtx, hex.EncodeToString(txHash[:])) if err != nil { return &StdTx{}, pack.NewU64(0), fmt.Errorf("query fail: %v", err) @@ -133,7 +101,7 @@ func (client *client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pa } // SubmitTx to the Cosmos based network. -func (client *client) SubmitTx(ctx context.Context, tx account.Tx) error { +func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { txBytes, err := tx.Serialize() if err != nil { return fmt.Errorf("bad \"submittx\": %v", err) diff --git a/chain/cosmos/cosmos_suite_test.go b/chain/cosmos/cosmos_suite_test.go index b1f67bf2..d9717899 100644 --- a/chain/cosmos/cosmos_suite_test.go +++ b/chain/cosmos/cosmos_suite_test.go @@ -1,13 +1,13 @@ package cosmos_test -// import ( -// "testing" +import ( + "testing" -// . "github.com/onsi/ginkgo" -// . "github.com/onsi/gomega" -// ) + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) -// func TestCosmos(t *testing.T) { -// RegisterFailHandler(Fail) -// RunSpecs(t, "Cosmos Suite") -// } +func TestCosmos(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Cosmos Suite") +} diff --git a/chain/cosmos/gas.go b/chain/cosmos/gas.go index f6eb82dd..c60190ae 100644 --- a/chain/cosmos/gas.go +++ b/chain/cosmos/gas.go @@ -3,36 +3,28 @@ package cosmos import ( "context" + "github.com/renproject/multichain/api/gas" "github.com/renproject/pack" ) // A GasEstimator returns the gas-per-byte that is needed in order to confirm -// transactions with relatively high speed. In distributed networks that work to -// collectively build transactions, it is important that all nodes return the -// same values from this interface. -type GasEstimator interface { - GasPerByte(ctx context.Context) (pack.U64, error) - GasPerSignature(ctx context.Context) (pack.U64, error) -} - -type gasEstimator struct { - gasPerByte pack.U64 - gasPerSignature pack.U64 +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// gas-per-byte. +type GasEstimator struct { + gasPerByte pack.U256 } // NewGasEstimator returns a simple gas estimator that always returns the same // amount of gas-per-byte. -func NewGasEstimator(gasPerByte, gasPerSignature pack.U64) GasEstimator { - return &gasEstimator{ - gasPerByte: gasPerByte, - gasPerSignature: gasPerSignature, +func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { + return &GasEstimator{ + gasPerByte: gasPerByte, } } -func (gasEstimator *gasEstimator) GasPerByte(ctx context.Context) (pack.U64, error) { +// EstimateGasPrice returns gas required per byte for Cosmos-compatible chains. +func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, error) { return gasEstimator.gasPerByte, nil } - -func (gasEstimator *gasEstimator) GasPerSignature(ctx context.Context) (pack.U64, error) { - return gasEstimator.gasPerSignature, nil -} diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 3e439b5b..2047e392 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -23,7 +23,7 @@ var ( ) // NewClient returns returns a new Client with terra codec -func NewClient(opts ClientOptions) Client { +func NewClient(opts ClientOptions) account.Client { return cosmos.NewClient(opts, app.MakeCodec()) } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index b31aa22d..1b2b5f31 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -59,12 +59,10 @@ var _ = Describe("Terra", func() { // instantiate a new client client := terra.NewClient(cosmos.DefaultClientOptions()) - account, err := client.Account(addr) - Expect(err).NotTo(HaveOccurred()) // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ - AccountNumber: account.AccountNumber, + AccountNumber: pack.NewU64(1), ChainID: "testnet", CoinDenom: "uluna", Cdc: app.MakeCodec(), @@ -73,13 +71,13 @@ var _ = Describe("Terra", func() { // build the transaction payload := pack.NewBytes([]byte("multichain")) tx, err := txBuilder.BuildTx( - multichain.Address(addr.String()), // from - multichain.Address(recipient.String()), // to - pack.NewU256FromU64(pack.U64(2000000)), // amount - pack.NewU256FromU64(account.SequenceNumber), // nonce - pack.NewU256FromU64(pack.U64(300000)), // gas - pack.NewU256FromU64(pack.U64(300)), // fee - payload, // memo + multichain.Address(addr.String()), // from + multichain.Address(recipient.String()), // to + pack.NewU256FromU64(pack.U64(2000000)), // amount + pack.NewU256FromU64(0), // nonce + pack.NewU256FromU64(pack.U64(300000)), // gas + pack.NewU256FromU64(pack.U64(300)), // fee + payload, // memo ) Expect(err).NotTo(HaveOccurred()) From d272335f4350e692e017f55cebea0ee17a133a3a Mon Sep 17 00:00:00 2001 From: Janet Liang Date: Mon, 7 Sep 2020 13:24:27 -0700 Subject: [PATCH 077/335] [api] Gas API Implementation --- chain/harmony/gas.go | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/chain/harmony/gas.go b/chain/harmony/gas.go index 66d37d46..8b229592 100644 --- a/chain/harmony/gas.go +++ b/chain/harmony/gas.go @@ -1 +1,21 @@ -package harmony \ No newline at end of file +package harmony + +import( + "context" + "math/big" + + "github.com/renproject/pack" +) + +var ( + defaultGas = big.NewInt(1) +) + +type Estimator struct {} + +// The average block time on Harmony is 5 seconds & each block has a max +// gas limit of 80 million. There is currently no need to estimate gas for +// regular transactions & we do not have the RPC for it. +func (Estimator) EstimateGasPrice(ctx context.Context) (pack.U256, error) { + return pack.NewU256FromInt(defaultGas), nil +} From fa9f4db421ad03cac94627d34b8f6d12a08c3e10 Mon Sep 17 00:00:00 2001 From: Janet Liang Date: Mon, 7 Sep 2020 13:24:46 -0700 Subject: [PATCH 078/335] [api] Fix nil return value --- chain/harmony/address.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/harmony/address.go b/chain/harmony/address.go index 366fbdbf..d6b6358c 100644 --- a/chain/harmony/address.go +++ b/chain/harmony/address.go @@ -22,7 +22,7 @@ type Encoder struct {} func (Encoder) EncodeAddress(addr address.RawAddress) (address.Address, error) { encodedAddr, err := bech32.ConvertBits(addr, 8, 5, true) if err != nil { - return nil, err + return "", err } return address.Address(encodedAddr), nil } From 6dbe2465a44738372d0fec238991488e8f5deaf6 Mon Sep 17 00:00:00 2001 From: Janet Liang Date: Mon, 7 Sep 2020 13:32:42 -0700 Subject: [PATCH 079/335] [api] Fix lint --- chain/harmony/address.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/harmony/address.go b/chain/harmony/address.go index d6b6358c..1fa33057 100644 --- a/chain/harmony/address.go +++ b/chain/harmony/address.go @@ -43,4 +43,4 @@ func NewEncoder() address.Encoder { func NewDecoder() address.Decoder { return Decoder{} -} \ No newline at end of file +} From 902db6981789d8c64767e3db2976309309726e08 Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Wed, 9 Sep 2020 14:56:29 +1000 Subject: [PATCH 080/335] update network params for heartwood and canopy --- chain/zcash/zcash.go | 12 +++++++++--- infra/zcash/zcash.conf | 14 +++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/chain/zcash/zcash.go b/chain/zcash/zcash.go index f76d1081..913380fc 100644 --- a/chain/zcash/zcash.go +++ b/chain/zcash/zcash.go @@ -44,6 +44,8 @@ var ( {347500, []byte{0x19, 0x1B, 0xA8, 0x5B}}, {419200, []byte{0xBB, 0x09, 0xB8, 0x76}}, {653600, []byte{0x60, 0x0E, 0xB4, 0x2B}}, + {903000, []byte{0x0B, 0x23, 0xB9, 0xF5}}, + {1046400, []byte{0xA6, 0x75, 0xff, 0xe9}}, }, } TestNet3Params = Params{ @@ -56,6 +58,8 @@ var ( {207500, []byte{0x19, 0x1B, 0xA8, 0x5B}}, {280000, []byte{0xBB, 0x09, 0xB8, 0x76}}, {584000, []byte{0x60, 0x0E, 0xB4, 0x2B}}, + {903800, []byte{0x0B, 0x23, 0xB9, 0xF5}}, + {1028500, []byte{0xA6, 0x75, 0xff, 0xe9}}, }, } RegressionNetParams = Params{ @@ -65,9 +69,11 @@ var ( P2SHPrefix: []byte{0x1C, 0xBA}, Upgrades: []ParamsUpgrade{ {0, []byte{0x00, 0x00, 0x00, 0x00}}, - {60, []byte{0x19, 0x1B, 0xA8, 0x5B}}, - {80, []byte{0xBB, 0x09, 0xB8, 0x76}}, - {100, []byte{0x60, 0x0E, 0xB4, 0x2B}}, + {10, []byte{0x19, 0x1B, 0xA8, 0x5B}}, + {20, []byte{0xBB, 0x09, 0xB8, 0x76}}, + {30, []byte{0x60, 0x0E, 0xB4, 0x2B}}, + {40, []byte{0x0B, 0x23, 0xB9, 0xF5}}, + {50, []byte{0xA6, 0x75, 0xff, 0xe9}}, }, } ) diff --git a/infra/zcash/zcash.conf b/infra/zcash/zcash.conf index 87e21705..87dd73a7 100644 --- a/infra/zcash/zcash.conf +++ b/infra/zcash/zcash.conf @@ -8,6 +8,14 @@ server=1 txindex=1 gen=1 minetolocalwallet=0 -nuparams=5ba81b19:40 -nuparams=76b809bb:60 -nuparams=2bb40e60:80 \ No newline at end of file + +# Overwinter +nuparams=5ba81b19:10 +# Sapling +nuparams=76b809bb:20 +# Blossom +nuparams=2bb40e60:30 +# Heartwood +nuparams=f5b9230b:40 +# Canopy +nuparams=e9ff75a6:50 \ No newline at end of file From 6733d4c5a6cf8218baa570771cfb99b71d2ce2a7 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 9 Sep 2020 16:11:57 +1000 Subject: [PATCH 081/335] rm irrelevant chains and revert to fix-sized sigs --- api/account/account.go | 4 +- chain/acala/acala.go | 128 ----------- chain/acala/acala_suite_test.go | 13 -- chain/acala/acala_test.go | 17 -- chain/acala/address.go | 38 ---- chain/acala/decode.go | 309 -------------------------- chain/celo/address.go | 25 --- chain/celo/address_test.go | 1 - chain/ethereum/account.go | 189 ---------------- chain/ethereum/account_test.go | 1 - chain/ethereum/address.go | 141 ------------ chain/ethereum/address_test.go | 107 --------- chain/ethereum/encode.go | 79 ------- chain/ethereum/encode_test.go | 255 --------------------- chain/ethereum/ethereum.go | 1 - chain/ethereum/ethereum_suite_test.go | 13 -- chain/ethereum/ethereum_test.go | 1 - chain/ethereum/gas.go | 32 --- chain/ethereum/gas_test.go | 1 - chain/filecoin/account.go | 15 +- chain/filecoin/filecoin_test.go | 10 +- multichain.go | 6 - 22 files changed, 10 insertions(+), 1376 deletions(-) delete mode 100644 chain/acala/acala.go delete mode 100644 chain/acala/acala_suite_test.go delete mode 100644 chain/acala/acala_test.go delete mode 100644 chain/acala/address.go delete mode 100644 chain/acala/decode.go delete mode 100644 chain/celo/address.go delete mode 100644 chain/celo/address_test.go delete mode 100644 chain/ethereum/account.go delete mode 100644 chain/ethereum/account_test.go delete mode 100644 chain/ethereum/address.go delete mode 100644 chain/ethereum/address_test.go delete mode 100644 chain/ethereum/encode.go delete mode 100644 chain/ethereum/encode_test.go delete mode 100644 chain/ethereum/ethereum.go delete mode 100644 chain/ethereum/ethereum_suite_test.go delete mode 100644 chain/ethereum/ethereum_test.go delete mode 100644 chain/ethereum/gas.go delete mode 100644 chain/ethereum/gas_test.go diff --git a/api/account/account.go b/api/account/account.go index 47f8394f..27341cb0 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -39,12 +39,12 @@ type Tx interface { // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighashes() ([]pack.Bytes, error) + Sighashes() ([]pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign([]pack.Bytes, pack.Bytes) error + Sign([]pack.Bytes65, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/acala/acala.go b/chain/acala/acala.go deleted file mode 100644 index 3452b7c2..00000000 --- a/chain/acala/acala.go +++ /dev/null @@ -1,128 +0,0 @@ -package acala - -import ( - "context" - "fmt" - - gsrpc "github.com/centrifuge/go-substrate-rpc-client" - "github.com/centrifuge/go-substrate-rpc-client/types" - "github.com/renproject/multichain" - "github.com/renproject/pack" - "go.uber.org/zap" -) - -const DefaultClientRPCURL = "http://127.0.0.1:9944" - -type ClientOptions struct { - Logger *zap.Logger - rpcURL pack.String -} - -func DefaultClientOptions() ClientOptions { - logger, err := zap.NewDevelopment() - if err != nil { - panic(err) - } - return ClientOptions{ - Logger: logger, - rpcURL: DefaultClientRPCURL, - } -} - -func (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions { - opts.rpcURL = rpcURL - return opts -} - -type Client struct { - opts ClientOptions - api gsrpc.SubstrateAPI -} - -func NewClient(opts ClientOptions) (*Client, error) { - substrateAPI, err := gsrpc.NewSubstrateAPI(string(opts.rpcURL)) - if err != nil { - return nil, err - } - - return &Client{ - opts: opts, - api: *substrateAPI, - }, nil -} - -func printEvents(meta *types.Metadata, data *types.StorageDataRaw, nhBlock types.Hash) error { - er := types.EventRecordsRaw(*data) - e := EventsWithMint{} - err := DecodeEvents(&er, meta, &e) - if err != nil { - return err - } - - for _, e := range e.RenToken_AssetsMinted { - fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Phase) - fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Who) - fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Currency) - fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Amount) - fmt.Printf("[EVENT] RenToken::AssetsMinted:: (phase=%#v)\n", e.Topics) - } - - return nil -} - -func (client *Client) BurnEvent(ctx context.Context, asset multichain.Asset, nonce pack.Bytes32, blockheight pack.U64) (amount pack.U256, to pack.String, confs int64, err error) { - - meta, err := client.api.RPC.State.GetMetadataLatest() - if err != nil { - panic(err) - } - - // fmt.Printf("%#v\n", meta) - - // Subscribe to system events via storage - key, err := types.CreateStorageKey(meta, "System", "Events", nil, nil) - if err != nil { - panic(err) - } - - blockhash, err := client.api.RPC.Chain.GetBlockHash(blockheight.Uint64()) - if err != nil { - panic(err) - } - - fmt.Printf("blockhash: %#v\n", blockhash.Hex()) - - data, err := client.api.RPC.State.GetStorageRaw(key, blockhash) - - if err = printEvents(meta, data, blockhash); err != nil { - panic(err) - } - - fmt.Printf("\nLive events:\n") - - // fmt.Printf("data: %#v\n", data) - - // panic("unimplemented") - - sub, err := client.api.RPC.State.SubscribeStorageRaw([]types.StorageKey{key}) - if err != nil { - panic(err) - } - defer sub.Unsubscribe() - - // outer for loop for subscription notifications - for { - set := <-sub.Chan() - // inner loop for the changes within one of those notifications - for _, chng := range set.Changes { - if !types.Eq(chng.StorageKey, key) || !chng.HasStorageData { - // skip, we are only interested in events with content - continue - } - - // printEvents(meta, &chng.StorageData) - } - } - - // return pack.U256{}, pack.String(""), 0, fmt.Errorf("unimplemented") -} diff --git a/chain/acala/acala_suite_test.go b/chain/acala/acala_suite_test.go deleted file mode 100644 index f91d1e63..00000000 --- a/chain/acala/acala_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package acala_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestSubstratecompat(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Acala Suite") -} diff --git a/chain/acala/acala_test.go b/chain/acala/acala_test.go deleted file mode 100644 index 55021661..00000000 --- a/chain/acala/acala_test.go +++ /dev/null @@ -1,17 +0,0 @@ -package acala_test - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "github.com/renproject/multichain/chain/acala" -) - -var _ = Describe("Substrate client", func() { - Context("when verifying burns", func() { - It("should verify a valid burn", func() { - _, err := acala.NewClient(acala.DefaultClientOptions()) - Expect(err).ToNot(HaveOccurred()) - }) - }) -}) diff --git a/chain/acala/address.go b/chain/acala/address.go deleted file mode 100644 index 5a0a49dc..00000000 --- a/chain/acala/address.go +++ /dev/null @@ -1,38 +0,0 @@ -package acala - -import ( - "fmt" - - "github.com/btcsuite/btcutil/base58" - "github.com/renproject/pack" -) - -// An Address represents a public address on a Substrate blockchain. It can be -// the address of an external account, or the address of a smart contract. -type Address pack.Bytes - -// The AddressDecoder defines an interface for decoding string representations -// of Substrate address into the concrete Address type. -type AddressDecoder interface { - DecodeAddress(pack.String) (Address, error) -} - -type addressDecoder struct{} - -// NewAddressDecoder returns the default AddressDecoder for Substract chains. It -// uses the Bitcoin base58 alphabet to decode the string, and interprets the -// result as a 2-byte address type, 32-byte array, and 1-byte checksum. -func NewAddressDecoder() AddressDecoder { - return addressDecoder{} -} - -// DecodeAddress the string using the Bitcoin base58 alphabet. If the string -// does not a 2-byte address type, 32-byte array, and 1-byte checksum, then an -// error is returned. -func (addressDecoder) DecodeAddress(encoded pack.String) (Address, error) { - data := base58.Decode(encoded.String()) - if len(data) != 35 { - return Address{}, fmt.Errorf("expected 35 bytes, got %v bytes", len(data)) - } - return Address(data), nil -} diff --git a/chain/acala/decode.go b/chain/acala/decode.go deleted file mode 100644 index 6fff7eca..00000000 --- a/chain/acala/decode.go +++ /dev/null @@ -1,309 +0,0 @@ -package acala - -import ( - "bytes" - "errors" - "fmt" - "reflect" - - "github.com/centrifuge/go-substrate-rpc-client/scale" - "github.com/centrifuge/go-substrate-rpc-client/types" -) - -type eventAssetsMinted struct { - Phase types.Phase - Who types.AccountID - Currency types.U8 - Amount types.U128 - Topics []types.Hash -} - -type EventsWithMint struct { - types.EventRecords - RenToken_AssetsMinted []eventAssetsMinted //nolint:stylecheck,golint -} - -func FindEventForEventID(m types.MetadataV10, eventID types.EventID) (*types.EventMetadataV4, error) { - mi := uint8(0) - for _, mod := range m.Modules { - if !mod.HasEvents { - continue - } - if mi != eventID[0] { - mi++ - continue - } - if int(eventID[1]) >= len(mod.Events) { - return nil, fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) - } - return &mod.Events[eventID[1]], nil - } - return nil, fmt.Errorf("module index %v out of range", eventID[0]) -} - -// DecodeEventRecords decodes the events records from an EventRecordRaw into a target t using the given Metadata m -// If this method returns an error like `unable to decode Phase for event #x: EOF`, it is likely that you have defined -// a custom event record with a wrong type. For example your custom event record has a field with a length prefixed -// type, such as types.Bytes, where your event in reallity contains a fixed width type, such as a types.U32. -func DecodeEvents(e *types.EventRecordsRaw, m *types.Metadata, t interface{}) error { - // ensure t is a pointer - ttyp := reflect.TypeOf(t) - if ttyp.Kind() != reflect.Ptr { - return errors.New("target must be a pointer, but is " + fmt.Sprint(ttyp)) - } - // ensure t is not a nil pointer - tval := reflect.ValueOf(t) - if tval.IsNil() { - return errors.New("target is a nil pointer") - } - val := tval.Elem() - typ := val.Type() - // ensure val can be set - if !val.CanSet() { - return fmt.Errorf("unsettable value %v", typ) - } - // ensure val points to a struct - if val.Kind() != reflect.Struct { - return fmt.Errorf("target must point to a struct, but is " + fmt.Sprint(typ)) - } - - decoder := scale.NewDecoder(bytes.NewReader(*e)) - - // determine number of events - n, err := decoder.DecodeUintCompact() - if err != nil { - return err - } - - fmt.Println(fmt.Sprintf("found %v events", n)) - - // iterate over events - for i := uint64(0); i < n; i++ { - fmt.Println(fmt.Sprintf("decoding event #%v", i)) - - // decode Phase - phase := types.Phase{} - err := decoder.Decode(&phase) - if err != nil { - return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) - } - - // decode EventID - id := types.EventID{} - err = decoder.Decode(&id) - if err != nil { - return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) - } - - fmt.Println(fmt.Sprintf("event #%v has EventID %v", i, id)) - - // ask metadata for method & event name for event - moduleName, eventName, err := m.FindEventNamesForEventID(id) - // moduleName, eventName, err := "System", "ExtrinsicSuccess", nil - if err != nil { - fmt.Printf("unable to find event with EventID %v in metadata for event #%v: %s\n", id, i, err) - continue - // return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) - } - - fmt.Println(fmt.Sprintf("event #%v is in module %v with event name %v", i, moduleName, eventName)) - - // check whether name for eventID exists in t - field := val.FieldByName(fmt.Sprintf("%v_%v", moduleName, eventName)) - if !field.IsValid() { - eventParams, err := FindEventForEventID(m.AsMetadataV10, id) - if err != nil { - return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) - } - - for j := 0; j < len(eventParams.Args); j++ { - fmt.Printf("decoding field: %v (%v)\n", j, eventParams.Args[j]) - switch eventParams.Args[j] { - case "u8": - param := types.U8(0) - err = decoder.Decode(param) - case "u16": - param := types.U16(0) - err = decoder.Decode(param) - case "u32": - param := types.U32(0) - err = decoder.Decode(param) - case "u64": - param := types.U64(0) - err = decoder.Decode(param) - case "u128": - param := types.U128{} - err = decoder.Decode(param) - case "u256": - param := types.U256{} - err = decoder.Decode(param) - case "Phase": - param := types.Phase{} - err = decoder.Decode(param) - case "DispatchInfo": - param := types.DispatchInfo{} - err = decoder.Decode(param) - case "DispatchError": - param := types.DispatchError{} - err = decoder.Decode(param) - case "AccountId": - param := types.AccountID{} - err = decoder.Decode(param) - case "AccountIndex": - param := types.AccountIndex(0) - err = decoder.Decode(param) - // case "Balance": - // param := types.Balance{} - // err = decoder.Decode(param) - // case "Status": - // param := types.Status{} - // err = decoder.Decode(param) - case "bool": - param := types.Bool(false) - err = decoder.Decode(param) - // case "CallHash": - // param := types.CallHash{} - // err = decoder.Decode(param) - // case "Timepoint": - // param := types.Timepoint{} - // err = decoder.Decode(param) - // case "ProposalIndex": - // param := types.ProposalIndex{} - // err = decoder.Decode(param) - case "Hash": - param := types.Hash{} - err = decoder.Decode(param) - // case "EraIndex": - // param := types.EraIndex{} - // err = decoder.Decode(param) - // case "SessionIndex": - // param := types.SessionIndex{} - // err = decoder.Decode(param) - // case "ElectionCompute": - // param := types.ElectionCompute{} - // err = decoder.Decode(param) - // case "MemberCount": - // param := types.MemberCount{} - // err = decoder.Decode(param) - // case "sp_std": - // param := // types.sp_std::marker::PhantomData<(AccountId, Event)>{} - // err = decoder.Decode(param) - // case "Vec": - // param := // types.Vec<(OracleKey, OracleValue)>{} - // err = decoder.Decode(param) - // case "CurrencyId": - // param := types.CurrencyId{} - // err = decoder.Decode(param) - // case "Amount": - // param := types.Amount{} - // err = decoder.Decode(param) - // case "VestingSchedule": - // param := types.VestingSchedule{} - // err = decoder.Decode(param) - case "BlockNumber": - param := types.BlockNumber(0) - err = decoder.Decode(param) - // case "DispatchId": - // param := types.DispatchId{} - // err = decoder.Decode(param) - case "StorageKey": - param := types.StorageKey{} - err = decoder.Decode(param) - // case "StorageValue": - // param := types.StorageValue{} - // err = decoder.Decode(param) - // case "AuctionId": - // param := types.AuctionId{} - // err = decoder.Decode(param) - // case "Price": - // param := types.Price{} - // err = decoder.Decode(param) - // case "DebitAmount": - // param := types.DebitAmount{} - // err = decoder.Decode(param) - // case "DebitBalance": - // param := types.DebitBalance{} - // err = decoder.Decode(param) - // case "Share": - // param := types.Share{} - // err = decoder.Decode(param) - // case "LiquidationStrategy": - // param := types.LiquidationStrategy{} - // err = decoder.Decode(param) - // case "Option": - // param := types.Option{} - // err = decoder.Decode(param) - // case "Option": - // param := types.Option{} - // err = decoder.Decode(param) - // case "Rate": - // param := types.Rate{} - // err = decoder.Decode(param) - // case "Vec": - // param := // types.Vec<(CurrencyId, Balance)>{} - // err = decoder.Decode(param) - // case "AirDropCurrencyId": - // param := types.AirDropCurrencyId{} - // err = decoder.Decode(param) - // case "Vec": - // param := // types.Vec{} - // err = decoder.Decode(param) - - case "AuthorityList": - param := []struct { - AuthorityID types.AuthorityID - AuthorityWeight types.U64 - }{} - err = decoder.Decode(param) - default: - return fmt.Errorf("unable to decode field %v_%v arg #%v %v", moduleName, - eventName, j, eventParams.Args[j]) - } - } - - fmt.Printf("unable to find field %v_%v for event #%v with EventID %v\n", moduleName, eventName, i, id) - continue - // return fmt.Errorf("unable to find field %v_%v for event #%v with EventID %v", moduleName, eventName, i, id) - } - - // create a pointer to with the correct type that will hold the decoded event - holder := reflect.New(field.Type().Elem()) - - // ensure first field is for Phase, last field is for Topics - numFields := holder.Elem().NumField() - fmt.Printf("numFields: %v\n", numFields) - if numFields < 2 { - return fmt.Errorf("expected event #%v with EventID %v, field %v_%v to have at least 2 fields "+ - "(for Phase and Topics), but has %v fields", i, id, moduleName, eventName, numFields) - } - phaseField := holder.Elem().FieldByIndex([]int{0}) - if phaseField.Type() != reflect.TypeOf(phase) { - return fmt.Errorf("expected the first field of event #%v with EventID %v, field %v_%v to be of type "+ - "types.Phase, but got %v", i, id, moduleName, eventName, phaseField.Type()) - } - topicsField := holder.Elem().FieldByIndex([]int{numFields - 1}) - if topicsField.Type() != reflect.TypeOf([]types.Hash{}) { - return fmt.Errorf("expected the last field of event #%v with EventID %v, field %v_%v to be of type "+ - "[]types.Hash for Topics, but got %v", i, id, moduleName, eventName, topicsField.Type()) - } - - // set the phase we decoded earlier - phaseField.Set(reflect.ValueOf(phase)) - - // set the remaining fields - for j := 1; j < numFields; j++ { - fmt.Printf("decoding field: %v\n", j) - err = decoder.Decode(holder.Elem().FieldByIndex([]int{j}).Addr().Interface()) - if err != nil { - return fmt.Errorf("unable to decode field %v event #%v with EventID %v, field %v_%v: %v", j, i, id, moduleName, - eventName, err) - } - } - - // add the decoded event to the slice - field.Set(reflect.Append(field, holder.Elem())) - - fmt.Println(fmt.Sprintf("decoded event #%v", i)) - } - return nil -} diff --git a/chain/celo/address.go b/chain/celo/address.go deleted file mode 100644 index a5c6995c..00000000 --- a/chain/celo/address.go +++ /dev/null @@ -1,25 +0,0 @@ -package celo - -import "github.com/renproject/multichain/chain/ethereum" - -// An Address on the Celo chain is functionally identical to an address on the -// Ethereum chain. -type Address = ethereum.Address - -// An AddressEncoder on the Celo chain is functionally identical to an encoder -// on the Ethereum chain. -type AddressEncoder = ethereum.AddressEncoder - -// An AddressDecoder on the Celo chain is functionally identical to a decoder on -// the Ethereum chain. -type AddressDecoder = ethereum.AddressDecoder - -// An AddressEncodeDecoder on the Celo chain is functionally identical to a -// encoder/decoder on the Ethereum chain. -type AddressEncodeDecoder = ethereum.AddressEncodeDecoder - -var ( - // NewAddressEncodeDecoder creates a new address encode-decoder that - // implements the address.Encoder and address.Decoder interfaces - NewAddressEncodeDecoder = ethereum.NewAddressEncodeDecoder -) diff --git a/chain/celo/address_test.go b/chain/celo/address_test.go deleted file mode 100644 index 95d07238..00000000 --- a/chain/celo/address_test.go +++ /dev/null @@ -1 +0,0 @@ -package celo_test diff --git a/chain/ethereum/account.go b/chain/ethereum/account.go deleted file mode 100644 index f92add87..00000000 --- a/chain/ethereum/account.go +++ /dev/null @@ -1,189 +0,0 @@ -package ethereum - -import ( - "context" - "fmt" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/params" - "github.com/renproject/multichain/api/account" - "github.com/renproject/multichain/api/address" - "github.com/renproject/multichain/api/contract" - "github.com/renproject/pack" -) - -// The TxBuilder is an implementation of a Account-based chains compatible -// transaction builder for Ethereum. -type TxBuilder struct { - config *params.ChainConfig -} - -// NewTxBuilder returns a transaction builder that builds Account-compatible -// Ethereum transactions for the given chain configuration. -func NewTxBuilder(config *params.ChainConfig) TxBuilder { - return TxBuilder{config: config} -} - -// BuildTx returns an Ethereum transaction that transfers value from an address -// to another address, with other transaction-specific fields. The returned -// transaction implements the multichain.AccountTx interface. -func (txBuilder TxBuilder) BuildTx( - from, to address.Address, - value, nonce pack.U256, - gasPrice, gasLimit pack.U256, - payload pack.Bytes, -) (account.Tx, error) { - toAddr, err := NewAddressFromHex(string(to)) - if err != nil { - return nil, fmt.Errorf("decoding address: %v", err) - } - fromAddr, err := NewAddressFromHex(string(from)) - if err != nil { - return nil, fmt.Errorf("decoding address: %v", err) - } - - tx := types.NewTransaction(nonce.Int().Uint64(), common.Address(toAddr), value.Int(), gasLimit.Int().Uint64(), gasPrice.Int(), []byte(payload)) - - signer := types.MakeSigner(txBuilder.config, nil) - signed := false - - return &Tx{fromAddr, tx, signer, signed}, nil -} - -// Tx represents an Ethereum transaction that implements the -// multichain.AccountTx interface -type Tx struct { - from Address - - tx *types.Transaction - - signer types.Signer - signed bool -} - -// Hash returns the transaction hash of the given transaction. -func (tx *Tx) Hash() pack.Bytes { - return pack.NewBytes(tx.tx.Hash().Bytes()) -} - -// From returns the sender of the transaction. -func (tx *Tx) From() address.Address { - return address.Address(tx.from.String()) -} - -// To returns the recipient of the transaction. -func (tx *Tx) To() address.Address { - return address.Address(tx.tx.To().String()) -} - -// Value returns the value (in native tokens) that is being transferred in the -// transaction. -func (tx *Tx) Value() pack.U256 { - return pack.NewU256FromInt(tx.tx.Value()) -} - -// Nonce returns the transaction nonce for the transaction sender. This is a -// one-time use incremental identifier to protect against double spending. -func (tx *Tx) Nonce() pack.U256 { - return pack.NewU256FromU64(pack.NewU64(tx.tx.Nonce())) -} - -// Payload returns the data/payload attached in the transaction. -func (tx *Tx) Payload() contract.CallData { - return contract.CallData(pack.NewBytes(tx.tx.Data())) -} - -// Sighashes returns the digest that must be signed by the sender before the -// transaction can be submitted by the client. -func (tx *Tx) Sighashes() ([]pack.Bytes, error) { - sighash32 := tx.signer.Hash(tx.tx) - sighash := sighash32[:] - return []pack.Bytes{pack.NewBytes(sighash)}, nil -} - -// Sign consumes a list of signatures, and adds them to the underlying -// Ethereum transaction. In case of Ethereum, we expect only a single signature -// per transaction. -func (tx *Tx) Sign(signatures []pack.Bytes, pubKey pack.Bytes) error { - if tx.signed { - return fmt.Errorf("already signed") - } - - if len(signatures) != 1 { - return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) - } - - if len(signatures[0]) != 65 { - return fmt.Errorf("expected signature to be 65 bytes, got %v bytes", len(signatures[0])) - } - - signedTx, err := tx.tx.WithSignature(tx.signer, []byte(signatures[0])) - if err != nil { - return err - } - - tx.tx = signedTx - tx.signed = true - return nil -} - -// Serialize serializes the transaction to bytes. -func (tx *Tx) Serialize() (pack.Bytes, error) { - // FIXME: I am pretty sure that this is not the format the Ethereum expects - // transactions to be serialised to on the network. Although the client - // might expect to send JSON objects, that is different from serialization, - // and can better represented by implementing MarshalJSON on this type. - serialized, err := tx.tx.MarshalJSON() - if err != nil { - return pack.Bytes{}, err - } - - return pack.NewBytes(serialized), nil -} - -// EthClient interacts with an instance of the Ethereum network using the RPC -// interface exposed by an Ethereum node. -type EthClient struct { - client *ethclient.Client -} - -// NewClient returns a new Client. -func NewClient(rpcURL pack.String) (account.Client, error) { - client, err := ethclient.Dial(string(rpcURL)) - if err != nil { - return nil, fmt.Errorf("dialing RPC URL %v: %v", rpcURL, err) - } - - return EthClient{client}, nil -} - -// Tx queries the Ethereum node to fetch a transaction with the provided tx ID -// and also returns the number of block confirmations for the transaction. -func (client EthClient) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { - txHash := common.BytesToHash(txID) - tx, isPending, err := client.client.TransactionByHash(ctx, txHash) - if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("fetching tx: %v", err) - } - if isPending { - return nil, pack.NewU64(0), fmt.Errorf("tx not confirmed") - } - txReceipt, err := client.client.TransactionReceipt(ctx, txHash) - if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("fetching tx receipt: %v", err) - } - block, err := client.client.BlockByNumber(ctx, nil) - if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("fetching current block: %v", err) - } - confs := block.NumberU64() - txReceipt.BlockNumber.Uint64() + 1 - - return &Tx{tx: tx}, pack.NewU64(confs), nil -} - -// SubmitTx submits a signed transaction to the Ethereum network. -func (client EthClient) SubmitTx(ctx context.Context, tx account.Tx) error { - panic("unimplemented") -} diff --git a/chain/ethereum/account_test.go b/chain/ethereum/account_test.go deleted file mode 100644 index bbd71f0b..00000000 --- a/chain/ethereum/account_test.go +++ /dev/null @@ -1 +0,0 @@ -package ethereum_test diff --git a/chain/ethereum/address.go b/chain/ethereum/address.go deleted file mode 100644 index dd3dae5b..00000000 --- a/chain/ethereum/address.go +++ /dev/null @@ -1,141 +0,0 @@ -package ethereum - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "strings" - - "github.com/ethereum/go-ethereum/common" - "github.com/renproject/multichain/api/address" - "github.com/renproject/pack" - "github.com/renproject/surge" -) - -// AddressEncodeDecoder implements the address.EncodeDecoder interface -type AddressEncodeDecoder struct { - AddressEncoder - AddressDecoder -} - -// AddressEncoder implements the address.Encoder interface. -type AddressEncoder interface { - EncodeAddress(address.RawAddress) (address.Address, error) -} - -type addressEncoder struct{} - -// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder. -func NewAddressEncodeDecoder() address.EncodeDecoder { - return AddressEncodeDecoder{ - AddressEncoder: NewAddressEncoder(), - AddressDecoder: NewAddressDecoder(), - } -} - -// AddressDecoder implements the address.Decoder interface. -type AddressDecoder interface { - DecodeAddress(address.Address) (address.RawAddress, error) -} - -type addressDecoder struct{} - -// NewAddressDecoder constructs a new AddressDecoder. -func NewAddressDecoder() AddressDecoder { - return addressDecoder{} -} - -// NewAddressEncoder constructs a new AddressEncoder. -func NewAddressEncoder() AddressEncoder { - return addressEncoder{} -} - -func (addressDecoder) DecodeAddress(encoded address.Address) (address.RawAddress, error) { - ethaddr, err := NewAddressFromHex(string(pack.String(encoded))) - if err != nil { - return nil, err - } - return address.RawAddress(pack.Bytes(ethaddr[:])), nil -} - -func (addressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { - encodedAddr := common.Bytes2Hex([]byte(rawAddr)) - return address.Address(pack.NewString(encodedAddr)), nil -} - -// An Address represents a public address on the Ethereum blockchain. It can be -// the address of an external account, or the address of a smart contract. -type Address common.Address - -// NewAddressFromHex returns an Address decoded from a hex -// string. -func NewAddressFromHex(str string) (Address, error) { - if strings.HasPrefix(str, "0x") { - str = str[2:] - } - if len(str) != 40 { - return Address{}, fmt.Errorf("invalid ethaddress %v", str) - } - ethaddrData, err := hex.DecodeString(str) - if err != nil { - return Address{}, fmt.Errorf("invalid ethaddress %v: %v", str, err) - } - ethaddr := common.Address{} - copy(ethaddr[:], ethaddrData) - return Address(ethaddr), nil -} - -// SizeHint returns the number of bytes needed to represent this address in -// binary. -func (Address) SizeHint() int { - return common.AddressLength -} - -// Marshal the address to binary. -func (addr Address) Marshal(buf []byte, rem int) ([]byte, int, error) { - if len(buf) < common.AddressLength || rem < common.AddressLength { - return buf, rem, surge.ErrUnexpectedEndOfBuffer - } - copy(buf, addr[:]) - return buf[common.AddressLength:], rem - common.AddressLength, nil -} - -// Unmarshal the address from binary. -func (addr *Address) Unmarshal(buf []byte, rem int) ([]byte, int, error) { - if len(buf) < common.AddressLength || rem < common.AddressLength { - return buf, rem, surge.ErrUnexpectedEndOfBuffer - } - copy(addr[:], buf[:common.AddressLength]) - return buf[common.AddressLength:], rem - common.AddressLength, nil -} - -// MarshalJSON implements JSON marshaling by encoding the address as a hex -// string. -func (addr Address) MarshalJSON() ([]byte, error) { - return json.Marshal(common.Address(addr).Hex()) -} - -// UnmarshalJSON implements JSON unmarshaling by expected the data be a hex -// encoded string representation of an address. -func (addr *Address) UnmarshalJSON(data []byte) error { - var str string - if err := json.Unmarshal(data, &str); err != nil { - return err - } - ethaddr, err := NewAddressFromHex(str) - if err != nil { - return err - } - *addr = ethaddr - return nil -} - -// String returns the address as a human-readable hex string. -func (addr Address) String() string { - return hex.EncodeToString(addr[:]) -} - -// Bytes returns the address as a slice of 20 bytes. -func (addr Address) Bytes() pack.Bytes { - return pack.Bytes(addr[:]) -} diff --git a/chain/ethereum/address_test.go b/chain/ethereum/address_test.go deleted file mode 100644 index 3c8f9e2c..00000000 --- a/chain/ethereum/address_test.go +++ /dev/null @@ -1,107 +0,0 @@ -package ethereum_test - -import ( - "encoding/hex" - "encoding/json" - "testing/quick" - - "github.com/renproject/multichain/chain/ethereum" - "github.com/renproject/surge" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Address", func() { - Context("when unmarshaling and unmarshaling", func() { - It("should equal itself", func() { - f := func(x [20]byte) bool { - addr := ethereum.Address(x) - Expect(addr.SizeHint()).To(Equal(20)) - - bytes, err := surge.ToBinary(addr) - Expect(err).ToNot(HaveOccurred()) - - var newAddr ethereum.Address - err = surge.FromBinary(&newAddr, bytes) - Expect(err).ToNot(HaveOccurred()) - - Expect(addr).To(Equal(newAddr)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when unmarshaling and unmarshaling to/from JSON", func() { - It("should equal itself", func() { - f := func(x [20]byte) bool { - addr := ethereum.Address(x) - - bytes, err := json.Marshal(addr) - Expect(err).ToNot(HaveOccurred()) - - var newAddr ethereum.Address - err = json.Unmarshal(bytes, &newAddr) - Expect(err).ToNot(HaveOccurred()) - - Expect(addr).To(Equal(newAddr)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - - Context("when the address is invalid hex", func() { - It("should return an error", func() { - f := func(x [40]byte) bool { - bytes, err := json.Marshal(string(x[:])) - Expect(err).ToNot(HaveOccurred()) - - var newAddr ethereum.Address - err = json.Unmarshal(bytes, &newAddr) - Expect(err).To(HaveOccurred()) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when the address is invalid length", func() { - It("should return an error", func() { - f := func(x [10]byte) bool { - addr := hex.EncodeToString(x[:]) - bytes, err := json.Marshal(addr) - Expect(err).ToNot(HaveOccurred()) - - var newAddr ethereum.Address - err = json.Unmarshal(bytes, &newAddr) - Expect(err).To(HaveOccurred()) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - }) - - Context("when unmarshalling random data", func() { - It("should not panic", func() { - f := func(x []byte) bool { - var addr ethereum.Address - Expect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic()) - Expect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic()) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) -}) diff --git a/chain/ethereum/encode.go b/chain/ethereum/encode.go deleted file mode 100644 index 816c2855..00000000 --- a/chain/ethereum/encode.go +++ /dev/null @@ -1,79 +0,0 @@ -package ethereum - -import ( - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/renproject/pack" -) - -// A Payload is an Ethereum encoded function call. It includes an ABI, the -// function being called from the ABI, and the data being passed to the -// function. -type Payload struct { - ABI pack.Bytes `json:"abi"` - Fn pack.Bytes `json:"fn"` - Data pack.Bytes `json:"data"` -} - -// Encode values into an Ethereum ABI compatible byte slice. -func Encode(vals ...interface{}) []byte { - ethargs := make(abi.Arguments, 0, len(vals)) - ethvals := make([]interface{}, 0, len(vals)) - - for _, val := range vals { - var ethval interface{} - var ty abi.Type - var err error - - switch val := val.(type) { - case pack.Bytes: - ethval = val - ty, err = abi.NewType("bytes", "", nil) - case pack.Bytes32: - ethval = val - ty, err = abi.NewType("bytes32", "", nil) - - case pack.U8: - ethval = big.NewInt(0).SetUint64(uint64(val.Uint8())) - ty, err = abi.NewType("uint256", "", nil) - case pack.U16: - ethval = big.NewInt(0).SetUint64(uint64(val.Uint16())) - ty, err = abi.NewType("uint256", "", nil) - case pack.U32: - ethval = big.NewInt(0).SetUint64(uint64(val.Uint32())) - ty, err = abi.NewType("uint256", "", nil) - case pack.U64: - ethval = big.NewInt(0).SetUint64(uint64(val.Uint64())) - ty, err = abi.NewType("uint256", "", nil) - case pack.U128: - ethval = val.Int() - ty, err = abi.NewType("uint256", "", nil) - case pack.U256: - ethval = val.Int() - ty, err = abi.NewType("uint256", "", nil) - - case Address: - ethval = val - ty, err = abi.NewType("address", "", nil) - - default: - panic(fmt.Errorf("non-exhaustive pattern: %T", val)) - } - - if err != nil { - panic(fmt.Errorf("error encoding: %v", err)) - } - ethargs = append(ethargs, abi.Argument{ - Type: ty, - }) - ethvals = append(ethvals, ethval) - } - - packed, err := ethargs.Pack(ethvals...) - if err != nil { - panic(fmt.Errorf("error packing: %v", err)) - } - return packed -} diff --git a/chain/ethereum/encode_test.go b/chain/ethereum/encode_test.go deleted file mode 100644 index 00ffa312..00000000 --- a/chain/ethereum/encode_test.go +++ /dev/null @@ -1,255 +0,0 @@ -package ethereum_test - -import ( - "encoding/hex" - "fmt" - "math" - "testing/quick" - - "github.com/renproject/multichain/chain/ethereum" - "github.com/renproject/pack" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" -) - -var _ = Describe("Encoding", func() { - Context("when encoding bytes", func() { - It("should return the correct result", func() { - f := func(x []byte) bool { - arg := pack.NewBytes(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - - expectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32)) - copy(expectedBytes, x) - // Note: since the first parameter has a dynamic length, the - // first 32 bytes instead contain a pointer to the data. - expectedString := fmt.Sprintf("%064x", 32) + fmt.Sprintf("%064x", len(x)) + hex.EncodeToString(expectedBytes) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding 32 bytes", func() { - It("should return the correct result", func() { - f := func(x [32]byte) bool { - arg := pack.NewBytes32(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - expectedString := hex.EncodeToString(x[:]) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding 8-bit unsigned integers", func() { - It("should return the correct result", func() { - f := func(x uint8) bool { - arg := pack.NewU8(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - expectedString := fmt.Sprintf("%064x", x) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding 16-bit unsigned integers", func() { - It("should return the correct result", func() { - f := func(x uint16) bool { - arg := pack.NewU16(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - expectedString := fmt.Sprintf("%064x", x) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding 32-bit unsigned integers", func() { - It("should return the correct result", func() { - f := func(x uint32) bool { - arg := pack.NewU32(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - expectedString := fmt.Sprintf("%064x", x) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding 64-bit unsigned integers", func() { - It("should return the correct result", func() { - f := func(x uint64) bool { - arg := pack.NewU64(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - expectedString := fmt.Sprintf("%064x", x) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding 128-bit unsigned integers", func() { - It("should return the correct result", func() { - f := func(x [16]byte) bool { - arg := pack.NewU128(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - expectedString := fmt.Sprintf("%064x", x) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding 256-bit unsigned integers", func() { - It("should return the correct result", func() { - f := func(x [32]byte) bool { - arg := pack.NewU256(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - expectedString := fmt.Sprintf("%064x", x) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding Ethereum addresses", func() { - It("should return the correct result", func() { - f := func(x [20]byte) bool { - arg := ethereum.Address(x) - - resBytes := ethereum.Encode(arg) - resString := hex.EncodeToString(resBytes) - - expectedBytes := make([]byte, 32) - copy(expectedBytes, x[:]) - expectedString := hex.EncodeToString(expectedBytes) - - Expect(resString).To(Equal(expectedString)) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when encoding an unsupported type", func() { - It("should panic", func() { - f := func(x bool) bool { - arg := pack.NewBool(x) - Expect(func() { ethereum.Encode(arg) }).To(Panic()) - return true - } - - err := quick.Check(f, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - type testCase struct { - addr string - amount uint64 - hash string - result string - } - - testCases := []testCase{ - { - addr: "797522Fb74d42bB9fbF6b76dEa24D01A538d5D66", - amount: 10000, - hash: "702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed", - result: "797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed", - }, - { - addr: "58afb504ef2444a267b8c7ce57279417f1377ceb", - amount: 50000000000000000, - hash: "dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93", - result: "58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93", - }, - { - addr: "0000000000000000000000000000000000000000", - amount: 0, - hash: "0000000000000000000000000000000000000000000000000000000000000000", - result: "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - } - - DescribeTable("when encoding args", - func(test testCase) { - addrBytes, err := hex.DecodeString(test.addr) - Expect(err).ToNot(HaveOccurred()) - - var addr ethereum.Address - copy(addr[:], addrBytes) - - hashBytes32 := [32]byte{} - hashBytes, err := hex.DecodeString(test.hash) - Expect(err).ToNot(HaveOccurred()) - copy(hashBytes32[:], hashBytes) - - args := []interface{}{ - addr, - pack.NewU64(test.amount), - pack.NewBytes32(hashBytes32), - } - result := ethereum.Encode(args...) - Expect(hex.EncodeToString(result)).To(Equal(test.result)) - }, - - Entry("should return the same result as solidity for small transactions", testCases[0]), - Entry("should return the same result as solidity for large transactions", testCases[1]), - Entry("should return the same result as solidity for empty transactions", testCases[2]), - ) -}) diff --git a/chain/ethereum/ethereum.go b/chain/ethereum/ethereum.go deleted file mode 100644 index 59dd7210..00000000 --- a/chain/ethereum/ethereum.go +++ /dev/null @@ -1 +0,0 @@ -package ethereum diff --git a/chain/ethereum/ethereum_suite_test.go b/chain/ethereum/ethereum_suite_test.go deleted file mode 100644 index 1ee58840..00000000 --- a/chain/ethereum/ethereum_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package ethereum_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestEthereum(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Ethereum Suite") -} diff --git a/chain/ethereum/ethereum_test.go b/chain/ethereum/ethereum_test.go deleted file mode 100644 index bbd71f0b..00000000 --- a/chain/ethereum/ethereum_test.go +++ /dev/null @@ -1 +0,0 @@ -package ethereum_test diff --git a/chain/ethereum/gas.go b/chain/ethereum/gas.go deleted file mode 100644 index f091bb6d..00000000 --- a/chain/ethereum/gas.go +++ /dev/null @@ -1,32 +0,0 @@ -package ethereum - -import ( - "context" - - "github.com/renproject/pack" -) - -// A GasEstimator returns the gas price (in wei) that is needed in order to -// confirm transactions with an estimated maximum delay of one block. In -// distributed networks that collectively build, sign, and submit transactions, -// it is important that all nodes in the network have reached consensus on the -// gas price. -type GasEstimator struct { - wei pack.U256 -} - -// NewGasEstimator returns a simple gas estimator that always returns the given -// gas price (in wei) to be used for broadcasting an Ethereum transaction. -func NewGasEstimator(wei pack.U256) GasEstimator { - return GasEstimator{ - wei: wei, - } -} - -// EstimateGasPrice returns the number of wei that is needed in order to confirm -// transactions with an estimated maximum delay of one block. It is the -// responsibility of the caller to know the number of bytes in their -// transaction. -func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { - return gasEstimator.wei, nil -} diff --git a/chain/ethereum/gas_test.go b/chain/ethereum/gas_test.go deleted file mode 100644 index bbd71f0b..00000000 --- a/chain/ethereum/gas_test.go +++ /dev/null @@ -1 +0,0 @@ -package ethereum_test diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index a803ac76..27b7dab0 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -115,25 +115,18 @@ func (tx Tx) Payload() contract.CallData { // Sighashes returns the digests that must be signed before the transaction // can be submitted by the client. -func (tx Tx) Sighashes() ([]pack.Bytes, error) { - sighash32 := blake2b.Sum256(tx.Hash()) - sighash := sighash32[:] - return []pack.Bytes{pack.NewBytes(sighash)}, nil +func (tx Tx) Sighashes() ([]pack.Bytes32, error) { + return []pack.Bytes32{pack.Bytes32(blake2b.Sum256(tx.Hash()))}, nil } // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes must also be // specified. -func (tx *Tx) Sign(signatures []pack.Bytes, pubkey pack.Bytes) error { +func (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error { if len(signatures) != 1 { return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) } - - if len(signatures[0]) != 65 { - return fmt.Errorf("expected signature to be 65 bytes, got %v bytes", len(signatures[0])) - } - - copy(tx.signature[:], signatures[0]) + tx.signature = signatures[0] return nil } diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 528d44c4..862999f6 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -87,17 +87,15 @@ var _ = Describe("Filecoin", func() { Expect(err).ToNot(HaveOccurred()) Expect(len(txSighashes)).To(Equal(1)) Expect(len(txSighashes[0])).To(Equal(32)) - sighash32 := [32]byte{} - for i, b := range []byte(txSighashes[0]) { - sighash32[i] = b - } + sighash32 := txSighashes[0] hash := id.Hash(sighash32) sig, err := senderPrivKey.Sign(&hash) Expect(err).NotTo(HaveOccurred()) sigBytes, err := surge.ToBinary(sig) Expect(err).NotTo(HaveOccurred()) - txSignature := pack.NewBytes(sigBytes) - Expect(tx.Sign([]pack.Bytes{txSignature}, []byte{})).To(Succeed()) + txSignature := pack.Bytes65{} + copy(txSignature[:], sigBytes) + Expect(tx.Sign([]pack.Bytes65{txSignature}, []byte{})).To(Succeed()) // submit the transaction txHash := tx.Hash() diff --git a/multichain.go b/multichain.go index f31b1778..4027570d 100644 --- a/multichain.go +++ b/multichain.go @@ -8,7 +8,6 @@ import ( "github.com/renproject/multichain/api/contract" "github.com/renproject/multichain/api/gas" "github.com/renproject/multichain/api/utxo" - "github.com/renproject/multichain/chain/ethereum" "github.com/renproject/surge" ) @@ -21,11 +20,6 @@ type ( // functionality into one interface. AddressEncodeDecoder = address.EncodeDecoder - // An EthereumCompatAddress represents a public address on the Ethereum - // blockchain. It can be the address of an external account, or the address of - // a smart contract. - EthereumCompatAddress = ethereum.Address - // RawAddress is an address that has been decoded into its binary form. RawAddress = address.RawAddress ) From 7320e8183bdd798a43e6fece59f2ff85b0ffe4f2 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Thu, 10 Sep 2020 10:23:47 +1000 Subject: [PATCH 082/335] chain/ethereum: add encode function --- chain/ethereum/encode.go | 79 +++++++++++ chain/ethereum/encode_test.go | 255 ++++++++++++++++++++++++++++++++++ 2 files changed, 334 insertions(+) create mode 100644 chain/ethereum/encode.go create mode 100644 chain/ethereum/encode_test.go diff --git a/chain/ethereum/encode.go b/chain/ethereum/encode.go new file mode 100644 index 00000000..816c2855 --- /dev/null +++ b/chain/ethereum/encode.go @@ -0,0 +1,79 @@ +package ethereum + +import ( + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/renproject/pack" +) + +// A Payload is an Ethereum encoded function call. It includes an ABI, the +// function being called from the ABI, and the data being passed to the +// function. +type Payload struct { + ABI pack.Bytes `json:"abi"` + Fn pack.Bytes `json:"fn"` + Data pack.Bytes `json:"data"` +} + +// Encode values into an Ethereum ABI compatible byte slice. +func Encode(vals ...interface{}) []byte { + ethargs := make(abi.Arguments, 0, len(vals)) + ethvals := make([]interface{}, 0, len(vals)) + + for _, val := range vals { + var ethval interface{} + var ty abi.Type + var err error + + switch val := val.(type) { + case pack.Bytes: + ethval = val + ty, err = abi.NewType("bytes", "", nil) + case pack.Bytes32: + ethval = val + ty, err = abi.NewType("bytes32", "", nil) + + case pack.U8: + ethval = big.NewInt(0).SetUint64(uint64(val.Uint8())) + ty, err = abi.NewType("uint256", "", nil) + case pack.U16: + ethval = big.NewInt(0).SetUint64(uint64(val.Uint16())) + ty, err = abi.NewType("uint256", "", nil) + case pack.U32: + ethval = big.NewInt(0).SetUint64(uint64(val.Uint32())) + ty, err = abi.NewType("uint256", "", nil) + case pack.U64: + ethval = big.NewInt(0).SetUint64(uint64(val.Uint64())) + ty, err = abi.NewType("uint256", "", nil) + case pack.U128: + ethval = val.Int() + ty, err = abi.NewType("uint256", "", nil) + case pack.U256: + ethval = val.Int() + ty, err = abi.NewType("uint256", "", nil) + + case Address: + ethval = val + ty, err = abi.NewType("address", "", nil) + + default: + panic(fmt.Errorf("non-exhaustive pattern: %T", val)) + } + + if err != nil { + panic(fmt.Errorf("error encoding: %v", err)) + } + ethargs = append(ethargs, abi.Argument{ + Type: ty, + }) + ethvals = append(ethvals, ethval) + } + + packed, err := ethargs.Pack(ethvals...) + if err != nil { + panic(fmt.Errorf("error packing: %v", err)) + } + return packed +} diff --git a/chain/ethereum/encode_test.go b/chain/ethereum/encode_test.go new file mode 100644 index 00000000..00ffa312 --- /dev/null +++ b/chain/ethereum/encode_test.go @@ -0,0 +1,255 @@ +package ethereum_test + +import ( + "encoding/hex" + "fmt" + "math" + "testing/quick" + + "github.com/renproject/multichain/chain/ethereum" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" +) + +var _ = Describe("Encoding", func() { + Context("when encoding bytes", func() { + It("should return the correct result", func() { + f := func(x []byte) bool { + arg := pack.NewBytes(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + + expectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32)) + copy(expectedBytes, x) + // Note: since the first parameter has a dynamic length, the + // first 32 bytes instead contain a pointer to the data. + expectedString := fmt.Sprintf("%064x", 32) + fmt.Sprintf("%064x", len(x)) + hex.EncodeToString(expectedBytes) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding 32 bytes", func() { + It("should return the correct result", func() { + f := func(x [32]byte) bool { + arg := pack.NewBytes32(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + expectedString := hex.EncodeToString(x[:]) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding 8-bit unsigned integers", func() { + It("should return the correct result", func() { + f := func(x uint8) bool { + arg := pack.NewU8(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + expectedString := fmt.Sprintf("%064x", x) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding 16-bit unsigned integers", func() { + It("should return the correct result", func() { + f := func(x uint16) bool { + arg := pack.NewU16(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + expectedString := fmt.Sprintf("%064x", x) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding 32-bit unsigned integers", func() { + It("should return the correct result", func() { + f := func(x uint32) bool { + arg := pack.NewU32(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + expectedString := fmt.Sprintf("%064x", x) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding 64-bit unsigned integers", func() { + It("should return the correct result", func() { + f := func(x uint64) bool { + arg := pack.NewU64(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + expectedString := fmt.Sprintf("%064x", x) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding 128-bit unsigned integers", func() { + It("should return the correct result", func() { + f := func(x [16]byte) bool { + arg := pack.NewU128(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + expectedString := fmt.Sprintf("%064x", x) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding 256-bit unsigned integers", func() { + It("should return the correct result", func() { + f := func(x [32]byte) bool { + arg := pack.NewU256(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + expectedString := fmt.Sprintf("%064x", x) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding Ethereum addresses", func() { + It("should return the correct result", func() { + f := func(x [20]byte) bool { + arg := ethereum.Address(x) + + resBytes := ethereum.Encode(arg) + resString := hex.EncodeToString(resBytes) + + expectedBytes := make([]byte, 32) + copy(expectedBytes, x[:]) + expectedString := hex.EncodeToString(expectedBytes) + + Expect(resString).To(Equal(expectedString)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when encoding an unsupported type", func() { + It("should panic", func() { + f := func(x bool) bool { + arg := pack.NewBool(x) + Expect(func() { ethereum.Encode(arg) }).To(Panic()) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + type testCase struct { + addr string + amount uint64 + hash string + result string + } + + testCases := []testCase{ + { + addr: "797522Fb74d42bB9fbF6b76dEa24D01A538d5D66", + amount: 10000, + hash: "702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed", + result: "797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed", + }, + { + addr: "58afb504ef2444a267b8c7ce57279417f1377ceb", + amount: 50000000000000000, + hash: "dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93", + result: "58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93", + }, + { + addr: "0000000000000000000000000000000000000000", + amount: 0, + hash: "0000000000000000000000000000000000000000000000000000000000000000", + result: "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + }, + } + + DescribeTable("when encoding args", + func(test testCase) { + addrBytes, err := hex.DecodeString(test.addr) + Expect(err).ToNot(HaveOccurred()) + + var addr ethereum.Address + copy(addr[:], addrBytes) + + hashBytes32 := [32]byte{} + hashBytes, err := hex.DecodeString(test.hash) + Expect(err).ToNot(HaveOccurred()) + copy(hashBytes32[:], hashBytes) + + args := []interface{}{ + addr, + pack.NewU64(test.amount), + pack.NewBytes32(hashBytes32), + } + result := ethereum.Encode(args...) + Expect(hex.EncodeToString(result)).To(Equal(test.result)) + }, + + Entry("should return the same result as solidity for small transactions", testCases[0]), + Entry("should return the same result as solidity for large transactions", testCases[1]), + Entry("should return the same result as solidity for empty transactions", testCases[2]), + ) +}) From f46207f9ef6af2650a3dd914f15786ef3f105c30 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Thu, 10 Sep 2020 10:31:31 +1000 Subject: [PATCH 083/335] chain/ethereum: add address type --- chain/ethereum/address.go | 141 +++++++++++++++++++++++++++++++++ chain/ethereum/address_test.go | 107 +++++++++++++++++++++++++ 2 files changed, 248 insertions(+) create mode 100644 chain/ethereum/address.go create mode 100644 chain/ethereum/address_test.go diff --git a/chain/ethereum/address.go b/chain/ethereum/address.go new file mode 100644 index 00000000..dd3dae5b --- /dev/null +++ b/chain/ethereum/address.go @@ -0,0 +1,141 @@ +package ethereum + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "strings" + + "github.com/ethereum/go-ethereum/common" + "github.com/renproject/multichain/api/address" + "github.com/renproject/pack" + "github.com/renproject/surge" +) + +// AddressEncodeDecoder implements the address.EncodeDecoder interface +type AddressEncodeDecoder struct { + AddressEncoder + AddressDecoder +} + +// AddressEncoder implements the address.Encoder interface. +type AddressEncoder interface { + EncodeAddress(address.RawAddress) (address.Address, error) +} + +type addressEncoder struct{} + +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder. +func NewAddressEncodeDecoder() address.EncodeDecoder { + return AddressEncodeDecoder{ + AddressEncoder: NewAddressEncoder(), + AddressDecoder: NewAddressDecoder(), + } +} + +// AddressDecoder implements the address.Decoder interface. +type AddressDecoder interface { + DecodeAddress(address.Address) (address.RawAddress, error) +} + +type addressDecoder struct{} + +// NewAddressDecoder constructs a new AddressDecoder. +func NewAddressDecoder() AddressDecoder { + return addressDecoder{} +} + +// NewAddressEncoder constructs a new AddressEncoder. +func NewAddressEncoder() AddressEncoder { + return addressEncoder{} +} + +func (addressDecoder) DecodeAddress(encoded address.Address) (address.RawAddress, error) { + ethaddr, err := NewAddressFromHex(string(pack.String(encoded))) + if err != nil { + return nil, err + } + return address.RawAddress(pack.Bytes(ethaddr[:])), nil +} + +func (addressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + encodedAddr := common.Bytes2Hex([]byte(rawAddr)) + return address.Address(pack.NewString(encodedAddr)), nil +} + +// An Address represents a public address on the Ethereum blockchain. It can be +// the address of an external account, or the address of a smart contract. +type Address common.Address + +// NewAddressFromHex returns an Address decoded from a hex +// string. +func NewAddressFromHex(str string) (Address, error) { + if strings.HasPrefix(str, "0x") { + str = str[2:] + } + if len(str) != 40 { + return Address{}, fmt.Errorf("invalid ethaddress %v", str) + } + ethaddrData, err := hex.DecodeString(str) + if err != nil { + return Address{}, fmt.Errorf("invalid ethaddress %v: %v", str, err) + } + ethaddr := common.Address{} + copy(ethaddr[:], ethaddrData) + return Address(ethaddr), nil +} + +// SizeHint returns the number of bytes needed to represent this address in +// binary. +func (Address) SizeHint() int { + return common.AddressLength +} + +// Marshal the address to binary. +func (addr Address) Marshal(buf []byte, rem int) ([]byte, int, error) { + if len(buf) < common.AddressLength || rem < common.AddressLength { + return buf, rem, surge.ErrUnexpectedEndOfBuffer + } + copy(buf, addr[:]) + return buf[common.AddressLength:], rem - common.AddressLength, nil +} + +// Unmarshal the address from binary. +func (addr *Address) Unmarshal(buf []byte, rem int) ([]byte, int, error) { + if len(buf) < common.AddressLength || rem < common.AddressLength { + return buf, rem, surge.ErrUnexpectedEndOfBuffer + } + copy(addr[:], buf[:common.AddressLength]) + return buf[common.AddressLength:], rem - common.AddressLength, nil +} + +// MarshalJSON implements JSON marshaling by encoding the address as a hex +// string. +func (addr Address) MarshalJSON() ([]byte, error) { + return json.Marshal(common.Address(addr).Hex()) +} + +// UnmarshalJSON implements JSON unmarshaling by expected the data be a hex +// encoded string representation of an address. +func (addr *Address) UnmarshalJSON(data []byte) error { + var str string + if err := json.Unmarshal(data, &str); err != nil { + return err + } + ethaddr, err := NewAddressFromHex(str) + if err != nil { + return err + } + *addr = ethaddr + return nil +} + +// String returns the address as a human-readable hex string. +func (addr Address) String() string { + return hex.EncodeToString(addr[:]) +} + +// Bytes returns the address as a slice of 20 bytes. +func (addr Address) Bytes() pack.Bytes { + return pack.Bytes(addr[:]) +} diff --git a/chain/ethereum/address_test.go b/chain/ethereum/address_test.go new file mode 100644 index 00000000..3c8f9e2c --- /dev/null +++ b/chain/ethereum/address_test.go @@ -0,0 +1,107 @@ +package ethereum_test + +import ( + "encoding/hex" + "encoding/json" + "testing/quick" + + "github.com/renproject/multichain/chain/ethereum" + "github.com/renproject/surge" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Address", func() { + Context("when unmarshaling and unmarshaling", func() { + It("should equal itself", func() { + f := func(x [20]byte) bool { + addr := ethereum.Address(x) + Expect(addr.SizeHint()).To(Equal(20)) + + bytes, err := surge.ToBinary(addr) + Expect(err).ToNot(HaveOccurred()) + + var newAddr ethereum.Address + err = surge.FromBinary(&newAddr, bytes) + Expect(err).ToNot(HaveOccurred()) + + Expect(addr).To(Equal(newAddr)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when unmarshaling and unmarshaling to/from JSON", func() { + It("should equal itself", func() { + f := func(x [20]byte) bool { + addr := ethereum.Address(x) + + bytes, err := json.Marshal(addr) + Expect(err).ToNot(HaveOccurred()) + + var newAddr ethereum.Address + err = json.Unmarshal(bytes, &newAddr) + Expect(err).ToNot(HaveOccurred()) + + Expect(addr).To(Equal(newAddr)) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + + Context("when the address is invalid hex", func() { + It("should return an error", func() { + f := func(x [40]byte) bool { + bytes, err := json.Marshal(string(x[:])) + Expect(err).ToNot(HaveOccurred()) + + var newAddr ethereum.Address + err = json.Unmarshal(bytes, &newAddr) + Expect(err).To(HaveOccurred()) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when the address is invalid length", func() { + It("should return an error", func() { + f := func(x [10]byte) bool { + addr := hex.EncodeToString(x[:]) + bytes, err := json.Marshal(addr) + Expect(err).ToNot(HaveOccurred()) + + var newAddr ethereum.Address + err = json.Unmarshal(bytes, &newAddr) + Expect(err).To(HaveOccurred()) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + }) + + Context("when unmarshalling random data", func() { + It("should not panic", func() { + f := func(x []byte) bool { + var addr ethereum.Address + Expect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic()) + Expect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic()) + return true + } + + err := quick.Check(f, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) +}) From 4c7ee2e6c2db61f11d5f1d0f92f8f33cbda3facb Mon Sep 17 00:00:00 2001 From: Loong Date: Thu, 10 Sep 2020 10:44:15 +1000 Subject: [PATCH 084/335] fix account interface --- api/account/account.go | 4 ++-- chain/cosmos/address_test.go | 24 ------------------------ chain/cosmos/tx.go | 14 +++++++++----- chain/terra/terra_test.go | 6 ++++-- 4 files changed, 15 insertions(+), 33 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 45c97753..858b6753 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -39,12 +39,12 @@ type Tx interface { // Sighashes that must be signed before the transaction can be submitted by // the client. - Sighashes() ([]pack.Bytes, error) + Sighashes() ([]pack.Bytes32, error) // Sign the transaction by injecting signatures for the required sighashes. // The serialized public key used to sign the sighashes should also be // specified whenever it is available. - Sign([]pack.Bytes, pack.Bytes) error + Sign([]pack.Bytes65, pack.Bytes) error // Serialize the transaction into bytes. This is the format in which the // transaction will be submitted by the client. diff --git a/chain/cosmos/address_test.go b/chain/cosmos/address_test.go index 4b358ce3..712dd321 100644 --- a/chain/cosmos/address_test.go +++ b/chain/cosmos/address_test.go @@ -1,25 +1 @@ package cosmos_test - -import ( - "github.com/renproject/multichain/chain/cosmos" - "github.com/renproject/pack" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -var _ = Describe("Cosmos", func() { - Context("when decoding address", func() { - Context("when decoding terra address", func() { - It("should work", func() { - decoder := cosmos.NewAddressDecoder("terra") - - addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" - addr, err := decoder.DecodeAddress(pack.NewString(addrStr)) - - Expect(err).ToNot(HaveOccurred()) - Expect(addr.AccAddress().String()).Should(Equal(addrStr)) - }) - }) - }) -}) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 04b5b0b5..e6ff88f5 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -261,20 +261,24 @@ func (tx StdTx) Hash() pack.Bytes { } // Sighashes that need to be signed before this transaction can be submitted. -func (tx StdTx) Sighashes() ([]pack.Bytes, error) { - return []pack.Bytes{tx.signMsg.Bytes()}, nil +func (tx StdTx) Sighashes() ([]pack.Bytes32, error) { + if len(tx.signMsg.Bytes()) != 32 { + return nil, fmt.Errorf("expected 32 bytes, got %v bytes", len(tx.signMsg.Bytes())) + } + sighash := pack.Bytes32{} + copy(sighash[:], tx.signMsg.Bytes()) + return []pack.Bytes32{sighash}, nil } // Sign the transaction by injecting signatures and the serialized pubkey of // the signer. -func (tx *StdTx) Sign(signatures []pack.Bytes, pubKey pack.Bytes) error { +func (tx *StdTx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { var stdSignatures []auth.StdSignature for _, sig := range signatures { var cpPubKey secp256k1.PubKeySecp256k1 copy(cpPubKey[:], pubKey[:secp256k1.PubKeySecp256k1Size]) - stdSignatures = append(stdSignatures, auth.StdSignature{ - Signature: sig, + Signature: sig[:], PubKey: cpPubKey, }) } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index b489cd2c..7f070242 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -82,13 +82,15 @@ var _ = Describe("Terra", func() { // get the transaction bytes and sign it sighashes, err := tx.Sighashes() Expect(err).NotTo(HaveOccurred()) - sigBytes, err := pk.Sign([]byte(sighashes[0])) + sigBytes, err := pk.Sign(sighashes[0][:]) Expect(err).NotTo(HaveOccurred()) + sig65 := pack.Bytes65{} + copy(sig65[:], sigBytes) // attach the signature to the transaction pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) err = tx.Sign( - []pack.Bytes{pack.NewBytes(sigBytes)}, + []pack.Bytes65{sig65}, pack.NewBytes(pubKey[:]), ) Expect(err).NotTo(HaveOccurred()) From a55904226975b274b1f4f40c04e18979726a27d0 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 15:57:49 +0530 Subject: [PATCH 085/335] utxo and account chain tests --- chain/digibyte/utxo.go | 10 +- chain/dogecoin/utxo.go | 8 +- go.mod | 3 + multichain_test.go | 382 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 397 insertions(+), 6 deletions(-) diff --git a/chain/digibyte/utxo.go b/chain/digibyte/utxo.go index 76604833..aa80452c 100644 --- a/chain/digibyte/utxo.go +++ b/chain/digibyte/utxo.go @@ -25,7 +25,11 @@ var ( // NewClient re-exports bitcoin.NewClient NewClient = bitcoin.NewClient - - // DefaultClientOptions re-exports bitcoin.DefaultClientOptions - DefaultClientOptions = bitcoin.DefaultClientOptions ) + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. +func DefaultClientOptions() ClientOptions { + return bitcoin.DefaultClientOptions().WithHost("http://0.0.0.0:20443") +} diff --git a/chain/dogecoin/utxo.go b/chain/dogecoin/utxo.go index 5cee84d1..c77c8224 100644 --- a/chain/dogecoin/utxo.go +++ b/chain/dogecoin/utxo.go @@ -12,5 +12,11 @@ type ( var ( NewTxBuilder = bitcoin.NewTxBuilder NewClient = bitcoin.NewClient - DefaultClientOptions = bitcoin.DefaultClientOptions ) + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. +func DefaultClientOptions() ClientOptions { + return bitcoin.DefaultClientOptions().WithHost("http://0.0.0.0:18332") +} diff --git a/go.mod b/go.mod index d775b96c..00b96f79 100644 --- a/go.mod +++ b/go.mod @@ -28,6 +28,9 @@ require ( ) replace github.com/cosmos/ledger-cosmos-go => github.com/terra-project/ledger-terra-go v0.11.1-terra + replace github.com/CosmWasm/go-cosmwasm => github.com/terra-project/go-cosmwasm v0.10.1-terra + replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi + replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 diff --git a/multichain_test.go b/multichain_test.go index c9dfef38..959aab71 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -1,4 +1,382 @@ package multichain_test -// TODO: Run test suite of simple tests for all supported chains. The idea is to -// use the common APIs to run these tests. +import ( + "context" + "encoding/hex" + "fmt" + "os" + "reflect" + "time" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil" + "github.com/cosmos/cosmos-sdk/types" + "github.com/renproject/id" + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/bitcoin" + "github.com/renproject/multichain/chain/bitcoincash" + "github.com/renproject/multichain/chain/digibyte" + "github.com/renproject/multichain/chain/dogecoin" + "github.com/renproject/multichain/chain/terra" + "github.com/renproject/multichain/chain/zcash" + "github.com/renproject/pack" + "github.com/renproject/surge" + "github.com/tendermint/tendermint/crypto/secp256k1" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Multichain", func() { + // Create context to work within + ctx := context.Background() + + // Initialise the logger + loggerConfig := zap.NewDevelopmentConfig() + loggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder + logger, err := loggerConfig.Build() + Expect(err).ToNot(HaveOccurred()) + + Context("Address API", func() { + It("should pass", func() { + Fail("not implemented") + }) + }) + + Context("Account API", func() { + accountChainTable := []struct { + senderEnv func() (id.PrivKey, *id.PubKey, pack.String) + privKeyToAddr func(pk id.PrivKey) pack.String + rpcURL pack.String + randomRecipientAddr func() pack.String + initialise func() multichain.AccountClient + txBuilder multichain.AccountTxBuilder + txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) + chain multichain.Chain + }{ + { + func() (id.PrivKey, *id.PubKey, pack.String) { + pkEnv := os.Getenv("TERRA_PK") + if pkEnv == "" { + panic("TERRA_PK is undefined") + } + pkBytes, err := hex.DecodeString(pkEnv) + Expect(err).NotTo(HaveOccurred()) + var pk secp256k1.PrivKeySecp256k1 + copy(pk[:], pkBytes) + senderAddr := terra.Address(pk.PubKey().Address()) + senderPrivKey := id.PrivKey{} + err = surge.FromBinary(&senderPrivKey, pkBytes) + Expect(err).NotTo(HaveOccurred()) + return senderPrivKey, senderPrivKey.PubKey(), pack.NewString(senderAddr.String()) + }, + func(privKey id.PrivKey) pack.String { + pkBytes, err := surge.ToBinary(privKey) + Expect(err).NotTo(HaveOccurred()) + var pk secp256k1.PrivKeySecp256k1 + copy(pk[:], pkBytes) + addr := terra.Address(pk.PubKey().Address()) + return pack.NewString(addr.String()) + }, + "http://127.0.0.1:26657", + func() pack.String { + recipientKey := secp256k1.GenPrivKey() + recipient := types.AccAddress(recipientKey.PubKey().Address()) + return pack.NewString(recipient.String()) + }, + func() multichain.AccountClient { + client := terra.NewClient(terra.DefaultClientOptions()) + return client + }, + terra.NewTxBuilder(terra.TxBuilderOptions{ + AccountNumber: pack.NewU64(1), + ChainID: "testnet", + CoinDenom: "uluna", + }), + func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + amount := pack.NewU256FromU64(pack.U64(2000000)) + nonce := pack.NewU256FromU64(0) + gasLimit := pack.NewU256FromU64(pack.U64(300000)) + gasPrice := pack.NewU256FromU64(pack.U64(300)) + payload := pack.NewBytes([]byte("multichain")) + return amount, nonce, gasLimit, gasPrice, payload + }, + multichain.Terra, + }, + } + + for _, accountChain := range accountChainTable { + accountChain := accountChain + FContext(fmt.Sprintf("%v", accountChain.chain), func() { + Specify("build, broadcast and fetch tx", func() { + // Load private key and the associated address. + senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() + + // Get a random recipient address. + recipientAddr := accountChain.randomRecipientAddr() + + // Initialise the account chain's client. + accountClient := accountChain.initialise() + + // Build a transaction. + amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() + accountTx, err := accountChain.txBuilder.BuildTx( + multichain.Address(senderAddr), + multichain.Address(recipientAddr), + amount, nonce, gasLimit, gasPrice, + payload, + ) + Expect(err).NotTo(HaveOccurred()) + + // Get the transaction bytes and sign them. + sighashes, err := accountTx.Sighashes() + Expect(err).NotTo(HaveOccurred()) + sighash32 := sighashes[0] + hash := id.Hash(sighash32) + sig, err := senderPrivKey.Sign(&hash) + Expect(err).NotTo(HaveOccurred()) + sigBytes, err := surge.ToBinary(sig) + Expect(err).NotTo(HaveOccurred()) + txSignature := pack.Bytes65{} + copy(txSignature[:], sigBytes) + senderPubKeyBytes, err := surge.ToBinary(senderPubKey) + Expect(err).NotTo(HaveOccurred()) + Expect(accountTx.Sign( + []pack.Bytes65{txSignature}, + pack.NewBytes(senderPubKeyBytes), + )).To(Succeed()) + + // Submit the transaction to the account chain. + txHash := accountTx.Hash() + Expect(accountClient.SubmitTx(ctx, accountTx)).To(Succeed()) + + // Wait slightly before we query the chain's node. + time.Sleep(time.Second) + + for { + // Loop until the transaction has at least a few confirmations. + tx, confs, err := accountClient.Tx(ctx, txHash) + if err == nil { + Expect(confs.Uint64()).To(Equal(uint64(1))) + Expect(tx.Value()).To(Equal(amount)) + Expect(tx.From()).To(Equal(senderAddr)) + Expect(tx.To()).To(Equal(recipientAddr)) + break + } + + // wait and retry querying for the transaction + time.Sleep(5 * time.Second) + } + }) + }) + } + }) + + Context("UTXO API", func() { + utxoChainTable := []struct { + privKeyEnv string + newAddressPKH func([]byte) (btcutil.Address, error) + newAddressSH func([]byte) (btcutil.Address, error) + rpcURL pack.String + initialise func(pack.String, btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) + txBuilder multichain.UTXOTxBuilder + chain multichain.Chain + }{ + { + "BITCOIN_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &chaincfg.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:18443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := bitcoin.NewClient(bitcoin.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + bitcoin.NewTxBuilder(&chaincfg.RegressionNetParams), + multichain.Bitcoin, + }, + { + "BITCOINCASH_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := bitcoincash.NewAddressPubKeyHash(pkh, &chaincfg.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:19443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := bitcoincash.NewClient(bitcoincash.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + bitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams), + multichain.BitcoinCash, + }, + { + "DIGIBYTE_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:20443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := digibyte.NewClient(digibyte.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + digibyte.NewTxBuilder(&digibyte.RegressionNetParams), + multichain.DigiByte, + }, + { + "DOGECOIN_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &dogecoin.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &dogecoin.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:18332"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := dogecoin.NewClient(dogecoin.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + dogecoin.NewTxBuilder(&dogecoin.RegressionNetParams), + multichain.Dogecoin, + }, + { + "ZCASH_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressPubKeyHash(pkh, &zcash.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + return addr, err + }, + pack.String("http://0.0.0.0:18232"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := zcash.NewClient(zcash.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), + multichain.Zcash, + }, + } + + for _, utxoChain := range utxoChainTable { + utxoChain := utxoChain + Context(fmt.Sprintf("%v", utxoChain.chain), func() { + Specify("build, broadcast and fetch tx", func() { + // Load private key. + pkEnv := os.Getenv(utxoChain.privKeyEnv) + if pkEnv == "" { + panic(fmt.Sprintf("%v is undefined", utxoChain.privKeyEnv)) + } + wif, err := btcutil.DecodeWIF(pkEnv) + Expect(err).NotTo(HaveOccurred()) + + // Get the PKH address from the loaded private key. + pkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed())) + Expect(err).NotTo(HaveOccurred()) + + // Recipient + pkhAddrUncompressed, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed())) + Expect(err).ToNot(HaveOccurred()) + + // Initialise the UTXO client and fetch the unspent outputs. Also get a + // function to query the number of block confirmations for a transaction. + utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) + Expect(len(unspentOutputs)).To(BeNumerically(">", 0)) + output := unspentOutputs[0] + + // Build a transaction + inputs := []multichain.UTXOInput{ + {Output: multichain.UTXOutput{ + Outpoint: multichain.UTXOutpoint{ + Hash: output.Outpoint.Hash[:], + Index: output.Outpoint.Index, + }, + PubKeyScript: output.PubKeyScript, + Value: output.Value, + }}, + } + recipients := []multichain.UTXORecipient{ + { + To: multichain.Address(pkhAddr.EncodeAddress()), + Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + }, + { + To: multichain.Address(pkhAddrUncompressed.EncodeAddress()), + Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + }, + } + utxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients) + Expect(err).NotTo(HaveOccurred()) + + // Get the sighashes that need to be signed, and sign them. + sighashes, err := utxoTx.Sighashes() + signatures := make([]pack.Bytes65, len(sighashes)) + Expect(err).ToNot(HaveOccurred()) + for i := range sighashes { + hash := id.Hash(sighashes[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures[i] = pack.NewBytes65(signature) + } + Expect(utxoTx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + + // Submit the signed transaction to the UTXO chain's node. + txHash, err := utxoTx.Hash() + Expect(err).ToNot(HaveOccurred()) + err = utxoClient.SubmitTx(ctx, utxoTx) + Expect(err).ToNot(HaveOccurred()) + + // Check confirmations after waiting for the transaction to be in the + // mempool. + time.Sleep(time.Second) + + for { + // Loop until the transaction has at least a few + // confirmations. + confs, err := confsFn(ctx, txHash) + Expect(err).ToNot(HaveOccurred()) + logger.Debug(fmt.Sprintf("[%v] confirming", utxoChain.chain), zap.Uint64("current", uint64(confs))) + if confs >= 1 { + break + } + time.Sleep(10 * time.Second) + } + + // Load the output and verify that it is equal to the original output. + output2, _, err := utxoClient.Output(ctx, output.Outpoint) + Expect(err).ToNot(HaveOccurred()) + Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) + }) + }) + } + }) +}) From 6bfdf6085042f39b078580379924f7bd417c96be Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 16:40:23 +0530 Subject: [PATCH 086/335] checkpoint --- chain/cosmos/tx.go | 6 ++++-- chain/dogecoin/utxo.go | 4 ++-- chain/terra/terra_test.go | 12 +++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index e6ff88f5..f98c1137 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -13,6 +13,7 @@ import ( "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/tendermint/tendermint/crypto/tmhash" ) @@ -262,11 +263,12 @@ func (tx StdTx) Hash() pack.Bytes { // Sighashes that need to be signed before this transaction can be submitted. func (tx StdTx) Sighashes() ([]pack.Bytes32, error) { - if len(tx.signMsg.Bytes()) != 32 { + sighashBytes := crypto.Sha256(tx.signMsg.Bytes()) + if len(sighashBytes) != 32 { return nil, fmt.Errorf("expected 32 bytes, got %v bytes", len(tx.signMsg.Bytes())) } sighash := pack.Bytes32{} - copy(sighash[:], tx.signMsg.Bytes()) + copy(sighash[:], sighashBytes) return []pack.Bytes32{sighash}, nil } diff --git a/chain/dogecoin/utxo.go b/chain/dogecoin/utxo.go index c77c8224..d5611514 100644 --- a/chain/dogecoin/utxo.go +++ b/chain/dogecoin/utxo.go @@ -10,8 +10,8 @@ type ( ) var ( - NewTxBuilder = bitcoin.NewTxBuilder - NewClient = bitcoin.NewClient + NewTxBuilder = bitcoin.NewTxBuilder + NewClient = bitcoin.NewClient ) // DefaultClientOptions returns ClientOptions with the default settings. These diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 7f070242..5d70eff5 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -7,10 +7,12 @@ import ( "time" "github.com/cosmos/cosmos-sdk/types" + "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/cosmos" "github.com/renproject/multichain/chain/terra" "github.com/renproject/pack" + "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/terra-project/core/app" @@ -45,6 +47,10 @@ var _ = Describe("Terra", func() { var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBz) + var privKey id.PrivKey + err = surge.FromBinary(&privKey, pkBz) + Expect(err).NotTo(HaveOccurred()) + addr := terra.Address(pk.PubKey().Address()) decoder := terra.NewAddressDecoder("terra") @@ -82,7 +88,11 @@ var _ = Describe("Terra", func() { // get the transaction bytes and sign it sighashes, err := tx.Sighashes() Expect(err).NotTo(HaveOccurred()) - sigBytes, err := pk.Sign(sighashes[0][:]) + Expect(len(sighashes)).To(Equal(1)) + hash := id.Hash(sighashes[0]) + sig, err := privKey.Sign(&hash) + Expect(err).NotTo(HaveOccurred()) + sigBytes, err := surge.ToBinary(sig) Expect(err).NotTo(HaveOccurred()) sig65 := pack.Bytes65{} copy(sig65[:], sigBytes) From d83c26aa4b4e0f2dd5a6449f8a724d57ea27ce38 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 17:31:56 +0530 Subject: [PATCH 087/335] fix cosmos-compat signature --- chain/cosmos/tx.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index f98c1137..5d3ccbac 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -280,7 +280,9 @@ func (tx *StdTx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { var cpPubKey secp256k1.PubKeySecp256k1 copy(cpPubKey[:], pubKey[:secp256k1.PubKeySecp256k1Size]) stdSignatures = append(stdSignatures, auth.StdSignature{ - Signature: sig[:], + // Cosmos uses 64-bytes signature + // https://github.com/tendermint/tendermint/blob/v0.33.8/crypto/secp256k1/secp256k1_nocgo.go#L60-L70 + Signature: sig[:64], PubKey: cpPubKey, }) } From e0e0b0eb11a38ca02988b81380d19761a0c33764 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 18:09:46 +0530 Subject: [PATCH 088/335] checkpoint --- chain/terra/terra_test.go | 11 +---------- multichain_test.go | 13 ++++++++----- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 5d70eff5..ebb52a2c 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -36,11 +36,6 @@ var _ = Describe("Terra", func() { panic("TERRA_PK is undefined") } - addrEnv := os.Getenv("TERRA_ADDRESS") - if addrEnv == "" { - panic("TERRA_ADDRESS is undefined") - } - pkBz, err := hex.DecodeString(pkEnv) Expect(err).ToNot(HaveOccurred()) @@ -53,16 +48,12 @@ var _ = Describe("Terra", func() { addr := terra.Address(pk.PubKey().Address()) - decoder := terra.NewAddressDecoder("terra") - _, err = decoder.DecodeAddress(multichain.Address(pack.NewString(addrEnv))) - Expect(err).ToNot(HaveOccurred()) - // random recipient pkRecipient := secp256k1.GenPrivKey() recipient := types.AccAddress(pkRecipient.PubKey().Address()) // instantiate a new client - client := terra.NewClient(cosmos.DefaultClientOptions()) + client := terra.NewClient(terra.DefaultClientOptions()) // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ diff --git a/multichain_test.go b/multichain_test.go index 959aab71..41554faa 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -22,6 +22,7 @@ import ( "github.com/renproject/pack" "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" + "github.com/terra-project/core/app" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -94,6 +95,7 @@ var _ = Describe("Multichain", func() { AccountNumber: pack.NewU64(1), ChainID: "testnet", CoinDenom: "uluna", + Cdc: app.MakeCodec(), }), func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) @@ -133,8 +135,7 @@ var _ = Describe("Multichain", func() { // Get the transaction bytes and sign them. sighashes, err := accountTx.Sighashes() Expect(err).NotTo(HaveOccurred()) - sighash32 := sighashes[0] - hash := id.Hash(sighash32) + hash := id.Hash(sighashes[0]) sig, err := senderPrivKey.Sign(&hash) Expect(err).NotTo(HaveOccurred()) sigBytes, err := surge.ToBinary(sig) @@ -143,14 +144,16 @@ var _ = Describe("Multichain", func() { copy(txSignature[:], sigBytes) senderPubKeyBytes, err := surge.ToBinary(senderPubKey) Expect(err).NotTo(HaveOccurred()) - Expect(accountTx.Sign( + err = accountTx.Sign( []pack.Bytes65{txSignature}, pack.NewBytes(senderPubKeyBytes), - )).To(Succeed()) + ) + Expect(err).NotTo(HaveOccurred()) // Submit the transaction to the account chain. txHash := accountTx.Hash() - Expect(accountClient.SubmitTx(ctx, accountTx)).To(Succeed()) + err = accountClient.SubmitTx(ctx, accountTx) + Expect(err).NotTo(HaveOccurred()) // Wait slightly before we query the chain's node. time.Sleep(time.Second) From d19e3f6ec1909ea471d660379d55f93251b73851 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 20:20:29 +0530 Subject: [PATCH 089/335] checkpoint 2 --- chain/cosmos/address.go | 9 ++++++--- chain/terra/terra_test.go | 9 +++++---- multichain_test.go | 39 +++++++++++++++++++++++++-------------- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index 57a555d1..c1b5adcb 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -36,7 +36,9 @@ func NewAddressEncodeDecoder(hrp string) AddressEncodeDecoder { } // AddressEncoder implements the address.Encoder interface -type AddressEncoder struct{} +type AddressEncoder struct { + hrp string +} // AddressDecoder implements the address.Decoder interface type AddressDecoder struct { @@ -49,8 +51,8 @@ func NewAddressDecoder(hrp string) AddressDecoder { } // NewAddressEncoder creates a new address encoder -func NewAddressEncoder() AddressEncoder { - return AddressEncoder{} +func NewAddressEncoder(hrp string) AddressEncoder { + return AddressEncoder{hrp: hrp} } // DecodeAddress consumes a human-readable representation of a cosmos @@ -67,6 +69,7 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd // EncodeAddress consumes raw bytes and encodes them to a human-readable // address format. func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + sdk.GetConfig().SetBech32PrefixForAccount(encoder.hrp, encoder.hrp+"pub") bech32Addr := sdk.AccAddress(rawAddr) return address.Address(bech32Addr.String()), nil } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index ebb52a2c..00b58756 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -6,10 +6,9 @@ import ( "os" "time" - "github.com/cosmos/cosmos-sdk/types" "github.com/renproject/id" "github.com/renproject/multichain" - "github.com/renproject/multichain/chain/cosmos" + "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/chain/terra" "github.com/renproject/pack" "github.com/renproject/surge" @@ -50,7 +49,9 @@ var _ = Describe("Terra", func() { // random recipient pkRecipient := secp256k1.GenPrivKey() - recipient := types.AccAddress(pkRecipient.PubKey().Address()) + addrEncoder := terra.NewAddressEncoder("terra") + recipient, err := addrEncoder.EncodeAddress(address.RawAddress(pack.Bytes(pkRecipient.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) // instantiate a new client client := terra.NewClient(terra.DefaultClientOptions()) @@ -67,7 +68,7 @@ var _ = Describe("Terra", func() { payload := pack.NewBytes([]byte("multichain")) tx, err := txBuilder.BuildTx( multichain.Address(addr.String()), // from - multichain.Address(recipient.String()), // to + recipient, // to pack.NewU256FromU64(pack.U64(2000000)), // amount pack.NewU256FromU64(0), // nonce pack.NewU256FromU64(pack.U64(300000)), // gas diff --git a/multichain_test.go b/multichain_test.go index 41554faa..4f79d912 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -10,7 +10,6 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" - "github.com/cosmos/cosmos-sdk/types" "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" @@ -48,17 +47,17 @@ var _ = Describe("Multichain", func() { Context("Account API", func() { accountChainTable := []struct { - senderEnv func() (id.PrivKey, *id.PubKey, pack.String) - privKeyToAddr func(pk id.PrivKey) pack.String + senderEnv func() (id.PrivKey, *id.PubKey, multichain.Address) + privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String - randomRecipientAddr func() pack.String + randomRecipientAddr func() multichain.Address initialise func() multichain.AccountClient txBuilder multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ { - func() (id.PrivKey, *id.PubKey, pack.String) { + func() (id.PrivKey, *id.PubKey, multichain.Address) { pkEnv := os.Getenv("TERRA_PK") if pkEnv == "" { panic("TERRA_PK is undefined") @@ -67,25 +66,31 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBytes) - senderAddr := terra.Address(pk.PubKey().Address()) + addrEncoder := terra.NewAddressEncoder("terra") + senderAddr, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(pk.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) senderPrivKey := id.PrivKey{} err = surge.FromBinary(&senderPrivKey, pkBytes) Expect(err).NotTo(HaveOccurred()) - return senderPrivKey, senderPrivKey.PubKey(), pack.NewString(senderAddr.String()) + return senderPrivKey, senderPrivKey.PubKey(), senderAddr }, - func(privKey id.PrivKey) pack.String { + func(privKey id.PrivKey) multichain.Address { pkBytes, err := surge.ToBinary(privKey) Expect(err).NotTo(HaveOccurred()) var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBytes) - addr := terra.Address(pk.PubKey().Address()) - return pack.NewString(addr.String()) + addrEncoder := terra.NewAddressEncoder("terra") + addr, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(pk.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) + return addr }, "http://127.0.0.1:26657", - func() pack.String { + func() multichain.Address { recipientKey := secp256k1.GenPrivKey() - recipient := types.AccAddress(recipientKey.PubKey().Address()) - return pack.NewString(recipient.String()) + addrEncoder := terra.NewAddressEncoder("terra") + recipient, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(recipientKey.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) + return recipient }, func() multichain.AccountClient { client := terra.NewClient(terra.DefaultClientOptions()) @@ -115,9 +120,11 @@ var _ = Describe("Multichain", func() { Specify("build, broadcast and fetch tx", func() { // Load private key and the associated address. senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() + fmt.Printf("sender address = %v\n", senderAddr) // Get a random recipient address. recipientAddr := accountChain.randomRecipientAddr() + fmt.Printf("random recipient = %v\n", recipientAddr) // Initialise the account chain's client. accountClient := accountChain.initialise() @@ -126,7 +133,7 @@ var _ = Describe("Multichain", func() { amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), - multichain.Address(recipientAddr), + recipientAddr, amount, nonce, gasLimit, gasPrice, payload, ) @@ -149,9 +156,13 @@ var _ = Describe("Multichain", func() { pack.NewBytes(senderPubKeyBytes), ) Expect(err).NotTo(HaveOccurred()) + ser, err := accountTx.Serialize() + Expect(err).NotTo(HaveOccurred()) + fmt.Printf("tx serialised = %v\n", ser) // Submit the transaction to the account chain. txHash := accountTx.Hash() + fmt.Printf("tx hash = %v\n", txHash) err = accountClient.SubmitTx(ctx, accountTx) Expect(err).NotTo(HaveOccurred()) From e98c0eb7a9299e875c7fcbbd3d21ce4d33dd2b1d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 22:39:58 +0530 Subject: [PATCH 090/335] add filecoin to table --- chain/filecoin/client.go | 8 ++-- multichain_test.go | 98 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 97 insertions(+), 9 deletions(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 23758eca..1e09e48d 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -48,15 +48,15 @@ func DefaultClientOptions() ClientOptions { // WithRPCURL returns a modified version of the options with the given API // rpc-url -func (opts ClientOptions) WithRPCURL(rpcURL string) ClientOptions { - opts.RPCURL = rpcURL +func (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions { + opts.RPCURL = string(rpcURL) return opts } // WithAuthToken returns a modified version of the options with the given // authentication token. -func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { - opts.AuthToken = authToken +func (opts ClientOptions) WithAuthToken(authToken pack.String) ClientOptions { + opts.AuthToken = string(authToken) return opts } diff --git a/multichain_test.go b/multichain_test.go index 4f79d912..6cff6e73 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -1,21 +1,28 @@ package multichain_test import ( + "bytes" "context" "encoding/hex" + "encoding/json" "fmt" "os" + "os/exec" "reflect" + "strings" "time" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + filaddress "github.com/filecoin-project/go-address" + filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" "github.com/renproject/multichain/chain/digibyte" "github.com/renproject/multichain/chain/dogecoin" + "github.com/renproject/multichain/chain/filecoin" "github.com/renproject/multichain/chain/terra" "github.com/renproject/multichain/chain/zcash" "github.com/renproject/pack" @@ -51,7 +58,7 @@ var _ = Describe("Multichain", func() { privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String randomRecipientAddr func() multichain.Address - initialise func() multichain.AccountClient + initialise func(pack.String) multichain.AccountClient txBuilder multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain @@ -92,8 +99,11 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return recipient }, - func() multichain.AccountClient { - client := terra.NewClient(terra.DefaultClientOptions()) + func(rpcURL pack.String) multichain.AccountClient { + client := terra.NewClient( + terra.DefaultClientOptions(). + WithHost(rpcURL), + ) return client }, terra.NewTxBuilder(terra.TxBuilderOptions{ @@ -112,6 +122,67 @@ var _ = Describe("Multichain", func() { }, multichain.Terra, }, + { + func() (id.PrivKey, *id.PubKey, multichain.Address) { + pkEnv := os.Getenv("FILECOIN_PK") + if pkEnv == "" { + panic("FILECOIN_PK is undefined") + } + var ki filtypes.KeyInfo + data, err := hex.DecodeString(pkEnv) + Expect(err).NotTo(HaveOccurred()) + err = json.Unmarshal(data, &ki) + Expect(err).NotTo(HaveOccurred()) + privKey := id.PrivKey{} + err = surge.FromBinary(&privKey, ki.PrivateKey) + Expect(err).NotTo(HaveOccurred()) + pubKey := privKey.PubKey() + pubKeyCompressed, err := surge.ToBinary(pubKey) + Expect(err).NotTo(HaveOccurred()) + addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) + return privKey, pubKey, multichain.Address(pack.String(addr.String())) + }, + func(privKey id.PrivKey) multichain.Address { + pubKey := privKey.PubKey() + pubKeyCompressed, err := surge.ToBinary(pubKey) + Expect(err).NotTo(HaveOccurred()) + addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(pack.String(addr.String())) + }, + "ws://127.0.0.1:1234/rpc/v0", + func() multichain.Address { + pk := id.NewPrivKey() + pubKey := pk.PubKey() + pubKeyCompressed, err := surge.ToBinary(pubKey) + Expect(err).NotTo(HaveOccurred()) + addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(pack.String(addr.String())) + }, + func(rpcURL pack.String) multichain.AccountClient { + // dirty hack to fetch auth token + authToken := fetchAuthToken() + client, err := filecoin.NewClient( + filecoin.DefaultClientOptions(). + WithRPCURL(rpcURL). + WithAuthToken(authToken), + ) + Expect(err).NotTo(HaveOccurred()) + return client + }, + filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(149514))), + func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + amount := pack.NewU256FromU64(pack.NewU64(100000000)) + nonce := pack.NewU256FromU64(pack.NewU64(0)) + gasLimit := pack.NewU256FromU64(pack.NewU64(495335)) + gasPrice := pack.NewU256FromU64(pack.NewU64(149838)) + payload := pack.Bytes(nil) + return amount, nonce, gasLimit, gasPrice, payload + }, + multichain.Filecoin, + }, } for _, accountChain := range accountChainTable { @@ -127,7 +198,7 @@ var _ = Describe("Multichain", func() { fmt.Printf("random recipient = %v\n", recipientAddr) // Initialise the account chain's client. - accountClient := accountChain.initialise() + accountClient := accountChain.initialise(accountChain.rpcURL) // Build a transaction. amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() @@ -173,7 +244,7 @@ var _ = Describe("Multichain", func() { // Loop until the transaction has at least a few confirmations. tx, confs, err := accountClient.Tx(ctx, txHash) if err == nil { - Expect(confs.Uint64()).To(Equal(uint64(1))) + Expect(confs.Uint64()).To(BeNumerically(">", 0)) Expect(tx.Value()).To(Equal(amount)) Expect(tx.From()).To(Equal(senderAddr)) Expect(tx.To()).To(Equal(recipientAddr)) @@ -394,3 +465,20 @@ var _ = Describe("Multichain", func() { } }) }) + +func fetchAuthToken() pack.String { + // fetch the auth token from filecoin's running docker container + cmd := exec.Command("docker", "exec", "infra_filecoin_1", "/bin/bash", "-c", "/app/lotus auth api-info --perm admin") + var out bytes.Buffer + var stderr bytes.Buffer + cmd.Stdout = &out + cmd.Stderr = &stderr + err := cmd.Run() + if err != nil { + fmt.Println(fmt.Sprint(err) + ": " + stderr.String()) + panic(fmt.Sprintf("could not run command: %v", err)) + } + tokenWithSuffix := strings.TrimPrefix(out.String(), "FULLNODE_API_INFO=") + authToken := strings.Split(tokenWithSuffix, ":/") + return pack.NewString(fmt.Sprintf("Bearer %s", authToken[0])) +} From b8bd1a012fe9d2d3bcbc2bb63b64c6f13db11fff Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 22:55:58 +0530 Subject: [PATCH 091/335] filecoin addr moved to FIXME --- multichain_test.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 6cff6e73..c7bd900d 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -37,10 +37,10 @@ import ( ) var _ = Describe("Multichain", func() { - // Create context to work within + // Create context to work within. ctx := context.Background() - // Initialise the logger + // Initialise the logger. loggerConfig := zap.NewDevelopmentConfig() loggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder logger, err := loggerConfig.Build() @@ -137,11 +137,18 @@ var _ = Describe("Multichain", func() { err = surge.FromBinary(&privKey, ki.PrivateKey) Expect(err).NotTo(HaveOccurred()) pubKey := privKey.PubKey() + + // FIXME: add method in renproject/id to get uncompressed pubkey bytes pubKeyCompressed, err := surge.ToBinary(pubKey) Expect(err).NotTo(HaveOccurred()) - addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + /*addr*/ _, err = filaddress.NewSecp256k1Address(pubKeyCompressed) Expect(err).NotTo(HaveOccurred()) - return privKey, pubKey, multichain.Address(pack.String(addr.String())) + addrStr := os.Getenv("FILECOIN_ADDRESS") + if addrStr == "" { + panic("FILECOIN_ADDRESS is undefined") + } + + return privKey, pubKey, multichain.Address(pack.String(addrStr)) }, func(privKey id.PrivKey) multichain.Address { pubKey := privKey.PubKey() @@ -187,7 +194,7 @@ var _ = Describe("Multichain", func() { for _, accountChain := range accountChainTable { accountChain := accountChain - FContext(fmt.Sprintf("%v", accountChain.chain), func() { + Context(fmt.Sprintf("%v", accountChain.chain), func() { Specify("build, broadcast and fetch tx", func() { // Load private key and the associated address. senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() From ce8a4a7b4b87b2c6311996b8932cda8db774046f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:26:37 +0530 Subject: [PATCH 092/335] (not tested) github actions manifest --- .github/CODEOWNERS | 1 + .github/workflows/test.yml | 79 ++++++++++++++++++++++++++++++++++++++ multichain_test.go | 9 +++++ 3 files changed, 89 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/test.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..d5970cbd --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @loongy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..5dc7269e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,79 @@ +name: go +on: [push] +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + + - name: Run vetting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint ./... + + - name: Run multichain infrastructure + run: | + source ./infra/.env + cd $GITHUB_WORKSPACE/infra + docker-compose up --build bitcoin \ + bitcoincash \ + digibyte \ + dogecoin \ + filecoin \ + terra \ + zcash + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: '5m' + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + CI=true ginkgo --v --race --cover --coverprofile coverprofile.out ./... + covermerge \ + chain/bitcoin.out \ + chain/bitcoincash.out \ + chain/digibyte.out \ + chain/dogecoin.out \ + chain/ethereum.out \ + chain/filecoin.out \ + chain/terra.out \ + chain/zcash.out \ + coverprofile.out > coverprofile.out + goveralls -coverprofile=coverprofile.out -service=github diff --git a/multichain_test.go b/multichain_test.go index c7bd900d..0915a9ed 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -46,12 +46,18 @@ var _ = Describe("Multichain", func() { logger, err := loggerConfig.Build() Expect(err).ToNot(HaveOccurred()) + // + // ADDRESS API + // Context("Address API", func() { It("should pass", func() { Fail("not implemented") }) }) + // + // ACCOUNT API + // Context("Account API", func() { accountChainTable := []struct { senderEnv func() (id.PrivKey, *id.PubKey, multichain.Address) @@ -266,6 +272,9 @@ var _ = Describe("Multichain", func() { } }) + // + // UTXO API + // Context("UTXO API", func() { utxoChainTable := []struct { privKeyEnv string From 9283877b200597b08b57f25b5e4509383d780fe0 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:31:28 +0530 Subject: [PATCH 093/335] checkout the filecoin-ffi submodule --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5dc7269e..1d05a79f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,8 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 + with: + submodules: recursive - name: Caching modules uses: actions/cache@v1 @@ -22,6 +24,7 @@ jobs: - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin + git submodule go get -u github.com/onsi/ginkgo/ginkgo go get -u github.com/onsi/gomega/... go get -u golang.org/x/lint/golint From cbde69302e2441525ecc9abe58baf0f4cae3c573 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:34:38 +0530 Subject: [PATCH 094/335] build the ffi submodule before building multichain --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d05a79f..a0a6fae6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,6 @@ jobs: - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin - git submodule go get -u github.com/onsi/ginkgo/ginkgo go get -u github.com/onsi/gomega/... go get -u golang.org/x/lint/golint @@ -33,6 +32,8 @@ jobs: - name: Run vetting run: | + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make cd $GITHUB_WORKSPACE export PATH=$PATH:$(go env GOPATH)/bin go vet ./... From 92264a50defb1d97558764896ed8897be03697ac Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:38:29 +0530 Subject: [PATCH 095/335] install dep packages for filecoin --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0a6fae6..0c33f7b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,10 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + - name: Install dependency packages + run: + sudo apt-get install mesa-opencl-icd ocl-icd-opencl-dev + - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin From 67425c6ad7ee9babf0fdd6472b64fdcd52b57870 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 00:48:41 +0530 Subject: [PATCH 096/335] pull from docker hub --- .github/workflows/test.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c33f7b8..f64e4b3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,22 +49,25 @@ jobs: go get -u golang.org/x/lint/golint golint ./... - - name: Run multichain infrastructure - run: | - source ./infra/.env - cd $GITHUB_WORKSPACE/infra - docker-compose up --build bitcoin \ - bitcoincash \ - digibyte \ - dogecoin \ - filecoin \ - terra \ - zcash + - name: Run multichain infrastructure (bitcoin) + run: docker run -d -p 18443:18443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoin + - name: Run multichain infrastructure (bitcoincash) + run: docker run -d -p 19443:19443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoincash + - name: Run multichain infrastructure (digibyte) + run: docker run -d -p 20443:20443 -h 0.0.0.0 rohitnarurkar/multichain_digibyte + - name: Run multichain infrastructure (dogecoin) + run: docker run -d -p 18332:18332 -h 0.0.0.0 rohitnarurkar/multichain_dogecoin + - name: Run multichain infrastructure (filecoin) + run: docker run -d -p 1234:1234 -h 0.0.0.0 rohitnarurkar/multichain_filecoin + - name: Run multichain infrastructure (terra) + run: docker run -d -p 26657:26657 -h 0.0.0.0 rohitnarurkar/multichain_terra + - name: Run multichain infrastructure (zcash) + run: docker run -d -p 18232:18232 -h 0.0.0.0 rohitnarurkar/multichain_zcash - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '5m' + time: '1m' - name: Run tests and report test coverage env: From 761f042b19a22f7206c9644f69e38707742150a1 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Tue, 15 Sep 2020 12:48:15 +1000 Subject: [PATCH 097/335] infra/filecoin: check out working commit --- infra/filecoin/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index d816630f..5442e221 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -11,6 +11,7 @@ ENV PATH=$PATH:/usr/local/go/bin WORKDIR /app RUN git clone https://github.com/filecoin-project/lotus . +RUN git checkout 232cc320bd6de432b54008cb37619d45e8869df0 RUN make 2k RUN ./lotus fetch-params 2048 RUN ./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 From ad99a9faa0d3359ab44bf9e66e1a49d4a571088f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 11:33:21 +0530 Subject: [PATCH 098/335] check status of docker containers --- .github/CODEOWNERS | 2 +- .github/workflows/test.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d5970cbd..2b4c3323 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @loongy +* @loongy @jazg diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f64e4b3d..7601c8e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,6 +69,9 @@ jobs: with: time: '1m' + - name: Check on docker containers + run: docker ps -a + - name: Run tests and report test coverage env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ed815e87e41423c859b792a0889dc9c7c64e5b21 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 15:18:55 +0530 Subject: [PATCH 099/335] address API tests and minor fixes --- chain/bitcoin/address.go | 4 +- chain/cosmos/address.go | 2 +- chain/terra/address.go | 4 +- multichain_test.go | 97 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 99 insertions(+), 8 deletions(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 44038866..d229cae1 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -58,10 +58,10 @@ func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { } // DecodeAddress implements the address.Decoder interface -func (decoder AddressDecoder) DecodeAddress(addr address.Address) (pack.Bytes, error) { +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { if _, err := btcutil.DecodeAddress(string(addr), decoder.params); err != nil { // Check that the address is valid. return nil, err } - return pack.NewBytes(base58.Decode(string(addr))), nil + return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil } diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index c1b5adcb..63f9c172 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -30,7 +30,7 @@ type AddressEncodeDecoder struct { // NewAddressEncodeDecoder creates a new address encoder-decoder func NewAddressEncodeDecoder(hrp string) AddressEncodeDecoder { return AddressEncodeDecoder{ - AddressEncoder: AddressEncoder{}, + AddressEncoder: NewAddressEncoder(hrp), AddressDecoder: NewAddressDecoder(hrp), } } diff --git a/chain/terra/address.go b/chain/terra/address.go index 7b235bdc..1d4a59ec 100644 --- a/chain/terra/address.go +++ b/chain/terra/address.go @@ -23,6 +23,6 @@ var ( // NewAddressEncoder re-exports cosmos.NewAddressEncoder NewAddressEncoder = cosmos.NewAddressEncoder - // NewAddressEnodeDecoder re-exports cosmos.NewAddressEnodeDecoder - NewAddressEnodeDecoder = cosmos.NewAddressEncodeDecoder + // NewAddressEncodeDecoder re-exports cosmos.NewAddressEnodeDecoder + NewAddressEncodeDecoder = cosmos.NewAddressEncodeDecoder ) diff --git a/multichain_test.go b/multichain_test.go index 0915a9ed..19ac3a7f 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -6,14 +6,17 @@ import ( "encoding/hex" "encoding/json" "fmt" + "math/rand" "os" "os/exec" "reflect" "strings" "time" + "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + cosmossdk "github.com/cosmos/cosmos-sdk/types" filaddress "github.com/filecoin-project/go-address" filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" @@ -50,9 +53,97 @@ var _ = Describe("Multichain", func() { // ADDRESS API // Context("Address API", func() { - It("should pass", func() { - Fail("not implemented") - }) + chainTable := []struct { + chain multichain.Chain + newEncodeDecoder func() multichain.AddressEncodeDecoder + newAddress func() multichain.Address + newRawAddress func() multichain.RawAddress + }{ + { + multichain.Bitcoin, + func() multichain.AddressEncodeDecoder { + addrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + return addrEncodeDecoder + }, + func() multichain.Address { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrPubKey.EncodeAddress()) + }, + func() multichain.RawAddress { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.RawAddress(addrPubKey.ScriptAddress()) + }, + }, + { + multichain.Filecoin, + func() multichain.AddressEncodeDecoder { + return filecoin.NewAddressEncodeDecoder() + }, + func() multichain.Address { + pubKey := make([]byte, 64) + rand.Read(pubKey) + addr, err := filaddress.NewSecp256k1Address(pubKey) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addr.String()) + }, + func() multichain.RawAddress { + rawAddr := make([]byte, 20) + rand.Read(rawAddr) + formattedRawAddr := append([]byte{byte(filaddress.SECP256K1)}, rawAddr[:]...) + return multichain.RawAddress(pack.NewBytes(formattedRawAddr[:])) + }, + }, + { + multichain.Terra, + func() multichain.AddressEncodeDecoder { + return terra.NewAddressEncodeDecoder("terra") + }, + func() multichain.Address { + pk := secp256k1.GenPrivKey() + cosmossdk.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") + addr := cosmossdk.AccAddress(pk.PubKey().Address()) + return multichain.Address(addr.String()) + }, + func() multichain.RawAddress { + pk := secp256k1.GenPrivKey() + rawAddr := pk.PubKey().Address() + return multichain.RawAddress(pack.Bytes(rawAddr)) + }, + }, + } + + for _, chain := range chainTable { + chain := chain + Context(fmt.Sprintf("%v", chain.chain), func() { + encodeDecoder := chain.newEncodeDecoder() + + It("should encode a raw address correctly", func() { + rawAddr := chain.newRawAddress() + encodedAddr, err := encodeDecoder.EncodeAddress(rawAddr) + Expect(err).NotTo(HaveOccurred()) + decodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(decodedRawAddr).To(Equal(rawAddr)) + }) + + It("should decode an address correctly", func() { + addr := chain.newAddress() + decodedRawAddr, err := encodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + }) + } }) // From 586d16b91645704673c5a5966a16fb694eb96d74 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 20:11:46 +0530 Subject: [PATCH 100/335] bitcoin addresses are now check-summed 25-bytes long --- chain/bitcoin/address.go | 28 +++++++++++---- multichain_test.go | 75 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 11 deletions(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index d229cae1..01c6995e 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -1,6 +1,8 @@ package bitcoin import ( + "fmt" + "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" @@ -37,11 +39,12 @@ func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { // EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + // Validate that the base58 address is in fact in correct format. encodedAddr := base58.Encode([]byte(rawAddr)) - if _, err := btcutil.DecodeAddress(encodedAddr, encoder.params); err != nil { - // Check that the address is valid. - return address.Address(""), err + if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { + return address.Address(""), fmt.Errorf("address validation error: %v", err) } + return address.Address(encodedAddr), nil } @@ -59,9 +62,20 @@ func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { // DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { - if _, err := btcutil.DecodeAddress(string(addr), decoder.params); err != nil { - // Check that the address is valid. - return nil, err + // Decode the checksummed base58 format address. + decoded, ver, err := base58.CheckDecode(string(addr)) + if err != nil { + return nil, fmt.Errorf("base58 decoding error: %v", err) + } + if len(decoded) != 20 { + return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + } + + // Validate the address format. + switch ver { + case decoder.params.PubKeyHashAddrID, decoder.params.ScriptHashAddrID: + return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil + default: + return nil, fmt.Errorf("unknown address type") } - return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil } diff --git a/multichain_test.go b/multichain_test.go index 19ac3a7f..b0cc63f9 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -16,6 +16,7 @@ import ( "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + "github.com/btcsuite/btcutil/base58" cosmossdk "github.com/cosmos/cosmos-sdk/types" filaddress "github.com/filecoin-project/go-address" filtypes "github.com/filecoin-project/lotus/chain/types" @@ -58,6 +59,8 @@ var _ = Describe("Multichain", func() { newEncodeDecoder func() multichain.AddressEncodeDecoder newAddress func() multichain.Address newRawAddress func() multichain.RawAddress + newSHAddress func() multichain.Address + newSHRawAddress func() multichain.RawAddress }{ { multichain.Bitcoin, @@ -66,20 +69,52 @@ var _ = Describe("Multichain", func() { return addrEncodeDecoder }, func() multichain.Address { + // Generate a random SECP256K1 private key. pk := id.NewPrivKey() + // Get bitcoin WIF private key with the pub key configured to be in + // the compressed form. wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) Expect(err).NotTo(HaveOccurred()) - addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) - return multichain.Address(addrPubKey.EncodeAddress()) + // Return the human-readable encoded bitcoin address in base58 format. + return multichain.Address(addrPubKeyHash.EncodeAddress()) }, func() multichain.RawAddress { + // Generate a random SECP256K1 private key. pk := id.NewPrivKey() + // Get bitcoin WIF private key with the pub key configured to be in + // the compressed form. wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) Expect(err).NotTo(HaveOccurred()) - addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + // Get the address pubKey hash. This is the most commonly used format + // for a bitcoin address. + addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) - return multichain.RawAddress(addrPubKey.ScriptAddress()) + // Encode into the checksummed base58 format. + encoded := addrPubKeyHash.EncodeAddress() + return multichain.RawAddress(pack.Bytes(base58.Decode(encoded))) + }, + func() multichain.Address { + // Random bytes of script. + script := make([]byte, rand.Intn(100)) + rand.Read(script) + // Create address script hash from the random script bytes. + addrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + // Return in human-readable encoded form. + return multichain.Address(addrScriptHash.EncodeAddress()) + }, + func() multichain.RawAddress { + // Random bytes of script. + script := make([]byte, rand.Intn(100)) + rand.Read(script) + // Create address script hash from the random script bytes. + addrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + // Encode to the checksummed base58 format. + encoded := addrScriptHash.EncodeAddress() + return multichain.RawAddress(pack.Bytes(base58.Decode(encoded))) }, }, { @@ -100,6 +135,12 @@ var _ = Describe("Multichain", func() { formattedRawAddr := append([]byte{byte(filaddress.SECP256K1)}, rawAddr[:]...) return multichain.RawAddress(pack.NewBytes(formattedRawAddr[:])) }, + func() multichain.Address { + return multichain.Address("") + }, + func() multichain.RawAddress { + return multichain.RawAddress([]byte{}) + }, }, { multichain.Terra, @@ -117,6 +158,12 @@ var _ = Describe("Multichain", func() { rawAddr := pk.PubKey().Address() return multichain.RawAddress(pack.Bytes(rawAddr)) }, + func() multichain.Address { + return multichain.Address("") + }, + func() multichain.RawAddress { + return multichain.RawAddress([]byte{}) + }, }, } @@ -142,6 +189,26 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) Expect(encodedAddr).To(Equal(addr)) }) + + if chain.chain.IsUTXOBased() { + It("should encoded a raw script address correctly", func() { + rawScriptAddr := chain.newSHRawAddress() + encodedAddr, err := encodeDecoder.EncodeAddress(rawScriptAddr) + Expect(err).NotTo(HaveOccurred()) + decodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(decodedRawAddr).To(Equal(rawScriptAddr)) + }) + + It("should decode a script address correctly", func() { + scriptAddr := chain.newSHAddress() + decodedRawAddr, err := encodeDecoder.DecodeAddress(scriptAddr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(scriptAddr)) + }) + } }) } }) From 3021b5395a3f9f8d22a85bc5c8948908b4184d2f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 23:46:21 +0530 Subject: [PATCH 101/335] fetch nonce during initialisation --- chain/cosmos/client.go | 27 ++++++++++++++++++++++- chain/filecoin/client.go | 22 +++++++++++++++++++ chain/terra/terra.go | 2 +- multichain_test.go | 47 ++++++++++++++++++++++------------------ 4 files changed, 75 insertions(+), 23 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 967db076..d3be3ece 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -66,7 +66,7 @@ type Client struct { } // NewClient returns a new Client. -func NewClient(opts ClientOptions, cdc *codec.Codec) account.Client { +func NewClient(opts ClientOptions, cdc *codec.Codec) *Client { httpClient, err := rpchttp.NewWithTimeout(opts.Host.String(), "websocket", uint(opts.Timeout/time.Second)) if err != nil { panic(err) @@ -118,3 +118,28 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { return nil } + +// Account contains necessary info for sdk.Account +type Account struct { + Address Address `json:"address"` + AccountNumber pack.U64 `json:"account_number"` + SequenceNumber pack.U64 `json:"sequence_number"` + Coins Coins `json:"coins"` +} + +// Account query account with address. This method is not a part of the +// multichain.AccountClient API, but will be used in the test infrastructure. +func (client *Client) Account(addr Address) (Account, error) { + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(addr.AccAddress()) + if err != nil { + return Account{}, err + } + + return Account{ + Address: addr, + AccountNumber: pack.U64(acc.GetAccountNumber()), + SequenceNumber: pack.U64(acc.GetSequence()), + Coins: parseCoins(acc.GetCoins()), + }, nil +} diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 1e09e48d..aa27196e 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -3,8 +3,10 @@ package filecoin import ( "context" "fmt" + "math/big" "net/http" + filaddress "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/lotus/api" filclient "github.com/filecoin-project/lotus/api/client" @@ -146,3 +148,23 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { return fmt.Errorf("expected type %T, got type %T", new(Tx), tx) } } + +// Account contains necessary info for sdk.Account +type Account struct { + Balance pack.U256 + Nonce pack.U64 +} + +// Account query account with address. This method is not a part of the +// multichain.AccountClient API, but will be used in the test infrastructure. +func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Account, error) { + actor, err := client.node.StateGetActor(ctx, addr, types.NewTipSetKey(cid.Undef)) + if err != nil { + return Account{}, fmt.Errorf("searching state for addr: %v", addr) + } + + return Account{ + Balance: pack.NewU256FromInt(big.NewInt(actor.Balance.Int64())), + Nonce: pack.NewU64(actor.Nonce), + }, nil +} diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 2047e392..5aeaede6 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -23,7 +23,7 @@ var ( ) // NewClient returns returns a new Client with terra codec -func NewClient(opts ClientOptions) account.Client { +func NewClient(opts ClientOptions) *Client { return cosmos.NewClient(opts, app.MakeCodec()) } diff --git a/multichain_test.go b/multichain_test.go index b0cc63f9..9813e5df 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -222,9 +222,9 @@ var _ = Describe("Multichain", func() { privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String randomRecipientAddr func() multichain.Address - initialise func(pack.String) multichain.AccountClient + initialise func(pack.String, multichain.Address) (multichain.AccountClient, pack.U256) txBuilder multichain.AccountTxBuilder - txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) + txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ { @@ -263,12 +263,18 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return recipient }, - func(rpcURL pack.String) multichain.AccountClient { + func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { client := terra.NewClient( terra.DefaultClientOptions(). WithHost(rpcURL), ) - return client + cosmossdk.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") + terraAddr, err := cosmossdk.AccAddressFromBech32(string(addr)) + Expect(err).NotTo(HaveOccurred()) + accountInfo, err := client.Account(terra.Address(terraAddr)) + Expect(err).NotTo(HaveOccurred()) + + return client, pack.NewU256FromU64(accountInfo.SequenceNumber) }, terra.NewTxBuilder(terra.TxBuilderOptions{ AccountNumber: pack.NewU64(1), @@ -276,13 +282,12 @@ var _ = Describe("Multichain", func() { CoinDenom: "uluna", Cdc: app.MakeCodec(), }), - func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) - nonce := pack.NewU256FromU64(0) gasLimit := pack.NewU256FromU64(pack.U64(300000)) gasPrice := pack.NewU256FromU64(pack.U64(300)) payload := pack.NewBytes([]byte("multichain")) - return amount, nonce, gasLimit, gasPrice, payload + return amount, gasLimit, gasPrice, payload }, multichain.Terra, }, @@ -332,7 +337,7 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return multichain.Address(pack.String(addr.String())) }, - func(rpcURL pack.String) multichain.AccountClient { + func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { // dirty hack to fetch auth token authToken := fetchAuthToken() client, err := filecoin.NewClient( @@ -341,16 +346,20 @@ var _ = Describe("Multichain", func() { WithAuthToken(authToken), ) Expect(err).NotTo(HaveOccurred()) - return client + filAddr, err := filaddress.NewFromString(string(addr)) + Expect(err).NotTo(HaveOccurred()) + accountInfo, err := client.Account(ctx, filAddr) + Expect(err).NotTo(HaveOccurred()) + + return client, pack.NewU256FromU64(accountInfo.Nonce) }, filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(149514))), - func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) - nonce := pack.NewU256FromU64(pack.NewU64(0)) gasLimit := pack.NewU256FromU64(pack.NewU64(495335)) gasPrice := pack.NewU256FromU64(pack.NewU64(149838)) payload := pack.Bytes(nil) - return amount, nonce, gasLimit, gasPrice, payload + return amount, gasLimit, gasPrice, payload }, multichain.Filecoin, }, @@ -362,17 +371,17 @@ var _ = Describe("Multichain", func() { Specify("build, broadcast and fetch tx", func() { // Load private key and the associated address. senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() - fmt.Printf("sender address = %v\n", senderAddr) // Get a random recipient address. recipientAddr := accountChain.randomRecipientAddr() - fmt.Printf("random recipient = %v\n", recipientAddr) - // Initialise the account chain's client. - accountClient := accountChain.initialise(accountChain.rpcURL) + // Initialise the account chain's client, and possibly get a nonce for + // the sender. + accountClient, nonce := accountChain.initialise(accountChain.rpcURL, senderAddr) // Build a transaction. - amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() + amount, gasLimit, gasPrice, payload := accountChain.txParams() + accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), recipientAddr, @@ -398,13 +407,9 @@ var _ = Describe("Multichain", func() { pack.NewBytes(senderPubKeyBytes), ) Expect(err).NotTo(HaveOccurred()) - ser, err := accountTx.Serialize() - Expect(err).NotTo(HaveOccurred()) - fmt.Printf("tx serialised = %v\n", ser) // Submit the transaction to the account chain. txHash := accountTx.Hash() - fmt.Printf("tx hash = %v\n", txHash) err = accountClient.SubmitTx(ctx, accountTx) Expect(err).NotTo(HaveOccurred()) From 90d2694c9b9c31bf1a7ed7a221b79c22d018404a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 00:06:21 +0530 Subject: [PATCH 102/335] pass env file to docker containers --- .github/workflows/test.yml | 21 ++++++++++++++------- infra/.ci-env | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 infra/.ci-env diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7601c8e9..de2562ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,19 +50,26 @@ jobs: golint ./... - name: Run multichain infrastructure (bitcoin) - run: docker run -d -p 18443:18443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoin + run: docker run -d -p 18443:18443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin - name: Run multichain infrastructure (bitcoincash) - run: docker run -d -p 19443:19443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoincash + run: docker run -d -p 19443:19443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash - name: Run multichain infrastructure (digibyte) - run: docker run -d -p 20443:20443 -h 0.0.0.0 rohitnarurkar/multichain_digibyte + run: docker run -d -p 20443:20443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - name: Run multichain infrastructure (dogecoin) - run: docker run -d -p 18332:18332 -h 0.0.0.0 rohitnarurkar/multichain_dogecoin + run: docker run -d -p 18332:18332 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin - name: Run multichain infrastructure (filecoin) - run: docker run -d -p 1234:1234 -h 0.0.0.0 rohitnarurkar/multichain_filecoin + run: docker run -d -p 1234:1234 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - name: Run multichain infrastructure (terra) - run: docker run -d -p 26657:26657 -h 0.0.0.0 rohitnarurkar/multichain_terra + run: docker run -d -p 26657:26657 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra - name: Run multichain infrastructure (zcash) - run: docker run -d -p 18232:18232 -h 0.0.0.0 rohitnarurkar/multichain_zcash + run: docker run -d -p 18232:18232 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master diff --git a/infra/.ci-env b/infra/.ci-env new file mode 100644 index 00000000..96cba816 --- /dev/null +++ b/infra/.ci-env @@ -0,0 +1,18 @@ +BINANCE_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" +BINANCE_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A +BITCOIN_PK=cUJCHRMSUwkcofsHjFWBELT3yEAejokdKhyTNv3DScodYWzztBae +BITCOIN_ADDRESS=mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4 +BITCOINCASH_PK=cSEohZFQLKuemNeBVrzwxniouUJJxdcx7Tm6HpspYuxraVjytieW +BITCOINCASH_ADDRESS=bchreg:qp6tejc0ghtjeejcxa97amzvxvzacjt4qczpy2n3gf +DIGIBYTE_PK=efbJxdzwR1tZD7KWYmKBhmxR6TNb25P9z29ajaoALhkn1LdNe7Ci +DIGIBYTE_ADDRESS=shb4rf33ozMX8rinHsC6GghrvvA8RKTyGb +DOGECOIN_PK=cRZnRgH2ztcJupCzkWbq2mjiT8PSFAmtYRYb1phg1vSRRcNBX4w4 +DOGECOIN_ADDRESS=n3PSSpR4zqUKWH4tcRjP9aTwJ4GmixQXmt +ETHEREUM_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" +ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A +FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d +FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa +TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 +TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u +ZCASH_PK=cNSVbbsAcBQ6BAmMr6yH6DLWr7QTDptHwdzpy4GYxGDkNZeKnczK +ZCASH_ADDRESS=tmCTReBSJEDMWfFCkXXPMSB3EfuPg6SE9dw From e9eff1d49345d0a34e8734ea5a83e1696c02a05e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 03:54:20 +0530 Subject: [PATCH 103/335] add gas API for Filecoin --- chain/filecoin/gas.go | 30 ++++++++++++++++++++++++++++++ chain/filecoin/gas_test.go | 1 + 2 files changed, 31 insertions(+) create mode 100644 chain/filecoin/gas.go create mode 100644 chain/filecoin/gas_test.go diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go new file mode 100644 index 00000000..5a244499 --- /dev/null +++ b/chain/filecoin/gas.go @@ -0,0 +1,30 @@ +package filecoin + +import ( + "context" + + "github.com/renproject/multichain/api/gas" + "github.com/renproject/pack" +) + +// A GasEstimator returns the gas-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// gas-per-byte. +type GasEstimator struct { + gasPerByte pack.U256 +} + +// NewGasEstimator returns a simple gas estimator that always returns the same +// amount of gas-per-byte. +func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { + return &GasEstimator{ + gasPerByte: gasPerByte, + } +} + +// EstimateGasPrice returns gas required per byte for Cosmos-compatible chains. +func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, error) { + return gasEstimator.gasPerByte, nil +} diff --git a/chain/filecoin/gas_test.go b/chain/filecoin/gas_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/gas_test.go @@ -0,0 +1 @@ +package filecoin_test From 1dc21a412e4b09b550f2d422329dbe7b5782aa68 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 04:03:46 +0530 Subject: [PATCH 104/335] use bytes to avoid underflow --- chain/filecoin/client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index aa27196e..956c3b8d 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -163,8 +163,14 @@ func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Acc return Account{}, fmt.Errorf("searching state for addr: %v", addr) } + balanceBytes, err := actor.Balance.Bytes() + if err != nil { + return Account{}, fmt.Errorf("extracting balance bytes: %v", err) + } + balance := big.NewInt(0).SetBytes(balanceBytes) + return Account{ - Balance: pack.NewU256FromInt(big.NewInt(actor.Balance.Int64())), + Balance: pack.NewU256FromInt(balance), Nonce: pack.NewU64(actor.Nonce), }, nil } From 4410a9055d7e50a0d93830f8318b690af39efe07 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 04:09:22 +0530 Subject: [PATCH 105/335] skip digibyte from build --- .github/workflows/test.yml | 35 +++++++++++++++---------------- multichain_test.go | 42 +++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de2562ff..13a96c27 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,12 +22,17 @@ jobs: key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - name: Install dependency packages - run: - sudo apt-get install mesa-opencl-icd ocl-icd-opencl-dev + run: | + apt-get update + apt-get install -y build-essential + apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env go get -u github.com/onsi/ginkgo/ginkgo go get -u github.com/onsi/gomega/... go get -u golang.org/x/lint/golint @@ -36,6 +41,7 @@ jobs: - name: Run vetting run: | + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi make cd $GITHUB_WORKSPACE @@ -50,26 +56,20 @@ jobs: golint ./... - name: Run multichain infrastructure (bitcoin) - run: docker run -d -p 18443:18443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin + run: docker run -d -p 18443:18443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin - name: Run multichain infrastructure (bitcoincash) - run: docker run -d -p 19443:19443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash - - name: Run multichain infrastructure (digibyte) - run: docker run -d -p 20443:20443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte + run: docker run -d -p 19443:19443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash + # Skip DigiByte. + # - name: Run multichain infrastructure (digibyte) + # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - name: Run multichain infrastructure (dogecoin) - run: docker run -d -p 18332:18332 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin + run: docker run -d -p 18332:18332 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin - name: Run multichain infrastructure (filecoin) - run: docker run -d -p 1234:1234 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin + run: docker run -d -p 1234:1234 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - name: Run multichain infrastructure (terra) - run: docker run -d -p 26657:26657 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra + run: docker run -d -p 26657:26657 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra - name: Run multichain infrastructure (zcash) - run: docker run -d -p 18232:18232 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash + run: docker run -d -p 18232:18232 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master @@ -90,7 +90,6 @@ jobs: covermerge \ chain/bitcoin.out \ chain/bitcoincash.out \ - chain/digibyte.out \ chain/dogecoin.out \ chain/ethereum.out \ chain/filecoin.out \ diff --git a/multichain_test.go b/multichain_test.go index 9813e5df..780a68bd 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -24,7 +24,7 @@ import ( "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" - "github.com/renproject/multichain/chain/digibyte" + // "github.com/renproject/multichain/chain/digibyte" "github.com/renproject/multichain/chain/dogecoin" "github.com/renproject/multichain/chain/filecoin" "github.com/renproject/multichain/chain/terra" @@ -488,26 +488,26 @@ var _ = Describe("Multichain", func() { bitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams), multichain.BitcoinCash, }, - { - "DIGIBYTE_PK", - func(pkh []byte) (btcutil.Address, error) { - addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) - return addr, err - }, - func(script []byte) (btcutil.Address, error) { - addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) - return addr, err - }, - pack.NewString("http://0.0.0.0:20443"), - func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { - client := digibyte.NewClient(digibyte.DefaultClientOptions()) - outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) - Expect(err).NotTo(HaveOccurred()) - return client, outputs, client.Confirmations - }, - digibyte.NewTxBuilder(&digibyte.RegressionNetParams), - multichain.DigiByte, - }, + // { + // "DIGIBYTE_PK", + // func(pkh []byte) (btcutil.Address, error) { + // addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) + // return addr, err + // }, + // func(script []byte) (btcutil.Address, error) { + // addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) + // return addr, err + // }, + // pack.NewString("http://0.0.0.0:20443"), + // func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + // client := digibyte.NewClient(digibyte.DefaultClientOptions()) + // outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + // Expect(err).NotTo(HaveOccurred()) + // return client, outputs, client.Confirmations + // }, + // digibyte.NewTxBuilder(&digibyte.RegressionNetParams), + // multichain.DigiByte, + // }, { "DOGECOIN_PK", func(pkh []byte) (btcutil.Address, error) { From 8e1c672a9870f331abcfb98f8722e5e134ba50fa Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 04:11:29 +0530 Subject: [PATCH 106/335] permission for package lock --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13a96c27..ffa30137 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,9 +23,9 @@ jobs: - name: Install dependency packages run: | - apt-get update - apt-get install -y build-essential - apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env From f379b16852776ed9c78dfa49e8c8c36676236579 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 16 Sep 2020 11:32:27 +1000 Subject: [PATCH 107/335] add testnet params for dogecoin --- chain/dogecoin/dogecoin.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/chain/dogecoin/dogecoin.go b/chain/dogecoin/dogecoin.go index 131c96a4..b1c66d9b 100644 --- a/chain/dogecoin/dogecoin.go +++ b/chain/dogecoin/dogecoin.go @@ -32,13 +32,32 @@ var MainNetParams = chaincfg.Params{ Bech32HRPSegwit: "doge", } +var TestNetParams = chaincfg.Params{ + Name: "testnet", + Net: 0xfcc1b7dc, + + // Address encoding magics + PubKeyHashAddrID: 113, + ScriptHashAddrID: 196, + PrivateKeyID: 241, + + // BIP32 hierarchical deterministic extended key magics + HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, // starts with xprv + HDPublicKeyID: [4]byte{0x04, 0x35, 0x87, 0xcf}, // starts with xpub + + // Human-readable part for Bech32 encoded segwit addresses, as defined in + // BIP 173. Dogecoin does not actually support this, but we do not want to + // collide with real addresses, so we specify it. + Bech32HRPSegwit: "doget", +} + var RegressionNetParams = chaincfg.Params{ Name: "regtest", // Dogecoin has 0xdab5bffa as RegTest (same as Bitcoin's RegTest). // Setting it to an arbitrary value (leet_hex(dogecoin)), so that we can // register the regtest network. - Net: 0xd063c017, + Net: 0xfabfb5da, // Address encoding magics PubKeyHashAddrID: 111, From b516b214c25ad10ba12613fcdd44b9457def4634 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 16 Sep 2020 11:34:28 +1000 Subject: [PATCH 108/335] register dogecoin testnet params --- chain/dogecoin/dogecoin.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chain/dogecoin/dogecoin.go b/chain/dogecoin/dogecoin.go index b1c66d9b..4f168c37 100644 --- a/chain/dogecoin/dogecoin.go +++ b/chain/dogecoin/dogecoin.go @@ -8,6 +8,9 @@ func init() { if err := chaincfg.Register(&MainNetParams); err != nil { panic(err) } + if err := chaincfg.Register(&TestNetParams); err != nil { + panic(err) + } if err := chaincfg.Register(&RegressionNetParams); err != nil { panic(err) } From b604feb0584baf09fc2d5fc4e7d221465dc65960 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 13:31:50 +0530 Subject: [PATCH 109/335] pass address args to run scripts --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ffa30137..13b047cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,20 +56,44 @@ jobs: golint ./... - name: Run multichain infrastructure (bitcoin) - run: docker run -d -p 18443:18443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 18443:18443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_bitcoin ./root/run.sh $BITCOIN_ADDRESS - name: Run multichain infrastructure (bitcoincash) - run: docker run -d -p 19443:19443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 19443:19443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_bitcoincash ./root/run.sh $BITCOINCASH_ADDRESS # Skip DigiByte. # - name: Run multichain infrastructure (digibyte) # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - name: Run multichain infrastructure (dogecoin) - run: docker run -d -p 18332:18332 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 18332:18332 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_dogecoin ./root/run.sh $DOGECOIN_ADDRESS - name: Run multichain infrastructure (filecoin) - run: docker run -d -p 1234:1234 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 1234:1234 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - name: Run multichain infrastructure (terra) - run: docker run -d -p 26657:26657 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 26657:26657 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_terra ./root/run.sh $TERRA_ADDRESS - name: Run multichain infrastructure (zcash) - run: docker run -d -p 18232:18232 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 18232:18232 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_zcash ./root/run.sh $ZCASH_ADDRESS - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master From 1c343989725349f3df4ae7deb42b4eb5efc5d4d6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 14:22:58 +0530 Subject: [PATCH 110/335] test arg passing to container --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13b047cf..2c0d7b66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,13 +60,13 @@ jobs: source $GITHUB_WORKSPACE/infra/.env docker run -d -p 18443:18443 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoin ./root/run.sh $BITCOIN_ADDRESS + rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS - name: Run multichain infrastructure (bitcoincash) run: | source $GITHUB_WORKSPACE/infra/.env docker run -d -p 19443:19443 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoincash ./root/run.sh $BITCOINCASH_ADDRESS + rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS # Skip DigiByte. # - name: Run multichain infrastructure (digibyte) # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte @@ -75,7 +75,7 @@ jobs: source $GITHUB_WORKSPACE/infra/.env docker run -d -p 18332:18332 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_dogecoin ./root/run.sh $DOGECOIN_ADDRESS + rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS - name: Run multichain infrastructure (filecoin) run: | source $GITHUB_WORKSPACE/infra/.env @@ -87,13 +87,13 @@ jobs: source $GITHUB_WORKSPACE/infra/.env docker run -d -p 26657:26657 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_terra ./root/run.sh $TERRA_ADDRESS + rohitnarurkar/multichain_terra $TERRA_ADDRESS - name: Run multichain infrastructure (zcash) run: | source $GITHUB_WORKSPACE/infra/.env docker run -d -p 18232:18232 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_zcash ./root/run.sh $ZCASH_ADDRESS + rohitnarurkar/multichain_zcash $ZCASH_ADDRESS - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master From 862be9ad4306fceaaa9d94c084389973b72e2473 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 15:10:05 +0530 Subject: [PATCH 111/335] test only the multichain test suite --- .github/workflows/test.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c0d7b66..2caf45bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,14 +110,4 @@ jobs: export PATH=$PATH:$(go env GOPATH)/bin source ./infra/.env cd $GITHUB_WORKSPACE - CI=true ginkgo --v --race --cover --coverprofile coverprofile.out ./... - covermerge \ - chain/bitcoin.out \ - chain/bitcoincash.out \ - chain/dogecoin.out \ - chain/ethereum.out \ - chain/filecoin.out \ - chain/terra.out \ - chain/zcash.out \ - coverprofile.out > coverprofile.out - goveralls -coverprofile=coverprofile.out -service=github + CI=true go test From ff26437948b9c7d438b2b6da71218a935b615d79 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 21 Sep 2020 00:59:05 +0530 Subject: [PATCH 112/335] check error code (filecoin) --- chain/filecoin/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 956c3b8d..3b03b89e 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -102,6 +102,9 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack if messageLookup == nil { return nil, pack.NewU64(0), fmt.Errorf("searching state for txid %v: not found", msgID) } + if messageLookup.Receipt.ExitCode.IsError() { + return nil, pack.NewU64(0), fmt.Errorf("transaction execution error: %v", messageLookup.Receipt.ExitCode.String()) + } // get the most recent tipset and its height headTipset, err := client.node.ChainHead(ctx) From c34bc9598d3eb6dbe686ea33a1f6b604c25b5b2a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 21 Sep 2020 15:50:50 +0530 Subject: [PATCH 113/335] (test) bitcoin cash address API --- chain/bitcoincash/address.go | 138 ++++++++++++++++++++++++++++-- chain/bitcoincash/address_test.go | 63 ++++++++++++++ chain/bitcoincash/utxo.go | 2 +- multichain_test.go | 43 ++++++++++ 4 files changed, 239 insertions(+), 7 deletions(-) diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index efcebd83..c33cf54e 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -7,7 +7,10 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + "github.com/btcsuite/btcutil/base58" "github.com/btcsuite/btcutil/bech32" + "github.com/renproject/multichain/api/address" + "github.com/renproject/pack" "golang.org/x/crypto/ripemd160" ) @@ -24,6 +27,129 @@ var ( }() ) +type AddressEncodeDecoder struct { + AddressEncoder + AddressDecoder +} + +func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { + return AddressEncodeDecoder{ + AddressEncoder: NewAddressEncoder(params), + AddressDecoder: NewAddressDecoder(params), + } +} + +type AddressEncoder struct { + params *chaincfg.Params +} + +func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { + return AddressEncoder{params: params} +} + +type AddressDecoder struct { + params *chaincfg.Params +} + +func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { + return AddressDecoder{params: params} +} + +func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + rawAddrBytes := []byte(rawAddr) + var encodedAddr string + var err error + + switch len(rawAddrBytes) - 1 { + case ripemd160.Size: // P2PKH or P2SH + switch rawAddrBytes[0] { + case 0: // P2PKH + encodedAddr, err = encodeAddress(0x00, rawAddrBytes[1:21], encoder.params) + case 8: // P2SH + encodedAddr, err = encodeAddress(8, rawAddrBytes[1:21], encoder.params) + default: + return address.Address(""), btcutil.ErrUnknownAddressType + } + default: + return encodeLegacyAddress(rawAddr, encoder.params) + } + + if err != nil { + return address.Address(""), fmt.Errorf("encode address: %v", err) + } + + return address.Address(pack.String(encodedAddr)), nil +} + +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + // Legacy address decoding + if legacyAddr, err := btcutil.DecodeAddress(string(addr), decoder.params); err == nil { + switch legacyAddr.(type) { + case *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash, *btcutil.AddressPubKey: + return decodeLegacyAddress(addr, decoder.params) + case *btcutil.AddressWitnessPubKeyHash, *btcutil.AddressWitnessScriptHash: + return nil, fmt.Errorf("unsuported segwit bitcoin address type %T", legacyAddr) + default: + return nil, fmt.Errorf("unsuported legacy bitcoin address type %T", legacyAddr) + } + } + + if addrParts := strings.Split(string(addr), ":"); len(addrParts) != 1 { + addr = address.Address(addrParts[1]) + } + + decoded := DecodeString(string(addr)) + if !VerifyChecksum(AddressPrefix(decoder.params), decoded) { + return nil, btcutil.ErrChecksumMismatch + } + + addrBytes, err := bech32.ConvertBits(decoded[:len(decoded)-8], 5, 8, false) + if err != nil { + return nil, err + } + + switch len(addrBytes) - 1 { + case ripemd160.Size: // P2PKH or P2SH + switch addrBytes[0] { + case 0, 8: // P2PKH or P2SH + return address.RawAddress(pack.NewBytes(addrBytes)), nil + default: + return nil, btcutil.ErrUnknownAddressType + } + default: + return nil, errors.New("decoded address is of unknown size") + } +} + +func encodeLegacyAddress(rawAddr address.RawAddress, params *chaincfg.Params) (address.Address, error) { + // Validate that the base58 address is in fact in correct format. + encodedAddr := base58.Encode([]byte(rawAddr)) + if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { + return address.Address(""), fmt.Errorf("address validation error: %v", err) + } + + return address.Address(encodedAddr), nil +} + +func decodeLegacyAddress(addr address.Address, params *chaincfg.Params) (address.RawAddress, error) { + // Decode the checksummed base58 format address. + decoded, ver, err := base58.CheckDecode(string(addr)) + if err != nil { + return nil, fmt.Errorf("base58 decoding error: %v", err) + } + if len(decoded) != 20 { + return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + } + + // Validate the address format. + switch ver { + case params.PubKeyHashAddrID, params.ScriptHashAddrID: + return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil + default: + return nil, fmt.Errorf("unknown address type") + } +} + // An Address represents a Bitcoin Cash address. type Address interface { btcutil.Address @@ -77,7 +203,7 @@ func (addr AddressPubKeyHash) String() string { // for how this method differs from String. func (addr AddressPubKeyHash) EncodeAddress() string { hash := *addr.AddressPubKeyHash.Hash160() - encoded, err := EncodeAddress(0x00, hash[:], addr.params) + encoded, err := encodeAddress(0x00, hash[:], addr.params) if err != nil { panic(fmt.Errorf("invalid address: %v", err)) } @@ -139,7 +265,7 @@ func (addr AddressScriptHash) String() string { // for how this method differs from String. func (addr AddressScriptHash) EncodeAddress() string { hash := *addr.AddressScriptHash.Hash160() - encoded, err := EncodeAddress(8, hash[:], addr.params) + encoded, err := encodeAddress(8, hash[:], addr.params) if err != nil { panic(fmt.Errorf("invalid address: %v", err)) } @@ -163,9 +289,9 @@ func (addr AddressScriptHash) BitcoinAddress() btcutil.Address { return addr.AddressScriptHash } -// EncodeAddress using Bitcoin Cash address encoding, assuming that the hash +// encodeAddress using Bitcoin Cash address encoding, assuming that the hash // data has no prefix or checksum. -func EncodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, error) { +func encodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, error) { if (len(hash)-20)/4 != int(version)%8 { return "", fmt.Errorf("invalid version: %d", version) } @@ -176,8 +302,8 @@ func EncodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, return EncodeToString(AppendChecksum(AddressPrefix(params), data)), nil } -// DecodeAddress implements the address.Decoder interface -func DecodeAddress(addr string, params *chaincfg.Params) (Address, error) { +// decodeAddress implements the address.Decoder interface +func decodeAddress(addr string, params *chaincfg.Params) (Address, error) { // Legacy address decoding if address, err := btcutil.DecodeAddress(addr, params); err == nil { switch address.(type) { diff --git a/chain/bitcoincash/address_test.go b/chain/bitcoincash/address_test.go index a834dd27..773eef4f 100644 --- a/chain/bitcoincash/address_test.go +++ b/chain/bitcoincash/address_test.go @@ -1 +1,64 @@ package bitcoincash_test + +import ( + "math/rand" + + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/id" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/bitcoincash" +) + +var _ = Describe("Bitcoin Cash Address", func() { + Context("address", func() { + addrEncodeDecoder := bitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + + It("addr pub key hash", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + + It("addr script hash", func() { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrScriptHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + + It("legacy addr", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + }) +}) diff --git a/chain/bitcoincash/utxo.go b/chain/bitcoincash/utxo.go index 2880be16..88842a33 100644 --- a/chain/bitcoincash/utxo.go +++ b/chain/bitcoincash/utxo.go @@ -83,7 +83,7 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := DecodeAddress(string(recipient.To), txBuilder.params) + addr, err := decodeAddress(string(recipient.To), txBuilder.params) if err != nil { return &Tx{}, err } diff --git a/multichain_test.go b/multichain_test.go index 780a68bd..55f22a36 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -165,6 +165,49 @@ var _ = Describe("Multichain", func() { return multichain.RawAddress([]byte{}) }, }, + { + multichain.BitcoinCash, + func() multichain.AddressEncodeDecoder { + addrEncodeDecoder := bitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + return addrEncodeDecoder + }, + func() multichain.Address { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrPubKeyHash.EncodeAddress()) + }, + func() multichain.RawAddress { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + + addrBytes := addrPubKeyHash.ScriptAddress() + addrBytes = append([]byte{0x00}, addrBytes...) + return multichain.RawAddress(pack.Bytes(addrBytes)) + }, + func() multichain.Address { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrScriptHash.EncodeAddress()) + }, + func() multichain.RawAddress { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + + addrBytes := addrScriptHash.ScriptAddress() + addrBytes = append([]byte{8}, addrBytes...) + return multichain.RawAddress(pack.Bytes(addrBytes)) + }, + }, } for _, chain := range chainTable { From fc9d0674879a33b786363e337944c2a33938d045 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 21 Sep 2020 16:44:35 +0530 Subject: [PATCH 114/335] (test) zcash address API --- chain/zcash/address.go | 103 +++++++++++++++++++++++++++++++++++- chain/zcash/address_test.go | 47 ++++++++++++++++ chain/zcash/utxo.go | 2 +- multichain_test.go | 37 +++++++++++++ 4 files changed, 186 insertions(+), 3 deletions(-) diff --git a/chain/zcash/address.go b/chain/zcash/address.go index c1ae2851..2ebb9909 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -4,13 +4,112 @@ import ( "bytes" "crypto/sha256" "errors" + "fmt" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" + "github.com/renproject/multichain/api/address" + "github.com/renproject/pack" "golang.org/x/crypto/ripemd160" ) +type AddressEncodeDecoder struct { + AddressEncoder + AddressDecoder +} + +type AddressEncoder struct { + params *Params +} + +type AddressDecoder struct { + params *Params +} + +func NewAddressEncoder(params *Params) AddressEncoder { + return AddressEncoder{params: params} +} + +func NewAddressDecoder(params *Params) AddressDecoder { + return AddressDecoder{params: params} +} + +func NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder { + return AddressEncodeDecoder{ + AddressEncoder: NewAddressEncoder(params), + AddressDecoder: NewAddressDecoder(params), + } +} + +func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + if len(rawAddr) != 26 && len(rawAddr) != 25 { + return address.Address(""), fmt.Errorf("address of unknown length") + } + + var addrType uint8 + var err error + var hash [20]byte + var prefix []byte + if len(rawAddr) == 26 { + prefix = rawAddr[:2] + addrType, _, err = parsePrefix(prefix) + copy(hash[:], rawAddr[2:22]) + } else { + prefix = rawAddr[:1] + addrType, _, err = parsePrefix(prefix) + copy(hash[:], rawAddr[1:21]) + } + if err != nil { + return address.Address(""), fmt.Errorf("parsing prefix: %v", err) + } + + switch addrType { + case 0, 1: // P2PKH or P2SH + return address.Address(pack.String(encodeAddress(hash[:], prefix))), nil + default: + return address.Address(""), errors.New("unknown address") + } +} + +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + var decoded = base58.Decode(string(addr)) + if len(decoded) != 26 && len(decoded) != 25 { + return nil, base58.ErrInvalidFormat + } + + var cksum [4]byte + copy(cksum[:], decoded[len(decoded)-4:]) + if checksum(decoded[:len(decoded)-4]) != cksum { + return nil, base58.ErrChecksum + } + + if len(decoded)-6 != ripemd160.Size && len(decoded)-5 != ripemd160.Size { + return nil, errors.New("incorrect payload len") + } + + var addrType uint8 + var err error + var hash [20]byte + if len(decoded) == 26 { + addrType, _, err = parsePrefix(decoded[:2]) + copy(hash[:], decoded[2:22]) + } else { + addrType, _, err = parsePrefix(decoded[:1]) + copy(hash[:], decoded[1:21]) + } + if err != nil { + return nil, err + } + + switch addrType { + case 0, 1: // P2PKH or P2SH + return address.RawAddress(pack.Bytes(decoded)), nil + default: + return nil, errors.New("unknown address") + } +} + // An Address represents a Zcash address. type Address interface { btcutil.Address @@ -122,9 +221,9 @@ func (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool { return addr.AddressScriptHash.IsForNet(params) } -// DecodeAddress decodes a string-representation of an address to an address +// decodeAddress decodes a string-representation of an address to an address // type that implements the zcash.Address interface -func DecodeAddress(addr string) (Address, error) { +func decodeAddress(addr string) (Address, error) { var decoded = base58.Decode(addr) if len(decoded) != 26 && len(decoded) != 25 { return nil, base58.ErrInvalidFormat diff --git a/chain/zcash/address_test.go b/chain/zcash/address_test.go index 38e5b45b..a547ebfe 100644 --- a/chain/zcash/address_test.go +++ b/chain/zcash/address_test.go @@ -1 +1,48 @@ package zcash_test + +import ( + "math/rand" + + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcutil" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/id" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/zcash" +) + +var _ = Describe("Zcash Address", func() { + Context("address", func() { + addrEncodeDecoder := zcash.NewAddressEncodeDecoder(&zcash.RegressionNetParams) + + It("addr pub key hash", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + + It("addr script hash", func() { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrScriptHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + }) +}) diff --git a/chain/zcash/utxo.go b/chain/zcash/utxo.go index ec852dd3..dc413340 100644 --- a/chain/zcash/utxo.go +++ b/chain/zcash/utxo.go @@ -78,7 +78,7 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := DecodeAddress(string(recipient.To)) + addr, err := decodeAddress(string(recipient.To)) if err != nil { return &Tx{}, err } diff --git a/multichain_test.go b/multichain_test.go index 55f22a36..3befc720 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -208,6 +208,43 @@ var _ = Describe("Multichain", func() { return multichain.RawAddress(pack.Bytes(addrBytes)) }, }, + { + multichain.Zcash, + func() multichain.AddressEncodeDecoder { + addrEncodeDecoder := zcash.NewAddressEncodeDecoder(&zcash.RegressionNetParams) + return addrEncodeDecoder + }, + func() multichain.Address { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrPubKeyHash.EncodeAddress()) + }, + func() multichain.RawAddress { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.RawAddress(pack.Bytes(base58.Decode(addrPubKeyHash.EncodeAddress()))) + }, + func() multichain.Address { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrScriptHash.EncodeAddress()) + }, + func() multichain.RawAddress { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.RawAddress(pack.Bytes(base58.Decode(addrScriptHash.EncodeAddress()))) + }, + }, } for _, chain := range chainTable { From 51652cc31aff1e9e6aff1f8d9eb79ec8767c3972 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 22 Sep 2020 18:03:56 +0530 Subject: [PATCH 115/335] (test) sending tx to P2SH address, spend using sigscript --- go.mod | 2 +- go.sum | 2 + multichain_test.go | 242 ++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 223 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 00b96f79..ec863d70 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/renproject/id v0.4.2 - github.com/renproject/pack v0.2.3 + github.com/renproject/pack v0.2.5 github.com/renproject/surge v1.2.6 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.4.0-rc.4 diff --git a/go.sum b/go.sum index 0800b00f..f286014a 100644 --- a/go.sum +++ b/go.sum @@ -1277,6 +1277,8 @@ github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= github.com/renproject/pack v0.2.3/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= +github.com/renproject/pack v0.2.5 h1:BNfam8PCb5qJuIX36IqOkcRgaZLOZsM1lZZSakbOxb4= +github.com/renproject/pack v0.2.5/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/renproject/surge v1.2.6 h1:4EV2jbBPvQM8Wnv5zL1N1X/UbaH6AZiRUv7r4xZ8ncA= diff --git a/multichain_test.go b/multichain_test.go index 3befc720..ae030876 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -15,6 +15,7 @@ import ( "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" cosmossdk "github.com/cosmos/cosmos-sdk/types" @@ -568,26 +569,6 @@ var _ = Describe("Multichain", func() { bitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams), multichain.BitcoinCash, }, - // { - // "DIGIBYTE_PK", - // func(pkh []byte) (btcutil.Address, error) { - // addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) - // return addr, err - // }, - // func(script []byte) (btcutil.Address, error) { - // addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) - // return addr, err - // }, - // pack.NewString("http://0.0.0.0:20443"), - // func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { - // client := digibyte.NewClient(digibyte.DefaultClientOptions()) - // outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) - // Expect(err).NotTo(HaveOccurred()) - // return client, outputs, client.Confirmations - // }, - // digibyte.NewTxBuilder(&digibyte.RegressionNetParams), - // multichain.DigiByte, - // }, { "DOGECOIN_PK", func(pkh []byte) (btcutil.Address, error) { @@ -628,12 +609,34 @@ var _ = Describe("Multichain", func() { zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), multichain.Zcash, }, + /* + { + "DIGIBYTE_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:20443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := digibyte.NewClient(digibyte.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + digibyte.NewTxBuilder(&digibyte.RegressionNetParams), + multichain.DigiByte, + }, + */ } for _, utxoChain := range utxoChainTable { utxoChain := utxoChain Context(fmt.Sprintf("%v", utxoChain.chain), func() { - Specify("build, broadcast and fetch tx", func() { + Specify("(P2PKH) build, broadcast and fetch tx", func() { // Load private key. pkEnv := os.Getenv(utxoChain.privKeyEnv) if pkEnv == "" { @@ -654,7 +657,14 @@ var _ = Describe("Multichain", func() { // function to query the number of block confirmations for a transaction. utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) Expect(len(unspentOutputs)).To(BeNumerically(">", 0)) - output := unspentOutputs[0] + var output multichain.UTXOutput + thresholdValue := pack.NewU256FromU64(pack.NewU64(2500)) + for _, unspentOutput := range unspentOutputs { + if unspentOutput.Value.GreaterThan(thresholdValue) { + output = unspentOutput + break + } + } // Build a transaction inputs := []multichain.UTXOInput{ @@ -720,11 +730,172 @@ var _ = Describe("Multichain", func() { Expect(err).ToNot(HaveOccurred()) Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) }) + + Specify("(P2SH) build, broadcast and fetch tx", func() { + // Load private key. + pkEnv := os.Getenv(utxoChain.privKeyEnv) + if pkEnv == "" { + panic(fmt.Sprintf("%v is undefined", utxoChain.privKeyEnv)) + } + wif, err := btcutil.DecodeWIF(pkEnv) + Expect(err).NotTo(HaveOccurred()) + + // Get the PKH address from the loaded private key. + pkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed())) + Expect(err).NotTo(HaveOccurred()) + + // Recipient + recipientPrivKey := id.NewPrivKey() + recipientPubKey := recipientPrivKey.PubKey() + recipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey) + Expect(err).NotTo(HaveOccurred()) + pubKey := pack.Bytes(((*btcec.PublicKey)(recipientPubKey)).SerializeCompressed()) + script, err := getScript(pubKey) + Expect(err).NotTo(HaveOccurred()) + pubKeyScript, err := getPubKeyScript(pubKey) + Expect(err).NotTo(HaveOccurred()) + recipientP2SH, err := utxoChain.newAddressSH(script) + Expect(err).NotTo(HaveOccurred()) + + // Initialise the UTXO client and fetch the unspent outputs. Also get a + // function to query the number of block confirmations for a transaction. + utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) + Expect(len(unspentOutputs)).To(BeNumerically(">", 0)) + var output multichain.UTXOutput + thresholdValue := pack.NewU256FromU64(pack.NewU64(2500)) + for _, unspentOutput := range unspentOutputs { + if unspentOutput.Value.GreaterThan(thresholdValue) { + output = unspentOutput + break + } + } + + // Build a transaction + inputs := []multichain.UTXOInput{ + {Output: multichain.UTXOutput{ + Outpoint: multichain.UTXOutpoint{ + Hash: output.Outpoint.Hash[:], + Index: output.Outpoint.Index, + }, + PubKeyScript: output.PubKeyScript, + Value: output.Value, + }}, + } + recipients := []multichain.UTXORecipient{ + { + To: multichain.Address(recipientP2SH.EncodeAddress()), + Value: output.Value.Sub(pack.NewU256FromU64(pack.U64(500))), + }, + } + utxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients) + Expect(err).NotTo(HaveOccurred()) + + // Get the sighashes that need to be signed, and sign them. + sighashes, err := utxoTx.Sighashes() + signatures := make([]pack.Bytes65, len(sighashes)) + Expect(err).ToNot(HaveOccurred()) + for i := range sighashes { + hash := id.Hash(sighashes[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures[i] = pack.NewBytes65(signature) + } + Expect(utxoTx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + + // Submit the signed transaction to the UTXO chain's node. + txHash, err := utxoTx.Hash() + Expect(err).ToNot(HaveOccurred()) + err = utxoClient.SubmitTx(ctx, utxoTx) + Expect(err).ToNot(HaveOccurred()) + logger.Debug("[P2KH -> P2SH] submit tx", zap.String("from", pkhAddr.EncodeAddress()), zap.String("to", recipientP2SH.EncodeAddress()), zap.String("txHash", string(txHashToHex(txHash)))) + + // Check confirmations after waiting for the transaction to be in the + // mempool. + time.Sleep(time.Second) + + for { + // Loop until the transaction has at least a few + // confirmations. + confs, err := confsFn(ctx, txHash) + Expect(err).ToNot(HaveOccurred()) + logger.Debug(fmt.Sprintf("[%v] confirming", utxoChain.chain), zap.Uint64("current", uint64(confs))) + if confs >= 1 { + break + } + time.Sleep(10 * time.Second) + } + + // Load the output and verify that it is equal to the original output. + output2, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ + Hash: txHash, + Index: pack.NewU32(0), + }) + Expect(err).ToNot(HaveOccurred()) + Expect(output2.PubKeyScript.Equal(pubKeyScript)).To(BeTrue()) + + // Validate that the output2 is spendable + sigScript, err := getScript(pubKey) + Expect(err).NotTo(HaveOccurred()) + inputs2 := []multichain.UTXOInput{{ + Output: output2, + SigScript: sigScript, + }} + recipients2 := []multichain.UTXORecipient{{ + To: multichain.Address(pkhAddr.EncodeAddress()), + Value: output2.Value.Sub(pack.NewU256FromU64(pack.U64(500))), + }} + utxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + + // Get the sighashes that need to be signed, and sign them. + sighashes2, err := utxoTx2.Sighashes() + signatures2 := make([]pack.Bytes65, len(sighashes2)) + Expect(err).ToNot(HaveOccurred()) + for i := range sighashes2 { + hash := id.Hash(sighashes2[i]) + signature, err := recipientPrivKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures2[i] = pack.NewBytes65(signature) + } + Expect(utxoTx2.Sign(signatures2, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed()) + + // Submit the signed transaction to the UTXO chain's node. + txHash2, err := utxoTx2.Hash() + Expect(err).ToNot(HaveOccurred()) + err = utxoClient.SubmitTx(ctx, utxoTx2) + Expect(err).ToNot(HaveOccurred()) + logger.Debug("[P2SH -> P2KH] submit tx", zap.String("from", recipientP2SH.EncodeAddress()), zap.String("to", pkhAddr.EncodeAddress()), zap.String("txHash", string(txHashToHex(txHash2)))) + + for { + // Loop until the transaction has at least a few + // confirmations. + confs, err := confsFn(ctx, txHash2) + Expect(err).ToNot(HaveOccurred()) + logger.Debug(fmt.Sprintf("[%v] confirming", utxoChain.chain), zap.Uint64("current", uint64(confs))) + if confs >= 1 { + break + } + time.Sleep(10 * time.Second) + } + }) }) } }) }) +func txHashToHex(txHash pack.Bytes) pack.String { + // bitcoin's msgTx is a byte-reversed hash + // https://github.com/btcsuite/btcd/blob/master/chaincfg/chainhash/hash.go#L27-L28 + txHashCopy := make([]byte, len(txHash)) + copy(txHashCopy[:], txHash) + hashSize := len(txHashCopy) + for i := 0; i < hashSize/2; i++ { + txHashCopy[i], txHashCopy[hashSize-1-i] = txHashCopy[hashSize-1-i], txHashCopy[i] + } + return pack.String(hex.EncodeToString(txHashCopy)) +} + func fetchAuthToken() pack.String { // fetch the auth token from filecoin's running docker container cmd := exec.Command("docker", "exec", "infra_filecoin_1", "/bin/bash", "-c", "/app/lotus auth api-info --perm admin") @@ -741,3 +912,30 @@ func fetchAuthToken() pack.String { authToken := strings.Split(tokenWithSuffix, ":/") return pack.NewString(fmt.Sprintf("Bearer %s", authToken[0])) } + +func getScript(pubKey pack.Bytes) (pack.Bytes, error) { + pubKeyHash160 := btcutil.Hash160(pubKey) + return txscript.NewScriptBuilder(). + AddOp(txscript.OP_DUP). + AddOp(txscript.OP_HASH160). + AddData(pubKeyHash160). + AddOp(txscript.OP_EQUALVERIFY). + AddOp(txscript.OP_CHECKSIG). + Script() +} + +func getPubKeyScript(pubKey pack.Bytes) (pack.Bytes, error) { + script, err := getScript(pubKey) + if err != nil { + return nil, fmt.Errorf("invalid script: %v", err) + } + pubKeyScript, err := txscript.NewScriptBuilder(). + AddOp(txscript.OP_HASH160). + AddData(btcutil.Hash160(script)). + AddOp(txscript.OP_EQUAL). + Script() + if err != nil { + return nil, fmt.Errorf("invalid pubkeyscript: %v", err) + } + return pubKeyScript, nil +} From 93db362278fbd3ccfcbb70104500a557efde2f07 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 22 Sep 2020 19:17:30 +0530 Subject: [PATCH 116/335] gas params for filecoin --- multichain_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index ae030876..18cf01f9 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -434,11 +434,11 @@ var _ = Describe("Multichain", func() { return client, pack.NewU256FromU64(accountInfo.Nonce) }, - filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(149514))), + filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))), func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) - gasLimit := pack.NewU256FromU64(pack.NewU64(495335)) - gasPrice := pack.NewU256FromU64(pack.NewU64(149838)) + gasLimit := pack.NewU256FromU64(pack.NewU64(2189560)) + gasPrice := pack.NewU256FromU64(pack.NewU64(186893)) payload := pack.Bytes(nil) return amount, gasLimit, gasPrice, payload }, @@ -493,6 +493,7 @@ var _ = Describe("Multichain", func() { txHash := accountTx.Hash() err = accountClient.SubmitTx(ctx, accountTx) Expect(err).NotTo(HaveOccurred()) + logger.Debug("submit tx", zap.String("from", string(senderAddr)), zap.String("to", string(recipientAddr)), zap.Any("txHash", txHash)) // Wait slightly before we query the chain's node. time.Sleep(time.Second) From 7cf77506f9f937c7c5905ac3989c0639253f4c06 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 11:54:57 +0530 Subject: [PATCH 117/335] add luna and terra to chain types --- multichain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multichain.go b/multichain.go index 4027570d..30b86e6f 100644 --- a/multichain.go +++ b/multichain.go @@ -151,7 +151,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case BNB, ETH, FIL: + case BNB, ETH, FIL, LUNA: return ChainTypeAccountBased default: return ChainType("") @@ -220,7 +220,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Filecoin: + case BinanceSmartChain, Ethereum, Filecoin, Terra: return ChainTypeAccountBased default: return ChainType("") From f1768ca491c7f0c31110c1eed83c82a31479fc6b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 13:17:15 +0530 Subject: [PATCH 118/335] add AccountInfo to account client API --- api/account/account.go | 15 ++++++++++++++ chain/cosmos/client.go | 43 +++++++++++++++++++++++++++++----------- chain/filecoin/client.go | 33 ++++++++++++++++++++++-------- multichain_test.go | 27 ++++++++++--------------- 4 files changed, 82 insertions(+), 36 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 858b6753..48e3bc87 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -59,9 +59,24 @@ type TxBuilder interface { BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } +// The AccountInfo interface defines functionality that must expose account +// specific information for the underlying chain. +type AccountInfo interface { + // Nonce is the current nonce of this account, which must be used to build a + // new transaction. + Nonce() pack.U256 + + // Balance is the native token balance of this account. + Balance() pack.U256 +} + // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { + // Account queries the chain for an address. It returns the address' + // information, which contains the nonce and balance fields. + AccountInfo(context.Context, address.Address) (AccountInfo, error) + // Tx returns the transaction uniquely identified by the given transaction // hash. It also returns the number of confirmations for the transaction. If // the transaction cannot be found before the context is done, or the diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index d3be3ece..8609d843 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -7,10 +7,12 @@ import ( "time" "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" "github.com/renproject/pack" cliContext "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" rpchttp "github.com/tendermint/tendermint/rpc/client/http" @@ -121,25 +123,42 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // Account contains necessary info for sdk.Account type Account struct { - Address Address `json:"address"` - AccountNumber pack.U64 `json:"account_number"` - SequenceNumber pack.U64 `json:"sequence_number"` - Coins Coins `json:"coins"` + address Address + accountNumber pack.U64 + sequenceNumber pack.U64 + coins Coins } -// Account query account with address. This method is not a part of the +// Nonce returns the current nonce of the account. This is the nonce to be used +// while building a new transaction. +func (account Account) Nonce() pack.U256 { + return pack.NewU256FromU64(account.sequenceNumber) +} + +// Balance returns the native-token balance of the account. +func (account Account) Balance() pack.U256 { + // FIXME + return pack.NewU256FromU64(pack.NewU64(0)) +} + +// AccountInfo query account with address. This method is not a part of the // multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) Account(addr Address) (Account, error) { +func (client *Client) AccountInfo(_ context.Context, addr address.Address) (account.AccountInfo, error) { + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) + if err != nil { + return nil, fmt.Errorf("bad address: '%v': %v", addr, err) + } + accGetter := auth.NewAccountRetriever(client.cliCtx) - acc, err := accGetter.GetAccount(addr.AccAddress()) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) if err != nil { return Account{}, err } - return Account{ - Address: addr, - AccountNumber: pack.U64(acc.GetAccountNumber()), - SequenceNumber: pack.U64(acc.GetSequence()), - Coins: parseCoins(acc.GetCoins()), + return &Account{ + address: Address(cosmosAddr), + accountNumber: pack.U64(acc.GetAccountNumber()), + sequenceNumber: pack.U64(acc.GetSequence()), + coins: parseCoins(acc.GetCoins()), }, nil } diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 3b03b89e..7a3b00cc 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/ipfs/go-cid" "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" "github.com/renproject/pack" ) @@ -154,14 +155,30 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // Account contains necessary info for sdk.Account type Account struct { - Balance pack.U256 - Nonce pack.U64 + balance pack.U256 + nonce pack.U64 } -// Account query account with address. This method is not a part of the +// Nonce returns the current nonce of the account. This is the nonce to be used +// while building a new transaction. +func (account Account) Nonce() pack.U256 { + return pack.NewU256FromU64(account.nonce) +} + +// Balance returns the native-token balance of the account. +func (account Account) Balance() pack.U256 { + return account.balance +} + +// AccountInfo query account with address. This method is not a part of the // multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Account, error) { - actor, err := client.node.StateGetActor(ctx, addr, types.NewTipSetKey(cid.Undef)) +func (client *Client) AccountInfo(ctx context.Context, addr address.Address) (account.AccountInfo, error) { + filAddr, err := filaddress.NewFromString(string(addr)) + if err != nil { + return nil, fmt.Errorf("bad address '%v': %v", addr, err) + } + + actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef)) if err != nil { return Account{}, fmt.Errorf("searching state for addr: %v", addr) } @@ -172,8 +189,8 @@ func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Acc } balance := big.NewInt(0).SetBytes(balanceBytes) - return Account{ - Balance: pack.NewU256FromInt(balance), - Nonce: pack.NewU64(actor.Nonce), + return &Account{ + balance: pack.NewU256FromInt(balance), + nonce: pack.NewU64(actor.Nonce), }, nil } diff --git a/multichain_test.go b/multichain_test.go index 18cf01f9..38123f98 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -303,7 +303,7 @@ var _ = Describe("Multichain", func() { privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String randomRecipientAddr func() multichain.Address - initialise func(pack.String, multichain.Address) (multichain.AccountClient, pack.U256) + initialise func(pack.String) multichain.AccountClient txBuilder multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain @@ -344,18 +344,13 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return recipient }, - func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { + func(rpcURL pack.String) multichain.AccountClient { client := terra.NewClient( terra.DefaultClientOptions(). WithHost(rpcURL), ) - cosmossdk.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") - terraAddr, err := cosmossdk.AccAddressFromBech32(string(addr)) - Expect(err).NotTo(HaveOccurred()) - accountInfo, err := client.Account(terra.Address(terraAddr)) - Expect(err).NotTo(HaveOccurred()) - return client, pack.NewU256FromU64(accountInfo.SequenceNumber) + return client }, terra.NewTxBuilder(terra.TxBuilderOptions{ AccountNumber: pack.NewU64(1), @@ -418,7 +413,7 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return multichain.Address(pack.String(addr.String())) }, - func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { + func(rpcURL pack.String) multichain.AccountClient { // dirty hack to fetch auth token authToken := fetchAuthToken() client, err := filecoin.NewClient( @@ -427,12 +422,8 @@ var _ = Describe("Multichain", func() { WithAuthToken(authToken), ) Expect(err).NotTo(HaveOccurred()) - filAddr, err := filaddress.NewFromString(string(addr)) - Expect(err).NotTo(HaveOccurred()) - accountInfo, err := client.Account(ctx, filAddr) - Expect(err).NotTo(HaveOccurred()) - return client, pack.NewU256FromU64(accountInfo.Nonce) + return client }, filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))), func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { @@ -458,7 +449,11 @@ var _ = Describe("Multichain", func() { // Initialise the account chain's client, and possibly get a nonce for // the sender. - accountClient, nonce := accountChain.initialise(accountChain.rpcURL, senderAddr) + accountClient := accountChain.initialise(accountChain.rpcURL) + + // Get the appropriate nonce for sender. + accountInfo, err := accountClient.AccountInfo(ctx, senderAddr) + Expect(err).NotTo(HaveOccurred()) // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() @@ -466,7 +461,7 @@ var _ = Describe("Multichain", func() { accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), recipientAddr, - amount, nonce, gasLimit, gasPrice, + amount, accountInfo.Nonce(), gasLimit, gasPrice, payload, ) Expect(err).NotTo(HaveOccurred()) From 42bb7f0dff50cfec80f17b9dd04dadb9d8ee002d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 17:33:17 +0530 Subject: [PATCH 119/335] attach tx nonce to fetched tx --- chain/cosmos/client.go | 17 +++++++++++++++++ chain/terra/terra_test.go | 22 +++++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 8609d843..64bb3f44 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -65,6 +65,7 @@ func (opts ClientOptions) WithHost(host pack.String) ClientOptions { type Client struct { opts ClientOptions cliCtx cliContext.CLIContext + cdc *codec.Codec } // NewClient returns a new Client. @@ -79,6 +80,7 @@ func NewClient(opts ClientOptions, cdc *codec.Codec) *Client { return &Client{ opts: opts, cliCtx: cliCtx, + cdc: cdc, } } @@ -99,6 +101,21 @@ func (client *Client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pa return &StdTx{}, pack.NewU64(0), fmt.Errorf("parse tx failed: %v", err) } + // Construct a past context (just before the transaction's height) and query + // the sender account to know the nonce (sequence number) with which this + // transaction was broadcasted. + senderAddr, err := types.AccAddressFromBech32(string(stdTx.From())) + if err != nil { + return &StdTx{}, pack.NewU64(0), fmt.Errorf("bad address '%v': %v", stdTx.From(), err) + } + pastContext := client.cliCtx.WithHeight(res.Height - 1) + accGetter := auth.NewAccountRetriever(pastContext) + acc, err := accGetter.GetAccount(senderAddr) + if err != nil { + return &StdTx{}, pack.NewU64(0), fmt.Errorf("account query failed: %v", err) + } + stdTx.signMsg.Sequence = acc.GetSequence() + return &stdTx, pack.NewU64(1), nil } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 00b58756..a05ab170 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -55,6 +55,9 @@ var _ = Describe("Terra", func() { // instantiate a new client client := terra.NewClient(terra.DefaultClientOptions()) + accountInfo, err := client.AccountInfo(ctx, multichain.Address(addr.String())) + Expect(err).NotTo(HaveOccurred()) + nonce := accountInfo.Nonce() // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ @@ -66,14 +69,15 @@ var _ = Describe("Terra", func() { // build the transaction payload := pack.NewBytes([]byte("multichain")) + amount := pack.NewU256FromU64(pack.U64(2000000)) tx, err := txBuilder.BuildTx( - multichain.Address(addr.String()), // from - recipient, // to - pack.NewU256FromU64(pack.U64(2000000)), // amount - pack.NewU256FromU64(0), // nonce - pack.NewU256FromU64(pack.U64(300000)), // gas - pack.NewU256FromU64(pack.U64(300)), // fee - payload, // memo + multichain.Address(addr.String()), // from + recipient, // to + amount, // amount + nonce, // nonce + pack.NewU256FromU64(pack.U64(300000)), // gas + pack.NewU256FromU64(pack.U64(300)), // fee + payload, // memo ) Expect(err).NotTo(HaveOccurred()) @@ -112,6 +116,10 @@ var _ = Describe("Terra", func() { if err == nil { Expect(confs.Uint64()).To(Equal(uint64(1))) Expect(foundTx.Payload()).To(Equal(multichain.ContractCallData([]byte(payload.String())))) + Expect(foundTx.Nonce()).To(Equal(nonce)) + Expect(foundTx.From()).To(Equal(multichain.Address(addr.String()))) + Expect(foundTx.To()).To(Equal(recipient)) + Expect(foundTx.Value()).To(Equal(amount)) break } From 35600f8c41ad512249df349ca641c1000a6688df Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 12:15:54 +0000 Subject: [PATCH 120/335] add nonce+amount check in multichain test suite --- go.sum | 2 ++ multichain_test.go | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/go.sum b/go.sum index f286014a..55222813 100644 --- a/go.sum +++ b/go.sum @@ -356,6 +356,7 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -459,6 +460,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= diff --git a/multichain_test.go b/multichain_test.go index 38123f98..fb8e1e3c 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -454,6 +454,7 @@ var _ = Describe("Multichain", func() { // Get the appropriate nonce for sender. accountInfo, err := accountClient.AccountInfo(ctx, senderAddr) Expect(err).NotTo(HaveOccurred()) + nonce := accountInfo.Nonce() // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() @@ -461,7 +462,7 @@ var _ = Describe("Multichain", func() { accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), recipientAddr, - amount, accountInfo.Nonce(), gasLimit, gasPrice, + amount, nonce, gasLimit, gasPrice, payload, ) Expect(err).NotTo(HaveOccurred()) @@ -501,6 +502,8 @@ var _ = Describe("Multichain", func() { Expect(tx.Value()).To(Equal(amount)) Expect(tx.From()).To(Equal(senderAddr)) Expect(tx.To()).To(Equal(recipientAddr)) + Expect(tx.Nonce()).To(Equal(nonce)) + Expect(tx.Value()).To(Equal(amount)) break } From 0f313aab8c09d11fbe0599dc2134fa502e02c1bf Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 15:14:47 +0000 Subject: [PATCH 121/335] cosmos gas fee calculation and arguments for tests | terra pk and addr --- chain/cosmos/tx.go | 2 +- chain/terra/terra_test.go | 4 ++-- infra/.env | 6 ++++++ infra/docker-compose.yaml | 1 + infra/terra/run.sh | 3 +++ multichain_test.go | 4 ++-- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 5d3ccbac..fac95050 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -74,7 +74,7 @@ func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimi fees := Coins{Coin{ Denom: builder.coinDenom, - Amount: pack.NewU64(gasPrice.Int().Uint64()), + Amount: pack.NewU64(gasPrice.Mul(gasLimit).Int().Uint64()), }} txBuilder := auth.NewTxBuilder( diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index a05ab170..f16c8fb1 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -75,8 +75,8 @@ var _ = Describe("Terra", func() { recipient, // to amount, // amount nonce, // nonce - pack.NewU256FromU64(pack.U64(300000)), // gas - pack.NewU256FromU64(pack.U64(300)), // fee + pack.NewU256FromU64(pack.U64(200000)), // gas + pack.NewU256FromU64(pack.U64(1)), // gas price payload, // memo ) Expect(err).NotTo(HaveOccurred()) diff --git a/infra/.env b/infra/.env index 2a3da981..dee98085 100644 --- a/infra/.env +++ b/infra/.env @@ -1,3 +1,8 @@ +# +# RenVM's deterministic private key for test purposes +# +export RENVM_PK=8d00ff6a38267c5ecda940dc8a64948bde5a2fdc2a609041f2fdb1605f8794f6 + # # Binance Smart Chain # @@ -67,6 +72,7 @@ export FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa # suite access to plenty of testing funds. export TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 export TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u +export RENVM_TERRA_ADDRESS=terra1mclmytf3657uzw0cj3hcmu98vpj4t9ekdks6tc # # Zcash diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index fd515594..cfe3b421 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -147,3 +147,4 @@ services: entrypoint: - "./root/run.sh" - "${TERRA_ADDRESS}" + - "${RENVM_TERRA_ADDRESS}" diff --git a/infra/terra/run.sh b/infra/terra/run.sh index 8ab37ead..e11417d3 100644 --- a/infra/terra/run.sh +++ b/infra/terra/run.sh @@ -1,8 +1,10 @@ #!/bin/bash ADDRESS=$1 +ADDRESS_2=$2 # Print setup echo "TERRA_ADDRESS=$ADDRESS" +echo "RENVM_TERRA_ADDRESS=$ADDRESS_2" # Register client key terracli keys add validator --keyring-backend=test @@ -12,6 +14,7 @@ echo $(terracli keys show validator) terrad init testnet --chain-id testnet terrad add-genesis-account $(terracli keys show validator -a --keyring-backend=test) 10000000000uluna terrad add-genesis-account $ADDRESS 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt +terrad add-genesis-account $ADDRESS_2 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt terrad gentx --amount 10000000000uluna --name validator --keyring-backend=test terrad collect-gentxs diff --git a/multichain_test.go b/multichain_test.go index fb8e1e3c..5859287b 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -360,8 +360,8 @@ var _ = Describe("Multichain", func() { }), func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) - gasLimit := pack.NewU256FromU64(pack.U64(300000)) - gasPrice := pack.NewU256FromU64(pack.U64(300)) + gasLimit := pack.NewU256FromU64(pack.U64(100000)) + gasPrice := pack.NewU256FromU64(pack.U64(1)) payload := pack.NewBytes([]byte("multichain")) return amount, gasLimit, gasPrice, payload }, From aaab23fe3dc39f088be09edf9e3d81b1fe92cc54 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 24 Sep 2020 13:27:42 +0530 Subject: [PATCH 122/335] test that UTXOs cannot be spent by invalid address --- multichain_test.go | 106 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 6 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 5859287b..8f5099b4 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -648,10 +648,18 @@ var _ = Describe("Multichain", func() { pkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed())) Expect(err).NotTo(HaveOccurred()) - // Recipient + // Recipient 1 pkhAddrUncompressed, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed())) Expect(err).ToNot(HaveOccurred()) + // Recipient 2 + recipientPrivKey := id.NewPrivKey() + recipientPubKey := recipientPrivKey.PubKey() + recipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey) + Expect(err).NotTo(HaveOccurred()) + recipientPkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(((*btcec.PublicKey)(recipientPubKey)).SerializeCompressed())) + Expect(err).NotTo(HaveOccurred()) + // Initialise the UTXO client and fetch the unspent outputs. Also get a // function to query the number of block confirmations for a transaction. utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) @@ -676,14 +684,16 @@ var _ = Describe("Multichain", func() { Value: output.Value, }}, } + utxoValue1 := pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 4)) + utxoValue2 := pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) * 3 / 4)) recipients := []multichain.UTXORecipient{ { - To: multichain.Address(pkhAddr.EncodeAddress()), - Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + To: multichain.Address(pkhAddrUncompressed.EncodeAddress()), + Value: utxoValue1, }, { - To: multichain.Address(pkhAddrUncompressed.EncodeAddress()), - Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + To: multichain.Address(recipientPkhAddr.EncodeAddress()), + Value: utxoValue2, }, } utxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients) @@ -728,6 +738,65 @@ var _ = Describe("Multichain", func() { output2, _, err := utxoClient.Output(ctx, output.Outpoint) Expect(err).ToNot(HaveOccurred()) Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) + + // Load the first output and verify the value. + output3, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ + Hash: txHash, + Index: pack.NewU32(0), + }) + Expect(err).ToNot(HaveOccurred()) + Expect(output3.Value).To(Equal(utxoValue1)) + + // Load the second output and verify the value. + output4, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ + Hash: txHash, + Index: pack.NewU32(1), + }) + Expect(err).ToNot(HaveOccurred()) + Expect(output4.Value).To(Equal(utxoValue2)) + + // Construct UTXO to be signed by invalid key. This UTXO should fail + // when submitted to the network, since the signer doesn't have the + // right to spend it. + // We submit the invalid signed UTXO (which should fail), and wait + // for a maximum of 5 seconds. + inputs2 := []multichain.UTXOInput{{ + Output: output4, + }} + recipients2 := []multichain.UTXORecipient{{ + To: multichain.Address(pkhAddr.EncodeAddress()), + Value: output4.Value.Sub(pack.NewU256FromU64(pack.U64(500))), + }} + utxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + sighashes2, err := utxoTx2.Sighashes() + signatures2 := make([]pack.Bytes65, len(sighashes2)) + for i := range sighashes2 { + hash := id.Hash(sighashes2[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures2[i] = pack.NewBytes65(signature) + } + Expect(utxoTx2.Sign(signatures2, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + failingCtx, failingCancelFn := context.WithTimeout(ctx, 5*time.Second) + Expect(utxoClient.SubmitTx(failingCtx, utxoTx2)).To(HaveOccurred()) + failingCancelFn() + + // Try to spend UTXO from valid key. We should be able to successfully + // submit the signed UTXO to the network. + utxoTx3, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + sighashes3, err := utxoTx3.Sighashes() + signatures3 := make([]pack.Bytes65, len(sighashes3)) + for i := range sighashes3 { + hash := id.Hash(sighashes3[i]) + signature, err := recipientPrivKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures3[i] = pack.NewBytes65(signature) + } + Expect(utxoTx3.Sign(signatures3, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed()) + Expect(utxoClient.SubmitTx(ctx, utxoTx3)).NotTo(HaveOccurred()) }) Specify("(P2SH) build, broadcast and fetch tx", func() { @@ -825,7 +894,8 @@ var _ = Describe("Multichain", func() { time.Sleep(10 * time.Second) } - // Load the output and verify that it is equal to the original output. + // Load the output and verify that the pub key script is as calculated + // initially. output2, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ Hash: txHash, Index: pack.NewU32(0), @@ -847,9 +917,16 @@ var _ = Describe("Multichain", func() { utxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) Expect(err).NotTo(HaveOccurred()) + // Create another transaction using the same inputs, which we will + // sign with the original user's address. Validate that none other + // than the recipient's signature can spend this UTXO. + utxoTx3, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + // Get the sighashes that need to be signed, and sign them. sighashes2, err := utxoTx2.Sighashes() signatures2 := make([]pack.Bytes65, len(sighashes2)) + signatures3 := make([]pack.Bytes65, len(sighashes2)) Expect(err).ToNot(HaveOccurred()) for i := range sighashes2 { hash := id.Hash(sighashes2[i]) @@ -857,7 +934,20 @@ var _ = Describe("Multichain", func() { Expect(err).ToNot(HaveOccurred()) signatures2[i] = pack.NewBytes65(signature) } + for i := range sighashes2 { + hash := id.Hash(sighashes2[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures3[i] = pack.NewBytes65(signature) + } Expect(utxoTx2.Sign(signatures2, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed()) + Expect(utxoTx3.Sign(signatures3, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + + // Try to submit tx signed by invalid spender. This should fail since + failingCtx, failingCancelFn := context.WithTimeout(ctx, 5*time.Second) + Expect(utxoClient.SubmitTx(failingCtx, utxoTx3)).To(HaveOccurred()) + failingCancelFn() // Submit the signed transaction to the UTXO chain's node. txHash2, err := utxoTx2.Hash() @@ -866,6 +956,10 @@ var _ = Describe("Multichain", func() { Expect(err).ToNot(HaveOccurred()) logger.Debug("[P2SH -> P2KH] submit tx", zap.String("from", recipientP2SH.EncodeAddress()), zap.String("to", pkhAddr.EncodeAddress()), zap.String("txHash", string(txHashToHex(txHash2)))) + // Check confirmations after waiting for the transaction to be in the + // mempool. + time.Sleep(time.Second) + for { // Loop until the transaction has at least a few // confirmations. From 18e23ba52b685aacad4e79ab2cac5de8d2fb12c8 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 11:48:50 +1000 Subject: [PATCH 123/335] chain/cosmos: expose account number method on client --- chain/cosmos/client.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 64bb3f44..f3ee349e 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -179,3 +179,19 @@ func (client *Client) AccountInfo(_ context.Context, addr address.Address) (acco coins: parseCoins(acc.GetCoins()), }, nil } + +// AccountNumber returns the account number for a given address. +func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pack.U64, error) { + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) + if err != nil { + return 0, fmt.Errorf("bad address: '%v': %v", addr, err) + } + + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) + if err != nil { + return 0, err + } + + return pack.U64(acc.GetAccountNumber()), nil +} From d84cd12bc52f5cf2333a9dc0546db359e8700475 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 11:50:09 +1000 Subject: [PATCH 124/335] chain/cosmos, chain/terra, api/account: fetch account number from client --- api/account/account.go | 2 +- chain/cosmos/tx.go | 40 +++++++++++++++++++++------------------- chain/terra/terra.go | 4 ++-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 48e3bc87..a30928b8 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -56,7 +56,7 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { - BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) + BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } // The AccountInfo interface defines functionality that must expose account diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index fac95050..839b094c 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -1,6 +1,7 @@ package cosmos import ( + "context" "fmt" "github.com/cosmos/cosmos-sdk/codec" @@ -19,40 +20,36 @@ import ( ) type txBuilder struct { - cdc *codec.Codec - coinDenom pack.String - chainID pack.String - accountNumber pack.U64 + client *Client + coinDenom pack.String + chainID pack.String } // TxBuilderOptions only contains necessary options to build tx from tx builder type TxBuilderOptions struct { - Cdc *codec.Codec `json:"cdc"` - AccountNumber pack.U64 `json:"account_number"` - ChainID pack.String `json:"chain_id"` - CoinDenom pack.String `json:"coin_denom"` + ChainID pack.String `json:"chain_id"` + CoinDenom pack.String `json:"coin_denom"` } // NewTxBuilder returns an implementation of the transaction builder interface // from the Cosmos Compat API, and exposes the functionality to build simple // Cosmos based transactions. -func NewTxBuilder(options TxBuilderOptions) account.TxBuilder { - if options.Cdc == nil { - options.Cdc = simapp.MakeCodec() +func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { + if client.cdc == nil { + client.cdc = simapp.MakeCodec() } return txBuilder{ - cdc: options.Cdc, - coinDenom: options.CoinDenom, - chainID: options.ChainID, - accountNumber: options.AccountNumber, + client: client, + coinDenom: options.CoinDenom, + chainID: options.ChainID, } } // BuildTx consumes a list of MsgSend to build and return a cosmos transaction. // This transaction is unsigned, and must be signed before submitting to the // cosmos chain. -func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (account.Tx, error) { +func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (account.Tx, error) { fromAddr, err := types.AccAddressFromBech32(string(from)) if err != nil { return nil, err @@ -77,9 +74,14 @@ func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimi Amount: pack.NewU64(gasPrice.Mul(gasLimit).Int().Uint64()), }} + accountNumber, err := builder.client.AccountNumber(ctx, from) + if err != nil { + return nil, err + } + txBuilder := auth.NewTxBuilder( - utils.GetTxEncoder(builder.cdc), - builder.accountNumber.Uint64(), + utils.GetTxEncoder(builder.client.cdc), + accountNumber.Uint64(), nonce.Int().Uint64(), gasLimit.Int().Uint64(), 0, @@ -101,7 +103,7 @@ func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimi msgs: []MsgSend{sendMsg}, fee: parseStdFee(signMsg.Fee), memo: pack.String(payload.String()), - cdc: builder.cdc, + cdc: builder.client.cdc, signMsg: signMsg, }, nil } diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 5aeaede6..2c2739d6 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -30,6 +30,6 @@ func NewClient(opts ClientOptions) *Client { // NewTxBuilder returns an implementation of the transaction builder interface // from the Cosmos Compat API, and exposes the functionality to build simple // Terra transactions. -func NewTxBuilder(opts TxBuilderOptions) account.TxBuilder { - return cosmos.NewTxBuilder(opts) +func NewTxBuilder(opts TxBuilderOptions, client *Client) account.TxBuilder { + return cosmos.NewTxBuilder(opts, client) } From 7be509bc8bde49e26c8a5b68c3d8747c41363068 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 11:50:31 +1000 Subject: [PATCH 125/335] chain/fileccoin, multichain_test, chain/terra_test: fix tests and update fileccoin tx builder --- chain/filecoin/account.go | 3 ++- chain/filecoin/filecoin_test.go | 1 + chain/terra/terra_test.go | 10 ++++------ multichain_test.go | 25 +++++++++++++++---------- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 27b7dab0..97046d3b 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -2,6 +2,7 @@ package filecoin import ( "bytes" + "context" "fmt" filaddress "github.com/filecoin-project/go-address" @@ -28,7 +29,7 @@ func NewTxBuilder(gasPremium pack.U256) TxBuilder { } // BuildTx receives transaction fields and constructs a new transaction. -func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, gasLimit, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) { +func (txBuilder TxBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) { filfrom, err := filaddress.NewFromString(string(from)) if err != nil { return nil, fmt.Errorf("bad from address '%v': %v", from, err) diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 862999f6..180428ca 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -72,6 +72,7 @@ var _ = Describe("Filecoin", func() { // build the transaction tx, err := filTxBuilder.BuildTx( + ctx, multichain.Address(pack.String(senderFilAddr.String())), multichain.Address(pack.String(recipientFilAddr.String())), pack.NewU256FromU64(pack.NewU64(100000000)), // amount diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index f16c8fb1..643eba3e 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -13,7 +13,6 @@ import ( "github.com/renproject/pack" "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/terra-project/core/app" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -61,16 +60,15 @@ var _ = Describe("Terra", func() { // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ - AccountNumber: pack.NewU64(1), - ChainID: "testnet", - CoinDenom: "uluna", - Cdc: app.MakeCodec(), - }) + ChainID: "testnet", + CoinDenom: "uluna", + }, client) // build the transaction payload := pack.NewBytes([]byte("multichain")) amount := pack.NewU256FromU64(pack.U64(2000000)) tx, err := txBuilder.BuildTx( + ctx, multichain.Address(addr.String()), // from recipient, // to amount, // amount diff --git a/multichain_test.go b/multichain_test.go index 8f5099b4..651875a9 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -23,8 +23,10 @@ import ( filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" "github.com/renproject/multichain" + "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" + // "github.com/renproject/multichain/chain/digibyte" "github.com/renproject/multichain/chain/dogecoin" "github.com/renproject/multichain/chain/filecoin" @@ -33,7 +35,6 @@ import ( "github.com/renproject/pack" "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/terra-project/core/app" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -304,7 +305,7 @@ var _ = Describe("Multichain", func() { rpcURL pack.String randomRecipientAddr func() multichain.Address initialise func(pack.String) multichain.AccountClient - txBuilder multichain.AccountTxBuilder + txBuilder func(client multichain.AccountClient) multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ @@ -352,12 +353,12 @@ var _ = Describe("Multichain", func() { return client }, - terra.NewTxBuilder(terra.TxBuilderOptions{ - AccountNumber: pack.NewU64(1), - ChainID: "testnet", - CoinDenom: "uluna", - Cdc: app.MakeCodec(), - }), + func(client multichain.AccountClient) account.TxBuilder { + return terra.NewTxBuilder(terra.TxBuilderOptions{ + ChainID: "testnet", + CoinDenom: "uluna", + }, client.(*terra.Client)) + }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) gasLimit := pack.NewU256FromU64(pack.U64(100000)) @@ -425,7 +426,9 @@ var _ = Describe("Multichain", func() { return client }, - filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))), + func(client multichain.AccountClient) multichain.AccountTxBuilder { + return filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))) + }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) gasLimit := pack.NewU256FromU64(pack.NewU64(2189560)) @@ -459,7 +462,9 @@ var _ = Describe("Multichain", func() { // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() - accountTx, err := accountChain.txBuilder.BuildTx( + txBuilder := accountChain.txBuilder(accountClient) + accountTx, err := txBuilder.BuildTx( + ctx, multichain.Address(senderAddr), recipientAddr, amount, nonce, gasLimit, gasPrice, From 714261cd726b7410d8d4a107dcf1c78d9b527253 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 12:15:35 +1000 Subject: [PATCH 126/335] chain/cosmos: leave sequence number as 0 --- chain/cosmos/client.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index f3ee349e..c686a85f 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -101,21 +101,6 @@ func (client *Client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pa return &StdTx{}, pack.NewU64(0), fmt.Errorf("parse tx failed: %v", err) } - // Construct a past context (just before the transaction's height) and query - // the sender account to know the nonce (sequence number) with which this - // transaction was broadcasted. - senderAddr, err := types.AccAddressFromBech32(string(stdTx.From())) - if err != nil { - return &StdTx{}, pack.NewU64(0), fmt.Errorf("bad address '%v': %v", stdTx.From(), err) - } - pastContext := client.cliCtx.WithHeight(res.Height - 1) - accGetter := auth.NewAccountRetriever(pastContext) - acc, err := accGetter.GetAccount(senderAddr) - if err != nil { - return &StdTx{}, pack.NewU64(0), fmt.Errorf("account query failed: %v", err) - } - stdTx.signMsg.Sequence = acc.GetSequence() - return &stdTx, pack.NewU64(1), nil } From 99027bdbf01650d4d4d20cf0f8aa59d722b75419 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 13:21:01 +1000 Subject: [PATCH 127/335] multichain_test: remove unnecessary import --- multichain_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 651875a9..14f0d190 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -23,7 +23,6 @@ import ( filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" "github.com/renproject/multichain" - "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" @@ -353,7 +352,7 @@ var _ = Describe("Multichain", func() { return client }, - func(client multichain.AccountClient) account.TxBuilder { + func(client multichain.AccountClient) multichain.AccountTxBuilder { return terra.NewTxBuilder(terra.TxBuilderOptions{ ChainID: "testnet", CoinDenom: "uluna", From 5124db1cabf0441c5df46c11f71d810f577d36db Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 13:24:40 +1000 Subject: [PATCH 128/335] infra: remove deterministic test address --- infra/.env | 6 ------ infra/docker-compose.yaml | 1 - infra/terra/run.sh | 3 --- 3 files changed, 10 deletions(-) diff --git a/infra/.env b/infra/.env index dee98085..2a3da981 100644 --- a/infra/.env +++ b/infra/.env @@ -1,8 +1,3 @@ -# -# RenVM's deterministic private key for test purposes -# -export RENVM_PK=8d00ff6a38267c5ecda940dc8a64948bde5a2fdc2a609041f2fdb1605f8794f6 - # # Binance Smart Chain # @@ -72,7 +67,6 @@ export FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa # suite access to plenty of testing funds. export TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 export TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u -export RENVM_TERRA_ADDRESS=terra1mclmytf3657uzw0cj3hcmu98vpj4t9ekdks6tc # # Zcash diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index cfe3b421..fd515594 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -147,4 +147,3 @@ services: entrypoint: - "./root/run.sh" - "${TERRA_ADDRESS}" - - "${RENVM_TERRA_ADDRESS}" diff --git a/infra/terra/run.sh b/infra/terra/run.sh index e11417d3..8ab37ead 100644 --- a/infra/terra/run.sh +++ b/infra/terra/run.sh @@ -1,10 +1,8 @@ #!/bin/bash ADDRESS=$1 -ADDRESS_2=$2 # Print setup echo "TERRA_ADDRESS=$ADDRESS" -echo "RENVM_TERRA_ADDRESS=$ADDRESS_2" # Register client key terracli keys add validator --keyring-backend=test @@ -14,7 +12,6 @@ echo $(terracli keys show validator) terrad init testnet --chain-id testnet terrad add-genesis-account $(terracli keys show validator -a --keyring-backend=test) 10000000000uluna terrad add-genesis-account $ADDRESS 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt -terrad add-genesis-account $ADDRESS_2 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt terrad gentx --amount 10000000000uluna --name validator --keyring-backend=test terrad collect-gentxs From 6ee649fce3898b87b15c89a42c54f351a7072f28 Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 29 Sep 2020 10:13:43 +1000 Subject: [PATCH 129/335] add mocks and better network comments --- multichain.go | 57 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/multichain.go b/multichain.go index 4027570d..0c3cbaaf 100644 --- a/multichain.go +++ b/multichain.go @@ -111,6 +111,12 @@ const ( SOL = Asset("SOL") // Solana LUNA = Asset("LUNA") // Luna ZEC = Asset("ZEC") // Zcash + + // These assets are define separately because they are mock assets. These + // assets should only be used for testing. + + AMOCK = Asset("AMOCK") // Account-based mock asset + UMOCK = Asset("UMOCK") // UTXO-based mock asset ) // OriginChain returns the chain upon which the asset originates. For example, @@ -141,6 +147,15 @@ func (asset Asset) OriginChain() Chain { return Solana case ZEC: return Zcash + + // These assets are define separately because they are mock assets. These + // assets should only be used for testing. + + case AMOCK: + return AccountMocker + case UMOCK: + return UTXOMocker + default: return Chain("") } @@ -153,6 +168,14 @@ func (asset Asset) ChainType() ChainType { return ChainTypeUTXOBased case BNB, ETH, FIL: return ChainTypeAccountBased + + // These assets are define separately because they are mock assets. These + // assets should only be used for testing. + case AMOCK: + return ChainTypeAccountBased + case UMOCK: + return ChainTypeUTXOBased + default: return ChainType("") } @@ -194,6 +217,12 @@ const ( Solana = Chain("Solana") Terra = Chain("Terra") Zcash = Chain("Zcash") + + // These chains are define separately because they are mock chains. These + // chains should only be used for testing. + + AccountMocker = Chain("AccountMocker") + UTXOMocker = Chain("UTXOMocker") ) // SizeHint returns the number of bytes required to represent the chain in @@ -222,6 +251,14 @@ func (chain Chain) ChainType() ChainType { return ChainTypeUTXOBased case BinanceSmartChain, Ethereum, Filecoin: return ChainTypeAccountBased + + // These chains are define separately because they are mock chains. These + // chains should only be used for testing. + case AccountMocker: + return ChainTypeAccountBased + case UTXOMocker: + return ChainTypeUTXOBased + default: return ChainType("") } @@ -274,13 +311,27 @@ func (chainType *ChainType) Unmarshal(buf []byte, rem int) ([]byte, int, error) type Network string const ( - // NetworkLocalnet represents a locally deployed network for chains + // NetworkLocalnet represents a local network for chains. It is usually only + // accessible from the device running the network, and is not accessible + // over the Internet. Chain rules are often slightly different to allow for + // faster block times and easier access to testing funds. This is also + // sometimes referred to as "regnet" or "regression network". It should only + // be used for local testing. NetworkLocalnet = Network("localnet") - // NetworkTestnet represents the test network for chains + // NetworkDevnet represents the development network for chains. This network + // is typically a deployed version of the localnet. Chain rules are often + // slightly different to allow for faster block times and easier access to + // testing funds. + NetworkDevnet = Network("devnet") + + // NetworkTestnet represents the test network for chains. This network is + // typically a publicly accessible network that has the same, or very + // similar, chain rules compared to mainnet. Assets on this type of network + // are usually not considered to have value. NetworkTestnet = Network("testnet") - // NetworkMainnet represents the main network for chains + // NetworkMainnet represents the main network for chains. NetworkMainnet = Network("mainnet") ) From 05be1ad7431e0dd2ce4679f6acba62042b55cda9 Mon Sep 17 00:00:00 2001 From: Loong Date: Tue, 29 Sep 2020 14:15:49 +1000 Subject: [PATCH 130/335] add second account mock --- multichain.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/multichain.go b/multichain.go index 0c3cbaaf..9300a11e 100644 --- a/multichain.go +++ b/multichain.go @@ -115,8 +115,9 @@ const ( // These assets are define separately because they are mock assets. These // assets should only be used for testing. - AMOCK = Asset("AMOCK") // Account-based mock asset - UMOCK = Asset("UMOCK") // UTXO-based mock asset + AMOCK1 = Asset("AMOCK1") // Account-based mock asset + AMOCK2 = Asset("AMOCK2") // Account-based mock asset + UMOCK = Asset("UMOCK") // UTXO-based mock asset ) // OriginChain returns the chain upon which the asset originates. For example, @@ -151,8 +152,10 @@ func (asset Asset) OriginChain() Chain { // These assets are define separately because they are mock assets. These // assets should only be used for testing. - case AMOCK: - return AccountMocker + case AMOCK1: + return AccountMocker1 + case AMOCK2: + return AccountMocker2 case UMOCK: return UTXOMocker @@ -171,7 +174,7 @@ func (asset Asset) ChainType() ChainType { // These assets are define separately because they are mock assets. These // assets should only be used for testing. - case AMOCK: + case AMOCK1, AMOCK2: return ChainTypeAccountBased case UMOCK: return ChainTypeUTXOBased @@ -221,8 +224,9 @@ const ( // These chains are define separately because they are mock chains. These // chains should only be used for testing. - AccountMocker = Chain("AccountMocker") - UTXOMocker = Chain("UTXOMocker") + AccountMocker1 = Chain("AccountMocker1") + AccountMocker2 = Chain("AccountMocker2") + UTXOMocker = Chain("UTXOMocker") ) // SizeHint returns the number of bytes required to represent the chain in @@ -254,7 +258,7 @@ func (chain Chain) ChainType() ChainType { // These chains are define separately because they are mock chains. These // chains should only be used for testing. - case AccountMocker: + case AccountMocker1, AccountMocker2: return ChainTypeAccountBased case UTXOMocker: return ChainTypeUTXOBased From 7fa0702386f8186c2936b38dec050b3dbefc2120 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 11:00:21 +0530 Subject: [PATCH 131/335] changes based on review --- .github/workflows/test.yml | 86 ++++++++++++++++++++---------------- api/account/account.go | 17 ++----- chain/bitcoin/address.go | 11 +++-- chain/bitcoincash/address.go | 56 +++++++++-------------- chain/bitcoincash/utxo.go | 9 +++- chain/cosmos/client.go | 37 +++------------- chain/digibyte/digibyte.go | 2 + chain/dogecoin/address.go | 9 +++- chain/dogecoin/dogecoin.go | 3 ++ chain/dogecoin/gas.go | 2 + chain/dogecoin/utxo.go | 18 ++++++-- chain/filecoin/client.go | 41 +++-------------- chain/terra/terra_test.go | 3 +- chain/zcash/address.go | 42 +++++++++--------- chain/zcash/utxo.go | 9 +++- infra/.ci-env | 18 -------- multichain_test.go | 3 +- 17 files changed, 156 insertions(+), 210 deletions(-) delete mode 100644 infra/.ci-env diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2caf45bc..2d6391c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,52 +53,60 @@ jobs: cd $GITHUB_WORKSPACE export PATH=$PATH:$(go env GOPATH)/bin go get -u golang.org/x/lint/golint - golint ./... + golint $(go list ./... | grep -v filecoin-ffi) - - name: Run multichain infrastructure (bitcoin) + - name: Run multichain infrastructure run: | source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 18443:18443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS - - name: Run multichain infrastructure (bitcoincash) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 19443:19443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS - # Skip DigiByte. - # - name: Run multichain infrastructure (digibyte) - # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - - name: Run multichain infrastructure (dogecoin) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 18332:18332 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS - - name: Run multichain infrastructure (filecoin) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 1234:1234 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - - name: Run multichain infrastructure (terra) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 26657:26657 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_terra $TERRA_ADDRESS - - name: Run multichain infrastructure (zcash) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 18232:18232 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_zcash $ZCASH_ADDRESS + docker-compose up -d --build \ + bitcoin \ + bitcoincash \ + dogecoin \ + filecoin \ + terra \ + zcash + + # - name: Run multichain infrastructure (bitcoin) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 18443:18443 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS + # - name: Run multichain infrastructure (bitcoincash) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 19443:19443 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS + # - name: Run multichain infrastructure (dogecoin) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 18332:18332 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS + # - name: Run multichain infrastructure (filecoin) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 1234:1234 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # --name infra_filecoin_1 rohitnarurkar/multichain_filecoin + # - name: Run multichain infrastructure (terra) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 26657:26657 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_terra $TERRA_ADDRESS + # - name: Run multichain infrastructure (zcash) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 18232:18232 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_zcash $ZCASH_ADDRESS - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '1m' + time: '5m' - name: Check on docker containers run: docker ps -a diff --git a/api/account/account.go b/api/account/account.go index a30928b8..4759eb22 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -59,23 +59,12 @@ type TxBuilder interface { BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } -// The AccountInfo interface defines functionality that must expose account -// specific information for the underlying chain. -type AccountInfo interface { - // Nonce is the current nonce of this account, which must be used to build a - // new transaction. - Nonce() pack.U256 - - // Balance is the native token balance of this account. - Balance() pack.U256 -} - // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { - // Account queries the chain for an address. It returns the address' - // information, which contains the nonce and balance fields. - AccountInfo(context.Context, address.Address) (AccountInfo, error) + // AccountNonce is the current nonce of this account, which must be used to + // build a new transaction. + AccountNonce(context.Context, address.Address) (pack.U256, error) // Tx returns the transaction uniquely identified by the given transaction // hash. It also returns the number of confirmations for the transaction. If diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 01c6995e..205105eb 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -7,7 +7,6 @@ import ( "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" "github.com/renproject/multichain/api/address" - "github.com/renproject/pack" ) // AddressEncodeDecoder implements the address.EncodeDecoder interface @@ -42,7 +41,7 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address // Validate that the base58 address is in fact in correct format. encodedAddr := base58.Encode([]byte(rawAddr)) if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { - return address.Address(""), fmt.Errorf("address validation error: %v", err) + return address.Address(""), err } return address.Address(encodedAddr), nil @@ -65,17 +64,17 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd // Decode the checksummed base58 format address. decoded, ver, err := base58.CheckDecode(string(addr)) if err != nil { - return nil, fmt.Errorf("base58 decoding error: %v", err) + return nil, fmt.Errorf("checking: %v", err) } if len(decoded) != 20 { - return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + return nil, fmt.Errorf("expected len 20, got len %v", len(decoded)) } // Validate the address format. switch ver { case decoder.params.PubKeyHashAddrID, decoder.params.ScriptHashAddrID: - return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil + return address.RawAddress(base58.Decode(string(addr))), nil default: - return nil, fmt.Errorf("unknown address type") + return nil, fmt.Errorf("unexpected address prefix") } } diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index c33cf54e..aae61fbb 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -27,11 +27,14 @@ var ( }() ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the +// chain specific configurations func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(params), @@ -39,22 +42,31 @@ func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { } } +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder struct { params *chaincfg.Params } +// NewAddressEncoder constructs a new AddressEncoder with the chain specific +// configurations func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { return AddressEncoder{params: params} } +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder struct { params *chaincfg.Params } +// NewAddressDecoder constructs a new AddressDecoder with the chain specific +// configurations func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { return AddressDecoder{params: params} } +// EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { rawAddrBytes := []byte(rawAddr) var encodedAddr string @@ -75,12 +87,13 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address } if err != nil { - return address.Address(""), fmt.Errorf("encode address: %v", err) + return address.Address(""), fmt.Errorf("encoding: %v", err) } - return address.Address(pack.String(encodedAddr)), nil + return address.Address(encodedAddr), nil } +// DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { // Legacy address decoding if legacyAddr, err := btcutil.DecodeAddress(string(addr), decoder.params); err == nil { @@ -112,7 +125,7 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd case ripemd160.Size: // P2PKH or P2SH switch addrBytes[0] { case 0, 8: // P2PKH or P2SH - return address.RawAddress(pack.NewBytes(addrBytes)), nil + return address.RawAddress(addrBytes), nil default: return nil, btcutil.ErrUnknownAddressType } @@ -135,10 +148,10 @@ func decodeLegacyAddress(addr address.Address, params *chaincfg.Params) (address // Decode the checksummed base58 format address. decoded, ver, err := base58.CheckDecode(string(addr)) if err != nil { - return nil, fmt.Errorf("base58 decoding error: %v", err) + return nil, fmt.Errorf("checking: %v", err) } if len(decoded) != 20 { - return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + return nil, fmt.Errorf("expected len 20, got len %v", len(decoded)) } // Validate the address format. @@ -146,7 +159,7 @@ func decodeLegacyAddress(addr address.Address, params *chaincfg.Params) (address case params.PubKeyHashAddrID, params.ScriptHashAddrID: return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil default: - return nil, fmt.Errorf("unknown address type") + return nil, fmt.Errorf("unexpected address prefix") } } @@ -302,34 +315,9 @@ func encodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, return EncodeToString(AppendChecksum(AddressPrefix(params), data)), nil } -// decodeAddress implements the address.Decoder interface -func decodeAddress(addr string, params *chaincfg.Params) (Address, error) { - // Legacy address decoding - if address, err := btcutil.DecodeAddress(addr, params); err == nil { - switch address.(type) { - case *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash, *btcutil.AddressPubKey: - return AddressLegacy{Address: address}, nil - case *btcutil.AddressWitnessPubKeyHash, *btcutil.AddressWitnessScriptHash: - return nil, fmt.Errorf("unsuported segwit bitcoin address type %T", address) - default: - return nil, fmt.Errorf("unsuported legacy bitcoin address type %T", address) - } - } - - if addrParts := strings.Split(addr, ":"); len(addrParts) != 1 { - addr = addrParts[1] - } - - decoded := DecodeString(addr) - if !VerifyChecksum(AddressPrefix(params), decoded) { - return nil, btcutil.ErrChecksumMismatch - } - - addrBytes, err := bech32.ConvertBits(decoded[:len(decoded)-8], 5, 8, false) - if err != nil { - return nil, err - } - +// addressFromRawBytes consumes raw bytes representation of a bitcoincash +// address and returns a type that implements the bitcoincash.Address interface. +func addressFromRawBytes(addrBytes []byte, params *chaincfg.Params) (Address, error) { switch len(addrBytes) - 1 { case ripemd160.Size: // P2PKH or P2SH switch addrBytes[0] { diff --git a/chain/bitcoincash/utxo.go b/chain/bitcoincash/utxo.go index 88842a33..0cb4aac2 100644 --- a/chain/bitcoincash/utxo.go +++ b/chain/bitcoincash/utxo.go @@ -73,6 +73,9 @@ func NewTxBuilder(params *chaincfg.Params) utxo.TxBuilder { func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipient) (utxo.Tx, error) { msgTx := wire.NewMsgTx(Version) + // Address encoder-decoder + addrEncodeDecoder := NewAddressEncodeDecoder(txBuilder.params) + // Inputs for _, input := range inputs { hash := chainhash.Hash{} @@ -83,7 +86,11 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := decodeAddress(string(recipient.To), txBuilder.params) + addrBytes, err := addrEncodeDecoder.DecodeAddress(recipient.To) + if err != nil { + return &Tx{}, err + } + addr, err := addressFromRawBytes(addrBytes, txBuilder.params) if err != nil { return &Tx{}, err } diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index c686a85f..7ba4f53b 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -123,46 +123,21 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { return nil } -// Account contains necessary info for sdk.Account -type Account struct { - address Address - accountNumber pack.U64 - sequenceNumber pack.U64 - coins Coins -} - -// Nonce returns the current nonce of the account. This is the nonce to be used -// while building a new transaction. -func (account Account) Nonce() pack.U256 { - return pack.NewU256FromU64(account.sequenceNumber) -} - -// Balance returns the native-token balance of the account. -func (account Account) Balance() pack.U256 { - // FIXME - return pack.NewU256FromU64(pack.NewU64(0)) -} - -// AccountInfo query account with address. This method is not a part of the -// multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) AccountInfo(_ context.Context, addr address.Address) (account.AccountInfo, error) { +// AccountNonce returns the current nonce of the account. This is the nonce to +// be used while building a new transaction. +func (client *Client) AccountNonce(_ context.Context, addr address.Address) (pack.U256, error) { cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { - return nil, fmt.Errorf("bad address: '%v': %v", addr, err) + return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) } accGetter := auth.NewAccountRetriever(client.cliCtx) acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) if err != nil { - return Account{}, err + return pack.U256{}, err } - return &Account{ - address: Address(cosmosAddr), - accountNumber: pack.U64(acc.GetAccountNumber()), - sequenceNumber: pack.U64(acc.GetSequence()), - coins: parseCoins(acc.GetCoins()), - }, nil + return pack.NewU256FromU64(pack.NewU64(acc.GetSequence())), nil } // AccountNumber returns the account number for a given address. diff --git a/chain/digibyte/digibyte.go b/chain/digibyte/digibyte.go index c0f7350f..1f86c0fc 100644 --- a/chain/digibyte/digibyte.go +++ b/chain/digibyte/digibyte.go @@ -146,6 +146,7 @@ var MainNetParams = chaincfg.Params{ HDCoinType: 0x14, } +// TestnetParams returns the chain configuration for testnet var TestnetParams = chaincfg.Params{ Name: "testnet", @@ -180,6 +181,7 @@ var TestnetParams = chaincfg.Params{ HDCoinType: 0x14, } +// RegressionNetParams returns the chain configuration for regression net var RegressionNetParams = chaincfg.Params{ Name: "regtest", diff --git a/chain/dogecoin/address.go b/chain/dogecoin/address.go index e94c3a87..0e4ee882 100644 --- a/chain/dogecoin/address.go +++ b/chain/dogecoin/address.go @@ -3,7 +3,12 @@ package dogecoin import "github.com/renproject/multichain/chain/bitcoin" type ( - AddressEncoder = bitcoin.AddressEncoder - AddressDecoder = bitcoin.AddressDecoder + // AddressEncoder re-exports bitcoin.AddressEncoder. + AddressEncoder = bitcoin.AddressEncoder + + // AddressDecoder re-exports bitcoin.AddressDecoder. + AddressDecoder = bitcoin.AddressDecoder + + // AddressEncodeDecoder re-exports bitcoin.AddressEncodeDecoder. AddressEncodeDecoder = bitcoin.AddressEncodeDecoder ) diff --git a/chain/dogecoin/dogecoin.go b/chain/dogecoin/dogecoin.go index 4f168c37..d2850070 100644 --- a/chain/dogecoin/dogecoin.go +++ b/chain/dogecoin/dogecoin.go @@ -16,6 +16,7 @@ func init() { } } +// MainNetParams returns the chain configuration for mainnet. var MainNetParams = chaincfg.Params{ Name: "mainnet", Net: 0xc0c0c0c0, @@ -35,6 +36,7 @@ var MainNetParams = chaincfg.Params{ Bech32HRPSegwit: "doge", } +// TestNetParams returns the chain configuration for testnet. var TestNetParams = chaincfg.Params{ Name: "testnet", Net: 0xfcc1b7dc, @@ -54,6 +56,7 @@ var TestNetParams = chaincfg.Params{ Bech32HRPSegwit: "doget", } +// RegressionNetParams returns the chain configuration for regression net. var RegressionNetParams = chaincfg.Params{ Name: "regtest", diff --git a/chain/dogecoin/gas.go b/chain/dogecoin/gas.go index 07336be8..69a395fb 100644 --- a/chain/dogecoin/gas.go +++ b/chain/dogecoin/gas.go @@ -2,6 +2,8 @@ package dogecoin import "github.com/renproject/multichain/chain/bitcoin" +// GasEstimator re-exports bitcoin.GasEstimator. type GasEstimator = bitcoin.GasEstimator +// NewGasEstimator re-exports bitcoin.NewGasEstimator. var NewGasEstimator = bitcoin.NewGasEstimator diff --git a/chain/dogecoin/utxo.go b/chain/dogecoin/utxo.go index d5611514..e998791c 100644 --- a/chain/dogecoin/utxo.go +++ b/chain/dogecoin/utxo.go @@ -3,15 +3,25 @@ package dogecoin import "github.com/renproject/multichain/chain/bitcoin" type ( - Tx = bitcoin.Tx - TxBuilder = bitcoin.TxBuilder - Client = bitcoin.Client + // Tx re-exports bitcoin.Tx. + Tx = bitcoin.Tx + + // TxBuilder re-exports bitcoin.TxBuilder. + TxBuilder = bitcoin.TxBuilder + + // Client re-exports bitcoin.Client. + Client = bitcoin.Client + + // ClientOptions re-exports bitcoin.ClientOptions. ClientOptions = bitcoin.ClientOptions ) var ( + // NewTxBuilder re-exports bitcoin.NewTxBuilder. NewTxBuilder = bitcoin.NewTxBuilder - NewClient = bitcoin.NewClient + + // NewClient re-exports bitcoin.NewClient. + NewClient = bitcoin.NewClient ) // DefaultClientOptions returns ClientOptions with the default settings. These diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 7a3b00cc..7aabd747 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -3,7 +3,6 @@ package filecoin import ( "context" "fmt" - "math/big" "net/http" filaddress "github.com/filecoin-project/go-address" @@ -104,7 +103,7 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack return nil, pack.NewU64(0), fmt.Errorf("searching state for txid %v: not found", msgID) } if messageLookup.Receipt.ExitCode.IsError() { - return nil, pack.NewU64(0), fmt.Errorf("transaction execution error: %v", messageLookup.Receipt.ExitCode.String()) + return nil, pack.NewU64(0), fmt.Errorf("executing transaction: %v", messageLookup.Receipt.ExitCode.String()) } // get the most recent tipset and its height @@ -153,44 +152,18 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { } } -// Account contains necessary info for sdk.Account -type Account struct { - balance pack.U256 - nonce pack.U64 -} - -// Nonce returns the current nonce of the account. This is the nonce to be used -// while building a new transaction. -func (account Account) Nonce() pack.U256 { - return pack.NewU256FromU64(account.nonce) -} - -// Balance returns the native-token balance of the account. -func (account Account) Balance() pack.U256 { - return account.balance -} - -// AccountInfo query account with address. This method is not a part of the -// multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) AccountInfo(ctx context.Context, addr address.Address) (account.AccountInfo, error) { +// AccountNonce returns the current nonce of the account. This is the nonce to +// be used while building a new transaction. +func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) { filAddr, err := filaddress.NewFromString(string(addr)) if err != nil { - return nil, fmt.Errorf("bad address '%v': %v", addr, err) + return pack.U256{}, fmt.Errorf("bad address '%v': %v", addr, err) } actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef)) if err != nil { - return Account{}, fmt.Errorf("searching state for addr: %v", addr) - } - - balanceBytes, err := actor.Balance.Bytes() - if err != nil { - return Account{}, fmt.Errorf("extracting balance bytes: %v", err) + return pack.U256{}, fmt.Errorf("searching state for addr: %v", addr) } - balance := big.NewInt(0).SetBytes(balanceBytes) - return &Account{ - balance: pack.NewU256FromInt(balance), - nonce: pack.NewU64(actor.Nonce), - }, nil + return pack.NewU256FromU64(pack.NewU64(actor.Nonce)), nil } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 643eba3e..cf09c7f8 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -54,9 +54,8 @@ var _ = Describe("Terra", func() { // instantiate a new client client := terra.NewClient(terra.DefaultClientOptions()) - accountInfo, err := client.AccountInfo(ctx, multichain.Address(addr.String())) + nonce, err := client.AccountNonce(ctx, multichain.Address(addr.String())) Expect(err).NotTo(HaveOccurred()) - nonce := accountInfo.Nonce() // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ diff --git a/chain/zcash/address.go b/chain/zcash/address.go index 2ebb9909..05a07ece 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -14,27 +14,38 @@ import ( "golang.org/x/crypto/ripemd160" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder struct { params *Params } +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder struct { params *Params } +// NewAddressEncoder constructs a new AddressEncoder with the chain specific +// configurations func NewAddressEncoder(params *Params) AddressEncoder { return AddressEncoder{params: params} } +// NewAddressDecoder constructs a new AddressDecoder with the chain specific +// configurations func NewAddressDecoder(params *Params) AddressDecoder { return AddressDecoder{params: params} } +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the +// chain specific configurations func NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(params), @@ -42,6 +53,7 @@ func NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder { } } +// EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { if len(rawAddr) != 26 && len(rawAddr) != 25 { return address.Address(""), fmt.Errorf("address of unknown length") @@ -72,6 +84,7 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address } } +// DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { var decoded = base58.Decode(string(addr)) if len(decoded) != 26 && len(decoded) != 25 { @@ -221,34 +234,19 @@ func (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool { return addr.AddressScriptHash.IsForNet(params) } -// decodeAddress decodes a string-representation of an address to an address +// addressFromRawBytes decodes a string-representation of an address to an address // type that implements the zcash.Address interface -func decodeAddress(addr string) (Address, error) { - var decoded = base58.Decode(addr) - if len(decoded) != 26 && len(decoded) != 25 { - return nil, base58.ErrInvalidFormat - } - - var cksum [4]byte - copy(cksum[:], decoded[len(decoded)-4:]) - if checksum(decoded[:len(decoded)-4]) != cksum { - return nil, base58.ErrChecksum - } - - if len(decoded)-6 != ripemd160.Size && len(decoded)-5 != ripemd160.Size { - return nil, errors.New("incorrect payload len") - } - +func addressFromRawBytes(addrBytes []byte) (Address, error) { var addrType uint8 var params *Params var err error var hash [20]byte - if len(decoded) == 26 { - addrType, params, err = parsePrefix(decoded[:2]) - copy(hash[:], decoded[2:22]) + if len(addrBytes) == 26 { + addrType, params, err = parsePrefix(addrBytes[:2]) + copy(hash[:], addrBytes[2:22]) } else { - addrType, params, err = parsePrefix(decoded[:1]) - copy(hash[:], decoded[1:21]) + addrType, params, err = parsePrefix(addrBytes[:1]) + copy(hash[:], addrBytes[1:21]) } if err != nil { return nil, err diff --git a/chain/zcash/utxo.go b/chain/zcash/utxo.go index dc413340..42794dfe 100644 --- a/chain/zcash/utxo.go +++ b/chain/zcash/utxo.go @@ -68,6 +68,9 @@ func NewTxBuilder(params *Params, expiryHeight uint32) utxo.TxBuilder { func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipient) (utxo.Tx, error) { msgTx := wire.NewMsgTx(Version) + // Address encoder-decoder + addrEncodeDecoder := NewAddressEncodeDecoder(txBuilder.params) + // Inputs for _, input := range inputs { hash := chainhash.Hash{} @@ -78,7 +81,11 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := decodeAddress(string(recipient.To)) + addrBytes, err := addrEncodeDecoder.DecodeAddress(recipient.To) + if err != nil { + return &Tx{}, err + } + addr, err := addressFromRawBytes(addrBytes) if err != nil { return &Tx{}, err } diff --git a/infra/.ci-env b/infra/.ci-env deleted file mode 100644 index 96cba816..00000000 --- a/infra/.ci-env +++ /dev/null @@ -1,18 +0,0 @@ -BINANCE_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" -BINANCE_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A -BITCOIN_PK=cUJCHRMSUwkcofsHjFWBELT3yEAejokdKhyTNv3DScodYWzztBae -BITCOIN_ADDRESS=mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4 -BITCOINCASH_PK=cSEohZFQLKuemNeBVrzwxniouUJJxdcx7Tm6HpspYuxraVjytieW -BITCOINCASH_ADDRESS=bchreg:qp6tejc0ghtjeejcxa97amzvxvzacjt4qczpy2n3gf -DIGIBYTE_PK=efbJxdzwR1tZD7KWYmKBhmxR6TNb25P9z29ajaoALhkn1LdNe7Ci -DIGIBYTE_ADDRESS=shb4rf33ozMX8rinHsC6GghrvvA8RKTyGb -DOGECOIN_PK=cRZnRgH2ztcJupCzkWbq2mjiT8PSFAmtYRYb1phg1vSRRcNBX4w4 -DOGECOIN_ADDRESS=n3PSSpR4zqUKWH4tcRjP9aTwJ4GmixQXmt -ETHEREUM_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" -ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A -FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d -FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa -TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 -TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u -ZCASH_PK=cNSVbbsAcBQ6BAmMr6yH6DLWr7QTDptHwdzpy4GYxGDkNZeKnczK -ZCASH_ADDRESS=tmCTReBSJEDMWfFCkXXPMSB3EfuPg6SE9dw diff --git a/multichain_test.go b/multichain_test.go index 14f0d190..9156f9d4 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -454,9 +454,8 @@ var _ = Describe("Multichain", func() { accountClient := accountChain.initialise(accountChain.rpcURL) // Get the appropriate nonce for sender. - accountInfo, err := accountClient.AccountInfo(ctx, senderAddr) + nonce, err := accountClient.AccountNonce(ctx, senderAddr) Expect(err).NotTo(HaveOccurred()) - nonce := accountInfo.Nonce() // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() From 9f1246b1e71efe288fe8e606ae41077573a10708 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 11:04:41 +0530 Subject: [PATCH 132/335] cd into infra before docker compose --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d6391c8..e2f4e434 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,8 @@ jobs: - name: Run multichain infrastructure run: | - source $GITHUB_WORKSPACE/infra/.env + cd $GITHUB_WORKSPACE/infra + source .env docker-compose up -d --build \ bitcoin \ bitcoincash \ From 7ea7877f1eb05009a1ec817b1a268eea0ce63d3a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 12:07:01 +0530 Subject: [PATCH 133/335] ignore nonce check in account-based chains for fetched tx --- .github/workflows/test.yml | 39 +------------------------------------- multichain_test.go | 5 ++--- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2f4e434..489c05ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,47 +67,10 @@ jobs: terra \ zcash - # - name: Run multichain infrastructure (bitcoin) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 18443:18443 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS - # - name: Run multichain infrastructure (bitcoincash) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 19443:19443 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS - # - name: Run multichain infrastructure (dogecoin) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 18332:18332 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS - # - name: Run multichain infrastructure (filecoin) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 1234:1234 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - # - name: Run multichain infrastructure (terra) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 26657:26657 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_terra $TERRA_ADDRESS - # - name: Run multichain infrastructure (zcash) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 18232:18232 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_zcash $ZCASH_ADDRESS - - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '5m' + time: '2m' - name: Check on docker containers run: docker ps -a diff --git a/multichain_test.go b/multichain_test.go index 9156f9d4..146f0c64 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -426,12 +426,12 @@ var _ = Describe("Multichain", func() { return client }, func(client multichain.AccountClient) multichain.AccountTxBuilder { - return filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))) + return filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(300000))) }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) gasLimit := pack.NewU256FromU64(pack.NewU64(2189560)) - gasPrice := pack.NewU256FromU64(pack.NewU64(186893)) + gasPrice := pack.NewU256FromU64(pack.NewU64(300000)) payload := pack.Bytes(nil) return amount, gasLimit, gasPrice, payload }, @@ -505,7 +505,6 @@ var _ = Describe("Multichain", func() { Expect(tx.Value()).To(Equal(amount)) Expect(tx.From()).To(Equal(senderAddr)) Expect(tx.To()).To(Equal(recipientAddr)) - Expect(tx.Nonce()).To(Equal(nonce)) Expect(tx.Value()).To(Equal(amount)) break } From c1a6a672c92d6eea8d2d1dc6debc1f55fae61250 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 12:28:12 +0530 Subject: [PATCH 134/335] wait more time for lotus node to have started --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 489c05ce..f3ea411d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,7 +70,7 @@ jobs: - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '2m' + time: '5m' - name: Check on docker containers run: docker ps -a From 8dcf17cc7e8872052dfbddbe95cbd222d9578a6d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 15:57:49 +0530 Subject: [PATCH 135/335] utxo and account chain tests --- chain/digibyte/utxo.go | 10 +- chain/dogecoin/utxo.go | 8 +- go.mod | 3 + multichain_test.go | 382 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 397 insertions(+), 6 deletions(-) diff --git a/chain/digibyte/utxo.go b/chain/digibyte/utxo.go index 76604833..aa80452c 100644 --- a/chain/digibyte/utxo.go +++ b/chain/digibyte/utxo.go @@ -25,7 +25,11 @@ var ( // NewClient re-exports bitcoin.NewClient NewClient = bitcoin.NewClient - - // DefaultClientOptions re-exports bitcoin.DefaultClientOptions - DefaultClientOptions = bitcoin.DefaultClientOptions ) + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. +func DefaultClientOptions() ClientOptions { + return bitcoin.DefaultClientOptions().WithHost("http://0.0.0.0:20443") +} diff --git a/chain/dogecoin/utxo.go b/chain/dogecoin/utxo.go index 5cee84d1..c77c8224 100644 --- a/chain/dogecoin/utxo.go +++ b/chain/dogecoin/utxo.go @@ -12,5 +12,11 @@ type ( var ( NewTxBuilder = bitcoin.NewTxBuilder NewClient = bitcoin.NewClient - DefaultClientOptions = bitcoin.DefaultClientOptions ) + +// DefaultClientOptions returns ClientOptions with the default settings. These +// settings are valid for use with the default local deployment of the +// multichain. In production, the host, user, and password should be changed. +func DefaultClientOptions() ClientOptions { + return bitcoin.DefaultClientOptions().WithHost("http://0.0.0.0:18332") +} diff --git a/go.mod b/go.mod index d775b96c..00b96f79 100644 --- a/go.mod +++ b/go.mod @@ -28,6 +28,9 @@ require ( ) replace github.com/cosmos/ledger-cosmos-go => github.com/terra-project/ledger-terra-go v0.11.1-terra + replace github.com/CosmWasm/go-cosmwasm => github.com/terra-project/go-cosmwasm v0.10.1-terra + replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi + replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 diff --git a/multichain_test.go b/multichain_test.go index c9dfef38..959aab71 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -1,4 +1,382 @@ package multichain_test -// TODO: Run test suite of simple tests for all supported chains. The idea is to -// use the common APIs to run these tests. +import ( + "context" + "encoding/hex" + "fmt" + "os" + "reflect" + "time" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil" + "github.com/cosmos/cosmos-sdk/types" + "github.com/renproject/id" + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/bitcoin" + "github.com/renproject/multichain/chain/bitcoincash" + "github.com/renproject/multichain/chain/digibyte" + "github.com/renproject/multichain/chain/dogecoin" + "github.com/renproject/multichain/chain/terra" + "github.com/renproject/multichain/chain/zcash" + "github.com/renproject/pack" + "github.com/renproject/surge" + "github.com/tendermint/tendermint/crypto/secp256k1" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Multichain", func() { + // Create context to work within + ctx := context.Background() + + // Initialise the logger + loggerConfig := zap.NewDevelopmentConfig() + loggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder + logger, err := loggerConfig.Build() + Expect(err).ToNot(HaveOccurred()) + + Context("Address API", func() { + It("should pass", func() { + Fail("not implemented") + }) + }) + + Context("Account API", func() { + accountChainTable := []struct { + senderEnv func() (id.PrivKey, *id.PubKey, pack.String) + privKeyToAddr func(pk id.PrivKey) pack.String + rpcURL pack.String + randomRecipientAddr func() pack.String + initialise func() multichain.AccountClient + txBuilder multichain.AccountTxBuilder + txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) + chain multichain.Chain + }{ + { + func() (id.PrivKey, *id.PubKey, pack.String) { + pkEnv := os.Getenv("TERRA_PK") + if pkEnv == "" { + panic("TERRA_PK is undefined") + } + pkBytes, err := hex.DecodeString(pkEnv) + Expect(err).NotTo(HaveOccurred()) + var pk secp256k1.PrivKeySecp256k1 + copy(pk[:], pkBytes) + senderAddr := terra.Address(pk.PubKey().Address()) + senderPrivKey := id.PrivKey{} + err = surge.FromBinary(&senderPrivKey, pkBytes) + Expect(err).NotTo(HaveOccurred()) + return senderPrivKey, senderPrivKey.PubKey(), pack.NewString(senderAddr.String()) + }, + func(privKey id.PrivKey) pack.String { + pkBytes, err := surge.ToBinary(privKey) + Expect(err).NotTo(HaveOccurred()) + var pk secp256k1.PrivKeySecp256k1 + copy(pk[:], pkBytes) + addr := terra.Address(pk.PubKey().Address()) + return pack.NewString(addr.String()) + }, + "http://127.0.0.1:26657", + func() pack.String { + recipientKey := secp256k1.GenPrivKey() + recipient := types.AccAddress(recipientKey.PubKey().Address()) + return pack.NewString(recipient.String()) + }, + func() multichain.AccountClient { + client := terra.NewClient(terra.DefaultClientOptions()) + return client + }, + terra.NewTxBuilder(terra.TxBuilderOptions{ + AccountNumber: pack.NewU64(1), + ChainID: "testnet", + CoinDenom: "uluna", + }), + func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + amount := pack.NewU256FromU64(pack.U64(2000000)) + nonce := pack.NewU256FromU64(0) + gasLimit := pack.NewU256FromU64(pack.U64(300000)) + gasPrice := pack.NewU256FromU64(pack.U64(300)) + payload := pack.NewBytes([]byte("multichain")) + return amount, nonce, gasLimit, gasPrice, payload + }, + multichain.Terra, + }, + } + + for _, accountChain := range accountChainTable { + accountChain := accountChain + FContext(fmt.Sprintf("%v", accountChain.chain), func() { + Specify("build, broadcast and fetch tx", func() { + // Load private key and the associated address. + senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() + + // Get a random recipient address. + recipientAddr := accountChain.randomRecipientAddr() + + // Initialise the account chain's client. + accountClient := accountChain.initialise() + + // Build a transaction. + amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() + accountTx, err := accountChain.txBuilder.BuildTx( + multichain.Address(senderAddr), + multichain.Address(recipientAddr), + amount, nonce, gasLimit, gasPrice, + payload, + ) + Expect(err).NotTo(HaveOccurred()) + + // Get the transaction bytes and sign them. + sighashes, err := accountTx.Sighashes() + Expect(err).NotTo(HaveOccurred()) + sighash32 := sighashes[0] + hash := id.Hash(sighash32) + sig, err := senderPrivKey.Sign(&hash) + Expect(err).NotTo(HaveOccurred()) + sigBytes, err := surge.ToBinary(sig) + Expect(err).NotTo(HaveOccurred()) + txSignature := pack.Bytes65{} + copy(txSignature[:], sigBytes) + senderPubKeyBytes, err := surge.ToBinary(senderPubKey) + Expect(err).NotTo(HaveOccurred()) + Expect(accountTx.Sign( + []pack.Bytes65{txSignature}, + pack.NewBytes(senderPubKeyBytes), + )).To(Succeed()) + + // Submit the transaction to the account chain. + txHash := accountTx.Hash() + Expect(accountClient.SubmitTx(ctx, accountTx)).To(Succeed()) + + // Wait slightly before we query the chain's node. + time.Sleep(time.Second) + + for { + // Loop until the transaction has at least a few confirmations. + tx, confs, err := accountClient.Tx(ctx, txHash) + if err == nil { + Expect(confs.Uint64()).To(Equal(uint64(1))) + Expect(tx.Value()).To(Equal(amount)) + Expect(tx.From()).To(Equal(senderAddr)) + Expect(tx.To()).To(Equal(recipientAddr)) + break + } + + // wait and retry querying for the transaction + time.Sleep(5 * time.Second) + } + }) + }) + } + }) + + Context("UTXO API", func() { + utxoChainTable := []struct { + privKeyEnv string + newAddressPKH func([]byte) (btcutil.Address, error) + newAddressSH func([]byte) (btcutil.Address, error) + rpcURL pack.String + initialise func(pack.String, btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) + txBuilder multichain.UTXOTxBuilder + chain multichain.Chain + }{ + { + "BITCOIN_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &chaincfg.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:18443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := bitcoin.NewClient(bitcoin.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + bitcoin.NewTxBuilder(&chaincfg.RegressionNetParams), + multichain.Bitcoin, + }, + { + "BITCOINCASH_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := bitcoincash.NewAddressPubKeyHash(pkh, &chaincfg.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:19443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := bitcoincash.NewClient(bitcoincash.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + bitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams), + multichain.BitcoinCash, + }, + { + "DIGIBYTE_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:20443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := digibyte.NewClient(digibyte.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + digibyte.NewTxBuilder(&digibyte.RegressionNetParams), + multichain.DigiByte, + }, + { + "DOGECOIN_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &dogecoin.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &dogecoin.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:18332"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := dogecoin.NewClient(dogecoin.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + dogecoin.NewTxBuilder(&dogecoin.RegressionNetParams), + multichain.Dogecoin, + }, + { + "ZCASH_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressPubKeyHash(pkh, &zcash.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + return addr, err + }, + pack.String("http://0.0.0.0:18232"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := zcash.NewClient(zcash.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), + multichain.Zcash, + }, + } + + for _, utxoChain := range utxoChainTable { + utxoChain := utxoChain + Context(fmt.Sprintf("%v", utxoChain.chain), func() { + Specify("build, broadcast and fetch tx", func() { + // Load private key. + pkEnv := os.Getenv(utxoChain.privKeyEnv) + if pkEnv == "" { + panic(fmt.Sprintf("%v is undefined", utxoChain.privKeyEnv)) + } + wif, err := btcutil.DecodeWIF(pkEnv) + Expect(err).NotTo(HaveOccurred()) + + // Get the PKH address from the loaded private key. + pkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed())) + Expect(err).NotTo(HaveOccurred()) + + // Recipient + pkhAddrUncompressed, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed())) + Expect(err).ToNot(HaveOccurred()) + + // Initialise the UTXO client and fetch the unspent outputs. Also get a + // function to query the number of block confirmations for a transaction. + utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) + Expect(len(unspentOutputs)).To(BeNumerically(">", 0)) + output := unspentOutputs[0] + + // Build a transaction + inputs := []multichain.UTXOInput{ + {Output: multichain.UTXOutput{ + Outpoint: multichain.UTXOutpoint{ + Hash: output.Outpoint.Hash[:], + Index: output.Outpoint.Index, + }, + PubKeyScript: output.PubKeyScript, + Value: output.Value, + }}, + } + recipients := []multichain.UTXORecipient{ + { + To: multichain.Address(pkhAddr.EncodeAddress()), + Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + }, + { + To: multichain.Address(pkhAddrUncompressed.EncodeAddress()), + Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + }, + } + utxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients) + Expect(err).NotTo(HaveOccurred()) + + // Get the sighashes that need to be signed, and sign them. + sighashes, err := utxoTx.Sighashes() + signatures := make([]pack.Bytes65, len(sighashes)) + Expect(err).ToNot(HaveOccurred()) + for i := range sighashes { + hash := id.Hash(sighashes[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures[i] = pack.NewBytes65(signature) + } + Expect(utxoTx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + + // Submit the signed transaction to the UTXO chain's node. + txHash, err := utxoTx.Hash() + Expect(err).ToNot(HaveOccurred()) + err = utxoClient.SubmitTx(ctx, utxoTx) + Expect(err).ToNot(HaveOccurred()) + + // Check confirmations after waiting for the transaction to be in the + // mempool. + time.Sleep(time.Second) + + for { + // Loop until the transaction has at least a few + // confirmations. + confs, err := confsFn(ctx, txHash) + Expect(err).ToNot(HaveOccurred()) + logger.Debug(fmt.Sprintf("[%v] confirming", utxoChain.chain), zap.Uint64("current", uint64(confs))) + if confs >= 1 { + break + } + time.Sleep(10 * time.Second) + } + + // Load the output and verify that it is equal to the original output. + output2, _, err := utxoClient.Output(ctx, output.Outpoint) + Expect(err).ToNot(HaveOccurred()) + Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) + }) + }) + } + }) +}) From ed567d6317b063158a4ee1a24b6b1e3b4ed91062 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 16:40:23 +0530 Subject: [PATCH 136/335] checkpoint --- chain/cosmos/tx.go | 6 ++++-- chain/dogecoin/utxo.go | 4 ++-- chain/terra/terra_test.go | 12 +++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index e6ff88f5..f98c1137 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -13,6 +13,7 @@ import ( "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/tendermint/tendermint/crypto/tmhash" ) @@ -262,11 +263,12 @@ func (tx StdTx) Hash() pack.Bytes { // Sighashes that need to be signed before this transaction can be submitted. func (tx StdTx) Sighashes() ([]pack.Bytes32, error) { - if len(tx.signMsg.Bytes()) != 32 { + sighashBytes := crypto.Sha256(tx.signMsg.Bytes()) + if len(sighashBytes) != 32 { return nil, fmt.Errorf("expected 32 bytes, got %v bytes", len(tx.signMsg.Bytes())) } sighash := pack.Bytes32{} - copy(sighash[:], tx.signMsg.Bytes()) + copy(sighash[:], sighashBytes) return []pack.Bytes32{sighash}, nil } diff --git a/chain/dogecoin/utxo.go b/chain/dogecoin/utxo.go index c77c8224..d5611514 100644 --- a/chain/dogecoin/utxo.go +++ b/chain/dogecoin/utxo.go @@ -10,8 +10,8 @@ type ( ) var ( - NewTxBuilder = bitcoin.NewTxBuilder - NewClient = bitcoin.NewClient + NewTxBuilder = bitcoin.NewTxBuilder + NewClient = bitcoin.NewClient ) // DefaultClientOptions returns ClientOptions with the default settings. These diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 7f070242..5d70eff5 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -7,10 +7,12 @@ import ( "time" "github.com/cosmos/cosmos-sdk/types" + "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/cosmos" "github.com/renproject/multichain/chain/terra" "github.com/renproject/pack" + "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/terra-project/core/app" @@ -45,6 +47,10 @@ var _ = Describe("Terra", func() { var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBz) + var privKey id.PrivKey + err = surge.FromBinary(&privKey, pkBz) + Expect(err).NotTo(HaveOccurred()) + addr := terra.Address(pk.PubKey().Address()) decoder := terra.NewAddressDecoder("terra") @@ -82,7 +88,11 @@ var _ = Describe("Terra", func() { // get the transaction bytes and sign it sighashes, err := tx.Sighashes() Expect(err).NotTo(HaveOccurred()) - sigBytes, err := pk.Sign(sighashes[0][:]) + Expect(len(sighashes)).To(Equal(1)) + hash := id.Hash(sighashes[0]) + sig, err := privKey.Sign(&hash) + Expect(err).NotTo(HaveOccurred()) + sigBytes, err := surge.ToBinary(sig) Expect(err).NotTo(HaveOccurred()) sig65 := pack.Bytes65{} copy(sig65[:], sigBytes) From eed18a2d2ad379911eff3ed101928096deece055 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 17:31:56 +0530 Subject: [PATCH 137/335] fix cosmos-compat signature --- chain/cosmos/tx.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index f98c1137..5d3ccbac 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -280,7 +280,9 @@ func (tx *StdTx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { var cpPubKey secp256k1.PubKeySecp256k1 copy(cpPubKey[:], pubKey[:secp256k1.PubKeySecp256k1Size]) stdSignatures = append(stdSignatures, auth.StdSignature{ - Signature: sig[:], + // Cosmos uses 64-bytes signature + // https://github.com/tendermint/tendermint/blob/v0.33.8/crypto/secp256k1/secp256k1_nocgo.go#L60-L70 + Signature: sig[:64], PubKey: cpPubKey, }) } From 5d56f5e6c9312ba8a49401e76fe7bfb7b7674819 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 18:09:46 +0530 Subject: [PATCH 138/335] checkpoint --- chain/terra/terra_test.go | 11 +---------- multichain_test.go | 13 ++++++++----- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 5d70eff5..ebb52a2c 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -36,11 +36,6 @@ var _ = Describe("Terra", func() { panic("TERRA_PK is undefined") } - addrEnv := os.Getenv("TERRA_ADDRESS") - if addrEnv == "" { - panic("TERRA_ADDRESS is undefined") - } - pkBz, err := hex.DecodeString(pkEnv) Expect(err).ToNot(HaveOccurred()) @@ -53,16 +48,12 @@ var _ = Describe("Terra", func() { addr := terra.Address(pk.PubKey().Address()) - decoder := terra.NewAddressDecoder("terra") - _, err = decoder.DecodeAddress(multichain.Address(pack.NewString(addrEnv))) - Expect(err).ToNot(HaveOccurred()) - // random recipient pkRecipient := secp256k1.GenPrivKey() recipient := types.AccAddress(pkRecipient.PubKey().Address()) // instantiate a new client - client := terra.NewClient(cosmos.DefaultClientOptions()) + client := terra.NewClient(terra.DefaultClientOptions()) // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ diff --git a/multichain_test.go b/multichain_test.go index 959aab71..41554faa 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -22,6 +22,7 @@ import ( "github.com/renproject/pack" "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" + "github.com/terra-project/core/app" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -94,6 +95,7 @@ var _ = Describe("Multichain", func() { AccountNumber: pack.NewU64(1), ChainID: "testnet", CoinDenom: "uluna", + Cdc: app.MakeCodec(), }), func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) @@ -133,8 +135,7 @@ var _ = Describe("Multichain", func() { // Get the transaction bytes and sign them. sighashes, err := accountTx.Sighashes() Expect(err).NotTo(HaveOccurred()) - sighash32 := sighashes[0] - hash := id.Hash(sighash32) + hash := id.Hash(sighashes[0]) sig, err := senderPrivKey.Sign(&hash) Expect(err).NotTo(HaveOccurred()) sigBytes, err := surge.ToBinary(sig) @@ -143,14 +144,16 @@ var _ = Describe("Multichain", func() { copy(txSignature[:], sigBytes) senderPubKeyBytes, err := surge.ToBinary(senderPubKey) Expect(err).NotTo(HaveOccurred()) - Expect(accountTx.Sign( + err = accountTx.Sign( []pack.Bytes65{txSignature}, pack.NewBytes(senderPubKeyBytes), - )).To(Succeed()) + ) + Expect(err).NotTo(HaveOccurred()) // Submit the transaction to the account chain. txHash := accountTx.Hash() - Expect(accountClient.SubmitTx(ctx, accountTx)).To(Succeed()) + err = accountClient.SubmitTx(ctx, accountTx) + Expect(err).NotTo(HaveOccurred()) // Wait slightly before we query the chain's node. time.Sleep(time.Second) From 49fd406b8d0a50f9e48ca99a23fb812618b6d6e8 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 20:20:29 +0530 Subject: [PATCH 139/335] checkpoint 2 --- chain/cosmos/address.go | 9 ++++++--- chain/terra/terra_test.go | 9 +++++---- multichain_test.go | 39 +++++++++++++++++++++++++-------------- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index 57a555d1..c1b5adcb 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -36,7 +36,9 @@ func NewAddressEncodeDecoder(hrp string) AddressEncodeDecoder { } // AddressEncoder implements the address.Encoder interface -type AddressEncoder struct{} +type AddressEncoder struct { + hrp string +} // AddressDecoder implements the address.Decoder interface type AddressDecoder struct { @@ -49,8 +51,8 @@ func NewAddressDecoder(hrp string) AddressDecoder { } // NewAddressEncoder creates a new address encoder -func NewAddressEncoder() AddressEncoder { - return AddressEncoder{} +func NewAddressEncoder(hrp string) AddressEncoder { + return AddressEncoder{hrp: hrp} } // DecodeAddress consumes a human-readable representation of a cosmos @@ -67,6 +69,7 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd // EncodeAddress consumes raw bytes and encodes them to a human-readable // address format. func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + sdk.GetConfig().SetBech32PrefixForAccount(encoder.hrp, encoder.hrp+"pub") bech32Addr := sdk.AccAddress(rawAddr) return address.Address(bech32Addr.String()), nil } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index ebb52a2c..00b58756 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -6,10 +6,9 @@ import ( "os" "time" - "github.com/cosmos/cosmos-sdk/types" "github.com/renproject/id" "github.com/renproject/multichain" - "github.com/renproject/multichain/chain/cosmos" + "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/chain/terra" "github.com/renproject/pack" "github.com/renproject/surge" @@ -50,7 +49,9 @@ var _ = Describe("Terra", func() { // random recipient pkRecipient := secp256k1.GenPrivKey() - recipient := types.AccAddress(pkRecipient.PubKey().Address()) + addrEncoder := terra.NewAddressEncoder("terra") + recipient, err := addrEncoder.EncodeAddress(address.RawAddress(pack.Bytes(pkRecipient.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) // instantiate a new client client := terra.NewClient(terra.DefaultClientOptions()) @@ -67,7 +68,7 @@ var _ = Describe("Terra", func() { payload := pack.NewBytes([]byte("multichain")) tx, err := txBuilder.BuildTx( multichain.Address(addr.String()), // from - multichain.Address(recipient.String()), // to + recipient, // to pack.NewU256FromU64(pack.U64(2000000)), // amount pack.NewU256FromU64(0), // nonce pack.NewU256FromU64(pack.U64(300000)), // gas diff --git a/multichain_test.go b/multichain_test.go index 41554faa..4f79d912 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -10,7 +10,6 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" - "github.com/cosmos/cosmos-sdk/types" "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" @@ -48,17 +47,17 @@ var _ = Describe("Multichain", func() { Context("Account API", func() { accountChainTable := []struct { - senderEnv func() (id.PrivKey, *id.PubKey, pack.String) - privKeyToAddr func(pk id.PrivKey) pack.String + senderEnv func() (id.PrivKey, *id.PubKey, multichain.Address) + privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String - randomRecipientAddr func() pack.String + randomRecipientAddr func() multichain.Address initialise func() multichain.AccountClient txBuilder multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ { - func() (id.PrivKey, *id.PubKey, pack.String) { + func() (id.PrivKey, *id.PubKey, multichain.Address) { pkEnv := os.Getenv("TERRA_PK") if pkEnv == "" { panic("TERRA_PK is undefined") @@ -67,25 +66,31 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBytes) - senderAddr := terra.Address(pk.PubKey().Address()) + addrEncoder := terra.NewAddressEncoder("terra") + senderAddr, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(pk.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) senderPrivKey := id.PrivKey{} err = surge.FromBinary(&senderPrivKey, pkBytes) Expect(err).NotTo(HaveOccurred()) - return senderPrivKey, senderPrivKey.PubKey(), pack.NewString(senderAddr.String()) + return senderPrivKey, senderPrivKey.PubKey(), senderAddr }, - func(privKey id.PrivKey) pack.String { + func(privKey id.PrivKey) multichain.Address { pkBytes, err := surge.ToBinary(privKey) Expect(err).NotTo(HaveOccurred()) var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBytes) - addr := terra.Address(pk.PubKey().Address()) - return pack.NewString(addr.String()) + addrEncoder := terra.NewAddressEncoder("terra") + addr, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(pk.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) + return addr }, "http://127.0.0.1:26657", - func() pack.String { + func() multichain.Address { recipientKey := secp256k1.GenPrivKey() - recipient := types.AccAddress(recipientKey.PubKey().Address()) - return pack.NewString(recipient.String()) + addrEncoder := terra.NewAddressEncoder("terra") + recipient, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(recipientKey.PubKey().Address()))) + Expect(err).NotTo(HaveOccurred()) + return recipient }, func() multichain.AccountClient { client := terra.NewClient(terra.DefaultClientOptions()) @@ -115,9 +120,11 @@ var _ = Describe("Multichain", func() { Specify("build, broadcast and fetch tx", func() { // Load private key and the associated address. senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() + fmt.Printf("sender address = %v\n", senderAddr) // Get a random recipient address. recipientAddr := accountChain.randomRecipientAddr() + fmt.Printf("random recipient = %v\n", recipientAddr) // Initialise the account chain's client. accountClient := accountChain.initialise() @@ -126,7 +133,7 @@ var _ = Describe("Multichain", func() { amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), - multichain.Address(recipientAddr), + recipientAddr, amount, nonce, gasLimit, gasPrice, payload, ) @@ -149,9 +156,13 @@ var _ = Describe("Multichain", func() { pack.NewBytes(senderPubKeyBytes), ) Expect(err).NotTo(HaveOccurred()) + ser, err := accountTx.Serialize() + Expect(err).NotTo(HaveOccurred()) + fmt.Printf("tx serialised = %v\n", ser) // Submit the transaction to the account chain. txHash := accountTx.Hash() + fmt.Printf("tx hash = %v\n", txHash) err = accountClient.SubmitTx(ctx, accountTx) Expect(err).NotTo(HaveOccurred()) From 4ae54c5324edf24313bfca36cbe173e1bccbae79 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 22:39:58 +0530 Subject: [PATCH 140/335] add filecoin to table --- chain/filecoin/client.go | 8 ++-- multichain_test.go | 98 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 97 insertions(+), 9 deletions(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 23758eca..1e09e48d 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -48,15 +48,15 @@ func DefaultClientOptions() ClientOptions { // WithRPCURL returns a modified version of the options with the given API // rpc-url -func (opts ClientOptions) WithRPCURL(rpcURL string) ClientOptions { - opts.RPCURL = rpcURL +func (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions { + opts.RPCURL = string(rpcURL) return opts } // WithAuthToken returns a modified version of the options with the given // authentication token. -func (opts ClientOptions) WithAuthToken(authToken string) ClientOptions { - opts.AuthToken = authToken +func (opts ClientOptions) WithAuthToken(authToken pack.String) ClientOptions { + opts.AuthToken = string(authToken) return opts } diff --git a/multichain_test.go b/multichain_test.go index 4f79d912..6cff6e73 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -1,21 +1,28 @@ package multichain_test import ( + "bytes" "context" "encoding/hex" + "encoding/json" "fmt" "os" + "os/exec" "reflect" + "strings" "time" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + filaddress "github.com/filecoin-project/go-address" + filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" "github.com/renproject/multichain/chain/digibyte" "github.com/renproject/multichain/chain/dogecoin" + "github.com/renproject/multichain/chain/filecoin" "github.com/renproject/multichain/chain/terra" "github.com/renproject/multichain/chain/zcash" "github.com/renproject/pack" @@ -51,7 +58,7 @@ var _ = Describe("Multichain", func() { privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String randomRecipientAddr func() multichain.Address - initialise func() multichain.AccountClient + initialise func(pack.String) multichain.AccountClient txBuilder multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain @@ -92,8 +99,11 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return recipient }, - func() multichain.AccountClient { - client := terra.NewClient(terra.DefaultClientOptions()) + func(rpcURL pack.String) multichain.AccountClient { + client := terra.NewClient( + terra.DefaultClientOptions(). + WithHost(rpcURL), + ) return client }, terra.NewTxBuilder(terra.TxBuilderOptions{ @@ -112,6 +122,67 @@ var _ = Describe("Multichain", func() { }, multichain.Terra, }, + { + func() (id.PrivKey, *id.PubKey, multichain.Address) { + pkEnv := os.Getenv("FILECOIN_PK") + if pkEnv == "" { + panic("FILECOIN_PK is undefined") + } + var ki filtypes.KeyInfo + data, err := hex.DecodeString(pkEnv) + Expect(err).NotTo(HaveOccurred()) + err = json.Unmarshal(data, &ki) + Expect(err).NotTo(HaveOccurred()) + privKey := id.PrivKey{} + err = surge.FromBinary(&privKey, ki.PrivateKey) + Expect(err).NotTo(HaveOccurred()) + pubKey := privKey.PubKey() + pubKeyCompressed, err := surge.ToBinary(pubKey) + Expect(err).NotTo(HaveOccurred()) + addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) + return privKey, pubKey, multichain.Address(pack.String(addr.String())) + }, + func(privKey id.PrivKey) multichain.Address { + pubKey := privKey.PubKey() + pubKeyCompressed, err := surge.ToBinary(pubKey) + Expect(err).NotTo(HaveOccurred()) + addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(pack.String(addr.String())) + }, + "ws://127.0.0.1:1234/rpc/v0", + func() multichain.Address { + pk := id.NewPrivKey() + pubKey := pk.PubKey() + pubKeyCompressed, err := surge.ToBinary(pubKey) + Expect(err).NotTo(HaveOccurred()) + addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(pack.String(addr.String())) + }, + func(rpcURL pack.String) multichain.AccountClient { + // dirty hack to fetch auth token + authToken := fetchAuthToken() + client, err := filecoin.NewClient( + filecoin.DefaultClientOptions(). + WithRPCURL(rpcURL). + WithAuthToken(authToken), + ) + Expect(err).NotTo(HaveOccurred()) + return client + }, + filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(149514))), + func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + amount := pack.NewU256FromU64(pack.NewU64(100000000)) + nonce := pack.NewU256FromU64(pack.NewU64(0)) + gasLimit := pack.NewU256FromU64(pack.NewU64(495335)) + gasPrice := pack.NewU256FromU64(pack.NewU64(149838)) + payload := pack.Bytes(nil) + return amount, nonce, gasLimit, gasPrice, payload + }, + multichain.Filecoin, + }, } for _, accountChain := range accountChainTable { @@ -127,7 +198,7 @@ var _ = Describe("Multichain", func() { fmt.Printf("random recipient = %v\n", recipientAddr) // Initialise the account chain's client. - accountClient := accountChain.initialise() + accountClient := accountChain.initialise(accountChain.rpcURL) // Build a transaction. amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() @@ -173,7 +244,7 @@ var _ = Describe("Multichain", func() { // Loop until the transaction has at least a few confirmations. tx, confs, err := accountClient.Tx(ctx, txHash) if err == nil { - Expect(confs.Uint64()).To(Equal(uint64(1))) + Expect(confs.Uint64()).To(BeNumerically(">", 0)) Expect(tx.Value()).To(Equal(amount)) Expect(tx.From()).To(Equal(senderAddr)) Expect(tx.To()).To(Equal(recipientAddr)) @@ -394,3 +465,20 @@ var _ = Describe("Multichain", func() { } }) }) + +func fetchAuthToken() pack.String { + // fetch the auth token from filecoin's running docker container + cmd := exec.Command("docker", "exec", "infra_filecoin_1", "/bin/bash", "-c", "/app/lotus auth api-info --perm admin") + var out bytes.Buffer + var stderr bytes.Buffer + cmd.Stdout = &out + cmd.Stderr = &stderr + err := cmd.Run() + if err != nil { + fmt.Println(fmt.Sprint(err) + ": " + stderr.String()) + panic(fmt.Sprintf("could not run command: %v", err)) + } + tokenWithSuffix := strings.TrimPrefix(out.String(), "FULLNODE_API_INFO=") + authToken := strings.Split(tokenWithSuffix, ":/") + return pack.NewString(fmt.Sprintf("Bearer %s", authToken[0])) +} From 787a9718eceffe91da627b2540d18555d10fbd9e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 22:55:58 +0530 Subject: [PATCH 141/335] filecoin addr moved to FIXME --- multichain_test.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 6cff6e73..c7bd900d 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -37,10 +37,10 @@ import ( ) var _ = Describe("Multichain", func() { - // Create context to work within + // Create context to work within. ctx := context.Background() - // Initialise the logger + // Initialise the logger. loggerConfig := zap.NewDevelopmentConfig() loggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder logger, err := loggerConfig.Build() @@ -137,11 +137,18 @@ var _ = Describe("Multichain", func() { err = surge.FromBinary(&privKey, ki.PrivateKey) Expect(err).NotTo(HaveOccurred()) pubKey := privKey.PubKey() + + // FIXME: add method in renproject/id to get uncompressed pubkey bytes pubKeyCompressed, err := surge.ToBinary(pubKey) Expect(err).NotTo(HaveOccurred()) - addr, err := filaddress.NewSecp256k1Address(pubKeyCompressed) + /*addr*/ _, err = filaddress.NewSecp256k1Address(pubKeyCompressed) Expect(err).NotTo(HaveOccurred()) - return privKey, pubKey, multichain.Address(pack.String(addr.String())) + addrStr := os.Getenv("FILECOIN_ADDRESS") + if addrStr == "" { + panic("FILECOIN_ADDRESS is undefined") + } + + return privKey, pubKey, multichain.Address(pack.String(addrStr)) }, func(privKey id.PrivKey) multichain.Address { pubKey := privKey.PubKey() @@ -187,7 +194,7 @@ var _ = Describe("Multichain", func() { for _, accountChain := range accountChainTable { accountChain := accountChain - FContext(fmt.Sprintf("%v", accountChain.chain), func() { + Context(fmt.Sprintf("%v", accountChain.chain), func() { Specify("build, broadcast and fetch tx", func() { // Load private key and the associated address. senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() From de8fd505849f66145691ffc91c519f9363ce40f2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:26:37 +0530 Subject: [PATCH 142/335] (not tested) github actions manifest --- .github/CODEOWNERS | 1 + .github/workflows/test.yml | 79 ++++++++++++++++++++++++++++++++++++++ multichain_test.go | 9 +++++ 3 files changed, 89 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/test.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..d5970cbd --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @loongy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..5dc7269e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,79 @@ +name: go +on: [push] +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + + - name: Run vetting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint ./... + + - name: Run multichain infrastructure + run: | + source ./infra/.env + cd $GITHUB_WORKSPACE/infra + docker-compose up --build bitcoin \ + bitcoincash \ + digibyte \ + dogecoin \ + filecoin \ + terra \ + zcash + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: '5m' + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + CI=true ginkgo --v --race --cover --coverprofile coverprofile.out ./... + covermerge \ + chain/bitcoin.out \ + chain/bitcoincash.out \ + chain/digibyte.out \ + chain/dogecoin.out \ + chain/ethereum.out \ + chain/filecoin.out \ + chain/terra.out \ + chain/zcash.out \ + coverprofile.out > coverprofile.out + goveralls -coverprofile=coverprofile.out -service=github diff --git a/multichain_test.go b/multichain_test.go index c7bd900d..0915a9ed 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -46,12 +46,18 @@ var _ = Describe("Multichain", func() { logger, err := loggerConfig.Build() Expect(err).ToNot(HaveOccurred()) + // + // ADDRESS API + // Context("Address API", func() { It("should pass", func() { Fail("not implemented") }) }) + // + // ACCOUNT API + // Context("Account API", func() { accountChainTable := []struct { senderEnv func() (id.PrivKey, *id.PubKey, multichain.Address) @@ -266,6 +272,9 @@ var _ = Describe("Multichain", func() { } }) + // + // UTXO API + // Context("UTXO API", func() { utxoChainTable := []struct { privKeyEnv string From cc41edc7f13914bed1a2a44736f318ff5f1232cb Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:31:28 +0530 Subject: [PATCH 143/335] checkout the filecoin-ffi submodule --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5dc7269e..1d05a79f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,8 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 + with: + submodules: recursive - name: Caching modules uses: actions/cache@v1 @@ -22,6 +24,7 @@ jobs: - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin + git submodule go get -u github.com/onsi/ginkgo/ginkgo go get -u github.com/onsi/gomega/... go get -u golang.org/x/lint/golint From 7cb79d112baf502b6ad0aceced48c4d3de65434b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:34:38 +0530 Subject: [PATCH 144/335] build the ffi submodule before building multichain --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d05a79f..a0a6fae6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,6 @@ jobs: - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin - git submodule go get -u github.com/onsi/ginkgo/ginkgo go get -u github.com/onsi/gomega/... go get -u golang.org/x/lint/golint @@ -33,6 +32,8 @@ jobs: - name: Run vetting run: | + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make cd $GITHUB_WORKSPACE export PATH=$PATH:$(go env GOPATH)/bin go vet ./... From 0e60feaf5e0224e7381af85d72a05d8ec410ba89 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 14 Sep 2020 23:38:29 +0530 Subject: [PATCH 145/335] install dep packages for filecoin --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0a6fae6..0c33f7b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,10 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + - name: Install dependency packages + run: + sudo apt-get install mesa-opencl-icd ocl-icd-opencl-dev + - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin From 999516b31362170fcf094f7b4dd72f40375ab08d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 00:48:41 +0530 Subject: [PATCH 146/335] pull from docker hub --- .github/workflows/test.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c33f7b8..f64e4b3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,22 +49,25 @@ jobs: go get -u golang.org/x/lint/golint golint ./... - - name: Run multichain infrastructure - run: | - source ./infra/.env - cd $GITHUB_WORKSPACE/infra - docker-compose up --build bitcoin \ - bitcoincash \ - digibyte \ - dogecoin \ - filecoin \ - terra \ - zcash + - name: Run multichain infrastructure (bitcoin) + run: docker run -d -p 18443:18443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoin + - name: Run multichain infrastructure (bitcoincash) + run: docker run -d -p 19443:19443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoincash + - name: Run multichain infrastructure (digibyte) + run: docker run -d -p 20443:20443 -h 0.0.0.0 rohitnarurkar/multichain_digibyte + - name: Run multichain infrastructure (dogecoin) + run: docker run -d -p 18332:18332 -h 0.0.0.0 rohitnarurkar/multichain_dogecoin + - name: Run multichain infrastructure (filecoin) + run: docker run -d -p 1234:1234 -h 0.0.0.0 rohitnarurkar/multichain_filecoin + - name: Run multichain infrastructure (terra) + run: docker run -d -p 26657:26657 -h 0.0.0.0 rohitnarurkar/multichain_terra + - name: Run multichain infrastructure (zcash) + run: docker run -d -p 18232:18232 -h 0.0.0.0 rohitnarurkar/multichain_zcash - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '5m' + time: '1m' - name: Run tests and report test coverage env: From ab720f0537f9420b7efa3632c48786001af6fe7e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 11:33:21 +0530 Subject: [PATCH 147/335] check status of docker containers --- .github/CODEOWNERS | 2 +- .github/workflows/test.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d5970cbd..2b4c3323 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @loongy +* @loongy @jazg diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f64e4b3d..7601c8e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,6 +69,9 @@ jobs: with: time: '1m' + - name: Check on docker containers + run: docker ps -a + - name: Run tests and report test coverage env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ddacc649a925fcdafe227f12cd389731295b81cf Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 15:18:55 +0530 Subject: [PATCH 148/335] address API tests and minor fixes --- chain/bitcoin/address.go | 4 +- chain/cosmos/address.go | 2 +- chain/terra/address.go | 4 +- multichain_test.go | 97 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 99 insertions(+), 8 deletions(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 44038866..d229cae1 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -58,10 +58,10 @@ func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { } // DecodeAddress implements the address.Decoder interface -func (decoder AddressDecoder) DecodeAddress(addr address.Address) (pack.Bytes, error) { +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { if _, err := btcutil.DecodeAddress(string(addr), decoder.params); err != nil { // Check that the address is valid. return nil, err } - return pack.NewBytes(base58.Decode(string(addr))), nil + return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil } diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index c1b5adcb..63f9c172 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -30,7 +30,7 @@ type AddressEncodeDecoder struct { // NewAddressEncodeDecoder creates a new address encoder-decoder func NewAddressEncodeDecoder(hrp string) AddressEncodeDecoder { return AddressEncodeDecoder{ - AddressEncoder: AddressEncoder{}, + AddressEncoder: NewAddressEncoder(hrp), AddressDecoder: NewAddressDecoder(hrp), } } diff --git a/chain/terra/address.go b/chain/terra/address.go index 7b235bdc..1d4a59ec 100644 --- a/chain/terra/address.go +++ b/chain/terra/address.go @@ -23,6 +23,6 @@ var ( // NewAddressEncoder re-exports cosmos.NewAddressEncoder NewAddressEncoder = cosmos.NewAddressEncoder - // NewAddressEnodeDecoder re-exports cosmos.NewAddressEnodeDecoder - NewAddressEnodeDecoder = cosmos.NewAddressEncodeDecoder + // NewAddressEncodeDecoder re-exports cosmos.NewAddressEnodeDecoder + NewAddressEncodeDecoder = cosmos.NewAddressEncodeDecoder ) diff --git a/multichain_test.go b/multichain_test.go index 0915a9ed..19ac3a7f 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -6,14 +6,17 @@ import ( "encoding/hex" "encoding/json" "fmt" + "math/rand" "os" "os/exec" "reflect" "strings" "time" + "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + cosmossdk "github.com/cosmos/cosmos-sdk/types" filaddress "github.com/filecoin-project/go-address" filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" @@ -50,9 +53,97 @@ var _ = Describe("Multichain", func() { // ADDRESS API // Context("Address API", func() { - It("should pass", func() { - Fail("not implemented") - }) + chainTable := []struct { + chain multichain.Chain + newEncodeDecoder func() multichain.AddressEncodeDecoder + newAddress func() multichain.Address + newRawAddress func() multichain.RawAddress + }{ + { + multichain.Bitcoin, + func() multichain.AddressEncodeDecoder { + addrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + return addrEncodeDecoder + }, + func() multichain.Address { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrPubKey.EncodeAddress()) + }, + func() multichain.RawAddress { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.RawAddress(addrPubKey.ScriptAddress()) + }, + }, + { + multichain.Filecoin, + func() multichain.AddressEncodeDecoder { + return filecoin.NewAddressEncodeDecoder() + }, + func() multichain.Address { + pubKey := make([]byte, 64) + rand.Read(pubKey) + addr, err := filaddress.NewSecp256k1Address(pubKey) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addr.String()) + }, + func() multichain.RawAddress { + rawAddr := make([]byte, 20) + rand.Read(rawAddr) + formattedRawAddr := append([]byte{byte(filaddress.SECP256K1)}, rawAddr[:]...) + return multichain.RawAddress(pack.NewBytes(formattedRawAddr[:])) + }, + }, + { + multichain.Terra, + func() multichain.AddressEncodeDecoder { + return terra.NewAddressEncodeDecoder("terra") + }, + func() multichain.Address { + pk := secp256k1.GenPrivKey() + cosmossdk.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") + addr := cosmossdk.AccAddress(pk.PubKey().Address()) + return multichain.Address(addr.String()) + }, + func() multichain.RawAddress { + pk := secp256k1.GenPrivKey() + rawAddr := pk.PubKey().Address() + return multichain.RawAddress(pack.Bytes(rawAddr)) + }, + }, + } + + for _, chain := range chainTable { + chain := chain + Context(fmt.Sprintf("%v", chain.chain), func() { + encodeDecoder := chain.newEncodeDecoder() + + It("should encode a raw address correctly", func() { + rawAddr := chain.newRawAddress() + encodedAddr, err := encodeDecoder.EncodeAddress(rawAddr) + Expect(err).NotTo(HaveOccurred()) + decodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(decodedRawAddr).To(Equal(rawAddr)) + }) + + It("should decode an address correctly", func() { + addr := chain.newAddress() + decodedRawAddr, err := encodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + }) + } }) // From 4ea99e4644ef56c5e9709b41a7795b5b49bd8e4c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 20:11:46 +0530 Subject: [PATCH 149/335] bitcoin addresses are now check-summed 25-bytes long --- chain/bitcoin/address.go | 28 +++++++++++---- multichain_test.go | 75 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 11 deletions(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index d229cae1..01c6995e 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -1,6 +1,8 @@ package bitcoin import ( + "fmt" + "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" @@ -37,11 +39,12 @@ func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { // EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + // Validate that the base58 address is in fact in correct format. encodedAddr := base58.Encode([]byte(rawAddr)) - if _, err := btcutil.DecodeAddress(encodedAddr, encoder.params); err != nil { - // Check that the address is valid. - return address.Address(""), err + if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { + return address.Address(""), fmt.Errorf("address validation error: %v", err) } + return address.Address(encodedAddr), nil } @@ -59,9 +62,20 @@ func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { // DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { - if _, err := btcutil.DecodeAddress(string(addr), decoder.params); err != nil { - // Check that the address is valid. - return nil, err + // Decode the checksummed base58 format address. + decoded, ver, err := base58.CheckDecode(string(addr)) + if err != nil { + return nil, fmt.Errorf("base58 decoding error: %v", err) + } + if len(decoded) != 20 { + return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + } + + // Validate the address format. + switch ver { + case decoder.params.PubKeyHashAddrID, decoder.params.ScriptHashAddrID: + return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil + default: + return nil, fmt.Errorf("unknown address type") } - return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil } diff --git a/multichain_test.go b/multichain_test.go index 19ac3a7f..b0cc63f9 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -16,6 +16,7 @@ import ( "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + "github.com/btcsuite/btcutil/base58" cosmossdk "github.com/cosmos/cosmos-sdk/types" filaddress "github.com/filecoin-project/go-address" filtypes "github.com/filecoin-project/lotus/chain/types" @@ -58,6 +59,8 @@ var _ = Describe("Multichain", func() { newEncodeDecoder func() multichain.AddressEncodeDecoder newAddress func() multichain.Address newRawAddress func() multichain.RawAddress + newSHAddress func() multichain.Address + newSHRawAddress func() multichain.RawAddress }{ { multichain.Bitcoin, @@ -66,20 +69,52 @@ var _ = Describe("Multichain", func() { return addrEncodeDecoder }, func() multichain.Address { + // Generate a random SECP256K1 private key. pk := id.NewPrivKey() + // Get bitcoin WIF private key with the pub key configured to be in + // the compressed form. wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) Expect(err).NotTo(HaveOccurred()) - addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) - return multichain.Address(addrPubKey.EncodeAddress()) + // Return the human-readable encoded bitcoin address in base58 format. + return multichain.Address(addrPubKeyHash.EncodeAddress()) }, func() multichain.RawAddress { + // Generate a random SECP256K1 private key. pk := id.NewPrivKey() + // Get bitcoin WIF private key with the pub key configured to be in + // the compressed form. wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) Expect(err).NotTo(HaveOccurred()) - addrPubKey, err := btcutil.NewAddressPubKey(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + // Get the address pubKey hash. This is the most commonly used format + // for a bitcoin address. + addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) - return multichain.RawAddress(addrPubKey.ScriptAddress()) + // Encode into the checksummed base58 format. + encoded := addrPubKeyHash.EncodeAddress() + return multichain.RawAddress(pack.Bytes(base58.Decode(encoded))) + }, + func() multichain.Address { + // Random bytes of script. + script := make([]byte, rand.Intn(100)) + rand.Read(script) + // Create address script hash from the random script bytes. + addrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + // Return in human-readable encoded form. + return multichain.Address(addrScriptHash.EncodeAddress()) + }, + func() multichain.RawAddress { + // Random bytes of script. + script := make([]byte, rand.Intn(100)) + rand.Read(script) + // Create address script hash from the random script bytes. + addrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + // Encode to the checksummed base58 format. + encoded := addrScriptHash.EncodeAddress() + return multichain.RawAddress(pack.Bytes(base58.Decode(encoded))) }, }, { @@ -100,6 +135,12 @@ var _ = Describe("Multichain", func() { formattedRawAddr := append([]byte{byte(filaddress.SECP256K1)}, rawAddr[:]...) return multichain.RawAddress(pack.NewBytes(formattedRawAddr[:])) }, + func() multichain.Address { + return multichain.Address("") + }, + func() multichain.RawAddress { + return multichain.RawAddress([]byte{}) + }, }, { multichain.Terra, @@ -117,6 +158,12 @@ var _ = Describe("Multichain", func() { rawAddr := pk.PubKey().Address() return multichain.RawAddress(pack.Bytes(rawAddr)) }, + func() multichain.Address { + return multichain.Address("") + }, + func() multichain.RawAddress { + return multichain.RawAddress([]byte{}) + }, }, } @@ -142,6 +189,26 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) Expect(encodedAddr).To(Equal(addr)) }) + + if chain.chain.IsUTXOBased() { + It("should encoded a raw script address correctly", func() { + rawScriptAddr := chain.newSHRawAddress() + encodedAddr, err := encodeDecoder.EncodeAddress(rawScriptAddr) + Expect(err).NotTo(HaveOccurred()) + decodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(decodedRawAddr).To(Equal(rawScriptAddr)) + }) + + It("should decode a script address correctly", func() { + scriptAddr := chain.newSHAddress() + decodedRawAddr, err := encodeDecoder.DecodeAddress(scriptAddr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(scriptAddr)) + }) + } }) } }) From a48c58fe6b6cd15224316dcc0e66df79184a88f5 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 15 Sep 2020 23:46:21 +0530 Subject: [PATCH 150/335] fetch nonce during initialisation --- chain/cosmos/client.go | 27 ++++++++++++++++++++++- chain/filecoin/client.go | 22 +++++++++++++++++++ chain/terra/terra.go | 2 +- multichain_test.go | 47 ++++++++++++++++++++++------------------ 4 files changed, 75 insertions(+), 23 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 967db076..d3be3ece 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -66,7 +66,7 @@ type Client struct { } // NewClient returns a new Client. -func NewClient(opts ClientOptions, cdc *codec.Codec) account.Client { +func NewClient(opts ClientOptions, cdc *codec.Codec) *Client { httpClient, err := rpchttp.NewWithTimeout(opts.Host.String(), "websocket", uint(opts.Timeout/time.Second)) if err != nil { panic(err) @@ -118,3 +118,28 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { return nil } + +// Account contains necessary info for sdk.Account +type Account struct { + Address Address `json:"address"` + AccountNumber pack.U64 `json:"account_number"` + SequenceNumber pack.U64 `json:"sequence_number"` + Coins Coins `json:"coins"` +} + +// Account query account with address. This method is not a part of the +// multichain.AccountClient API, but will be used in the test infrastructure. +func (client *Client) Account(addr Address) (Account, error) { + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(addr.AccAddress()) + if err != nil { + return Account{}, err + } + + return Account{ + Address: addr, + AccountNumber: pack.U64(acc.GetAccountNumber()), + SequenceNumber: pack.U64(acc.GetSequence()), + Coins: parseCoins(acc.GetCoins()), + }, nil +} diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 1e09e48d..aa27196e 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -3,8 +3,10 @@ package filecoin import ( "context" "fmt" + "math/big" "net/http" + filaddress "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/lotus/api" filclient "github.com/filecoin-project/lotus/api/client" @@ -146,3 +148,23 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { return fmt.Errorf("expected type %T, got type %T", new(Tx), tx) } } + +// Account contains necessary info for sdk.Account +type Account struct { + Balance pack.U256 + Nonce pack.U64 +} + +// Account query account with address. This method is not a part of the +// multichain.AccountClient API, but will be used in the test infrastructure. +func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Account, error) { + actor, err := client.node.StateGetActor(ctx, addr, types.NewTipSetKey(cid.Undef)) + if err != nil { + return Account{}, fmt.Errorf("searching state for addr: %v", addr) + } + + return Account{ + Balance: pack.NewU256FromInt(big.NewInt(actor.Balance.Int64())), + Nonce: pack.NewU64(actor.Nonce), + }, nil +} diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 2047e392..5aeaede6 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -23,7 +23,7 @@ var ( ) // NewClient returns returns a new Client with terra codec -func NewClient(opts ClientOptions) account.Client { +func NewClient(opts ClientOptions) *Client { return cosmos.NewClient(opts, app.MakeCodec()) } diff --git a/multichain_test.go b/multichain_test.go index b0cc63f9..9813e5df 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -222,9 +222,9 @@ var _ = Describe("Multichain", func() { privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String randomRecipientAddr func() multichain.Address - initialise func(pack.String) multichain.AccountClient + initialise func(pack.String, multichain.Address) (multichain.AccountClient, pack.U256) txBuilder multichain.AccountTxBuilder - txParams func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) + txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ { @@ -263,12 +263,18 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return recipient }, - func(rpcURL pack.String) multichain.AccountClient { + func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { client := terra.NewClient( terra.DefaultClientOptions(). WithHost(rpcURL), ) - return client + cosmossdk.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") + terraAddr, err := cosmossdk.AccAddressFromBech32(string(addr)) + Expect(err).NotTo(HaveOccurred()) + accountInfo, err := client.Account(terra.Address(terraAddr)) + Expect(err).NotTo(HaveOccurred()) + + return client, pack.NewU256FromU64(accountInfo.SequenceNumber) }, terra.NewTxBuilder(terra.TxBuilderOptions{ AccountNumber: pack.NewU64(1), @@ -276,13 +282,12 @@ var _ = Describe("Multichain", func() { CoinDenom: "uluna", Cdc: app.MakeCodec(), }), - func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) - nonce := pack.NewU256FromU64(0) gasLimit := pack.NewU256FromU64(pack.U64(300000)) gasPrice := pack.NewU256FromU64(pack.U64(300)) payload := pack.NewBytes([]byte("multichain")) - return amount, nonce, gasLimit, gasPrice, payload + return amount, gasLimit, gasPrice, payload }, multichain.Terra, }, @@ -332,7 +337,7 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return multichain.Address(pack.String(addr.String())) }, - func(rpcURL pack.String) multichain.AccountClient { + func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { // dirty hack to fetch auth token authToken := fetchAuthToken() client, err := filecoin.NewClient( @@ -341,16 +346,20 @@ var _ = Describe("Multichain", func() { WithAuthToken(authToken), ) Expect(err).NotTo(HaveOccurred()) - return client + filAddr, err := filaddress.NewFromString(string(addr)) + Expect(err).NotTo(HaveOccurred()) + accountInfo, err := client.Account(ctx, filAddr) + Expect(err).NotTo(HaveOccurred()) + + return client, pack.NewU256FromU64(accountInfo.Nonce) }, filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(149514))), - func() (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) - nonce := pack.NewU256FromU64(pack.NewU64(0)) gasLimit := pack.NewU256FromU64(pack.NewU64(495335)) gasPrice := pack.NewU256FromU64(pack.NewU64(149838)) payload := pack.Bytes(nil) - return amount, nonce, gasLimit, gasPrice, payload + return amount, gasLimit, gasPrice, payload }, multichain.Filecoin, }, @@ -362,17 +371,17 @@ var _ = Describe("Multichain", func() { Specify("build, broadcast and fetch tx", func() { // Load private key and the associated address. senderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv() - fmt.Printf("sender address = %v\n", senderAddr) // Get a random recipient address. recipientAddr := accountChain.randomRecipientAddr() - fmt.Printf("random recipient = %v\n", recipientAddr) - // Initialise the account chain's client. - accountClient := accountChain.initialise(accountChain.rpcURL) + // Initialise the account chain's client, and possibly get a nonce for + // the sender. + accountClient, nonce := accountChain.initialise(accountChain.rpcURL, senderAddr) // Build a transaction. - amount, nonce, gasLimit, gasPrice, payload := accountChain.txParams() + amount, gasLimit, gasPrice, payload := accountChain.txParams() + accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), recipientAddr, @@ -398,13 +407,9 @@ var _ = Describe("Multichain", func() { pack.NewBytes(senderPubKeyBytes), ) Expect(err).NotTo(HaveOccurred()) - ser, err := accountTx.Serialize() - Expect(err).NotTo(HaveOccurred()) - fmt.Printf("tx serialised = %v\n", ser) // Submit the transaction to the account chain. txHash := accountTx.Hash() - fmt.Printf("tx hash = %v\n", txHash) err = accountClient.SubmitTx(ctx, accountTx) Expect(err).NotTo(HaveOccurred()) From 4effba19acf581f15846f655265d7f470ec71085 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 00:06:21 +0530 Subject: [PATCH 151/335] pass env file to docker containers --- .github/workflows/test.yml | 21 ++++++++++++++------- infra/.ci-env | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 infra/.ci-env diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7601c8e9..de2562ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,19 +50,26 @@ jobs: golint ./... - name: Run multichain infrastructure (bitcoin) - run: docker run -d -p 18443:18443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoin + run: docker run -d -p 18443:18443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin - name: Run multichain infrastructure (bitcoincash) - run: docker run -d -p 19443:19443 -h 0.0.0.0 rohitnarurkar/multichain_bitcoincash + run: docker run -d -p 19443:19443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash - name: Run multichain infrastructure (digibyte) - run: docker run -d -p 20443:20443 -h 0.0.0.0 rohitnarurkar/multichain_digibyte + run: docker run -d -p 20443:20443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - name: Run multichain infrastructure (dogecoin) - run: docker run -d -p 18332:18332 -h 0.0.0.0 rohitnarurkar/multichain_dogecoin + run: docker run -d -p 18332:18332 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin - name: Run multichain infrastructure (filecoin) - run: docker run -d -p 1234:1234 -h 0.0.0.0 rohitnarurkar/multichain_filecoin + run: docker run -d -p 1234:1234 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - name: Run multichain infrastructure (terra) - run: docker run -d -p 26657:26657 -h 0.0.0.0 rohitnarurkar/multichain_terra + run: docker run -d -p 26657:26657 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra - name: Run multichain infrastructure (zcash) - run: docker run -d -p 18232:18232 -h 0.0.0.0 rohitnarurkar/multichain_zcash + run: docker run -d -p 18232:18232 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master diff --git a/infra/.ci-env b/infra/.ci-env new file mode 100644 index 00000000..96cba816 --- /dev/null +++ b/infra/.ci-env @@ -0,0 +1,18 @@ +BINANCE_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" +BINANCE_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A +BITCOIN_PK=cUJCHRMSUwkcofsHjFWBELT3yEAejokdKhyTNv3DScodYWzztBae +BITCOIN_ADDRESS=mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4 +BITCOINCASH_PK=cSEohZFQLKuemNeBVrzwxniouUJJxdcx7Tm6HpspYuxraVjytieW +BITCOINCASH_ADDRESS=bchreg:qp6tejc0ghtjeejcxa97amzvxvzacjt4qczpy2n3gf +DIGIBYTE_PK=efbJxdzwR1tZD7KWYmKBhmxR6TNb25P9z29ajaoALhkn1LdNe7Ci +DIGIBYTE_ADDRESS=shb4rf33ozMX8rinHsC6GghrvvA8RKTyGb +DOGECOIN_PK=cRZnRgH2ztcJupCzkWbq2mjiT8PSFAmtYRYb1phg1vSRRcNBX4w4 +DOGECOIN_ADDRESS=n3PSSpR4zqUKWH4tcRjP9aTwJ4GmixQXmt +ETHEREUM_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" +ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A +FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d +FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa +TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 +TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u +ZCASH_PK=cNSVbbsAcBQ6BAmMr6yH6DLWr7QTDptHwdzpy4GYxGDkNZeKnczK +ZCASH_ADDRESS=tmCTReBSJEDMWfFCkXXPMSB3EfuPg6SE9dw From e24c21c43f8845f86696160a175637dbdf408e3a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 03:54:20 +0530 Subject: [PATCH 152/335] add gas API for Filecoin --- chain/filecoin/gas.go | 30 ++++++++++++++++++++++++++++++ chain/filecoin/gas_test.go | 1 + 2 files changed, 31 insertions(+) create mode 100644 chain/filecoin/gas.go create mode 100644 chain/filecoin/gas_test.go diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go new file mode 100644 index 00000000..5a244499 --- /dev/null +++ b/chain/filecoin/gas.go @@ -0,0 +1,30 @@ +package filecoin + +import ( + "context" + + "github.com/renproject/multichain/api/gas" + "github.com/renproject/pack" +) + +// A GasEstimator returns the gas-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// gas-per-byte. +type GasEstimator struct { + gasPerByte pack.U256 +} + +// NewGasEstimator returns a simple gas estimator that always returns the same +// amount of gas-per-byte. +func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { + return &GasEstimator{ + gasPerByte: gasPerByte, + } +} + +// EstimateGasPrice returns gas required per byte for Cosmos-compatible chains. +func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, error) { + return gasEstimator.gasPerByte, nil +} diff --git a/chain/filecoin/gas_test.go b/chain/filecoin/gas_test.go new file mode 100644 index 00000000..0d419baa --- /dev/null +++ b/chain/filecoin/gas_test.go @@ -0,0 +1 @@ +package filecoin_test From 2dd4333ec54cb0ac217494ceb3510e426342e324 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 04:03:46 +0530 Subject: [PATCH 153/335] use bytes to avoid underflow --- chain/filecoin/client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index aa27196e..956c3b8d 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -163,8 +163,14 @@ func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Acc return Account{}, fmt.Errorf("searching state for addr: %v", addr) } + balanceBytes, err := actor.Balance.Bytes() + if err != nil { + return Account{}, fmt.Errorf("extracting balance bytes: %v", err) + } + balance := big.NewInt(0).SetBytes(balanceBytes) + return Account{ - Balance: pack.NewU256FromInt(big.NewInt(actor.Balance.Int64())), + Balance: pack.NewU256FromInt(balance), Nonce: pack.NewU64(actor.Nonce), }, nil } From 929d25ffeefcc7fa2f56bf98c7cb600cc7c6f11e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 04:09:22 +0530 Subject: [PATCH 154/335] skip digibyte from build --- .github/workflows/test.yml | 35 +++++++++++++++---------------- multichain_test.go | 42 +++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de2562ff..13a96c27 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,12 +22,17 @@ jobs: key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - name: Install dependency packages - run: - sudo apt-get install mesa-opencl-icd ocl-icd-opencl-dev + run: | + apt-get update + apt-get install -y build-essential + apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env - name: Get dependencies run: | export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env go get -u github.com/onsi/ginkgo/ginkgo go get -u github.com/onsi/gomega/... go get -u golang.org/x/lint/golint @@ -36,6 +41,7 @@ jobs: - name: Run vetting run: | + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi make cd $GITHUB_WORKSPACE @@ -50,26 +56,20 @@ jobs: golint ./... - name: Run multichain infrastructure (bitcoin) - run: docker run -d -p 18443:18443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin + run: docker run -d -p 18443:18443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin - name: Run multichain infrastructure (bitcoincash) - run: docker run -d -p 19443:19443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash - - name: Run multichain infrastructure (digibyte) - run: docker run -d -p 20443:20443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte + run: docker run -d -p 19443:19443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash + # Skip DigiByte. + # - name: Run multichain infrastructure (digibyte) + # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - name: Run multichain infrastructure (dogecoin) - run: docker run -d -p 18332:18332 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin + run: docker run -d -p 18332:18332 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin - name: Run multichain infrastructure (filecoin) - run: docker run -d -p 1234:1234 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin + run: docker run -d -p 1234:1234 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - name: Run multichain infrastructure (terra) - run: docker run -d -p 26657:26657 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra + run: docker run -d -p 26657:26657 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra - name: Run multichain infrastructure (zcash) - run: docker run -d -p 18232:18232 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash + run: docker run -d -p 18232:18232 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master @@ -90,7 +90,6 @@ jobs: covermerge \ chain/bitcoin.out \ chain/bitcoincash.out \ - chain/digibyte.out \ chain/dogecoin.out \ chain/ethereum.out \ chain/filecoin.out \ diff --git a/multichain_test.go b/multichain_test.go index 9813e5df..780a68bd 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -24,7 +24,7 @@ import ( "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" - "github.com/renproject/multichain/chain/digibyte" + // "github.com/renproject/multichain/chain/digibyte" "github.com/renproject/multichain/chain/dogecoin" "github.com/renproject/multichain/chain/filecoin" "github.com/renproject/multichain/chain/terra" @@ -488,26 +488,26 @@ var _ = Describe("Multichain", func() { bitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams), multichain.BitcoinCash, }, - { - "DIGIBYTE_PK", - func(pkh []byte) (btcutil.Address, error) { - addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) - return addr, err - }, - func(script []byte) (btcutil.Address, error) { - addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) - return addr, err - }, - pack.NewString("http://0.0.0.0:20443"), - func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { - client := digibyte.NewClient(digibyte.DefaultClientOptions()) - outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) - Expect(err).NotTo(HaveOccurred()) - return client, outputs, client.Confirmations - }, - digibyte.NewTxBuilder(&digibyte.RegressionNetParams), - multichain.DigiByte, - }, + // { + // "DIGIBYTE_PK", + // func(pkh []byte) (btcutil.Address, error) { + // addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) + // return addr, err + // }, + // func(script []byte) (btcutil.Address, error) { + // addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) + // return addr, err + // }, + // pack.NewString("http://0.0.0.0:20443"), + // func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + // client := digibyte.NewClient(digibyte.DefaultClientOptions()) + // outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + // Expect(err).NotTo(HaveOccurred()) + // return client, outputs, client.Confirmations + // }, + // digibyte.NewTxBuilder(&digibyte.RegressionNetParams), + // multichain.DigiByte, + // }, { "DOGECOIN_PK", func(pkh []byte) (btcutil.Address, error) { From ded4912838b72b1d8a8cdebf456eb9df749b230e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 04:11:29 +0530 Subject: [PATCH 155/335] permission for package lock --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13a96c27..ffa30137 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,9 +23,9 @@ jobs: - name: Install dependency packages run: | - apt-get update - apt-get install -y build-essential - apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env From 53cf185dd7ad677b9acdfed7e947f22c35ee62d1 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Tue, 15 Sep 2020 12:48:15 +1000 Subject: [PATCH 156/335] infra/filecoin: check out working commit --- infra/filecoin/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index d816630f..5442e221 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -11,6 +11,7 @@ ENV PATH=$PATH:/usr/local/go/bin WORKDIR /app RUN git clone https://github.com/filecoin-project/lotus . +RUN git checkout 232cc320bd6de432b54008cb37619d45e8869df0 RUN make 2k RUN ./lotus fetch-params 2048 RUN ./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 From f517c77aa247fadc6e88aa3fbcb914f9117420f1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 13:31:50 +0530 Subject: [PATCH 157/335] pass address args to run scripts --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ffa30137..13b047cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,20 +56,44 @@ jobs: golint ./... - name: Run multichain infrastructure (bitcoin) - run: docker run -d -p 18443:18443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoin + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 18443:18443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_bitcoin ./root/run.sh $BITCOIN_ADDRESS - name: Run multichain infrastructure (bitcoincash) - run: docker run -d -p 19443:19443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_bitcoincash + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 19443:19443 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_bitcoincash ./root/run.sh $BITCOINCASH_ADDRESS # Skip DigiByte. # - name: Run multichain infrastructure (digibyte) # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - name: Run multichain infrastructure (dogecoin) - run: docker run -d -p 18332:18332 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_dogecoin + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 18332:18332 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_dogecoin ./root/run.sh $DOGECOIN_ADDRESS - name: Run multichain infrastructure (filecoin) - run: docker run -d -p 1234:1234 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env --name infra_filecoin_1 rohitnarurkar/multichain_filecoin + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 1234:1234 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - name: Run multichain infrastructure (terra) - run: docker run -d -p 26657:26657 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_terra + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 26657:26657 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_terra ./root/run.sh $TERRA_ADDRESS - name: Run multichain infrastructure (zcash) - run: docker run -d -p 18232:18232 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_zcash + run: | + source $GITHUB_WORKSPACE/infra/.env + docker run -d -p 18232:18232 -h 0.0.0.0 \ + --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + rohitnarurkar/multichain_zcash ./root/run.sh $ZCASH_ADDRESS - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master From 3d5c50a73032165b812878cbede275687d6349ed Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 14:22:58 +0530 Subject: [PATCH 158/335] test arg passing to container --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13b047cf..2c0d7b66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,13 +60,13 @@ jobs: source $GITHUB_WORKSPACE/infra/.env docker run -d -p 18443:18443 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoin ./root/run.sh $BITCOIN_ADDRESS + rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS - name: Run multichain infrastructure (bitcoincash) run: | source $GITHUB_WORKSPACE/infra/.env docker run -d -p 19443:19443 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoincash ./root/run.sh $BITCOINCASH_ADDRESS + rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS # Skip DigiByte. # - name: Run multichain infrastructure (digibyte) # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte @@ -75,7 +75,7 @@ jobs: source $GITHUB_WORKSPACE/infra/.env docker run -d -p 18332:18332 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_dogecoin ./root/run.sh $DOGECOIN_ADDRESS + rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS - name: Run multichain infrastructure (filecoin) run: | source $GITHUB_WORKSPACE/infra/.env @@ -87,13 +87,13 @@ jobs: source $GITHUB_WORKSPACE/infra/.env docker run -d -p 26657:26657 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_terra ./root/run.sh $TERRA_ADDRESS + rohitnarurkar/multichain_terra $TERRA_ADDRESS - name: Run multichain infrastructure (zcash) run: | source $GITHUB_WORKSPACE/infra/.env docker run -d -p 18232:18232 -h 0.0.0.0 \ --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_zcash ./root/run.sh $ZCASH_ADDRESS + rohitnarurkar/multichain_zcash $ZCASH_ADDRESS - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master From 47ed7900c64f4a213ceceaa5eca014bbd7d4257d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 16 Sep 2020 15:10:05 +0530 Subject: [PATCH 159/335] test only the multichain test suite --- .github/workflows/test.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c0d7b66..2caf45bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,14 +110,4 @@ jobs: export PATH=$PATH:$(go env GOPATH)/bin source ./infra/.env cd $GITHUB_WORKSPACE - CI=true ginkgo --v --race --cover --coverprofile coverprofile.out ./... - covermerge \ - chain/bitcoin.out \ - chain/bitcoincash.out \ - chain/dogecoin.out \ - chain/ethereum.out \ - chain/filecoin.out \ - chain/terra.out \ - chain/zcash.out \ - coverprofile.out > coverprofile.out - goveralls -coverprofile=coverprofile.out -service=github + CI=true go test From c7eda44fe523a81ee36fae0406bb5363898835db Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 21 Sep 2020 00:59:05 +0530 Subject: [PATCH 160/335] check error code (filecoin) --- chain/filecoin/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 956c3b8d..3b03b89e 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -102,6 +102,9 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack if messageLookup == nil { return nil, pack.NewU64(0), fmt.Errorf("searching state for txid %v: not found", msgID) } + if messageLookup.Receipt.ExitCode.IsError() { + return nil, pack.NewU64(0), fmt.Errorf("transaction execution error: %v", messageLookup.Receipt.ExitCode.String()) + } // get the most recent tipset and its height headTipset, err := client.node.ChainHead(ctx) From 66306aa8d6fc00171bf981eda1a2d8dafe658a4b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 21 Sep 2020 15:50:50 +0530 Subject: [PATCH 161/335] (test) bitcoin cash address API --- chain/bitcoincash/address.go | 138 ++++++++++++++++++++++++++++-- chain/bitcoincash/address_test.go | 63 ++++++++++++++ chain/bitcoincash/utxo.go | 2 +- multichain_test.go | 43 ++++++++++ 4 files changed, 239 insertions(+), 7 deletions(-) diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index efcebd83..c33cf54e 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -7,7 +7,10 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" + "github.com/btcsuite/btcutil/base58" "github.com/btcsuite/btcutil/bech32" + "github.com/renproject/multichain/api/address" + "github.com/renproject/pack" "golang.org/x/crypto/ripemd160" ) @@ -24,6 +27,129 @@ var ( }() ) +type AddressEncodeDecoder struct { + AddressEncoder + AddressDecoder +} + +func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { + return AddressEncodeDecoder{ + AddressEncoder: NewAddressEncoder(params), + AddressDecoder: NewAddressDecoder(params), + } +} + +type AddressEncoder struct { + params *chaincfg.Params +} + +func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { + return AddressEncoder{params: params} +} + +type AddressDecoder struct { + params *chaincfg.Params +} + +func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { + return AddressDecoder{params: params} +} + +func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + rawAddrBytes := []byte(rawAddr) + var encodedAddr string + var err error + + switch len(rawAddrBytes) - 1 { + case ripemd160.Size: // P2PKH or P2SH + switch rawAddrBytes[0] { + case 0: // P2PKH + encodedAddr, err = encodeAddress(0x00, rawAddrBytes[1:21], encoder.params) + case 8: // P2SH + encodedAddr, err = encodeAddress(8, rawAddrBytes[1:21], encoder.params) + default: + return address.Address(""), btcutil.ErrUnknownAddressType + } + default: + return encodeLegacyAddress(rawAddr, encoder.params) + } + + if err != nil { + return address.Address(""), fmt.Errorf("encode address: %v", err) + } + + return address.Address(pack.String(encodedAddr)), nil +} + +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + // Legacy address decoding + if legacyAddr, err := btcutil.DecodeAddress(string(addr), decoder.params); err == nil { + switch legacyAddr.(type) { + case *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash, *btcutil.AddressPubKey: + return decodeLegacyAddress(addr, decoder.params) + case *btcutil.AddressWitnessPubKeyHash, *btcutil.AddressWitnessScriptHash: + return nil, fmt.Errorf("unsuported segwit bitcoin address type %T", legacyAddr) + default: + return nil, fmt.Errorf("unsuported legacy bitcoin address type %T", legacyAddr) + } + } + + if addrParts := strings.Split(string(addr), ":"); len(addrParts) != 1 { + addr = address.Address(addrParts[1]) + } + + decoded := DecodeString(string(addr)) + if !VerifyChecksum(AddressPrefix(decoder.params), decoded) { + return nil, btcutil.ErrChecksumMismatch + } + + addrBytes, err := bech32.ConvertBits(decoded[:len(decoded)-8], 5, 8, false) + if err != nil { + return nil, err + } + + switch len(addrBytes) - 1 { + case ripemd160.Size: // P2PKH or P2SH + switch addrBytes[0] { + case 0, 8: // P2PKH or P2SH + return address.RawAddress(pack.NewBytes(addrBytes)), nil + default: + return nil, btcutil.ErrUnknownAddressType + } + default: + return nil, errors.New("decoded address is of unknown size") + } +} + +func encodeLegacyAddress(rawAddr address.RawAddress, params *chaincfg.Params) (address.Address, error) { + // Validate that the base58 address is in fact in correct format. + encodedAddr := base58.Encode([]byte(rawAddr)) + if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { + return address.Address(""), fmt.Errorf("address validation error: %v", err) + } + + return address.Address(encodedAddr), nil +} + +func decodeLegacyAddress(addr address.Address, params *chaincfg.Params) (address.RawAddress, error) { + // Decode the checksummed base58 format address. + decoded, ver, err := base58.CheckDecode(string(addr)) + if err != nil { + return nil, fmt.Errorf("base58 decoding error: %v", err) + } + if len(decoded) != 20 { + return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + } + + // Validate the address format. + switch ver { + case params.PubKeyHashAddrID, params.ScriptHashAddrID: + return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil + default: + return nil, fmt.Errorf("unknown address type") + } +} + // An Address represents a Bitcoin Cash address. type Address interface { btcutil.Address @@ -77,7 +203,7 @@ func (addr AddressPubKeyHash) String() string { // for how this method differs from String. func (addr AddressPubKeyHash) EncodeAddress() string { hash := *addr.AddressPubKeyHash.Hash160() - encoded, err := EncodeAddress(0x00, hash[:], addr.params) + encoded, err := encodeAddress(0x00, hash[:], addr.params) if err != nil { panic(fmt.Errorf("invalid address: %v", err)) } @@ -139,7 +265,7 @@ func (addr AddressScriptHash) String() string { // for how this method differs from String. func (addr AddressScriptHash) EncodeAddress() string { hash := *addr.AddressScriptHash.Hash160() - encoded, err := EncodeAddress(8, hash[:], addr.params) + encoded, err := encodeAddress(8, hash[:], addr.params) if err != nil { panic(fmt.Errorf("invalid address: %v", err)) } @@ -163,9 +289,9 @@ func (addr AddressScriptHash) BitcoinAddress() btcutil.Address { return addr.AddressScriptHash } -// EncodeAddress using Bitcoin Cash address encoding, assuming that the hash +// encodeAddress using Bitcoin Cash address encoding, assuming that the hash // data has no prefix or checksum. -func EncodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, error) { +func encodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, error) { if (len(hash)-20)/4 != int(version)%8 { return "", fmt.Errorf("invalid version: %d", version) } @@ -176,8 +302,8 @@ func EncodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, return EncodeToString(AppendChecksum(AddressPrefix(params), data)), nil } -// DecodeAddress implements the address.Decoder interface -func DecodeAddress(addr string, params *chaincfg.Params) (Address, error) { +// decodeAddress implements the address.Decoder interface +func decodeAddress(addr string, params *chaincfg.Params) (Address, error) { // Legacy address decoding if address, err := btcutil.DecodeAddress(addr, params); err == nil { switch address.(type) { diff --git a/chain/bitcoincash/address_test.go b/chain/bitcoincash/address_test.go index a834dd27..773eef4f 100644 --- a/chain/bitcoincash/address_test.go +++ b/chain/bitcoincash/address_test.go @@ -1 +1,64 @@ package bitcoincash_test + +import ( + "math/rand" + + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/id" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/bitcoincash" +) + +var _ = Describe("Bitcoin Cash Address", func() { + Context("address", func() { + addrEncodeDecoder := bitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + + It("addr pub key hash", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + + It("addr script hash", func() { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrScriptHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + + It("legacy addr", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + }) +}) diff --git a/chain/bitcoincash/utxo.go b/chain/bitcoincash/utxo.go index 2880be16..88842a33 100644 --- a/chain/bitcoincash/utxo.go +++ b/chain/bitcoincash/utxo.go @@ -83,7 +83,7 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := DecodeAddress(string(recipient.To), txBuilder.params) + addr, err := decodeAddress(string(recipient.To), txBuilder.params) if err != nil { return &Tx{}, err } diff --git a/multichain_test.go b/multichain_test.go index 780a68bd..55f22a36 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -165,6 +165,49 @@ var _ = Describe("Multichain", func() { return multichain.RawAddress([]byte{}) }, }, + { + multichain.BitcoinCash, + func() multichain.AddressEncodeDecoder { + addrEncodeDecoder := bitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + return addrEncodeDecoder + }, + func() multichain.Address { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrPubKeyHash.EncodeAddress()) + }, + func() multichain.RawAddress { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + + addrBytes := addrPubKeyHash.ScriptAddress() + addrBytes = append([]byte{0x00}, addrBytes...) + return multichain.RawAddress(pack.Bytes(addrBytes)) + }, + func() multichain.Address { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrScriptHash.EncodeAddress()) + }, + func() multichain.RawAddress { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + + addrBytes := addrScriptHash.ScriptAddress() + addrBytes = append([]byte{8}, addrBytes...) + return multichain.RawAddress(pack.Bytes(addrBytes)) + }, + }, } for _, chain := range chainTable { From 53b50e40508d68d9b188750d9183b1f1ba9f9785 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 21 Sep 2020 16:44:35 +0530 Subject: [PATCH 162/335] (test) zcash address API --- chain/zcash/address.go | 103 +++++++++++++++++++++++++++++++++++- chain/zcash/address_test.go | 47 ++++++++++++++++ chain/zcash/utxo.go | 2 +- multichain_test.go | 37 +++++++++++++ 4 files changed, 186 insertions(+), 3 deletions(-) diff --git a/chain/zcash/address.go b/chain/zcash/address.go index c1ae2851..2ebb9909 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -4,13 +4,112 @@ import ( "bytes" "crypto/sha256" "errors" + "fmt" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" + "github.com/renproject/multichain/api/address" + "github.com/renproject/pack" "golang.org/x/crypto/ripemd160" ) +type AddressEncodeDecoder struct { + AddressEncoder + AddressDecoder +} + +type AddressEncoder struct { + params *Params +} + +type AddressDecoder struct { + params *Params +} + +func NewAddressEncoder(params *Params) AddressEncoder { + return AddressEncoder{params: params} +} + +func NewAddressDecoder(params *Params) AddressDecoder { + return AddressDecoder{params: params} +} + +func NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder { + return AddressEncodeDecoder{ + AddressEncoder: NewAddressEncoder(params), + AddressDecoder: NewAddressDecoder(params), + } +} + +func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + if len(rawAddr) != 26 && len(rawAddr) != 25 { + return address.Address(""), fmt.Errorf("address of unknown length") + } + + var addrType uint8 + var err error + var hash [20]byte + var prefix []byte + if len(rawAddr) == 26 { + prefix = rawAddr[:2] + addrType, _, err = parsePrefix(prefix) + copy(hash[:], rawAddr[2:22]) + } else { + prefix = rawAddr[:1] + addrType, _, err = parsePrefix(prefix) + copy(hash[:], rawAddr[1:21]) + } + if err != nil { + return address.Address(""), fmt.Errorf("parsing prefix: %v", err) + } + + switch addrType { + case 0, 1: // P2PKH or P2SH + return address.Address(pack.String(encodeAddress(hash[:], prefix))), nil + default: + return address.Address(""), errors.New("unknown address") + } +} + +func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + var decoded = base58.Decode(string(addr)) + if len(decoded) != 26 && len(decoded) != 25 { + return nil, base58.ErrInvalidFormat + } + + var cksum [4]byte + copy(cksum[:], decoded[len(decoded)-4:]) + if checksum(decoded[:len(decoded)-4]) != cksum { + return nil, base58.ErrChecksum + } + + if len(decoded)-6 != ripemd160.Size && len(decoded)-5 != ripemd160.Size { + return nil, errors.New("incorrect payload len") + } + + var addrType uint8 + var err error + var hash [20]byte + if len(decoded) == 26 { + addrType, _, err = parsePrefix(decoded[:2]) + copy(hash[:], decoded[2:22]) + } else { + addrType, _, err = parsePrefix(decoded[:1]) + copy(hash[:], decoded[1:21]) + } + if err != nil { + return nil, err + } + + switch addrType { + case 0, 1: // P2PKH or P2SH + return address.RawAddress(pack.Bytes(decoded)), nil + default: + return nil, errors.New("unknown address") + } +} + // An Address represents a Zcash address. type Address interface { btcutil.Address @@ -122,9 +221,9 @@ func (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool { return addr.AddressScriptHash.IsForNet(params) } -// DecodeAddress decodes a string-representation of an address to an address +// decodeAddress decodes a string-representation of an address to an address // type that implements the zcash.Address interface -func DecodeAddress(addr string) (Address, error) { +func decodeAddress(addr string) (Address, error) { var decoded = base58.Decode(addr) if len(decoded) != 26 && len(decoded) != 25 { return nil, base58.ErrInvalidFormat diff --git a/chain/zcash/address_test.go b/chain/zcash/address_test.go index 38e5b45b..a547ebfe 100644 --- a/chain/zcash/address_test.go +++ b/chain/zcash/address_test.go @@ -1 +1,48 @@ package zcash_test + +import ( + "math/rand" + + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcutil" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/id" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/zcash" +) + +var _ = Describe("Zcash Address", func() { + Context("address", func() { + addrEncodeDecoder := zcash.NewAddressEncodeDecoder(&zcash.RegressionNetParams) + + It("addr pub key hash", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + + It("addr script hash", func() { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrScriptHash.EncodeAddress()) + + decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + }) +}) diff --git a/chain/zcash/utxo.go b/chain/zcash/utxo.go index ec852dd3..dc413340 100644 --- a/chain/zcash/utxo.go +++ b/chain/zcash/utxo.go @@ -78,7 +78,7 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := DecodeAddress(string(recipient.To)) + addr, err := decodeAddress(string(recipient.To)) if err != nil { return &Tx{}, err } diff --git a/multichain_test.go b/multichain_test.go index 55f22a36..3befc720 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -208,6 +208,43 @@ var _ = Describe("Multichain", func() { return multichain.RawAddress(pack.Bytes(addrBytes)) }, }, + { + multichain.Zcash, + func() multichain.AddressEncodeDecoder { + addrEncodeDecoder := zcash.NewAddressEncodeDecoder(&zcash.RegressionNetParams) + return addrEncodeDecoder + }, + func() multichain.Address { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrPubKeyHash.EncodeAddress()) + }, + func() multichain.RawAddress { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.RawAddress(pack.Bytes(base58.Decode(addrPubKeyHash.EncodeAddress()))) + }, + func() multichain.Address { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addrScriptHash.EncodeAddress()) + }, + func() multichain.RawAddress { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + Expect(err).NotTo(HaveOccurred()) + return multichain.RawAddress(pack.Bytes(base58.Decode(addrScriptHash.EncodeAddress()))) + }, + }, } for _, chain := range chainTable { From 36f0f01180da15adfcc09ac99945db57c7dfd23d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 22 Sep 2020 18:03:56 +0530 Subject: [PATCH 163/335] (test) sending tx to P2SH address, spend using sigscript --- go.mod | 2 +- go.sum | 2 + multichain_test.go | 242 ++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 223 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 00b96f79..ec863d70 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/renproject/id v0.4.2 - github.com/renproject/pack v0.2.3 + github.com/renproject/pack v0.2.5 github.com/renproject/surge v1.2.6 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.4.0-rc.4 diff --git a/go.sum b/go.sum index 0800b00f..f286014a 100644 --- a/go.sum +++ b/go.sum @@ -1277,6 +1277,8 @@ github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= github.com/renproject/pack v0.2.3/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= +github.com/renproject/pack v0.2.5 h1:BNfam8PCb5qJuIX36IqOkcRgaZLOZsM1lZZSakbOxb4= +github.com/renproject/pack v0.2.5/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= github.com/renproject/surge v1.2.6 h1:4EV2jbBPvQM8Wnv5zL1N1X/UbaH6AZiRUv7r4xZ8ncA= diff --git a/multichain_test.go b/multichain_test.go index 3befc720..ae030876 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -15,6 +15,7 @@ import ( "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" cosmossdk "github.com/cosmos/cosmos-sdk/types" @@ -568,26 +569,6 @@ var _ = Describe("Multichain", func() { bitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams), multichain.BitcoinCash, }, - // { - // "DIGIBYTE_PK", - // func(pkh []byte) (btcutil.Address, error) { - // addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) - // return addr, err - // }, - // func(script []byte) (btcutil.Address, error) { - // addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) - // return addr, err - // }, - // pack.NewString("http://0.0.0.0:20443"), - // func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { - // client := digibyte.NewClient(digibyte.DefaultClientOptions()) - // outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) - // Expect(err).NotTo(HaveOccurred()) - // return client, outputs, client.Confirmations - // }, - // digibyte.NewTxBuilder(&digibyte.RegressionNetParams), - // multichain.DigiByte, - // }, { "DOGECOIN_PK", func(pkh []byte) (btcutil.Address, error) { @@ -628,12 +609,34 @@ var _ = Describe("Multichain", func() { zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), multichain.Zcash, }, + /* + { + "DIGIBYTE_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams) + return addr, err + }, + pack.NewString("http://0.0.0.0:20443"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := digibyte.NewClient(digibyte.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + digibyte.NewTxBuilder(&digibyte.RegressionNetParams), + multichain.DigiByte, + }, + */ } for _, utxoChain := range utxoChainTable { utxoChain := utxoChain Context(fmt.Sprintf("%v", utxoChain.chain), func() { - Specify("build, broadcast and fetch tx", func() { + Specify("(P2PKH) build, broadcast and fetch tx", func() { // Load private key. pkEnv := os.Getenv(utxoChain.privKeyEnv) if pkEnv == "" { @@ -654,7 +657,14 @@ var _ = Describe("Multichain", func() { // function to query the number of block confirmations for a transaction. utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) Expect(len(unspentOutputs)).To(BeNumerically(">", 0)) - output := unspentOutputs[0] + var output multichain.UTXOutput + thresholdValue := pack.NewU256FromU64(pack.NewU64(2500)) + for _, unspentOutput := range unspentOutputs { + if unspentOutput.Value.GreaterThan(thresholdValue) { + output = unspentOutput + break + } + } // Build a transaction inputs := []multichain.UTXOInput{ @@ -720,11 +730,172 @@ var _ = Describe("Multichain", func() { Expect(err).ToNot(HaveOccurred()) Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) }) + + Specify("(P2SH) build, broadcast and fetch tx", func() { + // Load private key. + pkEnv := os.Getenv(utxoChain.privKeyEnv) + if pkEnv == "" { + panic(fmt.Sprintf("%v is undefined", utxoChain.privKeyEnv)) + } + wif, err := btcutil.DecodeWIF(pkEnv) + Expect(err).NotTo(HaveOccurred()) + + // Get the PKH address from the loaded private key. + pkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed())) + Expect(err).NotTo(HaveOccurred()) + + // Recipient + recipientPrivKey := id.NewPrivKey() + recipientPubKey := recipientPrivKey.PubKey() + recipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey) + Expect(err).NotTo(HaveOccurred()) + pubKey := pack.Bytes(((*btcec.PublicKey)(recipientPubKey)).SerializeCompressed()) + script, err := getScript(pubKey) + Expect(err).NotTo(HaveOccurred()) + pubKeyScript, err := getPubKeyScript(pubKey) + Expect(err).NotTo(HaveOccurred()) + recipientP2SH, err := utxoChain.newAddressSH(script) + Expect(err).NotTo(HaveOccurred()) + + // Initialise the UTXO client and fetch the unspent outputs. Also get a + // function to query the number of block confirmations for a transaction. + utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) + Expect(len(unspentOutputs)).To(BeNumerically(">", 0)) + var output multichain.UTXOutput + thresholdValue := pack.NewU256FromU64(pack.NewU64(2500)) + for _, unspentOutput := range unspentOutputs { + if unspentOutput.Value.GreaterThan(thresholdValue) { + output = unspentOutput + break + } + } + + // Build a transaction + inputs := []multichain.UTXOInput{ + {Output: multichain.UTXOutput{ + Outpoint: multichain.UTXOutpoint{ + Hash: output.Outpoint.Hash[:], + Index: output.Outpoint.Index, + }, + PubKeyScript: output.PubKeyScript, + Value: output.Value, + }}, + } + recipients := []multichain.UTXORecipient{ + { + To: multichain.Address(recipientP2SH.EncodeAddress()), + Value: output.Value.Sub(pack.NewU256FromU64(pack.U64(500))), + }, + } + utxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients) + Expect(err).NotTo(HaveOccurred()) + + // Get the sighashes that need to be signed, and sign them. + sighashes, err := utxoTx.Sighashes() + signatures := make([]pack.Bytes65, len(sighashes)) + Expect(err).ToNot(HaveOccurred()) + for i := range sighashes { + hash := id.Hash(sighashes[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures[i] = pack.NewBytes65(signature) + } + Expect(utxoTx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + + // Submit the signed transaction to the UTXO chain's node. + txHash, err := utxoTx.Hash() + Expect(err).ToNot(HaveOccurred()) + err = utxoClient.SubmitTx(ctx, utxoTx) + Expect(err).ToNot(HaveOccurred()) + logger.Debug("[P2KH -> P2SH] submit tx", zap.String("from", pkhAddr.EncodeAddress()), zap.String("to", recipientP2SH.EncodeAddress()), zap.String("txHash", string(txHashToHex(txHash)))) + + // Check confirmations after waiting for the transaction to be in the + // mempool. + time.Sleep(time.Second) + + for { + // Loop until the transaction has at least a few + // confirmations. + confs, err := confsFn(ctx, txHash) + Expect(err).ToNot(HaveOccurred()) + logger.Debug(fmt.Sprintf("[%v] confirming", utxoChain.chain), zap.Uint64("current", uint64(confs))) + if confs >= 1 { + break + } + time.Sleep(10 * time.Second) + } + + // Load the output and verify that it is equal to the original output. + output2, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ + Hash: txHash, + Index: pack.NewU32(0), + }) + Expect(err).ToNot(HaveOccurred()) + Expect(output2.PubKeyScript.Equal(pubKeyScript)).To(BeTrue()) + + // Validate that the output2 is spendable + sigScript, err := getScript(pubKey) + Expect(err).NotTo(HaveOccurred()) + inputs2 := []multichain.UTXOInput{{ + Output: output2, + SigScript: sigScript, + }} + recipients2 := []multichain.UTXORecipient{{ + To: multichain.Address(pkhAddr.EncodeAddress()), + Value: output2.Value.Sub(pack.NewU256FromU64(pack.U64(500))), + }} + utxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + + // Get the sighashes that need to be signed, and sign them. + sighashes2, err := utxoTx2.Sighashes() + signatures2 := make([]pack.Bytes65, len(sighashes2)) + Expect(err).ToNot(HaveOccurred()) + for i := range sighashes2 { + hash := id.Hash(sighashes2[i]) + signature, err := recipientPrivKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures2[i] = pack.NewBytes65(signature) + } + Expect(utxoTx2.Sign(signatures2, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed()) + + // Submit the signed transaction to the UTXO chain's node. + txHash2, err := utxoTx2.Hash() + Expect(err).ToNot(HaveOccurred()) + err = utxoClient.SubmitTx(ctx, utxoTx2) + Expect(err).ToNot(HaveOccurred()) + logger.Debug("[P2SH -> P2KH] submit tx", zap.String("from", recipientP2SH.EncodeAddress()), zap.String("to", pkhAddr.EncodeAddress()), zap.String("txHash", string(txHashToHex(txHash2)))) + + for { + // Loop until the transaction has at least a few + // confirmations. + confs, err := confsFn(ctx, txHash2) + Expect(err).ToNot(HaveOccurred()) + logger.Debug(fmt.Sprintf("[%v] confirming", utxoChain.chain), zap.Uint64("current", uint64(confs))) + if confs >= 1 { + break + } + time.Sleep(10 * time.Second) + } + }) }) } }) }) +func txHashToHex(txHash pack.Bytes) pack.String { + // bitcoin's msgTx is a byte-reversed hash + // https://github.com/btcsuite/btcd/blob/master/chaincfg/chainhash/hash.go#L27-L28 + txHashCopy := make([]byte, len(txHash)) + copy(txHashCopy[:], txHash) + hashSize := len(txHashCopy) + for i := 0; i < hashSize/2; i++ { + txHashCopy[i], txHashCopy[hashSize-1-i] = txHashCopy[hashSize-1-i], txHashCopy[i] + } + return pack.String(hex.EncodeToString(txHashCopy)) +} + func fetchAuthToken() pack.String { // fetch the auth token from filecoin's running docker container cmd := exec.Command("docker", "exec", "infra_filecoin_1", "/bin/bash", "-c", "/app/lotus auth api-info --perm admin") @@ -741,3 +912,30 @@ func fetchAuthToken() pack.String { authToken := strings.Split(tokenWithSuffix, ":/") return pack.NewString(fmt.Sprintf("Bearer %s", authToken[0])) } + +func getScript(pubKey pack.Bytes) (pack.Bytes, error) { + pubKeyHash160 := btcutil.Hash160(pubKey) + return txscript.NewScriptBuilder(). + AddOp(txscript.OP_DUP). + AddOp(txscript.OP_HASH160). + AddData(pubKeyHash160). + AddOp(txscript.OP_EQUALVERIFY). + AddOp(txscript.OP_CHECKSIG). + Script() +} + +func getPubKeyScript(pubKey pack.Bytes) (pack.Bytes, error) { + script, err := getScript(pubKey) + if err != nil { + return nil, fmt.Errorf("invalid script: %v", err) + } + pubKeyScript, err := txscript.NewScriptBuilder(). + AddOp(txscript.OP_HASH160). + AddData(btcutil.Hash160(script)). + AddOp(txscript.OP_EQUAL). + Script() + if err != nil { + return nil, fmt.Errorf("invalid pubkeyscript: %v", err) + } + return pubKeyScript, nil +} From aff884baa30b706ef33e7824016958caeb6a7d57 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 22 Sep 2020 19:17:30 +0530 Subject: [PATCH 164/335] gas params for filecoin --- multichain_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index ae030876..18cf01f9 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -434,11 +434,11 @@ var _ = Describe("Multichain", func() { return client, pack.NewU256FromU64(accountInfo.Nonce) }, - filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(149514))), + filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))), func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) - gasLimit := pack.NewU256FromU64(pack.NewU64(495335)) - gasPrice := pack.NewU256FromU64(pack.NewU64(149838)) + gasLimit := pack.NewU256FromU64(pack.NewU64(2189560)) + gasPrice := pack.NewU256FromU64(pack.NewU64(186893)) payload := pack.Bytes(nil) return amount, gasLimit, gasPrice, payload }, @@ -493,6 +493,7 @@ var _ = Describe("Multichain", func() { txHash := accountTx.Hash() err = accountClient.SubmitTx(ctx, accountTx) Expect(err).NotTo(HaveOccurred()) + logger.Debug("submit tx", zap.String("from", string(senderAddr)), zap.String("to", string(recipientAddr)), zap.Any("txHash", txHash)) // Wait slightly before we query the chain's node. time.Sleep(time.Second) From 151af9f2c3f6c2559adf0f83f78e883b38489efc Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 11:54:57 +0530 Subject: [PATCH 165/335] add luna and terra to chain types --- multichain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multichain.go b/multichain.go index 9300a11e..c6a9c824 100644 --- a/multichain.go +++ b/multichain.go @@ -169,7 +169,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case BNB, ETH, FIL: + case BNB, ETH, FIL, LUNA: return ChainTypeAccountBased // These assets are define separately because they are mock assets. These @@ -253,7 +253,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Filecoin: + case BinanceSmartChain, Ethereum, Filecoin, Terra: return ChainTypeAccountBased // These chains are define separately because they are mock chains. These From af7c0351ff8c8b518bebf03325a54e3c20a60d45 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 13:17:15 +0530 Subject: [PATCH 166/335] add AccountInfo to account client API --- api/account/account.go | 15 ++++++++++++++ chain/cosmos/client.go | 43 +++++++++++++++++++++++++++++----------- chain/filecoin/client.go | 33 ++++++++++++++++++++++-------- multichain_test.go | 27 ++++++++++--------------- 4 files changed, 82 insertions(+), 36 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 858b6753..48e3bc87 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -59,9 +59,24 @@ type TxBuilder interface { BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } +// The AccountInfo interface defines functionality that must expose account +// specific information for the underlying chain. +type AccountInfo interface { + // Nonce is the current nonce of this account, which must be used to build a + // new transaction. + Nonce() pack.U256 + + // Balance is the native token balance of this account. + Balance() pack.U256 +} + // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { + // Account queries the chain for an address. It returns the address' + // information, which contains the nonce and balance fields. + AccountInfo(context.Context, address.Address) (AccountInfo, error) + // Tx returns the transaction uniquely identified by the given transaction // hash. It also returns the number of confirmations for the transaction. If // the transaction cannot be found before the context is done, or the diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index d3be3ece..8609d843 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -7,10 +7,12 @@ import ( "time" "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" "github.com/renproject/pack" cliContext "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/client/utils" rpchttp "github.com/tendermint/tendermint/rpc/client/http" @@ -121,25 +123,42 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // Account contains necessary info for sdk.Account type Account struct { - Address Address `json:"address"` - AccountNumber pack.U64 `json:"account_number"` - SequenceNumber pack.U64 `json:"sequence_number"` - Coins Coins `json:"coins"` + address Address + accountNumber pack.U64 + sequenceNumber pack.U64 + coins Coins } -// Account query account with address. This method is not a part of the +// Nonce returns the current nonce of the account. This is the nonce to be used +// while building a new transaction. +func (account Account) Nonce() pack.U256 { + return pack.NewU256FromU64(account.sequenceNumber) +} + +// Balance returns the native-token balance of the account. +func (account Account) Balance() pack.U256 { + // FIXME + return pack.NewU256FromU64(pack.NewU64(0)) +} + +// AccountInfo query account with address. This method is not a part of the // multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) Account(addr Address) (Account, error) { +func (client *Client) AccountInfo(_ context.Context, addr address.Address) (account.AccountInfo, error) { + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) + if err != nil { + return nil, fmt.Errorf("bad address: '%v': %v", addr, err) + } + accGetter := auth.NewAccountRetriever(client.cliCtx) - acc, err := accGetter.GetAccount(addr.AccAddress()) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) if err != nil { return Account{}, err } - return Account{ - Address: addr, - AccountNumber: pack.U64(acc.GetAccountNumber()), - SequenceNumber: pack.U64(acc.GetSequence()), - Coins: parseCoins(acc.GetCoins()), + return &Account{ + address: Address(cosmosAddr), + accountNumber: pack.U64(acc.GetAccountNumber()), + sequenceNumber: pack.U64(acc.GetSequence()), + coins: parseCoins(acc.GetCoins()), }, nil } diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 3b03b89e..7a3b00cc 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/ipfs/go-cid" "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" "github.com/renproject/pack" ) @@ -154,14 +155,30 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // Account contains necessary info for sdk.Account type Account struct { - Balance pack.U256 - Nonce pack.U64 + balance pack.U256 + nonce pack.U64 } -// Account query account with address. This method is not a part of the +// Nonce returns the current nonce of the account. This is the nonce to be used +// while building a new transaction. +func (account Account) Nonce() pack.U256 { + return pack.NewU256FromU64(account.nonce) +} + +// Balance returns the native-token balance of the account. +func (account Account) Balance() pack.U256 { + return account.balance +} + +// AccountInfo query account with address. This method is not a part of the // multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Account, error) { - actor, err := client.node.StateGetActor(ctx, addr, types.NewTipSetKey(cid.Undef)) +func (client *Client) AccountInfo(ctx context.Context, addr address.Address) (account.AccountInfo, error) { + filAddr, err := filaddress.NewFromString(string(addr)) + if err != nil { + return nil, fmt.Errorf("bad address '%v': %v", addr, err) + } + + actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef)) if err != nil { return Account{}, fmt.Errorf("searching state for addr: %v", addr) } @@ -172,8 +189,8 @@ func (client *Client) Account(ctx context.Context, addr filaddress.Address) (Acc } balance := big.NewInt(0).SetBytes(balanceBytes) - return Account{ - Balance: pack.NewU256FromInt(balance), - Nonce: pack.NewU64(actor.Nonce), + return &Account{ + balance: pack.NewU256FromInt(balance), + nonce: pack.NewU64(actor.Nonce), }, nil } diff --git a/multichain_test.go b/multichain_test.go index 18cf01f9..38123f98 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -303,7 +303,7 @@ var _ = Describe("Multichain", func() { privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String randomRecipientAddr func() multichain.Address - initialise func(pack.String, multichain.Address) (multichain.AccountClient, pack.U256) + initialise func(pack.String) multichain.AccountClient txBuilder multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain @@ -344,18 +344,13 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return recipient }, - func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { + func(rpcURL pack.String) multichain.AccountClient { client := terra.NewClient( terra.DefaultClientOptions(). WithHost(rpcURL), ) - cosmossdk.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") - terraAddr, err := cosmossdk.AccAddressFromBech32(string(addr)) - Expect(err).NotTo(HaveOccurred()) - accountInfo, err := client.Account(terra.Address(terraAddr)) - Expect(err).NotTo(HaveOccurred()) - return client, pack.NewU256FromU64(accountInfo.SequenceNumber) + return client }, terra.NewTxBuilder(terra.TxBuilderOptions{ AccountNumber: pack.NewU64(1), @@ -418,7 +413,7 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return multichain.Address(pack.String(addr.String())) }, - func(rpcURL pack.String, addr multichain.Address) (multichain.AccountClient, pack.U256) { + func(rpcURL pack.String) multichain.AccountClient { // dirty hack to fetch auth token authToken := fetchAuthToken() client, err := filecoin.NewClient( @@ -427,12 +422,8 @@ var _ = Describe("Multichain", func() { WithAuthToken(authToken), ) Expect(err).NotTo(HaveOccurred()) - filAddr, err := filaddress.NewFromString(string(addr)) - Expect(err).NotTo(HaveOccurred()) - accountInfo, err := client.Account(ctx, filAddr) - Expect(err).NotTo(HaveOccurred()) - return client, pack.NewU256FromU64(accountInfo.Nonce) + return client }, filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))), func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { @@ -458,7 +449,11 @@ var _ = Describe("Multichain", func() { // Initialise the account chain's client, and possibly get a nonce for // the sender. - accountClient, nonce := accountChain.initialise(accountChain.rpcURL, senderAddr) + accountClient := accountChain.initialise(accountChain.rpcURL) + + // Get the appropriate nonce for sender. + accountInfo, err := accountClient.AccountInfo(ctx, senderAddr) + Expect(err).NotTo(HaveOccurred()) // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() @@ -466,7 +461,7 @@ var _ = Describe("Multichain", func() { accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), recipientAddr, - amount, nonce, gasLimit, gasPrice, + amount, accountInfo.Nonce(), gasLimit, gasPrice, payload, ) Expect(err).NotTo(HaveOccurred()) From c7bef940548351d9bc6de2f50be7bc6a32959c9e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 17:33:17 +0530 Subject: [PATCH 167/335] attach tx nonce to fetched tx --- chain/cosmos/client.go | 17 +++++++++++++++++ chain/terra/terra_test.go | 22 +++++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 8609d843..64bb3f44 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -65,6 +65,7 @@ func (opts ClientOptions) WithHost(host pack.String) ClientOptions { type Client struct { opts ClientOptions cliCtx cliContext.CLIContext + cdc *codec.Codec } // NewClient returns a new Client. @@ -79,6 +80,7 @@ func NewClient(opts ClientOptions, cdc *codec.Codec) *Client { return &Client{ opts: opts, cliCtx: cliCtx, + cdc: cdc, } } @@ -99,6 +101,21 @@ func (client *Client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pa return &StdTx{}, pack.NewU64(0), fmt.Errorf("parse tx failed: %v", err) } + // Construct a past context (just before the transaction's height) and query + // the sender account to know the nonce (sequence number) with which this + // transaction was broadcasted. + senderAddr, err := types.AccAddressFromBech32(string(stdTx.From())) + if err != nil { + return &StdTx{}, pack.NewU64(0), fmt.Errorf("bad address '%v': %v", stdTx.From(), err) + } + pastContext := client.cliCtx.WithHeight(res.Height - 1) + accGetter := auth.NewAccountRetriever(pastContext) + acc, err := accGetter.GetAccount(senderAddr) + if err != nil { + return &StdTx{}, pack.NewU64(0), fmt.Errorf("account query failed: %v", err) + } + stdTx.signMsg.Sequence = acc.GetSequence() + return &stdTx, pack.NewU64(1), nil } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 00b58756..a05ab170 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -55,6 +55,9 @@ var _ = Describe("Terra", func() { // instantiate a new client client := terra.NewClient(terra.DefaultClientOptions()) + accountInfo, err := client.AccountInfo(ctx, multichain.Address(addr.String())) + Expect(err).NotTo(HaveOccurred()) + nonce := accountInfo.Nonce() // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ @@ -66,14 +69,15 @@ var _ = Describe("Terra", func() { // build the transaction payload := pack.NewBytes([]byte("multichain")) + amount := pack.NewU256FromU64(pack.U64(2000000)) tx, err := txBuilder.BuildTx( - multichain.Address(addr.String()), // from - recipient, // to - pack.NewU256FromU64(pack.U64(2000000)), // amount - pack.NewU256FromU64(0), // nonce - pack.NewU256FromU64(pack.U64(300000)), // gas - pack.NewU256FromU64(pack.U64(300)), // fee - payload, // memo + multichain.Address(addr.String()), // from + recipient, // to + amount, // amount + nonce, // nonce + pack.NewU256FromU64(pack.U64(300000)), // gas + pack.NewU256FromU64(pack.U64(300)), // fee + payload, // memo ) Expect(err).NotTo(HaveOccurred()) @@ -112,6 +116,10 @@ var _ = Describe("Terra", func() { if err == nil { Expect(confs.Uint64()).To(Equal(uint64(1))) Expect(foundTx.Payload()).To(Equal(multichain.ContractCallData([]byte(payload.String())))) + Expect(foundTx.Nonce()).To(Equal(nonce)) + Expect(foundTx.From()).To(Equal(multichain.Address(addr.String()))) + Expect(foundTx.To()).To(Equal(recipient)) + Expect(foundTx.Value()).To(Equal(amount)) break } From cc56e4d065f1efa390ea2d40d28da8289767d17e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 12:15:54 +0000 Subject: [PATCH 168/335] add nonce+amount check in multichain test suite --- go.sum | 2 ++ multichain_test.go | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/go.sum b/go.sum index f286014a..55222813 100644 --- a/go.sum +++ b/go.sum @@ -356,6 +356,7 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -459,6 +460,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= diff --git a/multichain_test.go b/multichain_test.go index 38123f98..fb8e1e3c 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -454,6 +454,7 @@ var _ = Describe("Multichain", func() { // Get the appropriate nonce for sender. accountInfo, err := accountClient.AccountInfo(ctx, senderAddr) Expect(err).NotTo(HaveOccurred()) + nonce := accountInfo.Nonce() // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() @@ -461,7 +462,7 @@ var _ = Describe("Multichain", func() { accountTx, err := accountChain.txBuilder.BuildTx( multichain.Address(senderAddr), recipientAddr, - amount, accountInfo.Nonce(), gasLimit, gasPrice, + amount, nonce, gasLimit, gasPrice, payload, ) Expect(err).NotTo(HaveOccurred()) @@ -501,6 +502,8 @@ var _ = Describe("Multichain", func() { Expect(tx.Value()).To(Equal(amount)) Expect(tx.From()).To(Equal(senderAddr)) Expect(tx.To()).To(Equal(recipientAddr)) + Expect(tx.Nonce()).To(Equal(nonce)) + Expect(tx.Value()).To(Equal(amount)) break } From 7ce7cc81d8e017aefe3dd97f411590f329b46636 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 23 Sep 2020 15:14:47 +0000 Subject: [PATCH 169/335] cosmos gas fee calculation and arguments for tests | terra pk and addr --- chain/cosmos/tx.go | 2 +- chain/terra/terra_test.go | 4 ++-- infra/.env | 6 ++++++ infra/docker-compose.yaml | 1 + infra/terra/run.sh | 3 +++ multichain_test.go | 4 ++-- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 5d3ccbac..fac95050 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -74,7 +74,7 @@ func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimi fees := Coins{Coin{ Denom: builder.coinDenom, - Amount: pack.NewU64(gasPrice.Int().Uint64()), + Amount: pack.NewU64(gasPrice.Mul(gasLimit).Int().Uint64()), }} txBuilder := auth.NewTxBuilder( diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index a05ab170..f16c8fb1 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -75,8 +75,8 @@ var _ = Describe("Terra", func() { recipient, // to amount, // amount nonce, // nonce - pack.NewU256FromU64(pack.U64(300000)), // gas - pack.NewU256FromU64(pack.U64(300)), // fee + pack.NewU256FromU64(pack.U64(200000)), // gas + pack.NewU256FromU64(pack.U64(1)), // gas price payload, // memo ) Expect(err).NotTo(HaveOccurred()) diff --git a/infra/.env b/infra/.env index 2a3da981..dee98085 100644 --- a/infra/.env +++ b/infra/.env @@ -1,3 +1,8 @@ +# +# RenVM's deterministic private key for test purposes +# +export RENVM_PK=8d00ff6a38267c5ecda940dc8a64948bde5a2fdc2a609041f2fdb1605f8794f6 + # # Binance Smart Chain # @@ -67,6 +72,7 @@ export FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa # suite access to plenty of testing funds. export TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 export TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u +export RENVM_TERRA_ADDRESS=terra1mclmytf3657uzw0cj3hcmu98vpj4t9ekdks6tc # # Zcash diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index fd515594..cfe3b421 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -147,3 +147,4 @@ services: entrypoint: - "./root/run.sh" - "${TERRA_ADDRESS}" + - "${RENVM_TERRA_ADDRESS}" diff --git a/infra/terra/run.sh b/infra/terra/run.sh index 8ab37ead..e11417d3 100644 --- a/infra/terra/run.sh +++ b/infra/terra/run.sh @@ -1,8 +1,10 @@ #!/bin/bash ADDRESS=$1 +ADDRESS_2=$2 # Print setup echo "TERRA_ADDRESS=$ADDRESS" +echo "RENVM_TERRA_ADDRESS=$ADDRESS_2" # Register client key terracli keys add validator --keyring-backend=test @@ -12,6 +14,7 @@ echo $(terracli keys show validator) terrad init testnet --chain-id testnet terrad add-genesis-account $(terracli keys show validator -a --keyring-backend=test) 10000000000uluna terrad add-genesis-account $ADDRESS 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt +terrad add-genesis-account $ADDRESS_2 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt terrad gentx --amount 10000000000uluna --name validator --keyring-backend=test terrad collect-gentxs diff --git a/multichain_test.go b/multichain_test.go index fb8e1e3c..5859287b 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -360,8 +360,8 @@ var _ = Describe("Multichain", func() { }), func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) - gasLimit := pack.NewU256FromU64(pack.U64(300000)) - gasPrice := pack.NewU256FromU64(pack.U64(300)) + gasLimit := pack.NewU256FromU64(pack.U64(100000)) + gasPrice := pack.NewU256FromU64(pack.U64(1)) payload := pack.NewBytes([]byte("multichain")) return amount, gasLimit, gasPrice, payload }, From b8bc2fed59d664358c6973688c902416f12facf6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 24 Sep 2020 13:27:42 +0530 Subject: [PATCH 170/335] test that UTXOs cannot be spent by invalid address --- multichain_test.go | 106 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 6 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 5859287b..8f5099b4 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -648,10 +648,18 @@ var _ = Describe("Multichain", func() { pkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed())) Expect(err).NotTo(HaveOccurred()) - // Recipient + // Recipient 1 pkhAddrUncompressed, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed())) Expect(err).ToNot(HaveOccurred()) + // Recipient 2 + recipientPrivKey := id.NewPrivKey() + recipientPubKey := recipientPrivKey.PubKey() + recipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey) + Expect(err).NotTo(HaveOccurred()) + recipientPkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(((*btcec.PublicKey)(recipientPubKey)).SerializeCompressed())) + Expect(err).NotTo(HaveOccurred()) + // Initialise the UTXO client and fetch the unspent outputs. Also get a // function to query the number of block confirmations for a transaction. utxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) @@ -676,14 +684,16 @@ var _ = Describe("Multichain", func() { Value: output.Value, }}, } + utxoValue1 := pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 4)) + utxoValue2 := pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) * 3 / 4)) recipients := []multichain.UTXORecipient{ { - To: multichain.Address(pkhAddr.EncodeAddress()), - Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + To: multichain.Address(pkhAddrUncompressed.EncodeAddress()), + Value: utxoValue1, }, { - To: multichain.Address(pkhAddrUncompressed.EncodeAddress()), - Value: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)), + To: multichain.Address(recipientPkhAddr.EncodeAddress()), + Value: utxoValue2, }, } utxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients) @@ -728,6 +738,65 @@ var _ = Describe("Multichain", func() { output2, _, err := utxoClient.Output(ctx, output.Outpoint) Expect(err).ToNot(HaveOccurred()) Expect(reflect.DeepEqual(output, output2)).To(BeTrue()) + + // Load the first output and verify the value. + output3, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ + Hash: txHash, + Index: pack.NewU32(0), + }) + Expect(err).ToNot(HaveOccurred()) + Expect(output3.Value).To(Equal(utxoValue1)) + + // Load the second output and verify the value. + output4, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ + Hash: txHash, + Index: pack.NewU32(1), + }) + Expect(err).ToNot(HaveOccurred()) + Expect(output4.Value).To(Equal(utxoValue2)) + + // Construct UTXO to be signed by invalid key. This UTXO should fail + // when submitted to the network, since the signer doesn't have the + // right to spend it. + // We submit the invalid signed UTXO (which should fail), and wait + // for a maximum of 5 seconds. + inputs2 := []multichain.UTXOInput{{ + Output: output4, + }} + recipients2 := []multichain.UTXORecipient{{ + To: multichain.Address(pkhAddr.EncodeAddress()), + Value: output4.Value.Sub(pack.NewU256FromU64(pack.U64(500))), + }} + utxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + sighashes2, err := utxoTx2.Sighashes() + signatures2 := make([]pack.Bytes65, len(sighashes2)) + for i := range sighashes2 { + hash := id.Hash(sighashes2[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures2[i] = pack.NewBytes65(signature) + } + Expect(utxoTx2.Sign(signatures2, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + failingCtx, failingCancelFn := context.WithTimeout(ctx, 5*time.Second) + Expect(utxoClient.SubmitTx(failingCtx, utxoTx2)).To(HaveOccurred()) + failingCancelFn() + + // Try to spend UTXO from valid key. We should be able to successfully + // submit the signed UTXO to the network. + utxoTx3, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + sighashes3, err := utxoTx3.Sighashes() + signatures3 := make([]pack.Bytes65, len(sighashes3)) + for i := range sighashes3 { + hash := id.Hash(sighashes3[i]) + signature, err := recipientPrivKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures3[i] = pack.NewBytes65(signature) + } + Expect(utxoTx3.Sign(signatures3, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed()) + Expect(utxoClient.SubmitTx(ctx, utxoTx3)).NotTo(HaveOccurred()) }) Specify("(P2SH) build, broadcast and fetch tx", func() { @@ -825,7 +894,8 @@ var _ = Describe("Multichain", func() { time.Sleep(10 * time.Second) } - // Load the output and verify that it is equal to the original output. + // Load the output and verify that the pub key script is as calculated + // initially. output2, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{ Hash: txHash, Index: pack.NewU32(0), @@ -847,9 +917,16 @@ var _ = Describe("Multichain", func() { utxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) Expect(err).NotTo(HaveOccurred()) + // Create another transaction using the same inputs, which we will + // sign with the original user's address. Validate that none other + // than the recipient's signature can spend this UTXO. + utxoTx3, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2) + Expect(err).NotTo(HaveOccurred()) + // Get the sighashes that need to be signed, and sign them. sighashes2, err := utxoTx2.Sighashes() signatures2 := make([]pack.Bytes65, len(sighashes2)) + signatures3 := make([]pack.Bytes65, len(sighashes2)) Expect(err).ToNot(HaveOccurred()) for i := range sighashes2 { hash := id.Hash(sighashes2[i]) @@ -857,7 +934,20 @@ var _ = Describe("Multichain", func() { Expect(err).ToNot(HaveOccurred()) signatures2[i] = pack.NewBytes65(signature) } + for i := range sighashes2 { + hash := id.Hash(sighashes2[i]) + privKey := (*id.PrivKey)(wif.PrivKey) + signature, err := privKey.Sign(&hash) + Expect(err).ToNot(HaveOccurred()) + signatures3[i] = pack.NewBytes65(signature) + } Expect(utxoTx2.Sign(signatures2, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed()) + Expect(utxoTx3.Sign(signatures3, pack.NewBytes(wif.SerializePubKey()))).To(Succeed()) + + // Try to submit tx signed by invalid spender. This should fail since + failingCtx, failingCancelFn := context.WithTimeout(ctx, 5*time.Second) + Expect(utxoClient.SubmitTx(failingCtx, utxoTx3)).To(HaveOccurred()) + failingCancelFn() // Submit the signed transaction to the UTXO chain's node. txHash2, err := utxoTx2.Hash() @@ -866,6 +956,10 @@ var _ = Describe("Multichain", func() { Expect(err).ToNot(HaveOccurred()) logger.Debug("[P2SH -> P2KH] submit tx", zap.String("from", recipientP2SH.EncodeAddress()), zap.String("to", pkhAddr.EncodeAddress()), zap.String("txHash", string(txHashToHex(txHash2)))) + // Check confirmations after waiting for the transaction to be in the + // mempool. + time.Sleep(time.Second) + for { // Loop until the transaction has at least a few // confirmations. From 38cd497e3a4256ca6b147f815f12e932a309a098 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 11:48:50 +1000 Subject: [PATCH 171/335] chain/cosmos: expose account number method on client --- chain/cosmos/client.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 64bb3f44..f3ee349e 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -179,3 +179,19 @@ func (client *Client) AccountInfo(_ context.Context, addr address.Address) (acco coins: parseCoins(acc.GetCoins()), }, nil } + +// AccountNumber returns the account number for a given address. +func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pack.U64, error) { + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) + if err != nil { + return 0, fmt.Errorf("bad address: '%v': %v", addr, err) + } + + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) + if err != nil { + return 0, err + } + + return pack.U64(acc.GetAccountNumber()), nil +} From 54632f8d4d9b83fd459becbe03e9a45fa114924c Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 11:50:09 +1000 Subject: [PATCH 172/335] chain/cosmos, chain/terra, api/account: fetch account number from client --- api/account/account.go | 2 +- chain/cosmos/tx.go | 40 +++++++++++++++++++++------------------- chain/terra/terra.go | 4 ++-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 48e3bc87..a30928b8 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -56,7 +56,7 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { - BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) + BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } // The AccountInfo interface defines functionality that must expose account diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index fac95050..839b094c 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -1,6 +1,7 @@ package cosmos import ( + "context" "fmt" "github.com/cosmos/cosmos-sdk/codec" @@ -19,40 +20,36 @@ import ( ) type txBuilder struct { - cdc *codec.Codec - coinDenom pack.String - chainID pack.String - accountNumber pack.U64 + client *Client + coinDenom pack.String + chainID pack.String } // TxBuilderOptions only contains necessary options to build tx from tx builder type TxBuilderOptions struct { - Cdc *codec.Codec `json:"cdc"` - AccountNumber pack.U64 `json:"account_number"` - ChainID pack.String `json:"chain_id"` - CoinDenom pack.String `json:"coin_denom"` + ChainID pack.String `json:"chain_id"` + CoinDenom pack.String `json:"coin_denom"` } // NewTxBuilder returns an implementation of the transaction builder interface // from the Cosmos Compat API, and exposes the functionality to build simple // Cosmos based transactions. -func NewTxBuilder(options TxBuilderOptions) account.TxBuilder { - if options.Cdc == nil { - options.Cdc = simapp.MakeCodec() +func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { + if client.cdc == nil { + client.cdc = simapp.MakeCodec() } return txBuilder{ - cdc: options.Cdc, - coinDenom: options.CoinDenom, - chainID: options.ChainID, - accountNumber: options.AccountNumber, + client: client, + coinDenom: options.CoinDenom, + chainID: options.ChainID, } } // BuildTx consumes a list of MsgSend to build and return a cosmos transaction. // This transaction is unsigned, and must be signed before submitting to the // cosmos chain. -func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (account.Tx, error) { +func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (account.Tx, error) { fromAddr, err := types.AccAddressFromBech32(string(from)) if err != nil { return nil, err @@ -77,9 +74,14 @@ func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimi Amount: pack.NewU64(gasPrice.Mul(gasLimit).Int().Uint64()), }} + accountNumber, err := builder.client.AccountNumber(ctx, from) + if err != nil { + return nil, err + } + txBuilder := auth.NewTxBuilder( - utils.GetTxEncoder(builder.cdc), - builder.accountNumber.Uint64(), + utils.GetTxEncoder(builder.client.cdc), + accountNumber.Uint64(), nonce.Int().Uint64(), gasLimit.Int().Uint64(), 0, @@ -101,7 +103,7 @@ func (builder txBuilder) BuildTx(from, to address.Address, value, nonce, gasLimi msgs: []MsgSend{sendMsg}, fee: parseStdFee(signMsg.Fee), memo: pack.String(payload.String()), - cdc: builder.cdc, + cdc: builder.client.cdc, signMsg: signMsg, }, nil } diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 5aeaede6..2c2739d6 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -30,6 +30,6 @@ func NewClient(opts ClientOptions) *Client { // NewTxBuilder returns an implementation of the transaction builder interface // from the Cosmos Compat API, and exposes the functionality to build simple // Terra transactions. -func NewTxBuilder(opts TxBuilderOptions) account.TxBuilder { - return cosmos.NewTxBuilder(opts) +func NewTxBuilder(opts TxBuilderOptions, client *Client) account.TxBuilder { + return cosmos.NewTxBuilder(opts, client) } From 3e4deff311a4d24cebec1a78e9c8bc72a08827f1 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 11:50:31 +1000 Subject: [PATCH 173/335] chain/fileccoin, multichain_test, chain/terra_test: fix tests and update fileccoin tx builder --- chain/filecoin/account.go | 3 ++- chain/filecoin/filecoin_test.go | 1 + chain/terra/terra_test.go | 10 ++++------ multichain_test.go | 25 +++++++++++++++---------- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 27b7dab0..97046d3b 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -2,6 +2,7 @@ package filecoin import ( "bytes" + "context" "fmt" filaddress "github.com/filecoin-project/go-address" @@ -28,7 +29,7 @@ func NewTxBuilder(gasPremium pack.U256) TxBuilder { } // BuildTx receives transaction fields and constructs a new transaction. -func (txBuilder TxBuilder) BuildTx(from, to address.Address, value, nonce, gasLimit, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) { +func (txBuilder TxBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) { filfrom, err := filaddress.NewFromString(string(from)) if err != nil { return nil, fmt.Errorf("bad from address '%v': %v", from, err) diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 862999f6..180428ca 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -72,6 +72,7 @@ var _ = Describe("Filecoin", func() { // build the transaction tx, err := filTxBuilder.BuildTx( + ctx, multichain.Address(pack.String(senderFilAddr.String())), multichain.Address(pack.String(recipientFilAddr.String())), pack.NewU256FromU64(pack.NewU64(100000000)), // amount diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index f16c8fb1..643eba3e 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -13,7 +13,6 @@ import ( "github.com/renproject/pack" "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/terra-project/core/app" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -61,16 +60,15 @@ var _ = Describe("Terra", func() { // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ - AccountNumber: pack.NewU64(1), - ChainID: "testnet", - CoinDenom: "uluna", - Cdc: app.MakeCodec(), - }) + ChainID: "testnet", + CoinDenom: "uluna", + }, client) // build the transaction payload := pack.NewBytes([]byte("multichain")) amount := pack.NewU256FromU64(pack.U64(2000000)) tx, err := txBuilder.BuildTx( + ctx, multichain.Address(addr.String()), // from recipient, // to amount, // amount diff --git a/multichain_test.go b/multichain_test.go index 8f5099b4..651875a9 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -23,8 +23,10 @@ import ( filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" "github.com/renproject/multichain" + "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" + // "github.com/renproject/multichain/chain/digibyte" "github.com/renproject/multichain/chain/dogecoin" "github.com/renproject/multichain/chain/filecoin" @@ -33,7 +35,6 @@ import ( "github.com/renproject/pack" "github.com/renproject/surge" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/terra-project/core/app" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -304,7 +305,7 @@ var _ = Describe("Multichain", func() { rpcURL pack.String randomRecipientAddr func() multichain.Address initialise func(pack.String) multichain.AccountClient - txBuilder multichain.AccountTxBuilder + txBuilder func(client multichain.AccountClient) multichain.AccountTxBuilder txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ @@ -352,12 +353,12 @@ var _ = Describe("Multichain", func() { return client }, - terra.NewTxBuilder(terra.TxBuilderOptions{ - AccountNumber: pack.NewU64(1), - ChainID: "testnet", - CoinDenom: "uluna", - Cdc: app.MakeCodec(), - }), + func(client multichain.AccountClient) account.TxBuilder { + return terra.NewTxBuilder(terra.TxBuilderOptions{ + ChainID: "testnet", + CoinDenom: "uluna", + }, client.(*terra.Client)) + }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) gasLimit := pack.NewU256FromU64(pack.U64(100000)) @@ -425,7 +426,9 @@ var _ = Describe("Multichain", func() { return client }, - filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))), + func(client multichain.AccountClient) multichain.AccountTxBuilder { + return filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))) + }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) gasLimit := pack.NewU256FromU64(pack.NewU64(2189560)) @@ -459,7 +462,9 @@ var _ = Describe("Multichain", func() { // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() - accountTx, err := accountChain.txBuilder.BuildTx( + txBuilder := accountChain.txBuilder(accountClient) + accountTx, err := txBuilder.BuildTx( + ctx, multichain.Address(senderAddr), recipientAddr, amount, nonce, gasLimit, gasPrice, From 0b930b0391e660782f9f5806c79d858c70935674 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 12:15:35 +1000 Subject: [PATCH 174/335] chain/cosmos: leave sequence number as 0 --- chain/cosmos/client.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index f3ee349e..c686a85f 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -101,21 +101,6 @@ func (client *Client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pa return &StdTx{}, pack.NewU64(0), fmt.Errorf("parse tx failed: %v", err) } - // Construct a past context (just before the transaction's height) and query - // the sender account to know the nonce (sequence number) with which this - // transaction was broadcasted. - senderAddr, err := types.AccAddressFromBech32(string(stdTx.From())) - if err != nil { - return &StdTx{}, pack.NewU64(0), fmt.Errorf("bad address '%v': %v", stdTx.From(), err) - } - pastContext := client.cliCtx.WithHeight(res.Height - 1) - accGetter := auth.NewAccountRetriever(pastContext) - acc, err := accGetter.GetAccount(senderAddr) - if err != nil { - return &StdTx{}, pack.NewU64(0), fmt.Errorf("account query failed: %v", err) - } - stdTx.signMsg.Sequence = acc.GetSequence() - return &stdTx, pack.NewU64(1), nil } From 1b10437fe0aeef6173465c804b44e7ddf89b7ad5 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 13:21:01 +1000 Subject: [PATCH 175/335] multichain_test: remove unnecessary import --- multichain_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 651875a9..14f0d190 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -23,7 +23,6 @@ import ( filtypes "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/id" "github.com/renproject/multichain" - "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" @@ -353,7 +352,7 @@ var _ = Describe("Multichain", func() { return client }, - func(client multichain.AccountClient) account.TxBuilder { + func(client multichain.AccountClient) multichain.AccountTxBuilder { return terra.NewTxBuilder(terra.TxBuilderOptions{ ChainID: "testnet", CoinDenom: "uluna", From 4cdcc5911c08b078c0f360f0a475c4c944adc4b8 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 25 Sep 2020 13:24:40 +1000 Subject: [PATCH 176/335] infra: remove deterministic test address --- infra/.env | 6 ------ infra/docker-compose.yaml | 1 - infra/terra/run.sh | 3 --- 3 files changed, 10 deletions(-) diff --git a/infra/.env b/infra/.env index dee98085..2a3da981 100644 --- a/infra/.env +++ b/infra/.env @@ -1,8 +1,3 @@ -# -# RenVM's deterministic private key for test purposes -# -export RENVM_PK=8d00ff6a38267c5ecda940dc8a64948bde5a2fdc2a609041f2fdb1605f8794f6 - # # Binance Smart Chain # @@ -72,7 +67,6 @@ export FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa # suite access to plenty of testing funds. export TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 export TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u -export RENVM_TERRA_ADDRESS=terra1mclmytf3657uzw0cj3hcmu98vpj4t9ekdks6tc # # Zcash diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index cfe3b421..fd515594 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -147,4 +147,3 @@ services: entrypoint: - "./root/run.sh" - "${TERRA_ADDRESS}" - - "${RENVM_TERRA_ADDRESS}" diff --git a/infra/terra/run.sh b/infra/terra/run.sh index e11417d3..8ab37ead 100644 --- a/infra/terra/run.sh +++ b/infra/terra/run.sh @@ -1,10 +1,8 @@ #!/bin/bash ADDRESS=$1 -ADDRESS_2=$2 # Print setup echo "TERRA_ADDRESS=$ADDRESS" -echo "RENVM_TERRA_ADDRESS=$ADDRESS_2" # Register client key terracli keys add validator --keyring-backend=test @@ -14,7 +12,6 @@ echo $(terracli keys show validator) terrad init testnet --chain-id testnet terrad add-genesis-account $(terracli keys show validator -a --keyring-backend=test) 10000000000uluna terrad add-genesis-account $ADDRESS 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt -terrad add-genesis-account $ADDRESS_2 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt terrad gentx --amount 10000000000uluna --name validator --keyring-backend=test terrad collect-gentxs From 1e454bf6449300c034340d03c55c33ab7f94ae17 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 11:00:21 +0530 Subject: [PATCH 177/335] changes based on review --- .github/workflows/test.yml | 86 ++++++++++++++++++++---------------- api/account/account.go | 17 ++----- chain/bitcoin/address.go | 11 +++-- chain/bitcoincash/address.go | 56 +++++++++-------------- chain/bitcoincash/utxo.go | 9 +++- chain/cosmos/client.go | 37 +++------------- chain/digibyte/digibyte.go | 2 + chain/dogecoin/address.go | 9 +++- chain/dogecoin/dogecoin.go | 3 ++ chain/dogecoin/gas.go | 2 + chain/dogecoin/utxo.go | 18 ++++++-- chain/filecoin/client.go | 41 +++-------------- chain/terra/terra_test.go | 3 +- chain/zcash/address.go | 42 +++++++++--------- chain/zcash/utxo.go | 9 +++- infra/.ci-env | 18 -------- multichain_test.go | 3 +- 17 files changed, 156 insertions(+), 210 deletions(-) delete mode 100644 infra/.ci-env diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2caf45bc..2d6391c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,52 +53,60 @@ jobs: cd $GITHUB_WORKSPACE export PATH=$PATH:$(go env GOPATH)/bin go get -u golang.org/x/lint/golint - golint ./... + golint $(go list ./... | grep -v filecoin-ffi) - - name: Run multichain infrastructure (bitcoin) + - name: Run multichain infrastructure run: | source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 18443:18443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS - - name: Run multichain infrastructure (bitcoincash) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 19443:19443 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS - # Skip DigiByte. - # - name: Run multichain infrastructure (digibyte) - # run: docker run -d -p 20443:20443 -h 0.0.0.0 --env-file $GITHUB_WORKSPACE/infra/.ci-env rohitnarurkar/multichain_digibyte - - name: Run multichain infrastructure (dogecoin) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 18332:18332 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS - - name: Run multichain infrastructure (filecoin) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 1234:1234 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - - name: Run multichain infrastructure (terra) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 26657:26657 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_terra $TERRA_ADDRESS - - name: Run multichain infrastructure (zcash) - run: | - source $GITHUB_WORKSPACE/infra/.env - docker run -d -p 18232:18232 -h 0.0.0.0 \ - --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - rohitnarurkar/multichain_zcash $ZCASH_ADDRESS + docker-compose up -d --build \ + bitcoin \ + bitcoincash \ + dogecoin \ + filecoin \ + terra \ + zcash + + # - name: Run multichain infrastructure (bitcoin) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 18443:18443 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS + # - name: Run multichain infrastructure (bitcoincash) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 19443:19443 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS + # - name: Run multichain infrastructure (dogecoin) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 18332:18332 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS + # - name: Run multichain infrastructure (filecoin) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 1234:1234 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # --name infra_filecoin_1 rohitnarurkar/multichain_filecoin + # - name: Run multichain infrastructure (terra) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 26657:26657 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_terra $TERRA_ADDRESS + # - name: Run multichain infrastructure (zcash) + # run: | + # source $GITHUB_WORKSPACE/infra/.env + # docker run -d -p 18232:18232 -h 0.0.0.0 \ + # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ + # rohitnarurkar/multichain_zcash $ZCASH_ADDRESS - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '1m' + time: '5m' - name: Check on docker containers run: docker ps -a diff --git a/api/account/account.go b/api/account/account.go index a30928b8..4759eb22 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -59,23 +59,12 @@ type TxBuilder interface { BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) } -// The AccountInfo interface defines functionality that must expose account -// specific information for the underlying chain. -type AccountInfo interface { - // Nonce is the current nonce of this account, which must be used to build a - // new transaction. - Nonce() pack.U256 - - // Balance is the native token balance of this account. - Balance() pack.U256 -} - // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { - // Account queries the chain for an address. It returns the address' - // information, which contains the nonce and balance fields. - AccountInfo(context.Context, address.Address) (AccountInfo, error) + // AccountNonce is the current nonce of this account, which must be used to + // build a new transaction. + AccountNonce(context.Context, address.Address) (pack.U256, error) // Tx returns the transaction uniquely identified by the given transaction // hash. It also returns the number of confirmations for the transaction. If diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 01c6995e..205105eb 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -7,7 +7,6 @@ import ( "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" "github.com/renproject/multichain/api/address" - "github.com/renproject/pack" ) // AddressEncodeDecoder implements the address.EncodeDecoder interface @@ -42,7 +41,7 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address // Validate that the base58 address is in fact in correct format. encodedAddr := base58.Encode([]byte(rawAddr)) if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { - return address.Address(""), fmt.Errorf("address validation error: %v", err) + return address.Address(""), err } return address.Address(encodedAddr), nil @@ -65,17 +64,17 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd // Decode the checksummed base58 format address. decoded, ver, err := base58.CheckDecode(string(addr)) if err != nil { - return nil, fmt.Errorf("base58 decoding error: %v", err) + return nil, fmt.Errorf("checking: %v", err) } if len(decoded) != 20 { - return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + return nil, fmt.Errorf("expected len 20, got len %v", len(decoded)) } // Validate the address format. switch ver { case decoder.params.PubKeyHashAddrID, decoder.params.ScriptHashAddrID: - return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil + return address.RawAddress(base58.Decode(string(addr))), nil default: - return nil, fmt.Errorf("unknown address type") + return nil, fmt.Errorf("unexpected address prefix") } } diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index c33cf54e..aae61fbb 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -27,11 +27,14 @@ var ( }() ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the +// chain specific configurations func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(params), @@ -39,22 +42,31 @@ func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { } } +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder struct { params *chaincfg.Params } +// NewAddressEncoder constructs a new AddressEncoder with the chain specific +// configurations func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { return AddressEncoder{params: params} } +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder struct { params *chaincfg.Params } +// NewAddressDecoder constructs a new AddressDecoder with the chain specific +// configurations func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { return AddressDecoder{params: params} } +// EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { rawAddrBytes := []byte(rawAddr) var encodedAddr string @@ -75,12 +87,13 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address } if err != nil { - return address.Address(""), fmt.Errorf("encode address: %v", err) + return address.Address(""), fmt.Errorf("encoding: %v", err) } - return address.Address(pack.String(encodedAddr)), nil + return address.Address(encodedAddr), nil } +// DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { // Legacy address decoding if legacyAddr, err := btcutil.DecodeAddress(string(addr), decoder.params); err == nil { @@ -112,7 +125,7 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd case ripemd160.Size: // P2PKH or P2SH switch addrBytes[0] { case 0, 8: // P2PKH or P2SH - return address.RawAddress(pack.NewBytes(addrBytes)), nil + return address.RawAddress(addrBytes), nil default: return nil, btcutil.ErrUnknownAddressType } @@ -135,10 +148,10 @@ func decodeLegacyAddress(addr address.Address, params *chaincfg.Params) (address // Decode the checksummed base58 format address. decoded, ver, err := base58.CheckDecode(string(addr)) if err != nil { - return nil, fmt.Errorf("base58 decoding error: %v", err) + return nil, fmt.Errorf("checking: %v", err) } if len(decoded) != 20 { - return nil, fmt.Errorf("incorrect size of decoded address, wanted: 20, have: %v", len(decoded)) + return nil, fmt.Errorf("expected len 20, got len %v", len(decoded)) } // Validate the address format. @@ -146,7 +159,7 @@ func decodeLegacyAddress(addr address.Address, params *chaincfg.Params) (address case params.PubKeyHashAddrID, params.ScriptHashAddrID: return address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil default: - return nil, fmt.Errorf("unknown address type") + return nil, fmt.Errorf("unexpected address prefix") } } @@ -302,34 +315,9 @@ func encodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, return EncodeToString(AppendChecksum(AddressPrefix(params), data)), nil } -// decodeAddress implements the address.Decoder interface -func decodeAddress(addr string, params *chaincfg.Params) (Address, error) { - // Legacy address decoding - if address, err := btcutil.DecodeAddress(addr, params); err == nil { - switch address.(type) { - case *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash, *btcutil.AddressPubKey: - return AddressLegacy{Address: address}, nil - case *btcutil.AddressWitnessPubKeyHash, *btcutil.AddressWitnessScriptHash: - return nil, fmt.Errorf("unsuported segwit bitcoin address type %T", address) - default: - return nil, fmt.Errorf("unsuported legacy bitcoin address type %T", address) - } - } - - if addrParts := strings.Split(addr, ":"); len(addrParts) != 1 { - addr = addrParts[1] - } - - decoded := DecodeString(addr) - if !VerifyChecksum(AddressPrefix(params), decoded) { - return nil, btcutil.ErrChecksumMismatch - } - - addrBytes, err := bech32.ConvertBits(decoded[:len(decoded)-8], 5, 8, false) - if err != nil { - return nil, err - } - +// addressFromRawBytes consumes raw bytes representation of a bitcoincash +// address and returns a type that implements the bitcoincash.Address interface. +func addressFromRawBytes(addrBytes []byte, params *chaincfg.Params) (Address, error) { switch len(addrBytes) - 1 { case ripemd160.Size: // P2PKH or P2SH switch addrBytes[0] { diff --git a/chain/bitcoincash/utxo.go b/chain/bitcoincash/utxo.go index 88842a33..0cb4aac2 100644 --- a/chain/bitcoincash/utxo.go +++ b/chain/bitcoincash/utxo.go @@ -73,6 +73,9 @@ func NewTxBuilder(params *chaincfg.Params) utxo.TxBuilder { func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipient) (utxo.Tx, error) { msgTx := wire.NewMsgTx(Version) + // Address encoder-decoder + addrEncodeDecoder := NewAddressEncodeDecoder(txBuilder.params) + // Inputs for _, input := range inputs { hash := chainhash.Hash{} @@ -83,7 +86,11 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := decodeAddress(string(recipient.To), txBuilder.params) + addrBytes, err := addrEncodeDecoder.DecodeAddress(recipient.To) + if err != nil { + return &Tx{}, err + } + addr, err := addressFromRawBytes(addrBytes, txBuilder.params) if err != nil { return &Tx{}, err } diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index c686a85f..7ba4f53b 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -123,46 +123,21 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { return nil } -// Account contains necessary info for sdk.Account -type Account struct { - address Address - accountNumber pack.U64 - sequenceNumber pack.U64 - coins Coins -} - -// Nonce returns the current nonce of the account. This is the nonce to be used -// while building a new transaction. -func (account Account) Nonce() pack.U256 { - return pack.NewU256FromU64(account.sequenceNumber) -} - -// Balance returns the native-token balance of the account. -func (account Account) Balance() pack.U256 { - // FIXME - return pack.NewU256FromU64(pack.NewU64(0)) -} - -// AccountInfo query account with address. This method is not a part of the -// multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) AccountInfo(_ context.Context, addr address.Address) (account.AccountInfo, error) { +// AccountNonce returns the current nonce of the account. This is the nonce to +// be used while building a new transaction. +func (client *Client) AccountNonce(_ context.Context, addr address.Address) (pack.U256, error) { cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { - return nil, fmt.Errorf("bad address: '%v': %v", addr, err) + return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) } accGetter := auth.NewAccountRetriever(client.cliCtx) acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) if err != nil { - return Account{}, err + return pack.U256{}, err } - return &Account{ - address: Address(cosmosAddr), - accountNumber: pack.U64(acc.GetAccountNumber()), - sequenceNumber: pack.U64(acc.GetSequence()), - coins: parseCoins(acc.GetCoins()), - }, nil + return pack.NewU256FromU64(pack.NewU64(acc.GetSequence())), nil } // AccountNumber returns the account number for a given address. diff --git a/chain/digibyte/digibyte.go b/chain/digibyte/digibyte.go index c0f7350f..1f86c0fc 100644 --- a/chain/digibyte/digibyte.go +++ b/chain/digibyte/digibyte.go @@ -146,6 +146,7 @@ var MainNetParams = chaincfg.Params{ HDCoinType: 0x14, } +// TestnetParams returns the chain configuration for testnet var TestnetParams = chaincfg.Params{ Name: "testnet", @@ -180,6 +181,7 @@ var TestnetParams = chaincfg.Params{ HDCoinType: 0x14, } +// RegressionNetParams returns the chain configuration for regression net var RegressionNetParams = chaincfg.Params{ Name: "regtest", diff --git a/chain/dogecoin/address.go b/chain/dogecoin/address.go index e94c3a87..0e4ee882 100644 --- a/chain/dogecoin/address.go +++ b/chain/dogecoin/address.go @@ -3,7 +3,12 @@ package dogecoin import "github.com/renproject/multichain/chain/bitcoin" type ( - AddressEncoder = bitcoin.AddressEncoder - AddressDecoder = bitcoin.AddressDecoder + // AddressEncoder re-exports bitcoin.AddressEncoder. + AddressEncoder = bitcoin.AddressEncoder + + // AddressDecoder re-exports bitcoin.AddressDecoder. + AddressDecoder = bitcoin.AddressDecoder + + // AddressEncodeDecoder re-exports bitcoin.AddressEncodeDecoder. AddressEncodeDecoder = bitcoin.AddressEncodeDecoder ) diff --git a/chain/dogecoin/dogecoin.go b/chain/dogecoin/dogecoin.go index 4f168c37..d2850070 100644 --- a/chain/dogecoin/dogecoin.go +++ b/chain/dogecoin/dogecoin.go @@ -16,6 +16,7 @@ func init() { } } +// MainNetParams returns the chain configuration for mainnet. var MainNetParams = chaincfg.Params{ Name: "mainnet", Net: 0xc0c0c0c0, @@ -35,6 +36,7 @@ var MainNetParams = chaincfg.Params{ Bech32HRPSegwit: "doge", } +// TestNetParams returns the chain configuration for testnet. var TestNetParams = chaincfg.Params{ Name: "testnet", Net: 0xfcc1b7dc, @@ -54,6 +56,7 @@ var TestNetParams = chaincfg.Params{ Bech32HRPSegwit: "doget", } +// RegressionNetParams returns the chain configuration for regression net. var RegressionNetParams = chaincfg.Params{ Name: "regtest", diff --git a/chain/dogecoin/gas.go b/chain/dogecoin/gas.go index 07336be8..69a395fb 100644 --- a/chain/dogecoin/gas.go +++ b/chain/dogecoin/gas.go @@ -2,6 +2,8 @@ package dogecoin import "github.com/renproject/multichain/chain/bitcoin" +// GasEstimator re-exports bitcoin.GasEstimator. type GasEstimator = bitcoin.GasEstimator +// NewGasEstimator re-exports bitcoin.NewGasEstimator. var NewGasEstimator = bitcoin.NewGasEstimator diff --git a/chain/dogecoin/utxo.go b/chain/dogecoin/utxo.go index d5611514..e998791c 100644 --- a/chain/dogecoin/utxo.go +++ b/chain/dogecoin/utxo.go @@ -3,15 +3,25 @@ package dogecoin import "github.com/renproject/multichain/chain/bitcoin" type ( - Tx = bitcoin.Tx - TxBuilder = bitcoin.TxBuilder - Client = bitcoin.Client + // Tx re-exports bitcoin.Tx. + Tx = bitcoin.Tx + + // TxBuilder re-exports bitcoin.TxBuilder. + TxBuilder = bitcoin.TxBuilder + + // Client re-exports bitcoin.Client. + Client = bitcoin.Client + + // ClientOptions re-exports bitcoin.ClientOptions. ClientOptions = bitcoin.ClientOptions ) var ( + // NewTxBuilder re-exports bitcoin.NewTxBuilder. NewTxBuilder = bitcoin.NewTxBuilder - NewClient = bitcoin.NewClient + + // NewClient re-exports bitcoin.NewClient. + NewClient = bitcoin.NewClient ) // DefaultClientOptions returns ClientOptions with the default settings. These diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 7a3b00cc..7aabd747 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -3,7 +3,6 @@ package filecoin import ( "context" "fmt" - "math/big" "net/http" filaddress "github.com/filecoin-project/go-address" @@ -104,7 +103,7 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack return nil, pack.NewU64(0), fmt.Errorf("searching state for txid %v: not found", msgID) } if messageLookup.Receipt.ExitCode.IsError() { - return nil, pack.NewU64(0), fmt.Errorf("transaction execution error: %v", messageLookup.Receipt.ExitCode.String()) + return nil, pack.NewU64(0), fmt.Errorf("executing transaction: %v", messageLookup.Receipt.ExitCode.String()) } // get the most recent tipset and its height @@ -153,44 +152,18 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { } } -// Account contains necessary info for sdk.Account -type Account struct { - balance pack.U256 - nonce pack.U64 -} - -// Nonce returns the current nonce of the account. This is the nonce to be used -// while building a new transaction. -func (account Account) Nonce() pack.U256 { - return pack.NewU256FromU64(account.nonce) -} - -// Balance returns the native-token balance of the account. -func (account Account) Balance() pack.U256 { - return account.balance -} - -// AccountInfo query account with address. This method is not a part of the -// multichain.AccountClient API, but will be used in the test infrastructure. -func (client *Client) AccountInfo(ctx context.Context, addr address.Address) (account.AccountInfo, error) { +// AccountNonce returns the current nonce of the account. This is the nonce to +// be used while building a new transaction. +func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) { filAddr, err := filaddress.NewFromString(string(addr)) if err != nil { - return nil, fmt.Errorf("bad address '%v': %v", addr, err) + return pack.U256{}, fmt.Errorf("bad address '%v': %v", addr, err) } actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef)) if err != nil { - return Account{}, fmt.Errorf("searching state for addr: %v", addr) - } - - balanceBytes, err := actor.Balance.Bytes() - if err != nil { - return Account{}, fmt.Errorf("extracting balance bytes: %v", err) + return pack.U256{}, fmt.Errorf("searching state for addr: %v", addr) } - balance := big.NewInt(0).SetBytes(balanceBytes) - return &Account{ - balance: pack.NewU256FromInt(balance), - nonce: pack.NewU64(actor.Nonce), - }, nil + return pack.NewU256FromU64(pack.NewU64(actor.Nonce)), nil } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 643eba3e..cf09c7f8 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -54,9 +54,8 @@ var _ = Describe("Terra", func() { // instantiate a new client client := terra.NewClient(terra.DefaultClientOptions()) - accountInfo, err := client.AccountInfo(ctx, multichain.Address(addr.String())) + nonce, err := client.AccountNonce(ctx, multichain.Address(addr.String())) Expect(err).NotTo(HaveOccurred()) - nonce := accountInfo.Nonce() // create a new cosmos-compatible transaction builder txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ diff --git a/chain/zcash/address.go b/chain/zcash/address.go index 2ebb9909..05a07ece 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -14,27 +14,38 @@ import ( "golang.org/x/crypto/ripemd160" ) +// AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder AddressDecoder } +// AddressEncoder encapsulates the chain specific configurations and implements +// the address.Encoder interface type AddressEncoder struct { params *Params } +// AddressDecoder encapsulates the chain specific configurations and implements +// the address.Decoder interface type AddressDecoder struct { params *Params } +// NewAddressEncoder constructs a new AddressEncoder with the chain specific +// configurations func NewAddressEncoder(params *Params) AddressEncoder { return AddressEncoder{params: params} } +// NewAddressDecoder constructs a new AddressDecoder with the chain specific +// configurations func NewAddressDecoder(params *Params) AddressDecoder { return AddressDecoder{params: params} } +// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the +// chain specific configurations func NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder { return AddressEncodeDecoder{ AddressEncoder: NewAddressEncoder(params), @@ -42,6 +53,7 @@ func NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder { } } +// EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { if len(rawAddr) != 26 && len(rawAddr) != 25 { return address.Address(""), fmt.Errorf("address of unknown length") @@ -72,6 +84,7 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address } } +// DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { var decoded = base58.Decode(string(addr)) if len(decoded) != 26 && len(decoded) != 25 { @@ -221,34 +234,19 @@ func (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool { return addr.AddressScriptHash.IsForNet(params) } -// decodeAddress decodes a string-representation of an address to an address +// addressFromRawBytes decodes a string-representation of an address to an address // type that implements the zcash.Address interface -func decodeAddress(addr string) (Address, error) { - var decoded = base58.Decode(addr) - if len(decoded) != 26 && len(decoded) != 25 { - return nil, base58.ErrInvalidFormat - } - - var cksum [4]byte - copy(cksum[:], decoded[len(decoded)-4:]) - if checksum(decoded[:len(decoded)-4]) != cksum { - return nil, base58.ErrChecksum - } - - if len(decoded)-6 != ripemd160.Size && len(decoded)-5 != ripemd160.Size { - return nil, errors.New("incorrect payload len") - } - +func addressFromRawBytes(addrBytes []byte) (Address, error) { var addrType uint8 var params *Params var err error var hash [20]byte - if len(decoded) == 26 { - addrType, params, err = parsePrefix(decoded[:2]) - copy(hash[:], decoded[2:22]) + if len(addrBytes) == 26 { + addrType, params, err = parsePrefix(addrBytes[:2]) + copy(hash[:], addrBytes[2:22]) } else { - addrType, params, err = parsePrefix(decoded[:1]) - copy(hash[:], decoded[1:21]) + addrType, params, err = parsePrefix(addrBytes[:1]) + copy(hash[:], addrBytes[1:21]) } if err != nil { return nil, err diff --git a/chain/zcash/utxo.go b/chain/zcash/utxo.go index dc413340..42794dfe 100644 --- a/chain/zcash/utxo.go +++ b/chain/zcash/utxo.go @@ -68,6 +68,9 @@ func NewTxBuilder(params *Params, expiryHeight uint32) utxo.TxBuilder { func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipient) (utxo.Tx, error) { msgTx := wire.NewMsgTx(Version) + // Address encoder-decoder + addrEncodeDecoder := NewAddressEncodeDecoder(txBuilder.params) + // Inputs for _, input := range inputs { hash := chainhash.Hash{} @@ -78,7 +81,11 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi // Outputs for _, recipient := range recipients { - addr, err := decodeAddress(string(recipient.To)) + addrBytes, err := addrEncodeDecoder.DecodeAddress(recipient.To) + if err != nil { + return &Tx{}, err + } + addr, err := addressFromRawBytes(addrBytes) if err != nil { return &Tx{}, err } diff --git a/infra/.ci-env b/infra/.ci-env deleted file mode 100644 index 96cba816..00000000 --- a/infra/.ci-env +++ /dev/null @@ -1,18 +0,0 @@ -BINANCE_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" -BINANCE_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A -BITCOIN_PK=cUJCHRMSUwkcofsHjFWBELT3yEAejokdKhyTNv3DScodYWzztBae -BITCOIN_ADDRESS=mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4 -BITCOINCASH_PK=cSEohZFQLKuemNeBVrzwxniouUJJxdcx7Tm6HpspYuxraVjytieW -BITCOINCASH_ADDRESS=bchreg:qp6tejc0ghtjeejcxa97amzvxvzacjt4qczpy2n3gf -DIGIBYTE_PK=efbJxdzwR1tZD7KWYmKBhmxR6TNb25P9z29ajaoALhkn1LdNe7Ci -DIGIBYTE_ADDRESS=shb4rf33ozMX8rinHsC6GghrvvA8RKTyGb -DOGECOIN_PK=cRZnRgH2ztcJupCzkWbq2mjiT8PSFAmtYRYb1phg1vSRRcNBX4w4 -DOGECOIN_ADDRESS=n3PSSpR4zqUKWH4tcRjP9aTwJ4GmixQXmt -ETHEREUM_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" -ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A -FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d -FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa -TERRA_PK=a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330 -TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u -ZCASH_PK=cNSVbbsAcBQ6BAmMr6yH6DLWr7QTDptHwdzpy4GYxGDkNZeKnczK -ZCASH_ADDRESS=tmCTReBSJEDMWfFCkXXPMSB3EfuPg6SE9dw diff --git a/multichain_test.go b/multichain_test.go index 14f0d190..9156f9d4 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -454,9 +454,8 @@ var _ = Describe("Multichain", func() { accountClient := accountChain.initialise(accountChain.rpcURL) // Get the appropriate nonce for sender. - accountInfo, err := accountClient.AccountInfo(ctx, senderAddr) + nonce, err := accountClient.AccountNonce(ctx, senderAddr) Expect(err).NotTo(HaveOccurred()) - nonce := accountInfo.Nonce() // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() From f9245b374254ce652639c75c7b2ead6b61db9237 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 11:04:41 +0530 Subject: [PATCH 178/335] cd into infra before docker compose --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d6391c8..e2f4e434 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,8 @@ jobs: - name: Run multichain infrastructure run: | - source $GITHUB_WORKSPACE/infra/.env + cd $GITHUB_WORKSPACE/infra + source .env docker-compose up -d --build \ bitcoin \ bitcoincash \ From a14fe3d44b6fcb4b872343257a0914297a62831b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 12:07:01 +0530 Subject: [PATCH 179/335] ignore nonce check in account-based chains for fetched tx --- .github/workflows/test.yml | 39 +------------------------------------- multichain_test.go | 5 ++--- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2f4e434..489c05ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,47 +67,10 @@ jobs: terra \ zcash - # - name: Run multichain infrastructure (bitcoin) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 18443:18443 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_bitcoin $BITCOIN_ADDRESS - # - name: Run multichain infrastructure (bitcoincash) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 19443:19443 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_bitcoincash $BITCOINCASH_ADDRESS - # - name: Run multichain infrastructure (dogecoin) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 18332:18332 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_dogecoin $DOGECOIN_ADDRESS - # - name: Run multichain infrastructure (filecoin) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 1234:1234 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # --name infra_filecoin_1 rohitnarurkar/multichain_filecoin - # - name: Run multichain infrastructure (terra) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 26657:26657 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_terra $TERRA_ADDRESS - # - name: Run multichain infrastructure (zcash) - # run: | - # source $GITHUB_WORKSPACE/infra/.env - # docker run -d -p 18232:18232 -h 0.0.0.0 \ - # --env-file $GITHUB_WORKSPACE/infra/.ci-env \ - # rohitnarurkar/multichain_zcash $ZCASH_ADDRESS - - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '5m' + time: '2m' - name: Check on docker containers run: docker ps -a diff --git a/multichain_test.go b/multichain_test.go index 9156f9d4..146f0c64 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -426,12 +426,12 @@ var _ = Describe("Multichain", func() { return client }, func(client multichain.AccountClient) multichain.AccountTxBuilder { - return filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(186893))) + return filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(300000))) }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) gasLimit := pack.NewU256FromU64(pack.NewU64(2189560)) - gasPrice := pack.NewU256FromU64(pack.NewU64(186893)) + gasPrice := pack.NewU256FromU64(pack.NewU64(300000)) payload := pack.Bytes(nil) return amount, gasLimit, gasPrice, payload }, @@ -505,7 +505,6 @@ var _ = Describe("Multichain", func() { Expect(tx.Value()).To(Equal(amount)) Expect(tx.From()).To(Equal(senderAddr)) Expect(tx.To()).To(Equal(recipientAddr)) - Expect(tx.Nonce()).To(Equal(nonce)) Expect(tx.Value()).To(Equal(amount)) break } From 302423f836e77acaab0a69a72c99ff429be27ff0 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 29 Sep 2020 12:28:12 +0530 Subject: [PATCH 180/335] wait more time for lotus node to have started --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 489c05ce..f3ea411d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,7 +70,7 @@ jobs: - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '2m' + time: '5m' - name: Check on docker containers run: docker ps -a From 5ba6eb41eb838e187e007abd1387ef15e2c3bbe5 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 8 Oct 2020 13:20:40 +0530 Subject: [PATCH 181/335] feat: gas estimation for filecoin --- api/gas/gas.go | 2 +- chain/bitcoin/gas.go | 4 +- chain/cosmos/gas.go | 4 +- chain/filecoin/filecoin_test.go | 43 ++++++++++++++------ chain/filecoin/gas.go | 72 ++++++++++++++++++++++++++------- chain/filecoin/gas_test.go | 56 +++++++++++++++++++++++++ 6 files changed, 148 insertions(+), 33 deletions(-) diff --git a/api/gas/gas.go b/api/gas/gas.go index 2578fc80..f3189d62 100644 --- a/api/gas/gas.go +++ b/api/gas/gas.go @@ -21,5 +21,5 @@ type Estimator interface { // next block. In Ethereum, it would be the recommended GWEI-per-gas // required to get a transaction into one of the next few blocks (because // blocks happen a lot faster). - EstimateGasPrice(context.Context) (pack.U256, error) + EstimateGasPrice(context.Context) (pack.U256, pack.U256, error) } diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index 40207885..7a5e43c7 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -27,6 +27,6 @@ func NewGasEstimator(satsPerByte pack.U256) GasEstimator { // to confirm transactions with an estimated maximum delay of one block. It is // the responsibility of the caller to know the number of bytes in their // transaction. -func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, error) { - return gasEstimator.satsPerByte, nil +func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, pack.U256, error) { + return gasEstimator.satsPerByte, pack.NewU256([32]byte{}), nil } diff --git a/chain/cosmos/gas.go b/chain/cosmos/gas.go index c60190ae..aff9549f 100644 --- a/chain/cosmos/gas.go +++ b/chain/cosmos/gas.go @@ -25,6 +25,6 @@ func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { } // EstimateGasPrice returns gas required per byte for Cosmos-compatible chains. -func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, error) { - return gasEstimator.gasPerByte, nil +func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, pack.U256, error) { + return gasEstimator.gasPerByte, pack.NewU256([32]byte{}), nil } diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index 180428ca..c0240bd7 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -32,7 +32,7 @@ var _ = Describe("Filecoin", func() { client, err := filecoin.NewClient( filecoin.DefaultClientOptions(). WithRPCURL("ws://127.0.0.1:1234/rpc/v0"). - WithAuthToken("Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.673MLa4AmbhNeC1Hj2Bn6c4t_ci68I0amkqAEHea8ik"), + WithAuthToken(fetchAuthToken()), ) Expect(err).ToNot(HaveOccurred()) @@ -66,20 +66,30 @@ var _ = Describe("Filecoin", func() { recipientFilAddr, err := filaddress.NewSecp256k1Address(recipientPubKeyCompressed) Expect(err).NotTo(HaveOccurred()) + // get good gas estimates + gasLimit := uint64(2200000) + gasEstimator := filecoin.NewGasEstimator(client, int64(gasLimit)) + gasFeeCap, gasPremium, err := gasEstimator.EstimateGasPrice(ctx) + Expect(err).ToNot(HaveOccurred()) + // construct the transaction builder - gasPremium := pack.NewU256FromU64(pack.NewU64(149514)) filTxBuilder := filecoin.NewTxBuilder(gasPremium) // build the transaction + sender := multichain.Address(pack.String(senderFilAddr.String())) + amount := pack.NewU256FromU64(pack.NewU64(100000000)) + nonce, err := client.AccountNonce(ctx, sender) + Expect(err).ToNot(HaveOccurred()) + tx, err := filTxBuilder.BuildTx( ctx, - multichain.Address(pack.String(senderFilAddr.String())), + sender, multichain.Address(pack.String(recipientFilAddr.String())), - pack.NewU256FromU64(pack.NewU64(100000000)), // amount - pack.NewU256FromU64(pack.NewU64(0)), // nonce - pack.NewU256FromU64(pack.NewU64(495335)), // gasFeeCap - pack.NewU256FromU64(pack.NewU64(149838)), // gasPrice - pack.Bytes(nil), // payload + amount, // amount + nonce, // nonce + pack.NewU256FromU64(pack.NewU64(gasLimit)), // gasLimit + gasFeeCap, // gasFeeCap + pack.Bytes(nil), // payload ) Expect(err).ToNot(HaveOccurred()) @@ -106,15 +116,22 @@ var _ = Describe("Filecoin", func() { err = client.SubmitTx(ctx, tx) Expect(err).ToNot(HaveOccurred()) + // Wait slightly before we query the chain's node. + time.Sleep(time.Second) + // wait for the transaction to be included in a block for { - time.Sleep(2 * time.Second) - fetchedTx, confs, err := client.Tx(ctx, txHash) - if fetchedTx != nil { - Expect(err).ToNot(HaveOccurred()) - Expect(confs).To(BeNumerically(">=", 0)) + // Loop until the transaction has at least a few confirmations. + tx, confs, err := client.Tx(ctx, txHash) + if err == nil { + Expect(confs.Uint64()).To(BeNumerically(">", 0)) + Expect(tx.From()).To(Equal(sender)) + Expect(tx.Value()).To(Equal(amount)) break } + + // wait and retry querying for the transaction + time.Sleep(5 * time.Second) } }) }) diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go index 5a244499..647daceb 100644 --- a/chain/filecoin/gas.go +++ b/chain/filecoin/gas.go @@ -2,29 +2,71 @@ package filecoin import ( "context" + "fmt" + "math/big" - "github.com/renproject/multichain/api/gas" + filaddress "github.com/filecoin-project/go-address" + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/specs-actors/actors/abi" "github.com/renproject/pack" ) -// A GasEstimator returns the gas-per-byte that is needed in order to confirm -// transactions with an estimated maximum delay of one block. In distributed -// networks that collectively build, sign, and submit transactions, it is -// important that all nodes in the network have reached consensus on the -// gas-per-byte. +// A GasEstimator returns the gas fee cap and gas premium that is needed in +// order to confirm transactions with an estimated maximum delay of one block. +// In distributed networks that collectively build, sign, and submit +// transactions, it is important that all nodes in the network have reached +// consensus on these values. type GasEstimator struct { - gasPerByte pack.U256 + client *Client + gasLimit int64 } -// NewGasEstimator returns a simple gas estimator that always returns the same -// amount of gas-per-byte. -func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { - return &GasEstimator{ - gasPerByte: gasPerByte, +// NewGasEstimator returns a simple gas estimator that fetches the ideal gas +// fee cap and gas premium for a filecoin transaction to be included in a block +// with minimal delay. +func NewGasEstimator(client *Client, gasLimit int64) GasEstimator { + return GasEstimator{ + client: client, + gasLimit: gasLimit, } } -// EstimateGasPrice returns gas required per byte for Cosmos-compatible chains. -func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, error) { - return gasEstimator.gasPerByte, nil +// EstimateGasPrice returns gas fee cap and gas premium values being accepted +// in the filecoin chain at present. These numbers may vary as the chain's +// congestion level increases. It is safe to say that by using the fetched +// values, a transaction will be included in a block with minimal delay. +func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, pack.U256, error) { + // Create a dummy "Send" message. + msgIn := types.Message{ + Version: types.MessageVersion, + From: filaddress.Undef, + To: filaddress.Undef, + Value: types.EmptyInt, + Nonce: 0, + GasLimit: gasEstimator.gasLimit, + GasFeeCap: types.EmptyInt, + GasPremium: types.EmptyInt, + Method: abi.MethodNum(0), + Params: []byte{}, + } + + // Estimate the gas fee cap and gas premium fields for this dummy message. + msgOut, err := gasEstimator.client.node.GasEstimateMessageGas(ctx, &msgIn, &api.DefaultMessageSendSpec, types.EmptyTSK) + if err != nil { + return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf("estimating gas price: %v", err) + } + + gasFeeCapBytes, err := msgOut.GasFeeCap.Bytes() + if err != nil { + return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf("getting abi/big bytes for %v: %v", msgOut.GasFeeCap, err) + } + gasPremiumBytes, err := msgOut.GasPremium.Bytes() + if err != nil { + return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf("getting abi/big bytes for %v: %v", msgOut.GasPremium, err) + } + gasFeeCap := big.NewInt(0).SetBytes(gasFeeCapBytes) + gasPremium := big.NewInt(0).SetBytes(gasPremiumBytes) + + return pack.NewU256FromInt(gasFeeCap), pack.NewU256FromInt(gasPremium), nil } diff --git a/chain/filecoin/gas_test.go b/chain/filecoin/gas_test.go index 0d419baa..df7d8db4 100644 --- a/chain/filecoin/gas_test.go +++ b/chain/filecoin/gas_test.go @@ -1 +1,57 @@ package filecoin_test + +import ( + "bytes" + "context" + "fmt" + "os/exec" + "strings" + + "github.com/renproject/multichain/chain/filecoin" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Gas", func() { + Context("when estimating gas parameters", func() { + It("should work", func() { + // create context for the test + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + // instantiate the client + client, err := filecoin.NewClient( + filecoin.DefaultClientOptions(). + WithRPCURL("ws://127.0.0.1:1234/rpc/v0"). + WithAuthToken(fetchAuthToken()), + ) + Expect(err).ToNot(HaveOccurred()) + + // instantiate the gas estimator + gasEstimator := filecoin.NewGasEstimator(client, 2000000) + + // estimate gas price + _, _, err = gasEstimator.EstimateGasPrice(ctx) + Expect(err).ToNot(HaveOccurred()) + }) + }) +}) + +func fetchAuthToken() pack.String { + // fetch the auth token from filecoin's running docker container + cmd := exec.Command("docker", "exec", "infra_filecoin_1", "/bin/bash", "-c", "/app/lotus auth api-info --perm admin") + var out bytes.Buffer + var stderr bytes.Buffer + cmd.Stdout = &out + cmd.Stderr = &stderr + err := cmd.Run() + if err != nil { + fmt.Println(fmt.Sprint(err) + ": " + stderr.String()) + panic(fmt.Sprintf("could not run command: %v", err)) + } + tokenWithSuffix := strings.TrimPrefix(out.String(), "FULLNODE_API_INFO=") + authToken := strings.Split(tokenWithSuffix, ":/") + return pack.NewString(fmt.Sprintf("Bearer %s", authToken[0])) +} From 11c4dfed4c15ed88c0e81aaa094c32cbcd4a1ced Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 8 Oct 2020 08:44:35 +0000 Subject: [PATCH 182/335] chore: upgrade lotus packages --- chain/filecoin/account.go | 4 +-- chain/filecoin/client.go | 2 +- chain/filecoin/filecoin-ffi | 2 +- chain/filecoin/gas.go | 2 +- go.mod | 7 ++-- go.sum | 64 +++++++++++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 8 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 97046d3b..ef5d9ba3 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -6,9 +6,9 @@ import ( "fmt" filaddress "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/specs-actors/actors/abi" - "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 7aabd747..74edb4d1 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -7,10 +7,10 @@ import ( filaddress "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-jsonrpc" + "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/lotus/api" filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/ipfs/go-cid" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/api/address" diff --git a/chain/filecoin/filecoin-ffi b/chain/filecoin/filecoin-ffi index 777a6fbf..a62d00da 160000 --- a/chain/filecoin/filecoin-ffi +++ b/chain/filecoin/filecoin-ffi @@ -1 +1 @@ -Subproject commit 777a6fbf4446b1112adfd4fa5dd88e0c88974122 +Subproject commit a62d00da59d1b0fb35f3a4ae854efa9441af892d diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go index 647daceb..1511baa5 100644 --- a/chain/filecoin/gas.go +++ b/chain/filecoin/gas.go @@ -6,9 +6,9 @@ import ( "math/big" filaddress "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/specs-actors/actors/abi" "github.com/renproject/pack" ) diff --git a/go.mod b/go.mod index ec863d70..80e14bf4 100644 --- a/go.mod +++ b/go.mod @@ -9,10 +9,11 @@ require ( github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf github.com/cosmos/cosmos-sdk v0.39.1 github.com/ethereum/go-ethereum v1.9.20 - github.com/filecoin-project/go-address v0.0.3 + github.com/filecoin-project/go-address v0.0.4 github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 - github.com/filecoin-project/lotus v0.5.6 - github.com/filecoin-project/specs-actors v0.9.3 + github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab + github.com/filecoin-project/lotus v0.8.1 + github.com/filecoin-project/specs-actors v0.9.12 github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/multiformats/go-varint v0.0.6 diff --git a/go.sum b/go.sum index 55222813..366d4219 100644 --- a/go.sum +++ b/go.sum @@ -141,6 +141,7 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= +github.com/certifi/gocertifi v0.0.0-20200211180108-c7c1fbc02894/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -155,6 +156,10 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/pebble v0.0.0-20200916222308-4e219a90ba5b/go.mod h1:hU7vhtrqonEphNF+xt8/lHdaBprxmV1h8BOGrd9XwmQ= +github.com/cockroachdb/redact v0.0.0-20200622112456-cd282804bbd3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -205,8 +210,10 @@ github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhY github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= github.com/dgraph-io/badger/v2 v2.0.3/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM= +github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -217,9 +224,11 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4/go.mod h1:SnqWL9jksIMK63UKkfmWI6f9PDN8ROoCgg+Z4zWk7hg= +github.com/drand/drand v1.1.2-0.20200905144319-79c957281b32/go.mod h1:0sQEVg+ngs1jaDPVIiEgY0lbENWJPaUlWxGHEaSmKVM= github.com/drand/kyber v1.0.1-0.20200110225416-8de27ed8c0e2/go.mod h1:UpXoA0Upd1N9l4TvRPHr1qAUBBERj6JQ/mnKI3BPEmw= github.com/drand/kyber v1.0.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= github.com/drand/kyber v1.1.1/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= +github.com/drand/kyber v1.1.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= github.com/drand/kyber-bls12381 v0.1.0/go.mod h1:N1emiHpm+jj7kMlxEbu3MUyOiooTgNySln564cgD9mk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -255,8 +264,11 @@ github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= +github.com/filecoin-project/go-address v0.0.4 h1:gSNMv0qWwH16fGQs7ycOUrDjY6YCSsgLUl0I0KLjo8w= +github.com/filecoin-project/go-address v0.0.4/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 h1:K6t4Hrs+rwUxBz2xg88Bdqeh4k5/rycQFdPseZhRyfE= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= @@ -267,12 +279,17 @@ github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go. github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.1-0.20200920172649-837cbe6a1ed3 h1:HQa4+yCYsLq1TLM0kopeAhSCLbtZ541cWEi5N5rO+9g= +github.com/filecoin-project/go-bitfield v0.2.1-0.20200920172649-837cbe6a1ed3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v0.6.1/go.mod h1:uRYBRKVBVM12CSusBtVrzDHkVw/3DKZpkxKJVP1Ydas= github.com/filecoin-project/go-data-transfer v0.6.3 h1:7TLwm8nuodHYD/uiwJjKc/PGRR+LwqM8jmlZqgWuUfY= github.com/filecoin-project/go-data-transfer v0.6.3/go.mod h1:PmBKVXkhh67/tnEdJXQwDHl5mT+7Tbcwe1NPninqhnM= +github.com/filecoin-project/go-data-transfer v0.6.7 h1:Kacr5qz2YWtd3sensU6aXFtES7joeapVDeXApeUD35I= +github.com/filecoin-project/go-data-transfer v0.6.7/go.mod h1:C++k1U6+jMQODOaen5OPDo9XQbth9Yq3ie94vNjBJbk= +github.com/filecoin-project/go-ds-versioning v0.1.0/go.mod h1:mp16rb4i2QPmxBnmanUx8i/XANp+PFCCJWiAb+VW4/s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= @@ -280,6 +297,10 @@ github.com/filecoin-project/go-fil-markets v0.5.6-0.20200814234959-80b1788108ac/ github.com/filecoin-project/go-fil-markets v0.5.6/go.mod h1:SJApXAKr5jyGpbzDEOhvemui0pih7hhT8r2MXJxCP1E= github.com/filecoin-project/go-fil-markets v0.5.8 h1:uwl0QNUVmmSlUQfxshpj21Dmhh6WKTQNhnb1GMfdp18= github.com/filecoin-project/go-fil-markets v0.5.8/go.mod h1:6ZX1vbZbnukbVQ8tCB/MmEizuW/bmRX7SpGAltU3KVg= +github.com/filecoin-project/go-fil-markets v0.7.0 h1:tcEZiUNIYQJ4PBzgVpLwfdJ4ZdC4WCv9LsgvsoCXIls= +github.com/filecoin-project/go-fil-markets v0.7.0/go.mod h1:5Pt4DXQqUoUrp9QzlSdlYTpItXxwAtqKrxRWQ6hAOqk= +github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= +github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 h1:FXtCp0ybqdQL9knb3OGDpkNTaBbPxgkqPeWKotUwkH0= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= @@ -287,13 +308,23 @@ github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0 github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= +github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20 h1:+/4aUeUoKr6AKfPE3mBhXA5spIV6UcKdTYDPNU2Tdmg= +github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= +github.com/filecoin-project/go-state-types v0.0.0-20200903145444-247639ffa6ad/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= +github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= +github.com/filecoin-project/go-state-types v0.0.0-20200905071437-95828685f9df/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= +github.com/filecoin-project/go-state-types v0.0.0-20200911004822-964d6c679cfc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab h1:cEDC5Ei8UuT99hPWhCjA72SM9AuRtnpvdSTIYbnzN8I= +github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 h1:Jbburj7Ih2iaJ/o5Q9A+EAeTabME6YII7FLi9SKUf5c= github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe h1:dF8u+LEWeIcTcfUcCf3WFVlc81Fr2JKg8zPzIbBDKDw= +github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= @@ -302,6 +333,8 @@ github.com/filecoin-project/lotus v0.4.3-0.20200819134055-b13681df3205/go.mod h1 github.com/filecoin-project/lotus v0.4.3-0.20200820203717-d1718369a182/go.mod h1:biFZPQ/YyQGfkHUmHMiaNf2hnD6zm1+OAXPQYQ61Zkg= github.com/filecoin-project/lotus v0.5.6 h1:3Jea/vfZBs95KmNuqyXGEpB6h+uF69xyMz0OD+Igpi8= github.com/filecoin-project/lotus v0.5.6/go.mod h1:JeT2ti5ArW4B69k1FMMFV1rj00wX4ooHMX6zS5MgY+w= +github.com/filecoin-project/lotus v0.8.1 h1:le1NxJo7dOI+G7Hdt5qBZ9YlevA1F7nwufHLFNUBDrs= +github.com/filecoin-project/lotus v0.8.1/go.mod h1:9ukCCZ8KpowtotH2OTiOhFHh7+r7Xh0pkwNL6lFw1xU= github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= @@ -314,13 +347,21 @@ github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go github.com/filecoin-project/specs-actors v0.9.2/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= github.com/filecoin-project/specs-actors v0.9.3 h1:Fi75G/UQ7R4eiIwnN+S6bBQ9LqKivyJdw62jJzTi6aE= github.com/filecoin-project/specs-actors v0.9.3/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= +github.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4= +github.com/filecoin-project/specs-actors v0.9.7/go.mod h1:wM2z+kwqYgXn5Z7scV1YHLyd1Q1cy0R8HfTIWQ0BFGU= +github.com/filecoin-project/specs-actors v0.9.11/go.mod h1:czlvLQGEX0fjLLfdNHD7xLymy6L3n7aQzRWzsYGf+ys= +github.com/filecoin-project/specs-actors v0.9.12 h1:iIvk58tuMtmloFNHhAOQHG+4Gci6Lui0n7DYQGi3cJk= +github.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796 h1:dJsTPWpG2pcTeojO2pyn0c6l+x/3MZYCBgo/9d11JEk= +github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796/go.mod h1:nJRRM7Aa9XVvygr3W9k6xGF46RWzr2zxF/iGoAIfA/g= github.com/filecoin-project/statediff v0.0.1/go.mod h1:qNWauolLFEzOiA4LNWermBRVNbaZHfPcPevumZeh+hE= github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= github.com/filecoin-project/test-vectors v0.0.0-20200819133914-e20cc29cc926/go.mod h1:ou1Im2BTyrYTnXX8yj5VvC+DTfbIrwESJjKDxbh31nA= github.com/filecoin-project/test-vectors v0.0.0-20200826113833-9ffe6524729d/go.mod h1:hY/JN3OFRtykBrMByFjTonUFEOW2bRJjyR5YMUh3jLw= +github.com/filecoin-project/test-vectors/schema v0.0.3/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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= @@ -334,6 +375,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0= github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1/go.mod h1:0eHX/BVySxPc6SE2mZRoppGq7qcEagxdmQnA3dzork8= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= @@ -403,6 +446,7 @@ github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 h1:lMm2hD9Fy0ynom5+85/pbdkiYcBqM1JWmhpAXLmy0fw= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -471,8 +515,11 @@ github.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3 github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/gxed/pubsub v0.0.0-20180201040156-26ebdf44f824/go.mod h1:OiEWyHgK+CWrmOlVquHaIK1vhpUJydC9m0Je6mhaiNE= +github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= github.com/hannahhoward/cbor-gen-for v0.0.0-20191218204337-9ab7b1bcc099/go.mod h1:WVPCl0HO/0RAL5+vBH2GMxBomlxBF70MAS78+Lu1//k= github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= +github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= +github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e h1:3YKHER4nmd7b5qy5t0GWDTwSn4OyRgfAXSmo6VnryBY= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -554,6 +601,8 @@ github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13X github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.5 h1:cwOUcGMLdLPWgu3SlrCckCMznaGADbPqE0r8h768/Dg= +github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= @@ -567,6 +616,7 @@ github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZ github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY= +github.com/ipfs/go-ds-pebble v0.0.2-0.20200921225637-ce220f8ac459/go.mod h1:oh4liWHulKcDKVhCska5NLelE3MatWl+1FwSz3tY91g= github.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEPb0= github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= @@ -575,6 +625,8 @@ github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CE github.com/ipfs/go-graphsync v0.1.1/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= github.com/ipfs/go-graphsync v0.1.2 h1:25Ll9kIXCE+DY0dicvfS3KMw+U5sd01b/FJbA7KAbhg= github.com/ipfs/go-graphsync v0.1.2/go.mod h1:sLXVXm1OxtE2XYPw62MuXCdAuNwkAdsbnfrmos5odbA= +github.com/ipfs/go-graphsync v0.2.1 h1:MdehhqBSuTI2LARfKLkpYnt0mUrqHs/mtuDnESXHBfU= +github.com/ipfs/go-graphsync v0.2.1/go.mod h1:gEBvJUNelzMkaRPJTpg/jaKN4AQW/7wDWu0K92D8o10= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= @@ -668,11 +720,15 @@ github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZ github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= +github.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4/go.mod h1:xrMEcuSq+D1vEwl+YAXsg/JfA98XGpXDwnkIL4Aimqw= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef h1:/yPelt/0CuzZsmRkYzBBnJ499JnAOGaIaAXHujx96ic= github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= +github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f h1:XpOuNQ5GbXxUcSukbQcW9jkE7REpaFGJU2/T00fo9kA= +github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= github.com/ipld/go-ipld-prime-proto v0.0.0-20200828231332-ae0aea07222b/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= +github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -698,6 +754,7 @@ github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8 github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= @@ -748,6 +805,7 @@ github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UG github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= +github.com/libp2p/go-flow-metrics v0.0.3 h1:8tAs/hSdNvUiLgtlSy3mxwxWP4I9y/jlkPFT7epKdeM= github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-libp2p v0.0.2/go.mod h1:Qu8bWqFXiocPloabFGUcVG4kk94fLvfC8mWTDdFC9wE= github.com/libp2p/go-libp2p v0.0.30/go.mod h1:XWT8FGHlhptAv1+3V/+J5mEpzyui/5bvFsNuWYs611A= @@ -882,6 +940,8 @@ github.com/libp2p/go-libp2p-pubsub v0.3.4/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W github.com/libp2p/go-libp2p-pubsub v0.3.5-0.20200820194335-bfc96c2cd081/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-pubsub v0.3.5 h1:iF75GWpcxKEUQU8tTkgLy69qIQvfhL+t6U6ndQrB6ho= github.com/libp2p/go-libp2p-pubsub v0.3.5/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.6-0.20200910093904-f7f33e10cc18 h1:+ae7vHSv/PJ4xGXwLV6LKGj32zjyB8ttJHtyV4TXal0= +github.com/libp2p/go-libp2p-pubsub v0.3.6-0.20200910093904-f7f33e10cc18/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= github.com/libp2p/go-libp2p-quic-transport v0.7.1/go.mod h1:TD31to4E5exogR/GWHClXCfkktigjAl5rXSt7HoxNvY= @@ -1456,6 +1516,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee h1:U7zWWvvAjT76EiuWPSOiZlQDnaQYPxPoxugTtTAcJK0= github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163 h1:TtcUeY2XZSriVWR1pXyfCBWIf/NGC2iUdNw1lofUjUU= +github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= @@ -1482,6 +1544,7 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= +github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= @@ -1582,6 +1645,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= From 81a803fcba2ab90e0721d9455c8f7980e5f9b3b7 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 8 Oct 2020 14:50:26 +0530 Subject: [PATCH 183/335] fix: pointer to gas estimator --- chain/filecoin/gas.go | 4 ++-- chain/terra/terra.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go index 1511baa5..5f996883 100644 --- a/chain/filecoin/gas.go +++ b/chain/filecoin/gas.go @@ -25,8 +25,8 @@ type GasEstimator struct { // NewGasEstimator returns a simple gas estimator that fetches the ideal gas // fee cap and gas premium for a filecoin transaction to be included in a block // with minimal delay. -func NewGasEstimator(client *Client, gasLimit int64) GasEstimator { - return GasEstimator{ +func NewGasEstimator(client *Client, gasLimit int64) *GasEstimator { + return &GasEstimator{ client: client, gasLimit: gasLimit, } diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 2c2739d6..865f60c0 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -20,6 +20,9 @@ type ( var ( // DefaultClientOptions re-exports default cosmos-compatible client options DefaultClientOptions = cosmos.DefaultClientOptions + + // NewGasEstimator re-exports cosmos.NewGasEstimator + NewGasEstimator = cosmos.NewGasEstimator ) // NewClient returns returns a new Client with terra codec From be4d957810a95dcb6e8056f5a128924107fea567 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 8 Oct 2020 16:55:51 +0530 Subject: [PATCH 184/335] fix: default Send method num, complete payload --- chain/filecoin/account.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index ef5d9ba3..4f27bcf3 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -39,10 +39,6 @@ func (txBuilder TxBuilder) BuildTx(ctx context.Context, from, to address.Address return nil, fmt.Errorf("bad to address '%v': %v", to, err) } methodNum := abi.MethodNum(0) - if len(payload) > 0 { - methodNum = abi.MethodNum(payload[0]) - payload = payload[1:] - } return &Tx{ msg: types.Message{ Version: types.MessageVersion, From e5ae729440a1595dc35ae556df54c97a2d7a37a9 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 8 Oct 2020 17:47:01 +0530 Subject: [PATCH 185/335] fix: payload for filecoin, gas estimator for multichain tests --- chain/filecoin/account.go | 11 +---------- multichain_test.go | 34 ++++++++++++++++------------------ 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 4f27bcf3..439fa0f3 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -98,16 +98,7 @@ func (tx Tx) Nonce() pack.U256 { // Generally, this payload is used to send notes between external accounts, // or invoke business logic on a contract. func (tx Tx) Payload() contract.CallData { - if tx.msg.Method == 0 { - if len(tx.msg.Params) == 0 { - return contract.CallData([]byte{}) - } - return contract.CallData(append([]byte{0}, tx.msg.Params...)) - } - if len(tx.msg.Params) == 0 { - return contract.CallData([]byte{byte(tx.msg.Method)}) - } - return contract.CallData(append([]byte{byte(tx.msg.Method)}, tx.msg.Params...)) + return contract.CallData(tx.msg.Params) } // Sighashes returns the digests that must be signed before the transaction diff --git a/multichain_test.go b/multichain_test.go index 146f0c64..03ef2371 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -303,8 +303,7 @@ var _ = Describe("Multichain", func() { privKeyToAddr func(pk id.PrivKey) multichain.Address rpcURL pack.String randomRecipientAddr func() multichain.Address - initialise func(pack.String) multichain.AccountClient - txBuilder func(client multichain.AccountClient) multichain.AccountTxBuilder + initialise func(pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ @@ -344,19 +343,17 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return recipient }, - func(rpcURL pack.String) multichain.AccountClient { + func(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) { client := terra.NewClient( terra.DefaultClientOptions(). WithHost(rpcURL), ) - - return client - }, - func(client multichain.AccountClient) multichain.AccountTxBuilder { - return terra.NewTxBuilder(terra.TxBuilderOptions{ + txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ ChainID: "testnet", CoinDenom: "uluna", - }, client.(*terra.Client)) + }, client) + + return client, txBuilder }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) @@ -413,20 +410,22 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return multichain.Address(pack.String(addr.String())) }, - func(rpcURL pack.String) multichain.AccountClient { + func(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) { // dirty hack to fetch auth token - authToken := fetchAuthToken() client, err := filecoin.NewClient( filecoin.DefaultClientOptions(). WithRPCURL(rpcURL). - WithAuthToken(authToken), + WithAuthToken(fetchAuthToken()), ) Expect(err).NotTo(HaveOccurred()) - return client - }, - func(client multichain.AccountClient) multichain.AccountTxBuilder { - return filecoin.NewTxBuilder(pack.NewU256FromU64(pack.NewU64(300000))) + gasEstimator := filecoin.NewGasEstimator(client, 2189560) + _, gasPremium, err := gasEstimator.EstimateGasPrice(context.Background()) + Expect(err).NotTo(HaveOccurred()) + + txBuilder := filecoin.NewTxBuilder(gasPremium) + + return client, txBuilder }, func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) @@ -451,7 +450,7 @@ var _ = Describe("Multichain", func() { // Initialise the account chain's client, and possibly get a nonce for // the sender. - accountClient := accountChain.initialise(accountChain.rpcURL) + accountClient, txBuilder := accountChain.initialise(accountChain.rpcURL) // Get the appropriate nonce for sender. nonce, err := accountClient.AccountNonce(ctx, senderAddr) @@ -460,7 +459,6 @@ var _ = Describe("Multichain", func() { // Build a transaction. amount, gasLimit, gasPrice, payload := accountChain.txParams() - txBuilder := accountChain.txBuilder(accountClient) accountTx, err := txBuilder.BuildTx( ctx, multichain.Address(senderAddr), From a2c68755fddbcb452cab144f2bb9bda637958f93 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 8 Oct 2020 12:43:46 +0000 Subject: [PATCH 186/335] ci: fix zcash dockerfile --- infra/zcash/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/zcash/Dockerfile b/infra/zcash/Dockerfile index e976dcab..0efeda32 100644 --- a/infra/zcash/Dockerfile +++ b/infra/zcash/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic # Install zcashd. RUN apt-get update && \ @@ -14,4 +14,4 @@ RUN chmod +x /root/run.sh EXPOSE 18232 -ENTRYPOINT ["./root/run.sh"] \ No newline at end of file +ENTRYPOINT ["./root/run.sh"] From 18c25ffcef2e68448d5af2b5379d435a9952e434 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 9 Oct 2020 15:39:41 +0530 Subject: [PATCH 187/335] chore: upgrade lotus packages --- go.mod | 3 +-- go.sum | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 80e14bf4..83156841 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,7 @@ require ( github.com/filecoin-project/go-address v0.0.4 github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab - github.com/filecoin-project/lotus v0.8.1 - github.com/filecoin-project/specs-actors v0.9.12 + github.com/filecoin-project/lotus v0.9.0 github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/multiformats/go-varint v0.0.6 diff --git a/go.sum b/go.sum index 366d4219..3f2da47b 100644 --- a/go.sum +++ b/go.sum @@ -272,6 +272,8 @@ github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UN github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 h1:K6t4Hrs+rwUxBz2xg88Bdqeh4k5/rycQFdPseZhRyfE= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 h1:pIuR0dnMD0i+as8wNnjjHyQrnhP5O5bmba/lmgQeRgU= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= @@ -281,6 +283,8 @@ github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7 github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.1-0.20200920172649-837cbe6a1ed3 h1:HQa4+yCYsLq1TLM0kopeAhSCLbtZ541cWEi5N5rO+9g= github.com/filecoin-project/go-bitfield v0.2.1-0.20200920172649-837cbe6a1ed3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.1 h1:S6Uuqcspqu81sWJ0He4OAfFLm1tSwPdVjtKTkl5m/xQ= +github.com/filecoin-project/go-bitfield v0.2.1/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= @@ -301,6 +305,8 @@ github.com/filecoin-project/go-fil-markets v0.7.0 h1:tcEZiUNIYQJ4PBzgVpLwfdJ4ZdC github.com/filecoin-project/go-fil-markets v0.7.0/go.mod h1:5Pt4DXQqUoUrp9QzlSdlYTpItXxwAtqKrxRWQ6hAOqk= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= +github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= +github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0/go.mod h1:7aWZdaQ1b16BVoQUYR+eEvrDCGJoPLxFpDynFjYfBjI= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 h1:FXtCp0ybqdQL9knb3OGDpkNTaBbPxgkqPeWKotUwkH0= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= @@ -335,6 +341,8 @@ github.com/filecoin-project/lotus v0.5.6 h1:3Jea/vfZBs95KmNuqyXGEpB6h+uF69xyMz0O github.com/filecoin-project/lotus v0.5.6/go.mod h1:JeT2ti5ArW4B69k1FMMFV1rj00wX4ooHMX6zS5MgY+w= github.com/filecoin-project/lotus v0.8.1 h1:le1NxJo7dOI+G7Hdt5qBZ9YlevA1F7nwufHLFNUBDrs= github.com/filecoin-project/lotus v0.8.1/go.mod h1:9ukCCZ8KpowtotH2OTiOhFHh7+r7Xh0pkwNL6lFw1xU= +github.com/filecoin-project/lotus v0.9.0 h1:AWgKRtYJP5uQTycQQqdy0dsuoinABBxuX2wKKiQFvYA= +github.com/filecoin-project/lotus v0.9.0/go.mod h1:8Qg5wmvHgCvxq2gCq9iziPlcNHl58dtzozf4StZ68Kk= github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= @@ -352,6 +360,8 @@ github.com/filecoin-project/specs-actors v0.9.7/go.mod h1:wM2z+kwqYgXn5Z7scV1YHL github.com/filecoin-project/specs-actors v0.9.11/go.mod h1:czlvLQGEX0fjLLfdNHD7xLymy6L3n7aQzRWzsYGf+ys= github.com/filecoin-project/specs-actors v0.9.12 h1:iIvk58tuMtmloFNHhAOQHG+4Gci6Lui0n7DYQGi3cJk= github.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= +github.com/filecoin-project/specs-actors/v2 v2.0.1 h1:bf08x6tqCDfClzrv2q/rmt/A/UbBOy1KgaoogQEcLhU= +github.com/filecoin-project/specs-actors/v2 v2.0.1/go.mod h1:v2NZVYinNIKA9acEMBm5wWXxqv5+frFEbekBFemYghY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= @@ -1512,6 +1522,7 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200806213330-63aa96ca5488/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee h1:U7zWWvvAjT76EiuWPSOiZlQDnaQYPxPoxugTtTAcJK0= From 8a63a3116b921e21bf5e47df4a4287bff3bf6efb Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 9 Oct 2020 11:05:26 +0000 Subject: [PATCH 188/335] chore: upgrade local lotus node --- .github/workflows/test.yml | 2 +- infra/.env | 2 +- infra/filecoin/Dockerfile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3ea411d..56f9f26d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,4 +82,4 @@ jobs: export PATH=$PATH:$(go env GOPATH)/bin source ./infra/.env cd $GITHUB_WORKSPACE - CI=true go test + CI=true go test -timeout 1500s diff --git a/infra/.env b/infra/.env index 2a3da981..92ced4f5 100644 --- a/infra/.env +++ b/infra/.env @@ -56,7 +56,7 @@ export ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A # Filecoin # export FILECOIN_PK=7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d -export FILECOIN_ADDRESS=t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa +export FILECOIN_ADDRESS=f1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa # # Terra diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index 5442e221..fe8f400b 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic RUN apt update -y RUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl wget nano @@ -11,7 +11,7 @@ ENV PATH=$PATH:/usr/local/go/bin WORKDIR /app RUN git clone https://github.com/filecoin-project/lotus . -RUN git checkout 232cc320bd6de432b54008cb37619d45e8869df0 +RUN git checkout 26ed6af0405b027470b88f893577d35fca9af5bd RUN make 2k RUN ./lotus fetch-params 2048 RUN ./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 From 42650cfeef6cfaadb6a75407bdc52ba750139d65 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 9 Oct 2020 11:38:18 +0000 Subject: [PATCH 189/335] chore: use prebuilt image (filecoin) --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56f9f26d..a2e2062c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,9 +63,10 @@ jobs: bitcoin \ bitcoincash \ dogecoin \ - filecoin \ terra \ zcash + docker run -d -p 1234:1234 -h 0.0.0.0 \ + --name infra_filecoin_1 rohitnarurkar/multichain_filecoin:latest - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master From 3865a18d2903573bb04ee5b986286435af99a816 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 9 Oct 2020 12:08:33 +0000 Subject: [PATCH 190/335] ignore zcash tests (connection reset) --- multichain_test.go | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 03ef2371..865cc31f 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -588,27 +588,27 @@ var _ = Describe("Multichain", func() { dogecoin.NewTxBuilder(&dogecoin.RegressionNetParams), multichain.Dogecoin, }, - { - "ZCASH_PK", - func(pkh []byte) (btcutil.Address, error) { - addr, err := zcash.NewAddressPubKeyHash(pkh, &zcash.RegressionNetParams) - return addr, err - }, - func(script []byte) (btcutil.Address, error) { - addr, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) - return addr, err - }, - pack.String("http://0.0.0.0:18232"), - func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { - client := zcash.NewClient(zcash.DefaultClientOptions()) - outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) - Expect(err).NotTo(HaveOccurred()) - return client, outputs, client.Confirmations - }, - zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), - multichain.Zcash, - }, /* + { + "ZCASH_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressPubKeyHash(pkh, &zcash.RegressionNetParams) + return addr, err + }, + func(script []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + return addr, err + }, + pack.String("http://0.0.0.0:18232"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := zcash.NewClient(zcash.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), + multichain.Zcash, + }, { "DIGIBYTE_PK", func(pkh []byte) (btcutil.Address, error) { From e7271716ef3d00f1471e17b154eae5a91af9abf9 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 12 Oct 2020 15:42:26 +0530 Subject: [PATCH 191/335] fix: use network params from encoder instance --- chain/bitcoin/address.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 205105eb..3228c374 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -40,7 +40,7 @@ func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { // Validate that the base58 address is in fact in correct format. encodedAddr := base58.Encode([]byte(rawAddr)) - if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { + if _, err := btcutil.DecodeAddress(encodedAddr, encoder.params); err != nil { return address.Address(""), err } From c1e75817738a458ae48dbe10da882c0c8cf5c092 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 12 Oct 2020 15:56:13 +0530 Subject: [PATCH 192/335] chore: upgrade lotus packages --- go.mod | 6 +++--- go.sum | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 83156841..08dc62f2 100644 --- a/go.mod +++ b/go.mod @@ -10,9 +10,9 @@ require ( github.com/cosmos/cosmos-sdk v0.39.1 github.com/ethereum/go-ethereum v1.9.20 github.com/filecoin-project/go-address v0.0.4 - github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 - github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab - github.com/filecoin-project/lotus v0.9.0 + github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49 + github.com/filecoin-project/go-state-types v0.0.0-20201003010437-c33112184a2b + github.com/filecoin-project/lotus v0.10.0 github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/multiformats/go-varint v0.0.6 diff --git a/go.sum b/go.sum index 3f2da47b..75ce7767 100644 --- a/go.sum +++ b/go.sum @@ -303,6 +303,8 @@ github.com/filecoin-project/go-fil-markets v0.5.8 h1:uwl0QNUVmmSlUQfxshpj21Dmhh6 github.com/filecoin-project/go-fil-markets v0.5.8/go.mod h1:6ZX1vbZbnukbVQ8tCB/MmEizuW/bmRX7SpGAltU3KVg= github.com/filecoin-project/go-fil-markets v0.7.0 h1:tcEZiUNIYQJ4PBzgVpLwfdJ4ZdC4WCv9LsgvsoCXIls= github.com/filecoin-project/go-fil-markets v0.7.0/go.mod h1:5Pt4DXQqUoUrp9QzlSdlYTpItXxwAtqKrxRWQ6hAOqk= +github.com/filecoin-project/go-fil-markets v0.7.1 h1:e0NlpSnaeGyDUhCOzevjcxkSA54kt9BzlXpLRgduUFI= +github.com/filecoin-project/go-fil-markets v0.7.1/go.mod h1:5Pt4DXQqUoUrp9QzlSdlYTpItXxwAtqKrxRWQ6hAOqk= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= @@ -310,6 +312,8 @@ github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0/go.mod h1:7aWZdaQ1b16BVoQUYR+ github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 h1:FXtCp0ybqdQL9knb3OGDpkNTaBbPxgkqPeWKotUwkH0= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49 h1:FSY245KeXFCUgyfFEu+bhrZNk8BGGJyfpSmQl2aiPU8= +github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= @@ -325,6 +329,8 @@ github.com/filecoin-project/go-state-types v0.0.0-20200905071437-95828685f9df/go github.com/filecoin-project/go-state-types v0.0.0-20200911004822-964d6c679cfc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab h1:cEDC5Ei8UuT99hPWhCjA72SM9AuRtnpvdSTIYbnzN8I= github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.0.0-20201003010437-c33112184a2b h1:bMUfG6Sy6YSMbsjQAO1Q2vEZldbSdsbRy/FX3OlTck0= +github.com/filecoin-project/go-state-types v0.0.0-20201003010437-c33112184a2b/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 h1:Jbburj7Ih2iaJ/o5Q9A+EAeTabME6YII7FLi9SKUf5c= @@ -343,6 +349,8 @@ github.com/filecoin-project/lotus v0.8.1 h1:le1NxJo7dOI+G7Hdt5qBZ9YlevA1F7nwufHL github.com/filecoin-project/lotus v0.8.1/go.mod h1:9ukCCZ8KpowtotH2OTiOhFHh7+r7Xh0pkwNL6lFw1xU= github.com/filecoin-project/lotus v0.9.0 h1:AWgKRtYJP5uQTycQQqdy0dsuoinABBxuX2wKKiQFvYA= github.com/filecoin-project/lotus v0.9.0/go.mod h1:8Qg5wmvHgCvxq2gCq9iziPlcNHl58dtzozf4StZ68Kk= +github.com/filecoin-project/lotus v0.10.0 h1:fH8DVC/hsKDXrlbwM4kU75EjH0V1TSF2kcy3CTRVK80= +github.com/filecoin-project/lotus v0.10.0/go.mod h1:GrP2TIyNUOYLNC74eHh4N9O4uFbV0U/3J472BI8CUaI= github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= @@ -362,6 +370,8 @@ github.com/filecoin-project/specs-actors v0.9.12 h1:iIvk58tuMtmloFNHhAOQHG+4Gci6 github.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= github.com/filecoin-project/specs-actors/v2 v2.0.1 h1:bf08x6tqCDfClzrv2q/rmt/A/UbBOy1KgaoogQEcLhU= github.com/filecoin-project/specs-actors/v2 v2.0.1/go.mod h1:v2NZVYinNIKA9acEMBm5wWXxqv5+frFEbekBFemYghY= +github.com/filecoin-project/specs-actors/v2 v2.1.0 h1:ocEuGz8DG2cUWw32c/tvF8D6xT+dGVWJTr5yDevU00g= +github.com/filecoin-project/specs-actors/v2 v2.1.0/go.mod h1:E7fAX4CZkDVQvDNRCxfq+hc3nx56KcCKyuZf0hlQJ20= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= @@ -372,6 +382,7 @@ github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f/go.mo github.com/filecoin-project/test-vectors v0.0.0-20200819133914-e20cc29cc926/go.mod h1:ou1Im2BTyrYTnXX8yj5VvC+DTfbIrwESJjKDxbh31nA= github.com/filecoin-project/test-vectors v0.0.0-20200826113833-9ffe6524729d/go.mod h1:hY/JN3OFRtykBrMByFjTonUFEOW2bRJjyR5YMUh3jLw= github.com/filecoin-project/test-vectors/schema v0.0.3/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= +github.com/filecoin-project/test-vectors/schema v0.0.4/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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= @@ -926,6 +937,7 @@ github.com/libp2p/go-libp2p-net v0.0.2/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8 github.com/libp2p/go-libp2p-netutil v0.0.1/go.mod h1:GdusFvujWZI9Vt0X5BKqwWWmZFxecf9Gt03cKxm2f/Q= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= +github.com/libp2p/go-libp2p-noise v0.1.2/go.mod h1:9B10b7ueo7TIxZHHcjcDCo5Hd6kfKT2m77by82SFRfE= github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo= github.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es= github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY= @@ -952,10 +964,13 @@ github.com/libp2p/go-libp2p-pubsub v0.3.5 h1:iF75GWpcxKEUQU8tTkgLy69qIQvfhL+t6U6 github.com/libp2p/go-libp2p-pubsub v0.3.5/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-pubsub v0.3.6-0.20200910093904-f7f33e10cc18 h1:+ae7vHSv/PJ4xGXwLV6LKGj32zjyB8ttJHtyV4TXal0= github.com/libp2p/go-libp2p-pubsub v0.3.6-0.20200910093904-f7f33e10cc18/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.3.6 h1:9oO8W7qIWCYQYyz5z8nUsPcb3rrFehBlkbqvbSVjBxY= +github.com/libp2p/go-libp2p-pubsub v0.3.6/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= github.com/libp2p/go-libp2p-quic-transport v0.7.1/go.mod h1:TD31to4E5exogR/GWHClXCfkktigjAl5rXSt7HoxNvY= github.com/libp2p/go-libp2p-quic-transport v0.8.0/go.mod h1:F2FG/6Bzz0U6essUVxDzE0s9CrY4XGLbl7QEmDNvU7A= +github.com/libp2p/go-libp2p-quic-transport v0.8.2/go.mod h1:L+e0q15ZNaYm3seHgbsXjWP8kXLEqz+elLWKk9l8DhM= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= @@ -1071,6 +1086,7 @@ github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdf github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lucas-clemente/quic-go v0.17.3/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lucas-clemente/quic-go v0.18.0/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= +github.com/lucas-clemente/quic-go v0.18.1/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= From 4d2ba3ec16639cf25719741016533f89b465feb6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 12 Oct 2020 17:54:44 +0530 Subject: [PATCH 193/335] feat: fee estimation (sats per byte) --- chain/bitcoin/bitcoin.go | 20 ++++++++++++++++++++ chain/bitcoin/gas.go | 33 +++++++++++++++++++++++++-------- chain/bitcoin/gas_test.go | 39 +++++++++++++++++++++++++++++++++++++++ infra/bitcoin/run.sh | 12 ++++++++++-- infra/docker-compose.yaml | 1 + 5 files changed, 95 insertions(+), 10 deletions(-) diff --git a/chain/bitcoin/bitcoin.go b/chain/bitcoin/bitcoin.go index ca66dc25..007546bd 100644 --- a/chain/bitcoin/bitcoin.go +++ b/chain/bitcoin/bitcoin.go @@ -88,6 +88,8 @@ type Client interface { UnspentOutputs(ctx context.Context, minConf, maxConf int64, address address.Address) ([]utxo.Output, error) // Confirmations of a transaction in the Bitcoin network. Confirmations(ctx context.Context, txHash pack.Bytes) (int64, error) + // EstimateSmartFee + EstimateSmartFee(ctx context.Context, numBlocks int64) (float64, error) } type client struct { @@ -239,6 +241,24 @@ func (client *client) Confirmations(ctx context.Context, txHash pack.Bytes) (int return confirmations, nil } +// EstimateSmartFee fetches the estimated bitcoin network fees to be paid (in +// BTC per kilobyte) needed for a transaction to be confirmed within `numBlocks` +// blocks. An error will be returned if the bitcoin node hasn't observed enough +// blocks to make an estimate for the provided target `numBlocks`. +func (client *client) EstimateSmartFee(ctx context.Context, numBlocks int64) (float64, error) { + resp := btcjson.EstimateSmartFeeResult{} + + if err := client.send(ctx, &resp, "estimatesmartfee", numBlocks); err != nil { + return 0.0, fmt.Errorf("estimating smart fee: %v", err) + } + + if resp.Errors != nil && len(resp.Errors) > 0 { + return 0.0, fmt.Errorf("estimating smart fee: %v", resp.Errors[0]) + } + + return *resp.FeeRate, nil +} + func (client *client) send(ctx context.Context, resp interface{}, method string, params ...interface{}) error { // Encode the request. data, err := encodeRequest(method, params) diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index 7a5e43c7..e2cba6e4 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -6,27 +6,44 @@ import ( "github.com/renproject/pack" ) +const ( + btcToSatoshis = 1e8 + kilobyteToByte = 1024 +) + // A GasEstimator returns the SATs-per-byte that is needed in order to confirm // transactions with an estimated maximum delay of one block. In distributed // networks that collectively build, sign, and submit transactions, it is // important that all nodes in the network have reached consensus on the // SATs-per-byte. type GasEstimator struct { - satsPerByte pack.U256 + client Client + numBlocks int64 } // NewGasEstimator returns a simple gas estimator that always returns the given // number of SATs-per-byte. -func NewGasEstimator(satsPerByte pack.U256) GasEstimator { +func NewGasEstimator(client Client, numBlocks int64) GasEstimator { return GasEstimator{ - satsPerByte: satsPerByte, + client: client, + numBlocks: numBlocks, } } // EstimateGasPrice returns the number of SATs-per-byte that is needed in order -// to confirm transactions with an estimated maximum delay of one block. It is -// the responsibility of the caller to know the number of bytes in their -// transaction. -func (gasEstimator GasEstimator) EstimateGasPrice(_ context.Context) (pack.U256, pack.U256, error) { - return gasEstimator.satsPerByte, pack.NewU256([32]byte{}), nil +// to confirm transactions with an estimated maximum delay of `numBlocks` block. +// It is the responsibility of the caller to know the number of bytes in their +// transaction. This method calls the `estimatesmartfee` RPC call to the node, +// which based on a conservative (considering longer history) strategy returns +// the estimated BTC per kilobyte of data in the transaction. An error will be +// returned if the bitcoin node hasn't observed enough blocks to make an +// estimate for the provided target `numBlocks`. +func (gasEstimator GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, pack.U256, error) { + feeRate, err := gasEstimator.client.EstimateSmartFee(ctx, gasEstimator.numBlocks) + if err != nil { + return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), err + } + + satsPerByte := uint64(feeRate * btcToSatoshis / kilobyteToByte) + return pack.NewU256FromU64(pack.NewU64(satsPerByte)), pack.NewU256([32]byte{}), nil } diff --git a/chain/bitcoin/gas_test.go b/chain/bitcoin/gas_test.go index 7e3ae1ff..e1d0d1f0 100644 --- a/chain/bitcoin/gas_test.go +++ b/chain/bitcoin/gas_test.go @@ -1 +1,40 @@ package bitcoin_test + +import ( + "context" + + "github.com/renproject/multichain/chain/bitcoin" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Gas", func() { + Context("when estimating bitcoin network fee", func() { + It("should work", func() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bitcoin.NewClient(bitcoin.DefaultClientOptions()) + + // estimate fee to include tx within 1 block. + gasEstimator1 := bitcoin.NewGasEstimator(client, 1) + gasPrice1, _, err := gasEstimator1.EstimateGasPrice(ctx) + Expect(err).NotTo(HaveOccurred()) + + // estimate fee to include tx within 10 blocks. + gasEstimator2 := bitcoin.NewGasEstimator(client, 10) + gasPrice2, _, err := gasEstimator2.EstimateGasPrice(ctx) + Expect(err).NotTo(HaveOccurred()) + + // estimate fee to include tx within 100 blocks. + gasEstimator3 := bitcoin.NewGasEstimator(client, 100) + gasPrice3, _, err := gasEstimator3.EstimateGasPrice(ctx) + Expect(err).NotTo(HaveOccurred()) + + // expect fees in this order at the very least. + Expect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue()) + Expect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue()) + }) + }) +}) diff --git a/infra/bitcoin/run.sh b/infra/bitcoin/run.sh index 5176e272..0a00cdef 100644 --- a/infra/bitcoin/run.sh +++ b/infra/bitcoin/run.sh @@ -1,5 +1,6 @@ #!/bin/bash ADDRESS=$1 +PRIV_KEY=$2 # Start /app/bin/bitcoind @@ -11,12 +12,19 @@ echo "BITCOIN_ADDRESS=$ADDRESS" # Import the address /app/bin/bitcoin-cli importaddress $ADDRESS +# Import the private key to spend UTXOs +/app/bin/bitcoin-cli importprivkey $PRIV_KEY + # Generate enough block to pass the maturation time /app/bin/bitcoin-cli generatetoaddress 101 $ADDRESS # Simulate mining while : do + # generate new btc to the address /app/bin/bitcoin-cli generatetoaddress 1 $ADDRESS - sleep 10 -done \ No newline at end of file + sleep 5 + # send tx to own address while paying fee to the miner + /app/bin/bitcoin-cli sendtoaddress $ADDRESS 0.5 "" "" true + sleep 5 +done diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index fd515594..b30be3fb 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -37,6 +37,7 @@ services: entrypoint: - "./root/run.sh" - "${BITCOIN_ADDRESS}" + - "${BITCOIN_PK}" # # Bitcoin Cash From f41af9594c6eec9733e2d134a2a1bb83d5f66599 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 13 Oct 2020 10:58:23 +0530 Subject: [PATCH 194/335] add root asset method for a chain --- multichain.go | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/multichain.go b/multichain.go index c6a9c824..119aba80 100644 --- a/multichain.go +++ b/multichain.go @@ -280,6 +280,43 @@ func (chain Chain) IsUTXOBased() bool { return chain.ChainType() == ChainTypeUTXOBased } +// RootAsset returns the underlying native asset for a chain. For example, the +// root asset of Bitcoin chain is BTC. +func (chain Chain) RootAsset() Asset { + switch chain { + case BinanceSmartChain: + return BNB + case BitcoinCash: + return BCH + case Bitcoin: + return BTC + case DigiByte: + return DGB + case Dogecoin: + return DOGE + case Ethereum: + return ETH + case Filecoin: + return FIL + case Terra: + return LUNA + case Zcash: + return ZEC + + // These assets are define separately because they are mock assets. These + // assets should only be used for testing. + case AccountMocker1: + return AMOCK1 + case AccountMocker2: + return AMOCK2 + case UTXOMocker: + return UMOCK + + default: + return Asset("") + } +} + // ChainType represents the type of chain (whether account-based or utxo-based) type ChainType string From 29273897b7099ed3793aee2bf94ad5ebf5d040bf Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Tue, 13 Oct 2020 16:31:50 +1100 Subject: [PATCH 195/335] multichain: tweak comments --- multichain.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/multichain.go b/multichain.go index 119aba80..2f79bac7 100644 --- a/multichain.go +++ b/multichain.go @@ -112,7 +112,7 @@ const ( LUNA = Asset("LUNA") // Luna ZEC = Asset("ZEC") // Zcash - // These assets are define separately because they are mock assets. These + // These assets are defined separately because they are mock assets. These // assets should only be used for testing. AMOCK1 = Asset("AMOCK1") // Account-based mock asset @@ -149,7 +149,7 @@ func (asset Asset) OriginChain() Chain { case ZEC: return Zcash - // These assets are define separately because they are mock assets. These + // These assets are handled separately because they are mock assets. These // assets should only be used for testing. case AMOCK1: @@ -172,8 +172,9 @@ func (asset Asset) ChainType() ChainType { case BNB, ETH, FIL, LUNA: return ChainTypeAccountBased - // These assets are define separately because they are mock assets. These + // These assets are handled separately because they are mock assets. These // assets should only be used for testing. + case AMOCK1, AMOCK2: return ChainTypeAccountBased case UMOCK: @@ -221,7 +222,7 @@ const ( Terra = Chain("Terra") Zcash = Chain("Zcash") - // These chains are define separately because they are mock chains. These + // These chains are defined separately because they are mock chains. These // chains should only be used for testing. AccountMocker1 = Chain("AccountMocker1") @@ -256,8 +257,9 @@ func (chain Chain) ChainType() ChainType { case BinanceSmartChain, Ethereum, Filecoin, Terra: return ChainTypeAccountBased - // These chains are define separately because they are mock chains. These + // These chains are handled separately because they are mock chains. These // chains should only be used for testing. + case AccountMocker1, AccountMocker2: return ChainTypeAccountBased case UTXOMocker: @@ -303,8 +305,9 @@ func (chain Chain) RootAsset() Asset { case Zcash: return ZEC - // These assets are define separately because they are mock assets. These - // assets should only be used for testing. + // These chains are handled separately because they are mock chains. These + // chains should only be used for testing. + case AccountMocker1: return AMOCK1 case AccountMocker2: From 3d6588b2b6586f2a2c96f0628b2dd733bc7894ed Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 13 Oct 2020 11:06:11 +0530 Subject: [PATCH 196/335] fix: rename root asset to native asset --- multichain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multichain.go b/multichain.go index 2f79bac7..436a7fc0 100644 --- a/multichain.go +++ b/multichain.go @@ -282,9 +282,9 @@ func (chain Chain) IsUTXOBased() bool { return chain.ChainType() == ChainTypeUTXOBased } -// RootAsset returns the underlying native asset for a chain. For example, the +// NativeAsset returns the underlying native asset for a chain. For example, the // root asset of Bitcoin chain is BTC. -func (chain Chain) RootAsset() Asset { +func (chain Chain) NativeAsset() Asset { switch chain { case BinanceSmartChain: return BNB From 110fc39a9ddc0e573a88db02dc5d2f5aa3ae032c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 14 Oct 2020 17:54:41 +0530 Subject: [PATCH 197/335] fix: re-export bitcoin gas api impl from digibyte --- chain/digibyte/gas.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/chain/digibyte/gas.go b/chain/digibyte/gas.go index fdc69082..b49ce8b3 100644 --- a/chain/digibyte/gas.go +++ b/chain/digibyte/gas.go @@ -2,9 +2,8 @@ package digibyte import "github.com/renproject/multichain/chain/bitcoin" -// A GasEstimator returns the SATs-per-byte that is needed in order to confirm -// transactions with an estimated maximum delay of one block. In distributed -// networks that collectively build, sign, and submit transactions, it is -// important that all nodes in the network have reached consensus on the -// SATs-per-byte. +// GasEstimator re-exports bitcoin.GasEstimator. type GasEstimator = bitcoin.GasEstimator + +// NewGasEstimator re-exports bitcoin.NewGasEstimator. +var NewGasEstimator = bitcoin.NewGasEstimator From 4009360a53bb0aec4e8ae6889b556cd9084bfaaa Mon Sep 17 00:00:00 2001 From: Loong Date: Fri, 16 Oct 2020 12:30:58 +1100 Subject: [PATCH 198/335] fix: use price and cap correctly --- api/account/account.go | 2 +- api/gas/gas.go | 32 ++++++++++++++++++++++---------- chain/bitcoin/gas.go | 20 ++++++++++---------- chain/bitcoin/gas_test.go | 6 +++--- chain/cosmos/gas.go | 8 +++++--- chain/cosmos/tx.go | 2 +- chain/filecoin/account.go | 11 +++++------ chain/filecoin/filecoin_test.go | 7 ++++--- chain/filecoin/gas.go | 11 +++++------ chain/filecoin/gas_test.go | 2 +- chain/terra/terra_test.go | 3 ++- multichain_test.go | 8 ++------ 12 files changed, 61 insertions(+), 51 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 4759eb22..2fcab1ca 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -56,7 +56,7 @@ type Tx interface { // information, and this should be accepted during the construction of the // chain-specific transaction builder. type TxBuilder interface { - BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (Tx, error) + BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (Tx, error) } // The Client interface defines the functionality required to interact with a diff --git a/api/gas/gas.go b/api/gas/gas.go index f3189d62..509fce52 100644 --- a/api/gas/gas.go +++ b/api/gas/gas.go @@ -11,15 +11,27 @@ import ( ) // The Estimator interface defines the functionality required to know the -// current recommended gas prices. +// current recommended gas price per gas unit and gas cap per gas unit. Not all +// chains have the concept of a gas cap, in which case it should be set to be +// equal to the gas price. type Estimator interface { - // EstimateGasPrice that should be used to get confirmation within a - // reasonable amount of time. The precise definition of "reasonable amount - // of time" varies from chain to chain, and so is left open to - // interpretation by the implementation. For example, in Bitcoin, it would - // be the recommended SATs-per-byte required to get a transaction into the - // next block. In Ethereum, it would be the recommended GWEI-per-gas - // required to get a transaction into one of the next few blocks (because - // blocks happen a lot faster). - EstimateGasPrice(context.Context) (pack.U256, pack.U256, error) + // EstimateGas base/price that should be used in order to get a transaction + // confirmed within a reasonable amount of time. The precise definition of + // "reasonable amount of time" varies from chain to chain, and so is left + // open to interpretation by the implementation. + + // For example, in Bitcoin, the gas price (and gas cap) would be the + // recommended SATs-per-byte required to get a transaction into the next + // block. + + // In Ethereum without EIP-1559, the gas price (and gas cap) would be the + // recommended GWEI-per-gas required to get a transaction into one of the + // next few blocks (because blocks happen a lot faster). In Ethereum with + // EIP1559, the gas price and gas cap would be back calculated given the gas + // cap and an estimate of the current gas base. + // + // The assumption is that the total gas cost will be gasLimit * gasPrice < + // gasLimit * gasCap. If chain nodes give back values based on different + // assumptions, then the values must be normalised as needed. + EstimateGas(context.Context) (gasPrice, gasCap pack.U256, err error) } diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index e2cba6e4..e2820d3b 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -30,20 +30,20 @@ func NewGasEstimator(client Client, numBlocks int64) GasEstimator { } } -// EstimateGasPrice returns the number of SATs-per-byte that is needed in order -// to confirm transactions with an estimated maximum delay of `numBlocks` block. -// It is the responsibility of the caller to know the number of bytes in their -// transaction. This method calls the `estimatesmartfee` RPC call to the node, -// which based on a conservative (considering longer history) strategy returns -// the estimated BTC per kilobyte of data in the transaction. An error will be -// returned if the bitcoin node hasn't observed enough blocks to make an -// estimate for the provided target `numBlocks`. -func (gasEstimator GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, pack.U256, error) { +// EstimateGas returns the number of SATs-per-byte (for both price and cap) that +// is needed in order to confirm transactions with an estimated maximum delay of +// `numBlocks` block. It is the responsibility of the caller to know the number +// of bytes in their transaction. This method calls the `estimatesmartfee` RPC +// call to the node, which based on a conservative (considering longer history) +// strategy returns the estimated BTC per kilobyte of data in the transaction. +// An error will be returned if the bitcoin node hasn't observed enough blocks +// to make an estimate for the provided target `numBlocks`. +func (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { feeRate, err := gasEstimator.client.EstimateSmartFee(ctx, gasEstimator.numBlocks) if err != nil { return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), err } satsPerByte := uint64(feeRate * btcToSatoshis / kilobyteToByte) - return pack.NewU256FromU64(pack.NewU64(satsPerByte)), pack.NewU256([32]byte{}), nil + return pack.NewU256FromU64(pack.NewU64(satsPerByte)), pack.NewU256FromU64(pack.NewU64(satsPerByte)), nil } diff --git a/chain/bitcoin/gas_test.go b/chain/bitcoin/gas_test.go index e1d0d1f0..9b9d7cd2 100644 --- a/chain/bitcoin/gas_test.go +++ b/chain/bitcoin/gas_test.go @@ -19,17 +19,17 @@ var _ = Describe("Gas", func() { // estimate fee to include tx within 1 block. gasEstimator1 := bitcoin.NewGasEstimator(client, 1) - gasPrice1, _, err := gasEstimator1.EstimateGasPrice(ctx) + gasPrice1, _, err := gasEstimator1.EstimateGas(ctx) Expect(err).NotTo(HaveOccurred()) // estimate fee to include tx within 10 blocks. gasEstimator2 := bitcoin.NewGasEstimator(client, 10) - gasPrice2, _, err := gasEstimator2.EstimateGasPrice(ctx) + gasPrice2, _, err := gasEstimator2.EstimateGas(ctx) Expect(err).NotTo(HaveOccurred()) // estimate fee to include tx within 100 blocks. gasEstimator3 := bitcoin.NewGasEstimator(client, 100) - gasPrice3, _, err := gasEstimator3.EstimateGasPrice(ctx) + gasPrice3, _, err := gasEstimator3.EstimateGas(ctx) Expect(err).NotTo(HaveOccurred()) // expect fees in this order at the very least. diff --git a/chain/cosmos/gas.go b/chain/cosmos/gas.go index aff9549f..dbd583c3 100644 --- a/chain/cosmos/gas.go +++ b/chain/cosmos/gas.go @@ -24,7 +24,9 @@ func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { } } -// EstimateGasPrice returns gas required per byte for Cosmos-compatible chains. -func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, pack.U256, error) { - return gasEstimator.gasPerByte, pack.NewU256([32]byte{}), nil +// EstimateGas returns gas required per byte for Cosmos-compatible chains. This +// value is used for both the price and cap, because Cosmos-compatible chains do +// not have a distinct concept of cap. +func (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { + return gasEstimator.gasPerByte, gasEstimator.gasPerByte, nil } diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 839b094c..7bfb3979 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -49,7 +49,7 @@ func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { // BuildTx consumes a list of MsgSend to build and return a cosmos transaction. // This transaction is unsigned, and must be signed before submitting to the // cosmos chain. -func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice pack.U256, payload pack.Bytes) (account.Tx, error) { +func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) { fromAddr, err := types.AccAddressFromBech32(string(from)) if err != nil { return nil, err diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 439fa0f3..601c4431 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -20,16 +20,15 @@ import ( // broadcasted to the filecoin network. The TxBuilder is configured using a // gas price and gas limit. type TxBuilder struct { - gasPremium pack.U256 } // NewTxBuilder creates a new transaction builder. -func NewTxBuilder(gasPremium pack.U256) TxBuilder { - return TxBuilder{gasPremium} +func NewTxBuilder() TxBuilder { + return TxBuilder{} } // BuildTx receives transaction fields and constructs a new transaction. -func (txBuilder TxBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) { +func (txBuilder TxBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) { filfrom, err := filaddress.NewFromString(string(from)) if err != nil { return nil, fmt.Errorf("bad from address '%v': %v", from, err) @@ -46,9 +45,9 @@ func (txBuilder TxBuilder) BuildTx(ctx context.Context, from, to address.Address To: filto, Value: big.Int{Int: value.Int()}, Nonce: nonce.Int().Uint64(), - GasFeeCap: big.Int{Int: gasFeeCap.Int()}, + GasFeeCap: big.Int{Int: gasCap.Int()}, GasLimit: gasLimit.Int().Int64(), - GasPremium: big.Int{Int: txBuilder.gasPremium.Int()}, + GasPremium: big.Int{Int: gasPrice.Int()}, Method: methodNum, Params: payload, }, diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index c0240bd7..5f56d40c 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -69,11 +69,11 @@ var _ = Describe("Filecoin", func() { // get good gas estimates gasLimit := uint64(2200000) gasEstimator := filecoin.NewGasEstimator(client, int64(gasLimit)) - gasFeeCap, gasPremium, err := gasEstimator.EstimateGasPrice(ctx) + gasPremium, gasFeeCap, err := gasEstimator.EstimateGas(ctx) Expect(err).ToNot(HaveOccurred()) // construct the transaction builder - filTxBuilder := filecoin.NewTxBuilder(gasPremium) + filTxBuilder := filecoin.NewTxBuilder() // build the transaction sender := multichain.Address(pack.String(senderFilAddr.String())) @@ -88,7 +88,8 @@ var _ = Describe("Filecoin", func() { amount, // amount nonce, // nonce pack.NewU256FromU64(pack.NewU64(gasLimit)), // gasLimit - gasFeeCap, // gasFeeCap + gasPremium, + gasFeeCap, pack.Bytes(nil), // payload ) Expect(err).ToNot(HaveOccurred()) diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go index 5f996883..69ca4e54 100644 --- a/chain/filecoin/gas.go +++ b/chain/filecoin/gas.go @@ -32,11 +32,10 @@ func NewGasEstimator(client *Client, gasLimit int64) *GasEstimator { } } -// EstimateGasPrice returns gas fee cap and gas premium values being accepted -// in the filecoin chain at present. These numbers may vary as the chain's -// congestion level increases. It is safe to say that by using the fetched -// values, a transaction will be included in a block with minimal delay. -func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U256, pack.U256, error) { +// EstimateGas returns an estimate of the current gas price (also known as gas +// premium) and gas cap. These numbers change with congestion. These estimates +// are often a little bit off, and this should be considered when using them. +func (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { // Create a dummy "Send" message. msgIn := types.Message{ Version: types.MessageVersion, @@ -68,5 +67,5 @@ func (gasEstimator *GasEstimator) EstimateGasPrice(ctx context.Context) (pack.U2 gasFeeCap := big.NewInt(0).SetBytes(gasFeeCapBytes) gasPremium := big.NewInt(0).SetBytes(gasPremiumBytes) - return pack.NewU256FromInt(gasFeeCap), pack.NewU256FromInt(gasPremium), nil + return pack.NewU256FromInt(gasPremium), pack.NewU256FromInt(gasFeeCap), nil } diff --git a/chain/filecoin/gas_test.go b/chain/filecoin/gas_test.go index df7d8db4..b0a6dd49 100644 --- a/chain/filecoin/gas_test.go +++ b/chain/filecoin/gas_test.go @@ -33,7 +33,7 @@ var _ = Describe("Gas", func() { gasEstimator := filecoin.NewGasEstimator(client, 2000000) // estimate gas price - _, _, err = gasEstimator.EstimateGasPrice(ctx) + _, _, err = gasEstimator.EstimateGas(ctx) Expect(err).ToNot(HaveOccurred()) }) }) diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index cf09c7f8..ff969096 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -72,8 +72,9 @@ var _ = Describe("Terra", func() { recipient, // to amount, // amount nonce, // nonce - pack.NewU256FromU64(pack.U64(200000)), // gas + pack.NewU256FromU64(pack.U64(200000)), // gas limit pack.NewU256FromU64(pack.U64(1)), // gas price + pack.NewU256FromU64(pack.U64(1)), // gas cap payload, // memo ) Expect(err).NotTo(HaveOccurred()) diff --git a/multichain_test.go b/multichain_test.go index 865cc31f..70136db5 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -419,11 +419,7 @@ var _ = Describe("Multichain", func() { ) Expect(err).NotTo(HaveOccurred()) - gasEstimator := filecoin.NewGasEstimator(client, 2189560) - _, gasPremium, err := gasEstimator.EstimateGasPrice(context.Background()) - Expect(err).NotTo(HaveOccurred()) - - txBuilder := filecoin.NewTxBuilder(gasPremium) + txBuilder := filecoin.NewTxBuilder() return client, txBuilder }, @@ -463,7 +459,7 @@ var _ = Describe("Multichain", func() { ctx, multichain.Address(senderAddr), recipientAddr, - amount, nonce, gasLimit, gasPrice, + amount, nonce, gasLimit, gasPrice, gasPrice, payload, ) Expect(err).NotTo(HaveOccurred()) From 6c11c317fee03af0b2e797767dd482e25389f97c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 16 Oct 2020 08:22:00 +0530 Subject: [PATCH 199/335] fix: use HTTP scheme instead of WS --- chain/filecoin/client.go | 6 +++--- chain/filecoin/filecoin_test.go | 1 - chain/filecoin/gas_test.go | 1 - multichain_test.go | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 74edb4d1..10070e1a 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -21,9 +21,9 @@ const ( // AuthorizationKey is the header key used for authorization AuthorizationKey = "Authorization" - // DefaultClientRPCURL is the RPC websocket URL used by default, to - // interact with the filecoin lotus node. - DefaultClientRPCURL = "ws://127.0.0.1:1234/rpc/v0" + // DefaultClientRPCURL is the RPC URL used by default, to interact with the + // filecoin lotus node. + DefaultClientRPCURL = "http://127.0.0.1:1234/rpc/v0" // DefaultClientAuthToken is the auth token used to instantiate the lotus // client. A valid lotus auth token is required to write messages to the diff --git a/chain/filecoin/filecoin_test.go b/chain/filecoin/filecoin_test.go index c0240bd7..ca8ac74d 100644 --- a/chain/filecoin/filecoin_test.go +++ b/chain/filecoin/filecoin_test.go @@ -31,7 +31,6 @@ var _ = Describe("Filecoin", func() { // instantiate the client client, err := filecoin.NewClient( filecoin.DefaultClientOptions(). - WithRPCURL("ws://127.0.0.1:1234/rpc/v0"). WithAuthToken(fetchAuthToken()), ) Expect(err).ToNot(HaveOccurred()) diff --git a/chain/filecoin/gas_test.go b/chain/filecoin/gas_test.go index df7d8db4..dd2eb50d 100644 --- a/chain/filecoin/gas_test.go +++ b/chain/filecoin/gas_test.go @@ -24,7 +24,6 @@ var _ = Describe("Gas", func() { // instantiate the client client, err := filecoin.NewClient( filecoin.DefaultClientOptions(). - WithRPCURL("ws://127.0.0.1:1234/rpc/v0"). WithAuthToken(fetchAuthToken()), ) Expect(err).ToNot(HaveOccurred()) diff --git a/multichain_test.go b/multichain_test.go index 865cc31f..7b792eef 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -400,7 +400,7 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) return multichain.Address(pack.String(addr.String())) }, - "ws://127.0.0.1:1234/rpc/v0", + "http://127.0.0.1:1234/rpc/v0", func() multichain.Address { pk := id.NewPrivKey() pubKey := pk.PubKey() From 6e3accda310087b92a78edd01b724cf9ca996f3d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 16 Oct 2020 09:01:47 +0530 Subject: [PATCH 200/335] fix: fetch gas parameters from gas estimator in multichain chain suite --- multichain_test.go | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 70136db5..30d2a323 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -304,7 +304,7 @@ var _ = Describe("Multichain", func() { rpcURL pack.String randomRecipientAddr func() multichain.Address initialise func(pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) - txParams func() (pack.U256, pack.U256, pack.U256, pack.Bytes) + txParams func(multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) chain multichain.Chain }{ { @@ -355,12 +355,13 @@ var _ = Describe("Multichain", func() { return client, txBuilder }, - func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { + func(_ multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.U64(2000000)) gasLimit := pack.NewU256FromU64(pack.U64(100000)) gasPrice := pack.NewU256FromU64(pack.U64(1)) + gasCap := pack.NewU256FromInt(gasPrice.Int()) payload := pack.NewBytes([]byte("multichain")) - return amount, gasLimit, gasPrice, payload + return amount, gasLimit, gasPrice, gasCap, payload }, multichain.Terra, }, @@ -423,12 +424,18 @@ var _ = Describe("Multichain", func() { return client, txBuilder }, - func() (pack.U256, pack.U256, pack.U256, pack.Bytes) { + func(client multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { amount := pack.NewU256FromU64(pack.NewU64(100000000)) gasLimit := pack.NewU256FromU64(pack.NewU64(2189560)) - gasPrice := pack.NewU256FromU64(pack.NewU64(300000)) + + // Fetch gas price and gas cap using the gas estimator. + filecoinClient := client.(*filecoin.Client) + gasPrice, gasCap, err := filecoin.NewGasEstimator(filecoinClient, gasLimit.Int().Int64()). + EstimateGas(context.Background()) + Expect(err).NotTo(HaveOccurred()) + payload := pack.Bytes(nil) - return amount, gasLimit, gasPrice, payload + return amount, gasLimit, gasPrice, gasCap, payload }, multichain.Filecoin, }, @@ -453,13 +460,13 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) // Build a transaction. - amount, gasLimit, gasPrice, payload := accountChain.txParams() + amount, gasLimit, gasPrice, gasCap, payload := accountChain.txParams(accountClient) accountTx, err := txBuilder.BuildTx( ctx, multichain.Address(senderAddr), recipientAddr, - amount, nonce, gasLimit, gasPrice, gasPrice, + amount, nonce, gasLimit, gasPrice, gasCap, payload, ) Expect(err).NotTo(HaveOccurred()) From 005efce2e47e120ee799f389f7f423d325abd21d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 16 Oct 2020 09:15:13 +0530 Subject: [PATCH 201/335] fix: remove unwanted repos that fail --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2e2062c..02e0c2e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,8 +21,11 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 - name: Install dependency packages run: | + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config From 94faa77940286eea9183342f7d600e3520140246 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Mon, 19 Oct 2020 11:59:30 +1100 Subject: [PATCH 202/335] chain/bitcoin: round up sats per byte --- chain/bitcoin/gas.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index e2820d3b..11daa21e 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -2,6 +2,7 @@ package bitcoin import ( "context" + "math" "github.com/renproject/pack" ) @@ -44,6 +45,6 @@ func (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pa return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), err } - satsPerByte := uint64(feeRate * btcToSatoshis / kilobyteToByte) - return pack.NewU256FromU64(pack.NewU64(satsPerByte)), pack.NewU256FromU64(pack.NewU64(satsPerByte)), nil + satsPerByte := uint64(math.Ceil(feeRate * btcToSatoshis / kilobyteToByte)) + return pack.NewU256FromUint64(satsPerByte), pack.NewU256FromUint64(satsPerByte), nil } From c08355c19b3abb3273439eaea9e5dd17d4f29b79 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Tue, 20 Oct 2020 11:49:29 +1100 Subject: [PATCH 203/335] chain/cosmos, chain/filecoin: add helper functions for fetching account balance --- chain/cosmos/client.go | 23 +++++++++++++++++++++++ chain/filecoin/client.go | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 7ba4f53b..271c4535 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -155,3 +155,26 @@ func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pa return pack.U64(acc.GetAccountNumber()), nil } + +// AccountBalance returns the account balancee for a given address. +func (client *Client) AccountBalance(_ context.Context, addr address.Address, denom string) (pack.U256, error) { + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) + if err != nil { + return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) + } + + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) + if err != nil { + return pack.U256{}, err + } + + balance := acc.GetCoins().AmountOf(denom).BigInt() + + // If the balance exceeds `MaxU256`, return an error. + if pack.MaxU256.Int().Cmp(balance) == -1 { + return pack.U256{}, fmt.Errorf("balance %v for %v exceeds MaxU256", balance.String(), addr) + } + + return pack.NewU256FromInt(balance), nil +} diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 10070e1a..05b8e7ad 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -167,3 +167,25 @@ func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (p return pack.NewU256FromU64(pack.NewU64(actor.Nonce)), nil } + +// AccountBalance returns the account balancee for a given address. +func (client *Client) AccountBalance(ctx context.Context, addr address.Address) (pack.U256, error) { + filAddr, err := filaddress.NewFromString(string(addr)) + if err != nil { + return pack.U256{}, fmt.Errorf("bad address '%v': %v", addr, err) + } + + actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef)) + if err != nil { + return pack.U256{}, fmt.Errorf("searching state for addr: %v", addr) + } + + balance := actor.Balance.Int + + // If the balance exceeds `MaxU256`, return an error. + if pack.MaxU256.Int().Cmp(balance) == -1 { + return pack.U256{}, fmt.Errorf("balance %v for %v exceeds MaxU256", balance.String(), addr) + } + + return pack.NewU256FromInt(balance), nil +} From c1fa11e758b3c0950f8c8738af03eb20fdb3605d Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Tue, 20 Oct 2020 16:22:41 +1100 Subject: [PATCH 204/335] chain/cosmos: fix payload encoding --- chain/cosmos/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 7bfb3979..a1e95e6f 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -87,7 +87,7 @@ func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, 0, false, builder.chainID.String(), - payload.String(), + string(payload), fees.Coins(), types.DecCoins{}, ) From 3cdd4e8c8ddb080f702f434e92d79207dd6e6e4c Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Wed, 21 Oct 2020 10:41:06 +1100 Subject: [PATCH 205/335] api/account, chain/cosmos, chain/terra: add AccountBalance method to account client API --- api/account/account.go | 3 +++ chain/cosmos/client.go | 43 +++++++++++++++++++++++++++++------ chain/cosmos/tx.go | 47 ++++++++++++++++++++++++++------------- chain/terra/terra.go | 7 ++++-- chain/terra/terra_test.go | 14 +++++++----- multichain_test.go | 12 +++++----- 6 files changed, 92 insertions(+), 34 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 2fcab1ca..6f36c48d 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -62,6 +62,9 @@ type TxBuilder interface { // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { + // AccountBalance returns the current balance of the given account. + AccountBalance(context.Context, address.Address) (pack.U256, error) + // AccountNonce is the current nonce of this account, which must be used to // build a new transaction. AccountNonce(context.Context, address.Address) (pack.U256, error) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 271c4535..1a1cde73 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -25,13 +25,15 @@ const ( DefaultClientTimeoutRetry = time.Second // DefaultClientHost used by the Client. This should only be used for local // deployments of the multichain. - DefaultClientHost = "http://0.0.0.0:26657" + DefaultClientHost = pack.String("http://0.0.0.0:26657") // DefaultBroadcastMode configures the behaviour of a cosmos client while it // interacts with the cosmos node. Allowed broadcast modes can be async, sync // and block. "async" returns immediately after broadcasting, "sync" returns // after the transaction has been checked and "block" waits until the // transaction is committed to the chain. - DefaultBroadcastMode = "sync" + DefaultBroadcastMode = pack.String("sync") + // DefaultCoinDenom used by the Client. + DefaultCoinDenom = pack.String("uluna") ) // ClientOptions are used to parameterise the behaviour of the Client. @@ -40,6 +42,7 @@ type ClientOptions struct { TimeoutRetry time.Duration Host pack.String BroadcastMode pack.String + CoinDenom pack.String } // DefaultClientOptions returns ClientOptions with the default settings. These @@ -49,17 +52,43 @@ func DefaultClientOptions() ClientOptions { return ClientOptions{ Timeout: DefaultClientTimeout, TimeoutRetry: DefaultClientTimeoutRetry, - Host: pack.String(DefaultClientHost), - BroadcastMode: pack.String(DefaultBroadcastMode), + Host: DefaultClientHost, + BroadcastMode: DefaultBroadcastMode, + CoinDenom: DefaultCoinDenom, } } -// WithHost sets the URL of the Bitcoin node. +// WithTimeout sets the timeout used by the Client. +func (opts ClientOptions) WithTimeout(timeout time.Duration) ClientOptions { + opts.Timeout = timeout + return opts +} + +// WithTimeoutRetry sets the timeout retry used by the Client. +func (opts ClientOptions) WithTimeoutRetry(timeoutRetry time.Duration) ClientOptions { + opts.TimeoutRetry = timeoutRetry + return opts +} + +// WithHost sets the URL of the node. func (opts ClientOptions) WithHost(host pack.String) ClientOptions { opts.Host = host return opts } +// WithBroadcastMode sets the behaviour of the Client when interacting with the +// underlying node. +func (opts ClientOptions) WithBroadcastMode(broadcastMode pack.String) ClientOptions { + opts.BroadcastMode = broadcastMode + return opts +} + +// WithCoinDenom sets the coin denomination used by the Client. +func (opts ClientOptions) WithCoinDenom(coinDenom pack.String) ClientOptions { + opts.CoinDenom = coinDenom + return opts +} + // Client interacts with an instance of the Cosmos based network using the REST // interface exposed by a lightclient node. type Client struct { @@ -157,7 +186,7 @@ func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pa } // AccountBalance returns the account balancee for a given address. -func (client *Client) AccountBalance(_ context.Context, addr address.Address, denom string) (pack.U256, error) { +func (client *Client) AccountBalance(_ context.Context, addr address.Address) (pack.U256, error) { cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) @@ -169,7 +198,7 @@ func (client *Client) AccountBalance(_ context.Context, addr address.Address, de return pack.U256{}, err } - balance := acc.GetCoins().AmountOf(denom).BigInt() + balance := acc.GetCoins().AmountOf(string(client.opts.CoinDenom)).BigInt() // If the balance exceeds `MaxU256`, return an error. if pack.MaxU256.Int().Cmp(balance) == -1 { diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 7bfb3979..a141b7c3 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -19,16 +19,32 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" ) -type txBuilder struct { - client *Client - coinDenom pack.String - chainID pack.String -} +const ( + // DefaultChainID used by the Client. + DefaultChainID = pack.String("testnet") +) // TxBuilderOptions only contains necessary options to build tx from tx builder type TxBuilderOptions struct { - ChainID pack.String `json:"chain_id"` - CoinDenom pack.String `json:"coin_denom"` + ChainID pack.String +} + +// DefaultTxBuilderOptions returns TxBuilderOptions with the default settings. +func DefaultTxBuilderOptions() TxBuilderOptions { + return TxBuilderOptions{ + ChainID: DefaultChainID, + } +} + +// WithChainID sets the chain ID used by the transaction builder. +func (opts TxBuilderOptions) WithChainID(chainID pack.String) TxBuilderOptions { + opts.ChainID = chainID + return opts +} + +type txBuilder struct { + client *Client + chainID pack.String } // NewTxBuilder returns an implementation of the transaction builder interface @@ -40,9 +56,8 @@ func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { } return txBuilder{ - client: client, - coinDenom: options.CoinDenom, - chainID: options.ChainID, + client: client, + chainID: options.ChainID, } } @@ -63,14 +78,16 @@ func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, sendMsg := MsgSend{ FromAddress: Address(fromAddr), ToAddress: Address(toAddr), - Amount: []Coin{Coin{ - Denom: builder.coinDenom, - Amount: pack.NewU64(value.Int().Uint64()), - }}, + Amount: []Coin{ + { + Denom: builder.client.opts.CoinDenom, + Amount: pack.NewU64(value.Int().Uint64()), + }, + }, } fees := Coins{Coin{ - Denom: builder.coinDenom, + Denom: builder.client.opts.CoinDenom, Amount: pack.NewU64(gasPrice.Mul(gasLimit).Int().Uint64()), }} diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 865f60c0..40fd98a1 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -18,14 +18,17 @@ type ( ) var ( - // DefaultClientOptions re-exports default cosmos-compatible client options + // DefaultClientOptions re-exports cosmos.DefaultClientOptions DefaultClientOptions = cosmos.DefaultClientOptions + // DefaultTxBuilderOptions re-exports cosmos.DefaultTxBuilderOptions + DefaultTxBuilderOptions = cosmos.DefaultTxBuilderOptions + // NewGasEstimator re-exports cosmos.NewGasEstimator NewGasEstimator = cosmos.NewGasEstimator ) -// NewClient returns returns a new Client with terra codec +// NewClient returns returns a new Client with Terra codec. func NewClient(opts ClientOptions) *Client { return cosmos.NewClient(opts, app.MakeCodec()) } diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index ff969096..8c5b6d5f 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -53,15 +53,19 @@ var _ = Describe("Terra", func() { Expect(err).NotTo(HaveOccurred()) // instantiate a new client - client := terra.NewClient(terra.DefaultClientOptions()) + client := terra.NewClient( + terra.DefaultClientOptions(). + WithCoinDenom("uluna"), + ) nonce, err := client.AccountNonce(ctx, multichain.Address(addr.String())) Expect(err).NotTo(HaveOccurred()) // create a new cosmos-compatible transaction builder - txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ - ChainID: "testnet", - CoinDenom: "uluna", - }, client) + txBuilder := terra.NewTxBuilder( + terra.DefaultTxBuilderOptions(). + WithChainID("testnet"), + client, + ) // build the transaction payload := pack.NewBytes([]byte("multichain")) diff --git a/multichain_test.go b/multichain_test.go index 64095938..469342c8 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -346,12 +346,14 @@ var _ = Describe("Multichain", func() { func(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) { client := terra.NewClient( terra.DefaultClientOptions(). - WithHost(rpcURL), + WithHost(rpcURL). + WithCoinDenom("uluna"), + ) + txBuilder := terra.NewTxBuilder( + terra.DefaultTxBuilderOptions(). + WithChainID("testnet"), + client, ) - txBuilder := terra.NewTxBuilder(terra.TxBuilderOptions{ - ChainID: "testnet", - CoinDenom: "uluna", - }, client) return client, txBuilder }, From 591a8ab71c2b69953b1caf818afa618f0842369f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 10:00:08 +0530 Subject: [PATCH 206/335] fix: set prefix in cosmos client --- chain/cosmos/client.go | 8 +++++++- chain/cosmos/tx.go | 2 ++ chain/terra/terra.go | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 7ba4f53b..72f775f1 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -66,10 +66,11 @@ type Client struct { opts ClientOptions cliCtx cliContext.CLIContext cdc *codec.Codec + hrp string } // NewClient returns a new Client. -func NewClient(opts ClientOptions, cdc *codec.Codec) *Client { +func NewClient(opts ClientOptions, cdc *codec.Codec, hrp string) *Client { httpClient, err := rpchttp.NewWithTimeout(opts.Host.String(), "websocket", uint(opts.Timeout/time.Second)) if err != nil { panic(err) @@ -81,6 +82,7 @@ func NewClient(opts ClientOptions, cdc *codec.Codec) *Client { opts: opts, cliCtx: cliCtx, cdc: cdc, + hrp: hrp, } } @@ -126,6 +128,8 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // AccountNonce returns the current nonce of the account. This is the nonce to // be used while building a new transaction. func (client *Client) AccountNonce(_ context.Context, addr address.Address) (pack.U256, error) { + types.GetConfig().SetBech32PrefixForAccount(client.hrp, client.hrp+"pub") + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) @@ -142,6 +146,8 @@ func (client *Client) AccountNonce(_ context.Context, addr address.Address) (pac // AccountNumber returns the account number for a given address. func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pack.U64, error) { + types.GetConfig().SetBech32PrefixForAccount(client.hrp, client.hrp+"pub") + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return 0, fmt.Errorf("bad address: '%v': %v", addr, err) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index a1e95e6f..30d1da21 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -50,6 +50,8 @@ func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { // This transaction is unsigned, and must be signed before submitting to the // cosmos chain. func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) { + types.GetConfig().SetBech32PrefixForAccount(builder.client.hrp, builder.client.hrp+"pub") + fromAddr, err := types.AccAddressFromBech32(string(from)) if err != nil { return nil, err diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 865f60c0..4e2356a0 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -27,7 +27,7 @@ var ( // NewClient returns returns a new Client with terra codec func NewClient(opts ClientOptions) *Client { - return cosmos.NewClient(opts, app.MakeCodec()) + return cosmos.NewClient(opts, app.MakeCodec(), "terra") } // NewTxBuilder returns an implementation of the transaction builder interface From 6ec98f28278a9a83b0d8df7bd542b8d704a861e3 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 12:48:39 +0530 Subject: [PATCH 207/335] chore: zcash infra upgrade --- infra/zcash/run.sh | 10 ++++++++-- infra/zcash/zcash.conf | 11 ----------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/infra/zcash/run.sh b/infra/zcash/run.sh index dc66a07d..7bd0e0c3 100644 --- a/infra/zcash/run.sh +++ b/infra/zcash/run.sh @@ -2,7 +2,13 @@ ADDRESS=$1 # Start -zcashd -mineraddress=$ADDRESS +zcashd \ + -mineraddress=$ADDRESS \ + -nuparams=5ba81b19:10 \ + -nuparams=76b809bb:20 \ + -nuparams=2bb40e60:30 \ + -nuparams=f5b9230b:40 \ + -nuparams=e9ff75a6:50 sleep 10 echo "ZCASH_ADDRESS=$ADDRESS" @@ -18,4 +24,4 @@ while : do zcash-cli generate 1 sleep 10 -done \ No newline at end of file +done diff --git a/infra/zcash/zcash.conf b/infra/zcash/zcash.conf index 87dd73a7..5b8aab13 100644 --- a/infra/zcash/zcash.conf +++ b/infra/zcash/zcash.conf @@ -8,14 +8,3 @@ server=1 txindex=1 gen=1 minetolocalwallet=0 - -# Overwinter -nuparams=5ba81b19:10 -# Sapling -nuparams=76b809bb:20 -# Blossom -nuparams=2bb40e60:30 -# Heartwood -nuparams=f5b9230b:40 -# Canopy -nuparams=e9ff75a6:50 \ No newline at end of file From fae8ad43c098c23955b3fb0947dffd774ba69d64 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 12:50:12 +0530 Subject: [PATCH 208/335] feat: add fallback gas to bitcoin gas estimator --- chain/bitcoin/gas.go | 19 +++++++++++++------ chain/bitcoin/gas_test.go | 28 ++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/chain/bitcoin/gas.go b/chain/bitcoin/gas.go index 11daa21e..d40d30bc 100644 --- a/chain/bitcoin/gas.go +++ b/chain/bitcoin/gas.go @@ -2,6 +2,7 @@ package bitcoin import ( "context" + "fmt" "math" "github.com/renproject/pack" @@ -18,16 +19,18 @@ const ( // important that all nodes in the network have reached consensus on the // SATs-per-byte. type GasEstimator struct { - client Client - numBlocks int64 + client Client + numBlocks int64 + fallbackGas pack.U256 } // NewGasEstimator returns a simple gas estimator that always returns the given // number of SATs-per-byte. -func NewGasEstimator(client Client, numBlocks int64) GasEstimator { +func NewGasEstimator(client Client, numBlocks int64, fallbackGas pack.U256) GasEstimator { return GasEstimator{ - client: client, - numBlocks: numBlocks, + client: client, + numBlocks: numBlocks, + fallbackGas: fallbackGas, } } @@ -42,7 +45,11 @@ func NewGasEstimator(client Client, numBlocks int64) GasEstimator { func (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { feeRate, err := gasEstimator.client.EstimateSmartFee(ctx, gasEstimator.numBlocks) if err != nil { - return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), err + return gasEstimator.fallbackGas, gasEstimator.fallbackGas, err + } + + if feeRate <= 0.0 { + return gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf("invalid fee rate: %v", feeRate) } satsPerByte := uint64(math.Ceil(feeRate * btcToSatoshis / kilobyteToByte)) diff --git a/chain/bitcoin/gas_test.go b/chain/bitcoin/gas_test.go index 9b9d7cd2..dae8dc8e 100644 --- a/chain/bitcoin/gas_test.go +++ b/chain/bitcoin/gas_test.go @@ -4,6 +4,7 @@ import ( "context" "github.com/renproject/multichain/chain/bitcoin" + "github.com/renproject/pack" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -18,23 +19,34 @@ var _ = Describe("Gas", func() { client := bitcoin.NewClient(bitcoin.DefaultClientOptions()) // estimate fee to include tx within 1 block. - gasEstimator1 := bitcoin.NewGasEstimator(client, 1) + fallback1 := uint64(123) + gasEstimator1 := bitcoin.NewGasEstimator(client, 1, pack.NewU256FromUint64(fallback1)) gasPrice1, _, err := gasEstimator1.EstimateGas(ctx) - Expect(err).NotTo(HaveOccurred()) + if err != nil { + Expect(gasPrice1).To(Equal(pack.NewU256FromUint64(fallback1))) + } // estimate fee to include tx within 10 blocks. - gasEstimator2 := bitcoin.NewGasEstimator(client, 10) + fallback2 := uint64(234) + gasEstimator2 := bitcoin.NewGasEstimator(client, 10, pack.NewU256FromUint64(fallback2)) gasPrice2, _, err := gasEstimator2.EstimateGas(ctx) - Expect(err).NotTo(HaveOccurred()) + if err != nil { + Expect(gasPrice2).To(Equal(pack.NewU256FromUint64(fallback2))) + } // estimate fee to include tx within 100 blocks. - gasEstimator3 := bitcoin.NewGasEstimator(client, 100) + fallback3 := uint64(345) + gasEstimator3 := bitcoin.NewGasEstimator(client, 100, pack.NewU256FromUint64(fallback3)) gasPrice3, _, err := gasEstimator3.EstimateGas(ctx) - Expect(err).NotTo(HaveOccurred()) + if err != nil { + Expect(gasPrice3).To(Equal(pack.NewU256FromUint64(fallback3))) + } // expect fees in this order at the very least. - Expect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue()) - Expect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue()) + if err == nil { + Expect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue()) + Expect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue()) + } }) }) }) From c0f75ab9e84bf49e77217c1b51f62704286c378a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 12:50:54 +0530 Subject: [PATCH 209/335] fix: bitcoin cash gas API to use estimatefee (legacy RPC call) --- chain/bitcoin/bitcoin.go | 19 +++++++++++++++ chain/bitcoincash/gas.go | 46 ++++++++++++++++++++++++++++++++--- chain/bitcoincash/gas_test.go | 30 +++++++++++++++++++++++ 3 files changed, 92 insertions(+), 3 deletions(-) diff --git a/chain/bitcoin/bitcoin.go b/chain/bitcoin/bitcoin.go index 007546bd..f23936ab 100644 --- a/chain/bitcoin/bitcoin.go +++ b/chain/bitcoin/bitcoin.go @@ -90,6 +90,8 @@ type Client interface { Confirmations(ctx context.Context, txHash pack.Bytes) (int64, error) // EstimateSmartFee EstimateSmartFee(ctx context.Context, numBlocks int64) (float64, error) + // EstimateFeeLegacy + EstimateFeeLegacy(ctx context.Context, numBlocks int64) (float64, error) } type client struct { @@ -259,6 +261,23 @@ func (client *client) EstimateSmartFee(ctx context.Context, numBlocks int64) (fl return *resp.FeeRate, nil } +func (client *client) EstimateFeeLegacy(ctx context.Context, numBlocks int64) (float64, error) { + var resp float64 + + switch numBlocks { + case int64(0): + if err := client.send(ctx, &resp, "estimatefee"); err != nil { + return 0.0, fmt.Errorf("estimating fee: %v", err) + } + default: + if err := client.send(ctx, &resp, "estimatefee", numBlocks); err != nil { + return 0.0, fmt.Errorf("estimating fee: %v", err) + } + } + + return resp, nil +} + func (client *client) send(ctx context.Context, resp interface{}, method string, params ...interface{}) error { // Encode the request. data, err := encodeRequest(method, params) diff --git a/chain/bitcoincash/gas.go b/chain/bitcoincash/gas.go index b2b5369d..3958e72e 100644 --- a/chain/bitcoincash/gas.go +++ b/chain/bitcoincash/gas.go @@ -1,14 +1,54 @@ package bitcoincash -import "github.com/renproject/multichain/chain/bitcoin" +import ( + "context" + "fmt" + "math" + + "github.com/renproject/pack" +) + +const ( + bchToSatoshis = 1e8 + kilobyteToByte = 1024 +) // A GasEstimator returns the SATs-per-byte that is needed in order to confirm // transactions with an estimated maximum delay of one block. In distributed // networks that collectively build, sign, and submit transactions, it is // important that all nodes in the network have reached consensus on the // SATs-per-byte. -type GasEstimator = bitcoin.GasEstimator +type GasEstimator struct { + client Client + fallbackGas pack.U256 +} // NewGasEstimator returns a simple gas estimator that always returns the given // number of SATs-per-byte. -var NewGasEstimator = bitcoin.NewGasEstimator +func NewGasEstimator(client Client, fallbackGas pack.U256) GasEstimator { + return GasEstimator{ + client: client, + fallbackGas: fallbackGas, + } +} + +// EstimateGas returns the number of SATs-per-byte (for both price and cap) that +// is needed in order to confirm transactions with a minimal delay. It is the +// responsibility of the caller to know the number of bytes in their +// transaction. This method calls the `estimatefee` RPC call to the node, which +// based on a conservative (considering longer history) strategy returns the +// estimated BCH per kilobyte of data in the transaction. An error will be +// returned if the node hasn't observed enough blocks to make an estimate. +func (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { + feeRate, err := gasEstimator.client.EstimateFeeLegacy(ctx, int64(0)) + if err != nil { + return gasEstimator.fallbackGas, gasEstimator.fallbackGas, err + } + + if feeRate <= 0.0 { + return gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf("invalid fee rate: %v", feeRate) + } + + satsPerByte := uint64(math.Ceil(feeRate * bchToSatoshis / kilobyteToByte)) + return pack.NewU256FromUint64(satsPerByte), pack.NewU256FromUint64(satsPerByte), nil +} diff --git a/chain/bitcoincash/gas_test.go b/chain/bitcoincash/gas_test.go index a834dd27..86aab014 100644 --- a/chain/bitcoincash/gas_test.go +++ b/chain/bitcoincash/gas_test.go @@ -1 +1,31 @@ package bitcoincash_test + +import ( + "context" + + "github.com/renproject/multichain/chain/bitcoincash" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Gas", func() { + Context("when estimating bitcoincash network fee", func() { + It("should work", func() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := bitcoincash.NewClient(bitcoincash.DefaultClientOptions()) + + fallbackGas := uint64(123) + gasEstimator := bitcoincash.NewGasEstimator(client, pack.NewU256FromUint64(fallbackGas)) + gasPrice, _, err := gasEstimator.EstimateGas(ctx) + if err != nil { + Expect(gasPrice).To(Equal(pack.NewU256FromUint64(fallbackGas))) + } else { + Expect(gasPrice.Int().Uint64()).To(BeNumerically(">", 0)) + } + }) + }) +}) From 4f5d82f3ad9a164c88707b4da37443be1ddc7ca1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 12:51:22 +0530 Subject: [PATCH 210/335] test: gas test for dogecoin --- chain/dogecoin/gas_test.go | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/chain/dogecoin/gas_test.go b/chain/dogecoin/gas_test.go index e03320bb..8dca3426 100644 --- a/chain/dogecoin/gas_test.go +++ b/chain/dogecoin/gas_test.go @@ -1 +1,52 @@ package dogecoin_test + +import ( + "context" + + "github.com/renproject/multichain/chain/dogecoin" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Gas", func() { + Context("when estimating dogecoin network fee", func() { + It("should work", func() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := dogecoin.NewClient(dogecoin.DefaultClientOptions()) + + // estimate fee to include tx within 1 block. + fallback1 := uint64(123) + gasEstimator1 := dogecoin.NewGasEstimator(client, 1, pack.NewU256FromUint64(fallback1)) + gasPrice1, _, err := gasEstimator1.EstimateGas(ctx) + if err != nil { + Expect(gasPrice1).To(Equal(pack.NewU256FromUint64(fallback1))) + } + + // estimate fee to include tx within 10 blocks. + fallback2 := uint64(234) + gasEstimator2 := dogecoin.NewGasEstimator(client, 10, pack.NewU256FromUint64(fallback2)) + gasPrice2, _, err := gasEstimator2.EstimateGas(ctx) + if err != nil { + Expect(gasPrice2).To(Equal(pack.NewU256FromUint64(fallback2))) + } + + // estimate fee to include tx within 100 blocks. + fallback3 := uint64(345) + gasEstimator3 := dogecoin.NewGasEstimator(client, 100, pack.NewU256FromUint64(fallback3)) + gasPrice3, _, err := gasEstimator3.EstimateGas(ctx) + if err != nil { + Expect(gasPrice3).To(Equal(pack.NewU256FromUint64(fallback3))) + } + + // expect fees in this order at the very least. + if err == nil { + Expect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue()) + Expect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue()) + } + }) + }) +}) From 30d01476a36c974b441192b234c32cce80256ece Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 12:51:50 +0530 Subject: [PATCH 211/335] feat: gas API for zcash --- chain/zcash/gas.go | 58 +++++++++++++++++++++++++++++++++++++---- chain/zcash/gas_test.go | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 5 deletions(-) diff --git a/chain/zcash/gas.go b/chain/zcash/gas.go index ce366b71..d10b37e7 100644 --- a/chain/zcash/gas.go +++ b/chain/zcash/gas.go @@ -1,9 +1,57 @@ package zcash -import "github.com/renproject/multichain/chain/bitcoin" +import ( + "context" + "fmt" + "math" -// GasEstimator re-exports bitcoin.GasEstimator -type GasEstimator = bitcoin.GasEstimator + "github.com/renproject/pack" +) -// NewGasEstimator re-exports bitcoin.NewGasEstimator -var NewGasEstimator = bitcoin.NewGasEstimator +const ( + multiplier = 1e8 + kilobyteToByte = 1024 +) + +// A GasEstimator returns the SATs-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// SATs-per-byte. +type GasEstimator struct { + client Client + numBlocks int64 + fallbackGas pack.U256 +} + +// NewGasEstimator returns a simple gas estimator that always returns the given +// number of SATs-per-byte. +func NewGasEstimator(client Client, numBlocks int64, fallbackGas pack.U256) GasEstimator { + return GasEstimator{ + client: client, + numBlocks: numBlocks, + fallbackGas: fallbackGas, + } +} + +// EstimateGas returns the number of SATs-per-byte (for both price and cap) that +// is needed in order to confirm transactions with an estimated maximum delay of +// `numBlocks` block. It is the responsibility of the caller to know the number +// of bytes in their transaction. This method calls the `estimatesmartfee` RPC +// call to the node, which based on a conservative (considering longer history) +// strategy returns the estimated BTC per kilobyte of data in the transaction. +// An error will be returned if the bitcoin node hasn't observed enough blocks +// to make an estimate for the provided target `numBlocks`. +func (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { + feeRate, err := gasEstimator.client.EstimateFeeLegacy(ctx, gasEstimator.numBlocks) + if err != nil { + return gasEstimator.fallbackGas, gasEstimator.fallbackGas, err + } + + if feeRate <= 0.0 { + return gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf("invalid fee rate: %v", feeRate) + } + + satsPerByte := uint64(math.Ceil(feeRate * multiplier / kilobyteToByte)) + return pack.NewU256FromUint64(satsPerByte), pack.NewU256FromUint64(satsPerByte), nil +} diff --git a/chain/zcash/gas_test.go b/chain/zcash/gas_test.go index 38e5b45b..2b95033d 100644 --- a/chain/zcash/gas_test.go +++ b/chain/zcash/gas_test.go @@ -1 +1,52 @@ package zcash_test + +import ( + "context" + + "github.com/renproject/multichain/chain/zcash" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Gas", func() { + Context("when estimating zcash network fee", func() { + It("should work", func() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + client := zcash.NewClient(zcash.DefaultClientOptions()) + + // estimate fee to include tx within 1 block. + fallback1 := uint64(123) + gasEstimator1 := zcash.NewGasEstimator(client, 1, pack.NewU256FromUint64(fallback1)) + gasPrice1, _, err := gasEstimator1.EstimateGas(ctx) + if err != nil { + Expect(gasPrice1).To(Equal(pack.NewU256FromUint64(fallback1))) + } + + // estimate fee to include tx within 10 blocks. + fallback2 := uint64(234) + gasEstimator2 := zcash.NewGasEstimator(client, 10, pack.NewU256FromUint64(fallback2)) + gasPrice2, _, err := gasEstimator2.EstimateGas(ctx) + if err != nil { + Expect(gasPrice2).To(Equal(pack.NewU256FromUint64(fallback2))) + } + + // estimate fee to include tx within 100 blocks. + fallback3 := uint64(345) + gasEstimator3 := zcash.NewGasEstimator(client, 100, pack.NewU256FromUint64(fallback3)) + gasPrice3, _, err := gasEstimator3.EstimateGas(ctx) + if err != nil { + Expect(gasPrice3).To(Equal(pack.NewU256FromUint64(fallback3))) + } + + // expect fees in this order at the very least. + if err == nil { + Expect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue()) + Expect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue()) + } + }) + }) +}) From 4aaa7f008099917616d2da438c5753d3a10a0e29 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 12:52:24 +0530 Subject: [PATCH 212/335] test: include zcash in test suite --- multichain_test.go | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/multichain_test.go b/multichain_test.go index 469342c8..98d578ab 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -593,27 +593,27 @@ var _ = Describe("Multichain", func() { dogecoin.NewTxBuilder(&dogecoin.RegressionNetParams), multichain.Dogecoin, }, - /* - { - "ZCASH_PK", - func(pkh []byte) (btcutil.Address, error) { - addr, err := zcash.NewAddressPubKeyHash(pkh, &zcash.RegressionNetParams) - return addr, err - }, - func(script []byte) (btcutil.Address, error) { - addr, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) - return addr, err - }, - pack.String("http://0.0.0.0:18232"), - func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { - client := zcash.NewClient(zcash.DefaultClientOptions()) - outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) - Expect(err).NotTo(HaveOccurred()) - return client, outputs, client.Confirmations - }, - zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), - multichain.Zcash, + { + "ZCASH_PK", + func(pkh []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressPubKeyHash(pkh, &zcash.RegressionNetParams) + return addr, err }, + func(script []byte) (btcutil.Address, error) { + addr, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) + return addr, err + }, + pack.String("http://0.0.0.0:18232"), + func(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) { + client := zcash.NewClient(zcash.DefaultClientOptions()) + outputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress())) + Expect(err).NotTo(HaveOccurred()) + return client, outputs, client.Confirmations + }, + zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000), + multichain.Zcash, + }, + /* { "DIGIBYTE_PK", func(pkh []byte) (btcutil.Address, error) { From d66a680938e5419e98264ff47fdb7896e6729848 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 13:03:07 +0530 Subject: [PATCH 213/335] fix: fix zcash infra dockerfile --- infra/zcash/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/infra/zcash/Dockerfile b/infra/zcash/Dockerfile index 0efeda32..8d14df3b 100644 --- a/infra/zcash/Dockerfile +++ b/infra/zcash/Dockerfile @@ -1,11 +1,11 @@ FROM ubuntu:bionic # Install zcashd. -RUN apt-get update && \ - apt-get install -y --no-install-recommends apt-transport-https gnupg2 ca-certificates wget && \ - wget -qO - https://apt.z.cash/zcash.asc | apt-key add - && \ - echo "deb https://apt.z.cash/ jessie main" | tee /etc/apt/sources.list.d/zcash.list && \ - apt-get update && apt-get install -y --no-install-recommends zcash && \ +RUN apt-get update && \ + apt-get install -y --no-install-recommends apt-transport-https gnupg2 ca-certificates wget && \ + wget -qO - https://apt.z.cash/zcash.asc | apt-key add - && \ + echo "deb [arch=amd64] https://apt.z.cash/ stretch main" | tee /etc/apt/sources.list.d/zcash.list && \ + apt-get update && apt-get install -y --no-install-recommends zcash && \ mkdir -p /root/.zcash-params && zcash-fetch-params COPY zcash.conf /root/.zcash/zcash.conf From 72bdf0a3f9793751986cc2ed3de8e00abf282864 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 14 Oct 2020 19:04:23 +0000 Subject: [PATCH 214/335] ci: multichain base image (wip) --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..41da7287 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM ubuntu:bionic + +RUN apt update -y +RUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl wget +RUN apt upgrade -y + +RUN wget -c https://golang.org/dl/go1.14.6.linux-amd64.tar.gz +RUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin + +RUN export GOROOT=/usr/local/go && \ + export GOPATH=$HOME/go && \ + export PATH=$GOPATH/bin:$GOROOT/bin:$PATH + +RUN mkdir -p $(go env GOPATH) && \ + cd $(go env GOPATH) && \ + ls && \ + mkdir -p src/github.com/filecoin-project && \ + cd src/github.com/filecoin-project && \ + git clone https://github.com/filecoin-project/filecoin-ffi && \ + cd filecoin-ffi && \ + git checkout a62d00da59d1b0fb && \ + make && \ + go install From dc09d352bd63729938dd7e958777fc6dba6ef70d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 15 Oct 2020 09:20:50 +0000 Subject: [PATCH 215/335] ci: set relevant fields for go env --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 41da7287..6ecaaaa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,3 +22,8 @@ RUN mkdir -p $(go env GOPATH) && \ git checkout a62d00da59d1b0fb && \ make && \ go install + +ENV GO111MODULE=on +ENV GOPROXY=direct +ENV GOSUMDB=off +ENV GOPRIVATE=github.com/renproject/darknode From 78fb2524adee7a741f84c33ca46486fce15cde6f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 16 Oct 2020 02:16:50 +0000 Subject: [PATCH 216/335] ci: split into multiple docker commands for better caching --- Dockerfile | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ecaaaa0..e9e7eef6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,24 +6,20 @@ RUN apt upgrade -y RUN wget -c https://golang.org/dl/go1.14.6.linux-amd64.tar.gz RUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz -ENV PATH=$PATH:/usr/local/go/bin - -RUN export GOROOT=/usr/local/go && \ - export GOPATH=$HOME/go && \ - export PATH=$GOPATH/bin:$GOROOT/bin:$PATH - -RUN mkdir -p $(go env GOPATH) && \ - cd $(go env GOPATH) && \ - ls && \ - mkdir -p src/github.com/filecoin-project && \ - cd src/github.com/filecoin-project && \ - git clone https://github.com/filecoin-project/filecoin-ffi && \ - cd filecoin-ffi && \ - git checkout a62d00da59d1b0fb && \ - make && \ - go install +ENV GOROOT=/usr/local/go +ENV GOPATH=$HOME/go +ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH ENV GO111MODULE=on ENV GOPROXY=direct ENV GOSUMDB=off -ENV GOPRIVATE=github.com/renproject/darknode + +RUN mkdir -p $(go env GOPATH) +WORKDIR $GOPATH +RUN mkdir -p src/github.com/filecoin-project +WORKDIR $GOPATH/src/github.com/filecoin-project +RUN git clone https://github.com/filecoin-project/filecoin-ffi +WORKDIR $GOPATH/src/github.com/filecoin-project/filecoin-ffi +RUN git checkout a62d00da59d1b0fb +RUN make +RUN go install From a87ae5ac58b96f22932ecc2cd8e9fb08c9aca9b9 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 21 Oct 2020 13:44:25 +0530 Subject: [PATCH 217/335] ci: docker build and push Multichain image --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02e0c2e9..0aa033f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,3 +87,28 @@ jobs: source ./infra/.env cd $GITHUB_WORKSPACE CI=true go test -timeout 1500s + + build: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: renbot/multichain:latest + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} From 0ae6cb8cc11fa8ecd85752dd28ad51c454f41ab6 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 23 Oct 2020 11:33:43 +1100 Subject: [PATCH 218/335] chain/cosmos: implement custom transport layer --- chain/cosmos/client.go | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index a1a5ab4b..984e26e0 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -4,6 +4,8 @@ import ( "context" "encoding/hex" "fmt" + "net/http" + "net/url" "time" "github.com/renproject/multichain/api/account" @@ -100,7 +102,17 @@ type Client struct { // NewClient returns a new Client. func NewClient(opts ClientOptions, cdc *codec.Codec, hrp string) *Client { - httpClient, err := rpchttp.NewWithTimeout(opts.Host.String(), "websocket", uint(opts.Timeout/time.Second)) + httpClient, err := rpchttp.NewWithClient( + string(opts.Host), + "websocket", + &http.Client{ + Timeout: opts.Timeout, + + // We override the transport layer with a custom implementation as + // there is an issue with the Cosmos SDK that causes it to + // incorrectly parse URLs. + Transport: newTransport(string(opts.Host), &http.Transport{}), + }) if err != nil { panic(err) } @@ -213,3 +225,29 @@ func (client *Client) AccountBalance(_ context.Context, addr address.Address) (p return pack.NewU256FromInt(balance), nil } + +type transport struct { + remote string + proxy http.RoundTripper +} + +// newTransport returns a custom implementation of http.RoundTripper that +// overrides the request URL prior to sending the request. +func newTransport(remote string, proxy http.RoundTripper) *transport { + return &transport{ + remote: remote, + proxy: proxy, + } +} + +func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) { + u, err := url.Parse(t.remote) + if err != nil { + return nil, err + } + req.URL = u + req.Host = u.Host + + // Proxy request. + return t.proxy.RoundTrip(req) +} From de78d9dab0de2800fe875636dfd3904850618328 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 26 Oct 2020 06:31:11 +0000 Subject: [PATCH 219/335] fix: upgrade lotus panics while marshaling undef filaddress --- chain/filecoin/gas.go | 4 +- go.mod | 4 +- go.sum | 219 ++++++-------------------------------- infra/filecoin/Dockerfile | 2 +- 4 files changed, 40 insertions(+), 189 deletions(-) diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go index 69ca4e54..1cdb7171 100644 --- a/chain/filecoin/gas.go +++ b/chain/filecoin/gas.go @@ -39,8 +39,8 @@ func (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, p // Create a dummy "Send" message. msgIn := types.Message{ Version: types.MessageVersion, - From: filaddress.Undef, - To: filaddress.Undef, + From: filaddress.TestAddress, + To: filaddress.TestAddress2, Value: types.EmptyInt, Nonce: 0, GasLimit: gasEstimator.gasLimit, diff --git a/go.mod b/go.mod index 08dc62f2..cd2b81b0 100644 --- a/go.mod +++ b/go.mod @@ -11,8 +11,8 @@ require ( github.com/ethereum/go-ethereum v1.9.20 github.com/filecoin-project/go-address v0.0.4 github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49 - github.com/filecoin-project/go-state-types v0.0.0-20201003010437-c33112184a2b - github.com/filecoin-project/lotus v0.10.0 + github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f + github.com/filecoin-project/lotus v1.1.2 github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/multiformats/go-varint v0.0.6 diff --git a/go.sum b/go.sum index 75ce7767..2df88715 100644 --- a/go.sum +++ b/go.sum @@ -9,20 +9,14 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= contrib.go.opencensus.io/exporter/jaeger v0.1.0/go.mod h1:VYianECmuFPwU37O699Vc1GOcy+y8kOsfaxHRImmjbA= contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= @@ -31,13 +25,11 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.1.3 h1:mEV3iyZWjkxQ7R8ia8GcG97vCX5zQQ7n4o8R2BylwQY= github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -159,6 +151,7 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/cockroachdb/pebble v0.0.0-20200916222308-4e219a90ba5b/go.mod h1:hU7vhtrqonEphNF+xt8/lHdaBprxmV1h8BOGrd9XwmQ= +github.com/cockroachdb/pebble v0.0.0-20201001221639-879f3bfeef07/go.mod h1:hU7vhtrqonEphNF+xt8/lHdaBprxmV1h8BOGrd9XwmQ= github.com/cockroachdb/redact v0.0.0-20200622112456-cd282804bbd3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= @@ -193,14 +186,12 @@ github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TI github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= -github.com/dave/jennifer v1.4.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= -github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU= @@ -223,13 +214,12 @@ github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= -github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4/go.mod h1:SnqWL9jksIMK63UKkfmWI6f9PDN8ROoCgg+Z4zWk7hg= -github.com/drand/drand v1.1.2-0.20200905144319-79c957281b32/go.mod h1:0sQEVg+ngs1jaDPVIiEgY0lbENWJPaUlWxGHEaSmKVM= +github.com/drand/drand v1.2.1/go.mod h1:j0P7RGmVaY7E/OuO2yQOcQj7OgeZCuhgu2gdv0JAm+g= github.com/drand/kyber v1.0.1-0.20200110225416-8de27ed8c0e2/go.mod h1:UpXoA0Upd1N9l4TvRPHr1qAUBBERj6JQ/mnKI3BPEmw= github.com/drand/kyber v1.0.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.1/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber v1.1.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw= -github.com/drand/kyber-bls12381 v0.1.0/go.mod h1:N1emiHpm+jj7kMlxEbu3MUyOiooTgNySln564cgD9mk= +github.com/drand/kyber v1.1.4/go.mod h1:9+IgTq7kadePhZg7eRwSD7+bA+bmvqRK+8DtmoV5a3U= +github.com/drand/kyber-bls12381 v0.2.0/go.mod h1:zQip/bHdeEB6HFZSU3v+d3cQE0GaBVQw9aR2E7AdoeI= +github.com/drand/kyber-bls12381 v0.2.1/go.mod h1:JwWn4nHO9Mp4F5qCie5sVIPQZ0X6cw8XAeMRvc/GXBE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a h1:mq+R6XEM6lJX5VlLyZIrUSP8tSuJp82xTK89hvBwJbU= @@ -258,131 +248,59 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200813000554-40c22fe26eef/go.mod h1:SMj5VK1pYgqC8FXVEtOBRTc+9AIrYu+C+K3tAXi2Rk8= -github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.4 h1:gSNMv0qWwH16fGQs7ycOUrDjY6YCSsgLUl0I0KLjo8w= github.com/filecoin-project/go-address v0.0.4/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 h1:K6t4Hrs+rwUxBz2xg88Bdqeh4k5/rycQFdPseZhRyfE= -github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 h1:pIuR0dnMD0i+as8wNnjjHyQrnhP5O5bmba/lmgQeRgU= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= -github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= -github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= -github.com/filecoin-project/go-bitfield v0.2.1-0.20200920172649-837cbe6a1ed3 h1:HQa4+yCYsLq1TLM0kopeAhSCLbtZ541cWEi5N5rO+9g= -github.com/filecoin-project/go-bitfield v0.2.1-0.20200920172649-837cbe6a1ed3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.1 h1:S6Uuqcspqu81sWJ0He4OAfFLm1tSwPdVjtKTkl5m/xQ= github.com/filecoin-project/go-bitfield v0.2.1/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-data-transfer v0.6.1/go.mod h1:uRYBRKVBVM12CSusBtVrzDHkVw/3DKZpkxKJVP1Ydas= -github.com/filecoin-project/go-data-transfer v0.6.3 h1:7TLwm8nuodHYD/uiwJjKc/PGRR+LwqM8jmlZqgWuUfY= -github.com/filecoin-project/go-data-transfer v0.6.3/go.mod h1:PmBKVXkhh67/tnEdJXQwDHl5mT+7Tbcwe1NPninqhnM= -github.com/filecoin-project/go-data-transfer v0.6.7 h1:Kacr5qz2YWtd3sensU6aXFtES7joeapVDeXApeUD35I= -github.com/filecoin-project/go-data-transfer v0.6.7/go.mod h1:C++k1U6+jMQODOaen5OPDo9XQbth9Yq3ie94vNjBJbk= +github.com/filecoin-project/go-data-transfer v0.9.0 h1:nTT8j7Hu3TM0wRWrGy83/ctawG7sleJGdFWtIsUsKgY= +github.com/filecoin-project/go-data-transfer v0.9.0/go.mod h1:i2CqUy7TMQGKukj9BgqIxiP8nDHDXU2VLd771KVaCaQ= github.com/filecoin-project/go-ds-versioning v0.1.0/go.mod h1:mp16rb4i2QPmxBnmanUx8i/XANp+PFCCJWiAb+VW4/s= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-markets v0.5.6-0.20200814234959-80b1788108ac/go.mod h1:umicPCaN99ysHTiYOmwhuLxTFbOwcsI+mdw/t96vvM4= -github.com/filecoin-project/go-fil-markets v0.5.6/go.mod h1:SJApXAKr5jyGpbzDEOhvemui0pih7hhT8r2MXJxCP1E= -github.com/filecoin-project/go-fil-markets v0.5.8 h1:uwl0QNUVmmSlUQfxshpj21Dmhh6WKTQNhnb1GMfdp18= -github.com/filecoin-project/go-fil-markets v0.5.8/go.mod h1:6ZX1vbZbnukbVQ8tCB/MmEizuW/bmRX7SpGAltU3KVg= -github.com/filecoin-project/go-fil-markets v0.7.0 h1:tcEZiUNIYQJ4PBzgVpLwfdJ4ZdC4WCv9LsgvsoCXIls= -github.com/filecoin-project/go-fil-markets v0.7.0/go.mod h1:5Pt4DXQqUoUrp9QzlSdlYTpItXxwAtqKrxRWQ6hAOqk= -github.com/filecoin-project/go-fil-markets v0.7.1 h1:e0NlpSnaeGyDUhCOzevjcxkSA54kt9BzlXpLRgduUFI= -github.com/filecoin-project/go-fil-markets v0.7.1/go.mod h1:5Pt4DXQqUoUrp9QzlSdlYTpItXxwAtqKrxRWQ6hAOqk= +github.com/filecoin-project/go-fil-markets v1.0.0 h1:np9+tlnWXh9xYG4oZfha6HZFLYOaAZoMGR3V4w6DM48= +github.com/filecoin-project/go-fil-markets v1.0.0/go.mod h1:lXExJyYHwpMMddCqhEdNrc7euYJKNkp04K76NZqJLGg= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0/go.mod h1:7aWZdaQ1b16BVoQUYR+eEvrDCGJoPLxFpDynFjYfBjI= -github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200817153016-2ea5cbaf5ec0/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= -github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52 h1:FXtCp0ybqdQL9knb3OGDpkNTaBbPxgkqPeWKotUwkH0= -github.com/filecoin-project/go-jsonrpc v0.1.2-0.20200822201400-474f4fdccc52/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49 h1:FSY245KeXFCUgyfFEu+bhrZNk8BGGJyfpSmQl2aiPU8= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= -github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= -github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20 h1:+/4aUeUoKr6AKfPE3mBhXA5spIV6UcKdTYDPNU2Tdmg= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= -github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-state-types v0.0.0-20200903145444-247639ffa6ad/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= -github.com/filecoin-project/go-state-types v0.0.0-20200905071437-95828685f9df/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= -github.com/filecoin-project/go-state-types v0.0.0-20200911004822-964d6c679cfc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= -github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab h1:cEDC5Ei8UuT99hPWhCjA72SM9AuRtnpvdSTIYbnzN8I= github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= -github.com/filecoin-project/go-state-types v0.0.0-20201003010437-c33112184a2b h1:bMUfG6Sy6YSMbsjQAO1Q2vEZldbSdsbRy/FX3OlTck0= -github.com/filecoin-project/go-state-types v0.0.0-20201003010437-c33112184a2b/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= -github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= -github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370 h1:Jbburj7Ih2iaJ/o5Q9A+EAeTabME6YII7FLi9SKUf5c= -github.com/filecoin-project/go-statemachine v0.0.0-20200813232949-df9b130df370/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f h1:TZDTu4MtBKSFLXWGKLy+cvC3nHfMFIrVgWLAz/+GgZQ= +github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe h1:dF8u+LEWeIcTcfUcCf3WFVlc81Fr2JKg8zPzIbBDKDw= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= -github.com/filecoin-project/lotus v0.4.3-0.20200819133134-a21234cd54d5/go.mod h1:YYUqCqyv4odVgKSFQAnIdAl0v1cIfbEYnF9E118dMGQ= -github.com/filecoin-project/lotus v0.4.3-0.20200819134055-b13681df3205/go.mod h1:rooripL/X8ixwUngDPzphAv/RKZXWBprbyxxDW0EJi0= -github.com/filecoin-project/lotus v0.4.3-0.20200820203717-d1718369a182/go.mod h1:biFZPQ/YyQGfkHUmHMiaNf2hnD6zm1+OAXPQYQ61Zkg= -github.com/filecoin-project/lotus v0.5.6 h1:3Jea/vfZBs95KmNuqyXGEpB6h+uF69xyMz0OD+Igpi8= -github.com/filecoin-project/lotus v0.5.6/go.mod h1:JeT2ti5ArW4B69k1FMMFV1rj00wX4ooHMX6zS5MgY+w= -github.com/filecoin-project/lotus v0.8.1 h1:le1NxJo7dOI+G7Hdt5qBZ9YlevA1F7nwufHLFNUBDrs= -github.com/filecoin-project/lotus v0.8.1/go.mod h1:9ukCCZ8KpowtotH2OTiOhFHh7+r7Xh0pkwNL6lFw1xU= -github.com/filecoin-project/lotus v0.9.0 h1:AWgKRtYJP5uQTycQQqdy0dsuoinABBxuX2wKKiQFvYA= -github.com/filecoin-project/lotus v0.9.0/go.mod h1:8Qg5wmvHgCvxq2gCq9iziPlcNHl58dtzozf4StZ68Kk= -github.com/filecoin-project/lotus v0.10.0 h1:fH8DVC/hsKDXrlbwM4kU75EjH0V1TSF2kcy3CTRVK80= -github.com/filecoin-project/lotus v0.10.0/go.mod h1:GrP2TIyNUOYLNC74eHh4N9O4uFbV0U/3J472BI8CUaI= -github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= -github.com/filecoin-project/sector-storage v0.0.0-20200730050024-3ee28c3b6d9a/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= -github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= -github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= -github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= -github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= -github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= -github.com/filecoin-project/specs-actors v0.9.2/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= -github.com/filecoin-project/specs-actors v0.9.3 h1:Fi75G/UQ7R4eiIwnN+S6bBQ9LqKivyJdw62jJzTi6aE= -github.com/filecoin-project/specs-actors v0.9.3/go.mod h1:YasnVUOUha0DN5wB+twl+V8LlDKVNknRG00kTJpsfFA= +github.com/filecoin-project/lotus v1.1.2 h1:cs74C5oNVoIIFmjovpSuJR3qXzXcqS9cpOT+oSmNRiE= +github.com/filecoin-project/lotus v1.1.2/go.mod h1:jSlQv+/+WGox3TdEzBEfmXzvbot4OOsBiIh98t7AnAA= github.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4= -github.com/filecoin-project/specs-actors v0.9.7/go.mod h1:wM2z+kwqYgXn5Z7scV1YHLyd1Q1cy0R8HfTIWQ0BFGU= -github.com/filecoin-project/specs-actors v0.9.11/go.mod h1:czlvLQGEX0fjLLfdNHD7xLymy6L3n7aQzRWzsYGf+ys= github.com/filecoin-project/specs-actors v0.9.12 h1:iIvk58tuMtmloFNHhAOQHG+4Gci6Lui0n7DYQGi3cJk= github.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= -github.com/filecoin-project/specs-actors/v2 v2.0.1 h1:bf08x6tqCDfClzrv2q/rmt/A/UbBOy1KgaoogQEcLhU= github.com/filecoin-project/specs-actors/v2 v2.0.1/go.mod h1:v2NZVYinNIKA9acEMBm5wWXxqv5+frFEbekBFemYghY= -github.com/filecoin-project/specs-actors/v2 v2.1.0 h1:ocEuGz8DG2cUWw32c/tvF8D6xT+dGVWJTr5yDevU00g= -github.com/filecoin-project/specs-actors/v2 v2.1.0/go.mod h1:E7fAX4CZkDVQvDNRCxfq+hc3nx56KcCKyuZf0hlQJ20= -github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= -github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-actors/v2 v2.2.0 h1:IyCICb0NHYeD0sdSqjVGwWydn/7r7xXuxdpvGAcRCGY= +github.com/filecoin-project/specs-actors/v2 v2.2.0/go.mod h1:rlv5Mx9wUhV8Qsz+vUezZNm+zL4tK08O0HreKKPB2Wc= github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796 h1:dJsTPWpG2pcTeojO2pyn0c6l+x/3MZYCBgo/9d11JEk= github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796/go.mod h1:nJRRM7Aa9XVvygr3W9k6xGF46RWzr2zxF/iGoAIfA/g= -github.com/filecoin-project/statediff v0.0.1/go.mod h1:qNWauolLFEzOiA4LNWermBRVNbaZHfPcPevumZeh+hE= -github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f/go.mod h1:1CGbd11KkHuyWPT+xwwCol1zl/jnlpiKD2L4fzKxaiI= -github.com/filecoin-project/test-vectors v0.0.0-20200819133914-e20cc29cc926/go.mod h1:ou1Im2BTyrYTnXX8yj5VvC+DTfbIrwESJjKDxbh31nA= -github.com/filecoin-project/test-vectors v0.0.0-20200826113833-9ffe6524729d/go.mod h1:hY/JN3OFRtykBrMByFjTonUFEOW2bRJjyR5YMUh3jLw= -github.com/filecoin-project/test-vectors/schema v0.0.3/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= -github.com/filecoin-project/test-vectors/schema v0.0.4/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= +github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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= @@ -448,7 +366,6 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -456,7 +373,6 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -477,6 +393,7 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -486,9 +403,7 @@ github.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8v github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= @@ -506,7 +421,6 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -537,8 +451,6 @@ github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfm github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/gxed/pubsub v0.0.0-20180201040156-26ebdf44f824/go.mod h1:OiEWyHgK+CWrmOlVquHaIK1vhpUJydC9m0Je6mhaiNE= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= -github.com/hannahhoward/cbor-gen-for v0.0.0-20191218204337-9ab7b1bcc099/go.mod h1:WVPCl0HO/0RAL5+vBH2GMxBomlxBF70MAS78+Lu1//k= -github.com/hannahhoward/cbor-gen-for v0.0.0-20200723175505-5892b522820a/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e h1:3YKHER4nmd7b5qy5t0GWDTwSn4OyRgfAXSmo6VnryBY= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= @@ -589,7 +501,6 @@ github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3 github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.8/go.mod h1:2Yjog0GMdH8+AsxkE0DI9D2mANaUTxbVVav0pPoZoug= github.com/ipfs/go-bitswap v0.2.20/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= @@ -620,7 +531,6 @@ github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRV github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.5 h1:cwOUcGMLdLPWgu3SlrCckCMznaGADbPqE0r8h768/Dg= github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs= @@ -640,17 +550,11 @@ github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2 github.com/ipfs/go-ds-pebble v0.0.2-0.20200921225637-ce220f8ac459/go.mod h1:oh4liWHulKcDKVhCska5NLelE3MatWl+1FwSz3tY91g= github.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEPb0= github.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM= -github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v0i9XJ8Y= github.com/ipfs/go-fs-lock v0.0.6/go.mod h1:OTR+Rj9sHiRubJh3dRhD15Juhd/+w6VPOY28L7zESmM= github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-graphsync v0.1.1/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= -github.com/ipfs/go-graphsync v0.1.2 h1:25Ll9kIXCE+DY0dicvfS3KMw+U5sd01b/FJbA7KAbhg= -github.com/ipfs/go-graphsync v0.1.2/go.mod h1:sLXVXm1OxtE2XYPw62MuXCdAuNwkAdsbnfrmos5odbA= -github.com/ipfs/go-graphsync v0.2.1 h1:MdehhqBSuTI2LARfKLkpYnt0mUrqHs/mtuDnESXHBfU= -github.com/ipfs/go-graphsync v0.2.1/go.mod h1:gEBvJUNelzMkaRPJTpg/jaKN4AQW/7wDWu0K92D8o10= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= -github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= +github.com/ipfs/go-graphsync v0.3.0/go.mod h1:gEBvJUNelzMkaRPJTpg/jaKN4AQW/7wDWu0K92D8o10= +github.com/ipfs/go-graphsync v0.3.1 h1:dJLYrck4oyJDfMVhGEKiWHxaY8oYMWko4m2Fi+4bofo= +github.com/ipfs/go-graphsync v0.3.1/go.mod h1:bw4LiLM5Oq/uLdzEtih9LK8GrwSijv+XqYiWCTxHMqs= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= @@ -676,7 +580,6 @@ github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAz github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6ZpusRg= github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= @@ -725,6 +628,7 @@ github.com/ipfs/go-merkledag v0.3.2 h1:MRqj40QkrWkvPswXs4EfSslhZ4RVPRbxwX11js0t1 github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= +github.com/ipfs/go-metrics-prometheus v0.0.2/go.mod h1:ELLU99AQQNi+zX6GCGm2lAgnzdSH3u5UVlCdqSXnEks= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ= @@ -740,15 +644,11 @@ github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZ github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= -github.com/ipld/go-car v0.1.1-0.20200526133713-1c7508d55aae/go.mod h1:2mvxpu4dKRnuH3mj5u6KW/tmRSCcXvy/KYiJ4nC6h4c= github.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4/go.mod h1:xrMEcuSq+D1vEwl+YAXsg/JfA98XGpXDwnkIL4Aimqw= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= -github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef h1:/yPelt/0CuzZsmRkYzBBnJ499JnAOGaIaAXHujx96ic= -github.com/ipld/go-ipld-prime v0.0.4-0.20200828224805-5ff8c8b0b6ef/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f h1:XpOuNQ5GbXxUcSukbQcW9jkE7REpaFGJU2/T00fo9kA= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= -github.com/ipld/go-ipld-prime-proto v0.0.0-20200828231332-ae0aea07222b/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -795,6 +695,8 @@ github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2vi github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= +github.com/kilic/bls12-381 v0.0.0-20200731194930-64c428e1bff5/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= +github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -842,7 +744,6 @@ github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qD github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= -github.com/libp2p/go-libp2p v0.10.3/go.mod h1:0ER6iPSaPeQjryNgOnm9bLNpMJCYmuw54xJXsVR17eE= github.com/libp2p/go-libp2p v0.11.0/go.mod h1:3/ogJDXsbbepEfqtZKBR/DedzxJXCeK17t2Z9RE9bEE= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= @@ -958,18 +859,10 @@ github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1 github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q= github.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= -github.com/libp2p/go-libp2p-pubsub v0.3.4/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= -github.com/libp2p/go-libp2p-pubsub v0.3.5-0.20200820194335-bfc96c2cd081/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= -github.com/libp2p/go-libp2p-pubsub v0.3.5 h1:iF75GWpcxKEUQU8tTkgLy69qIQvfhL+t6U6ndQrB6ho= -github.com/libp2p/go-libp2p-pubsub v0.3.5/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= -github.com/libp2p/go-libp2p-pubsub v0.3.6-0.20200910093904-f7f33e10cc18 h1:+ae7vHSv/PJ4xGXwLV6LKGj32zjyB8ttJHtyV4TXal0= -github.com/libp2p/go-libp2p-pubsub v0.3.6-0.20200910093904-f7f33e10cc18/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-pubsub v0.3.6 h1:9oO8W7qIWCYQYyz5z8nUsPcb3rrFehBlkbqvbSVjBxY= github.com/libp2p/go-libp2p-pubsub v0.3.6/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= -github.com/libp2p/go-libp2p-quic-transport v0.7.1/go.mod h1:TD31to4E5exogR/GWHClXCfkktigjAl5rXSt7HoxNvY= -github.com/libp2p/go-libp2p-quic-transport v0.8.0/go.mod h1:F2FG/6Bzz0U6essUVxDzE0s9CrY4XGLbl7QEmDNvU7A= github.com/libp2p/go-libp2p-quic-transport v0.8.2/go.mod h1:L+e0q15ZNaYm3seHgbsXjWP8kXLEqz+elLWKk9l8DhM= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= @@ -1084,8 +977,6 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= -github.com/lucas-clemente/quic-go v0.17.3/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= -github.com/lucas-clemente/quic-go v0.18.0/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= github.com/lucas-clemente/quic-go v0.18.1/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= @@ -1106,6 +997,7 @@ github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -1113,7 +1005,7 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1135,7 +1027,6 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -1363,8 +1254,6 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqn github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= -github.com/renproject/pack v0.2.3 h1:6zHFyz45ow52iLNLG19eyA/UphJE8b2LsYEcLC3HqQQ= -github.com/renproject/pack v0.2.3/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= github.com/renproject/pack v0.2.5 h1:BNfam8PCb5qJuIX36IqOkcRgaZLOZsM1lZZSakbOxb4= github.com/renproject/pack v0.2.5/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4= github.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs= @@ -1528,10 +1417,8 @@ github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= -github.com/whyrusleeping/cbor-gen v0.0.0-20191212224538-d370462a7e8a/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200206220010-03c9665e2a66/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200402171437-3d27c146c105/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= @@ -1541,8 +1428,6 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200806213330-63aa96ca5488/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee h1:U7zWWvvAjT76EiuWPSOiZlQDnaQYPxPoxugTtTAcJK0= -github.com/whyrusleeping/cbor-gen v0.0.0-20200814224545-656e08ce49ee/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163 h1:TtcUeY2XZSriVWR1pXyfCBWIf/NGC2iUdNw1lofUjUU= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= @@ -1555,6 +1440,7 @@ github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible/go.mod h1:34LEDb github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible/go.mod h1:dRWHHvc4HDQSHh9gbKEBbUZ+f2Q8iZTPG3UOGYODxSQ= github.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= github.com/whyrusleeping/go-smux-yamux v2.0.9+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI= +github.com/whyrusleeping/ledger-filecoin-go v0.9.1-0.20201010031517-c3dcc1bddce4/go.mod h1:K+EVq8d5QcQ2At5VECsA+SNZvWefyBXh8TnIsxo1OvQ= github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= @@ -1563,22 +1449,17 @@ github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7c github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= -github.com/willscott/go-cmp v0.5.2-0.20200812183318-8affb9542345/go.mod h1:D7hA8H5pyQx7Y5Em7IWx1R4vNJzfon3gpG9nxjkITjQ= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.12.1/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ= go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg= @@ -1605,7 +1486,6 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/dig v1.8.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -1621,8 +1501,6 @@ go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20190218023631-ce4c26f7be8e/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20190313082347-94abd6928b1d/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1651,15 +1529,13 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1669,9 +1545,7 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1685,7 +1559,6 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1730,10 +1603,8 @@ golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -1793,7 +1664,6 @@ golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1804,13 +1674,12 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025090151-53bf42e6b339/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1818,15 +1687,14 @@ golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200427175716-29b57079015a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200812155832-6a926be9bd1d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200926100807-9d91bd62050c h1:38q6VNPWR010vN82/SB121GujZNIfAUb4YttE2rhGuc= +golang.org/x/sys v0.0.0-20200926100807-9d91bd62050c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1865,22 +1733,14 @@ golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108195415-316d2f248479/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1901,9 +1761,6 @@ google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1929,12 +1786,7 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482 h1:i+Aiej6cta/Frzp13/swvwz5O00kYcSe0A/C5Wd7zX8= @@ -1960,7 +1812,6 @@ google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200617041141-9a465503579e/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1969,8 +1820,9 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2011,7 +1863,6 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= diff --git a/infra/filecoin/Dockerfile b/infra/filecoin/Dockerfile index fe8f400b..db653b4d 100644 --- a/infra/filecoin/Dockerfile +++ b/infra/filecoin/Dockerfile @@ -11,7 +11,7 @@ ENV PATH=$PATH:/usr/local/go/bin WORKDIR /app RUN git clone https://github.com/filecoin-project/lotus . -RUN git checkout 26ed6af0405b027470b88f893577d35fca9af5bd +RUN git checkout d4cdc6d3340b8496c9f98e2d0daed8d1bd9b271e RUN make 2k RUN ./lotus fetch-params 2048 RUN ./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 From aa3a64dd3ad7db0eb23774da8b987e880842d18c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 4 Nov 2020 15:28:00 +0530 Subject: [PATCH 220/335] feat: constant gas price conversion between micro and pico --- chain/cosmos/cosmos_test.go | 139 ------------------------------------ chain/cosmos/gas.go | 31 +++++--- chain/cosmos/gas_test.go | 32 +++++++++ chain/cosmos/tx.go | 5 +- go.sum | 1 + 5 files changed, 57 insertions(+), 151 deletions(-) create mode 100644 chain/cosmos/gas_test.go diff --git a/chain/cosmos/cosmos_test.go b/chain/cosmos/cosmos_test.go index 963ac226..712dd321 100644 --- a/chain/cosmos/cosmos_test.go +++ b/chain/cosmos/cosmos_test.go @@ -1,140 +1 @@ package cosmos_test - -// import ( -// "encoding/hex" -// "os" -// "strings" -// "time" - -// "github.com/tendermint/tendermint/crypto/secp256k1" - -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/terra-project/core/app" - -// "github.com/renproject/multichain/chain/cosmos" -// "github.com/renproject/multichain/compat/cosmoscompat" -// "github.com/renproject/pack" - -// . "github.com/onsi/ginkgo" -// . "github.com/onsi/gomega" -// ) - -// var _ = Describe("Cosmos", func() { -// Context("when submitting transactions", func() { -// Context("when sending LUNA to multiple addresses", func() { -// It("should work", func() { -// // Load private key, and assume that the associated address has -// // funds to spend. You can do this by setting TERRA_PK to the -// // value specified in the `./multichaindeploy/.env` file. -// pkEnv := os.Getenv("TERRA_PK") -// if pkEnv == "" { -// panic("TERRA_PK is undefined") -// } - -// addrEnv := os.Getenv("TERRA_ADDRESS") -// if addrEnv == "" { -// panic("TERRA_ADDRESS is undefined") -// } - -// // pkEnv := "a96e62ed3955e65be32703f12d87b6b5cf26039ecfa948dc5107a495418e5330" -// // addrEnv := "terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u" - -// pkBz, err := hex.DecodeString(pkEnv) -// Expect(err).ToNot(HaveOccurred()) - -// var pk secp256k1.PrivKeySecp256k1 -// copy(pk[:], pkBz) - -// addr := cosmoscompat.Address(pk.PubKey().Address()) - -// decoder := cosmos.NewAddressDecoder("terra") -// expectedAddr, err := decoder.DecodeAddress(pack.NewString(addrEnv)) -// Expect(err).ToNot(HaveOccurred()) -// Expect(addr).Should(Equal(expectedAddr)) - -// pk1 := secp256k1.GenPrivKey() -// pk2 := secp256k1.GenPrivKey() - -// recipient1 := sdk.AccAddress(pk1.PubKey().Address()) -// recipient2 := sdk.AccAddress(pk2.PubKey().Address()) - -// msgs := []cosmoscompat.MsgSend{ -// { -// FromAddress: cosmoscompat.Address(addr), -// ToAddress: cosmoscompat.Address(recipient1), -// Amount: cosmoscompat.Coins{ -// { -// Denom: "uluna", -// Amount: pack.U64(1000000), -// }, -// }, -// }, -// { -// FromAddress: cosmoscompat.Address(addr), -// ToAddress: cosmoscompat.Address(recipient2), -// Amount: cosmoscompat.Coins{ -// { -// Denom: "uluna", -// Amount: pack.U64(2000000), -// }, -// }, -// }, -// } - -// client := cosmoscompat.NewClient(cosmoscompat.DefaultClientOptions(), app.MakeCodec()) -// account, err := client.Account(addr) -// Expect(err).NotTo(HaveOccurred()) - -// txBuilder := cosmos.NewTxBuilder(cosmoscompat.TxOptions{ -// AccountNumber: account.AccountNumber, -// SequenceNumber: account.SequenceNumber, -// Gas: 200000, -// ChainID: "testnet", -// Memo: "multichain", -// Fees: cosmoscompat.Coins{ -// { -// Denom: "uluna", -// Amount: pack.U64(3000), -// }, -// }, -// }).WithCodec(app.MakeCodec()) - -// tx, err := txBuilder.BuildTx(msgs) -// Expect(err).NotTo(HaveOccurred()) - -// sigBytes, err := pk.Sign(tx.SigBytes()) -// Expect(err).NotTo(HaveOccurred()) - -// pubKey := pk.PubKey().(secp256k1.PubKeySecp256k1) -// err = tx.Sign([]cosmoscompat.StdSignature{ -// { -// Signature: pack.NewBytes(sigBytes), -// PubKey: pack.NewBytes(pubKey[:]), -// }, -// }) -// Expect(err).NotTo(HaveOccurred()) - -// txHash, err := client.SubmitTx(tx, pack.NewString("sync")) -// Expect(err).NotTo(HaveOccurred()) - -// for { -// // Loop until the transaction has at least a few -// // confirmations. This implies that the transaction is -// // definitely valid, and the test has passed. We were -// // successfully able to use the multichain to construct and -// // submit a Bitcoin transaction! -// _, err := client.Tx(txHash) -// if err == nil { -// break -// } - -// if !strings.Contains(err.Error(), "not found") { -// Expect(err).NotTo(HaveOccurred()) -// } - -// time.Sleep(10 * time.Second) -// } -// }) -// }) -// }) -// }) diff --git a/chain/cosmos/gas.go b/chain/cosmos/gas.go index dbd583c3..809ca5e6 100644 --- a/chain/cosmos/gas.go +++ b/chain/cosmos/gas.go @@ -7,26 +7,37 @@ import ( "github.com/renproject/pack" ) -// A GasEstimator returns the gas-per-byte that is needed in order to confirm -// transactions with an estimated maximum delay of one block. In distributed -// networks that collectively build, sign, and submit transactions, it is -// important that all nodes in the network have reached consensus on the -// gas-per-byte. +const ( + microToPico = 1000000 +) + +// A GasEstimator returns the gas price that is needed in order to confirm +// transactions with an estimated maximum delay of one block. As of now, Cosmos +// compatible chains do not support transaction prioritisation in the mempool. +// Hence we use constant gas price set in the micro-denomination (1e-6) of the +// underlying token. However, the gas price as returned by the gas estimation +// API is a 32-byte unsigned integer that represents the gas price in the +// pico-denomination (1e-12). type GasEstimator struct { - gasPerByte pack.U256 + gasPrice float64 } // NewGasEstimator returns a simple gas estimator that always returns the same // amount of gas-per-byte. -func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { +func NewGasEstimator(gasPrice float64) gas.Estimator { return &GasEstimator{ - gasPerByte: gasPerByte, + gasPrice: gasPrice, } } // EstimateGas returns gas required per byte for Cosmos-compatible chains. This // value is used for both the price and cap, because Cosmos-compatible chains do -// not have a distinct concept of cap. +// not have a distinct concept of cap. As of now, Cosmos compatible chains do +// not support transaction prioritisation in the mempool. Hence we use constant +// gas price set in the micro-denomination (1e-6) of the underlying token. +// However, the gas price as returned by the gas estimation API is a 32-byte +// unsigned integer representing gas price in the pico-denomination (1e-12). func (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { - return gasEstimator.gasPerByte, gasEstimator.gasPerByte, nil + gasPrice := pack.NewU256FromUint64(uint64(gasEstimator.gasPrice * microToPico)) + return gasPrice, gasPrice, nil } diff --git a/chain/cosmos/gas_test.go b/chain/cosmos/gas_test.go new file mode 100644 index 00000000..94646311 --- /dev/null +++ b/chain/cosmos/gas_test.go @@ -0,0 +1,32 @@ +package cosmos_test + +import ( + "context" + "math/rand" + "testing/quick" + "time" + + "github.com/renproject/multichain/chain/cosmos" + "github.com/renproject/pack" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Gas", func() { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + Context("when estimating gas parameters", func() { + It("should work", func() { + f := func() bool { + gasPriceMicro := r.Float64() + gasEstimator := cosmos.NewGasEstimator(gasPriceMicro) + gasPricePico, _, err := gasEstimator.EstimateGas(context.Background()) + Expect(err).NotTo(HaveOccurred()) + expectedGasPrice := pack.NewU256FromUint64(uint64(gasPriceMicro * 1000000)) + Expect(gasPricePico).To(Equal(expectedGasPrice)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + }) +}) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 5a91d39d..fa62daf9 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -63,7 +63,8 @@ func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { // BuildTx consumes a list of MsgSend to build and return a cosmos transaction. // This transaction is unsigned, and must be signed before submitting to the -// cosmos chain. +// cosmos chain. Note that the gas price is represented in the pico-denomination +// (1e-12) and must be converted back to the micro-denomination (1e-6). func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) { types.GetConfig().SetBech32PrefixForAccount(builder.client.hrp, builder.client.hrp+"pub") @@ -90,7 +91,7 @@ func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, fees := Coins{Coin{ Denom: builder.client.opts.CoinDenom, - Amount: pack.NewU64(gasPrice.Mul(gasLimit).Int().Uint64()), + Amount: pack.NewU64(gasPrice.Mul(gasLimit).Div(pack.NewU256FromUint64(uint64(microToPico))).Int().Uint64()), }} accountNumber, err := builder.client.AccountNumber(ctx, from) diff --git a/go.sum b/go.sum index 2df88715..ff1dad20 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,7 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.1.3 h1:mEV3iyZWjkxQ7R8ia8GcG97vCX5zQQ7n4o8R2BylwQY= github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= From 9af88bf7d8888baa2f4bc14fc40336f6057a3b9e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 5 Nov 2020 09:44:24 +0000 Subject: [PATCH 221/335] ci: use golang base image instead of ubuntu for smaller image --- Dockerfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index e9e7eef6..a5cbbeda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,9 @@ -FROM ubuntu:bionic +FROM golang RUN apt update -y RUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl wget RUN apt upgrade -y -RUN wget -c https://golang.org/dl/go1.14.6.linux-amd64.tar.gz -RUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz - -ENV GOROOT=/usr/local/go -ENV GOPATH=$HOME/go -ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH ENV GO111MODULE=on ENV GOPROXY=direct ENV GOSUMDB=off From 09b3c0bfa1e8ff1dc378ee5173b37bf31b36a646 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 6 Nov 2020 10:51:28 +1100 Subject: [PATCH 222/335] chain/cosmos: set addr prefix before fetching balance --- chain/cosmos/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 984e26e0..d231a68c 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -205,6 +205,8 @@ func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pa // AccountBalance returns the account balancee for a given address. func (client *Client) AccountBalance(_ context.Context, addr address.Address) (pack.U256, error) { + types.GetConfig().SetBech32PrefixForAccount(client.hrp, client.hrp+"pub") + cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) From 7058c3391940f13de0df6afec26e2327c16d49a1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 6 Nov 2020 04:41:23 +0000 Subject: [PATCH 223/335] fix(ci): use proxy to download packages faster --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5cbbeda..32283cf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,7 @@ RUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config RUN apt upgrade -y ENV GO111MODULE=on -ENV GOPROXY=direct -ENV GOSUMDB=off +ENV GOPROXY=https://proxy.golang.org RUN mkdir -p $(go env GOPATH) WORKDIR $GOPATH From 75d22b83d1dbb7247cb16c894db09c2afd9ac0d9 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Tue, 10 Nov 2020 10:42:56 +1100 Subject: [PATCH 224/335] chain/cosmos: revert gas estimation change --- chain/cosmos/gas.go | 31 +++------ chain/cosmos/gas_test.go | 13 ++-- chain/cosmos/tx.go | 5 +- go.mod | 1 - go.sum | 137 ++++++++++++++++++++++++++++++++++++++- 5 files changed, 152 insertions(+), 35 deletions(-) diff --git a/chain/cosmos/gas.go b/chain/cosmos/gas.go index 809ca5e6..dbd583c3 100644 --- a/chain/cosmos/gas.go +++ b/chain/cosmos/gas.go @@ -7,37 +7,26 @@ import ( "github.com/renproject/pack" ) -const ( - microToPico = 1000000 -) - -// A GasEstimator returns the gas price that is needed in order to confirm -// transactions with an estimated maximum delay of one block. As of now, Cosmos -// compatible chains do not support transaction prioritisation in the mempool. -// Hence we use constant gas price set in the micro-denomination (1e-6) of the -// underlying token. However, the gas price as returned by the gas estimation -// API is a 32-byte unsigned integer that represents the gas price in the -// pico-denomination (1e-12). +// A GasEstimator returns the gas-per-byte that is needed in order to confirm +// transactions with an estimated maximum delay of one block. In distributed +// networks that collectively build, sign, and submit transactions, it is +// important that all nodes in the network have reached consensus on the +// gas-per-byte. type GasEstimator struct { - gasPrice float64 + gasPerByte pack.U256 } // NewGasEstimator returns a simple gas estimator that always returns the same // amount of gas-per-byte. -func NewGasEstimator(gasPrice float64) gas.Estimator { +func NewGasEstimator(gasPerByte pack.U256) gas.Estimator { return &GasEstimator{ - gasPrice: gasPrice, + gasPerByte: gasPerByte, } } // EstimateGas returns gas required per byte for Cosmos-compatible chains. This // value is used for both the price and cap, because Cosmos-compatible chains do -// not have a distinct concept of cap. As of now, Cosmos compatible chains do -// not support transaction prioritisation in the mempool. Hence we use constant -// gas price set in the micro-denomination (1e-6) of the underlying token. -// However, the gas price as returned by the gas estimation API is a 32-byte -// unsigned integer representing gas price in the pico-denomination (1e-12). +// not have a distinct concept of cap. func (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) { - gasPrice := pack.NewU256FromUint64(uint64(gasEstimator.gasPrice * microToPico)) - return gasPrice, gasPrice, nil + return gasEstimator.gasPerByte, gasEstimator.gasPerByte, nil } diff --git a/chain/cosmos/gas_test.go b/chain/cosmos/gas_test.go index 94646311..f777ba2e 100644 --- a/chain/cosmos/gas_test.go +++ b/chain/cosmos/gas_test.go @@ -2,9 +2,7 @@ package cosmos_test import ( "context" - "math/rand" "testing/quick" - "time" "github.com/renproject/multichain/chain/cosmos" "github.com/renproject/pack" @@ -14,16 +12,13 @@ import ( ) var _ = Describe("Gas", func() { - r := rand.New(rand.NewSource(time.Now().UnixNano())) Context("when estimating gas parameters", func() { It("should work", func() { - f := func() bool { - gasPriceMicro := r.Float64() - gasEstimator := cosmos.NewGasEstimator(gasPriceMicro) - gasPricePico, _, err := gasEstimator.EstimateGas(context.Background()) + f := func(gasPerByte pack.U256) bool { + gasEstimator := cosmos.NewGasEstimator(gasPerByte) + gasPrice, _, err := gasEstimator.EstimateGas(context.Background()) Expect(err).NotTo(HaveOccurred()) - expectedGasPrice := pack.NewU256FromUint64(uint64(gasPriceMicro * 1000000)) - Expect(gasPricePico).To(Equal(expectedGasPrice)) + Expect(gasPrice).To(Equal(gasPerByte)) return true } Expect(quick.Check(f, nil)).To(Succeed()) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index fa62daf9..5a91d39d 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -63,8 +63,7 @@ func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { // BuildTx consumes a list of MsgSend to build and return a cosmos transaction. // This transaction is unsigned, and must be signed before submitting to the -// cosmos chain. Note that the gas price is represented in the pico-denomination -// (1e-12) and must be converted back to the micro-denomination (1e-6). +// cosmos chain. func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) { types.GetConfig().SetBech32PrefixForAccount(builder.client.hrp, builder.client.hrp+"pub") @@ -91,7 +90,7 @@ func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, fees := Coins{Coin{ Denom: builder.client.opts.CoinDenom, - Amount: pack.NewU64(gasPrice.Mul(gasLimit).Div(pack.NewU256FromUint64(uint64(microToPico))).Int().Uint64()), + Amount: pack.NewU64(gasPrice.Mul(gasLimit).Int().Uint64()), }} accountNumber, err := builder.client.AccountNumber(ctx, from) diff --git a/go.mod b/go.mod index cd2b81b0..0b489eae 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.14 require ( github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcutil v1.0.2 - github.com/centrifuge/go-substrate-rpc-client v1.1.0 github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf github.com/cosmos/cosmos-sdk v0.39.1 github.com/ethereum/go-ethereum v1.9.20 diff --git a/go.sum b/go.sum index ff1dad20..83c8ff33 100644 --- a/go.sum +++ b/go.sum @@ -44,6 +44,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= @@ -59,20 +60,26 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= +github.com/Stebalien/go-bitfield v0.0.1 h1:X3kbSSPUaJK60wV2hjOPZwmpljr6VGCqdq4cBLhbQBo= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= @@ -96,6 +103,7 @@ github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6Q github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -133,7 +141,6 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7 github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/centrifuge/go-substrate-rpc-client v1.1.0/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU= github.com/certifi/gocertifi v0.0.0-20200211180108-c7c1fbc02894/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -176,22 +183,28 @@ github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/V github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= +github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= +github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f h1:BOaYiTvg8p9vBUXpklC22XSK/mifLF7lG9jtmYYi3Tc= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= @@ -212,6 +225,7 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= @@ -232,6 +246,7 @@ github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -243,12 +258,16 @@ github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJ github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= @@ -262,9 +281,11 @@ github.com/filecoin-project/go-bitfield v0.2.1 h1:S6Uuqcspqu81sWJ0He4OAfFLm1tSwP github.com/filecoin-project/go-bitfield v0.2.1/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= +github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v0.9.0 h1:nTT8j7Hu3TM0wRWrGy83/ctawG7sleJGdFWtIsUsKgY= github.com/filecoin-project/go-data-transfer v0.9.0/go.mod h1:i2CqUy7TMQGKukj9BgqIxiP8nDHDXU2VLd771KVaCaQ= +github.com/filecoin-project/go-ds-versioning v0.1.0 h1:y/X6UksYTsK8TLCI7rttCKEvl8btmWxyFMEeeWGUxIQ= github.com/filecoin-project/go-ds-versioning v0.1.0/go.mod h1:mp16rb4i2QPmxBnmanUx8i/XANp+PFCCJWiAb+VW4/s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= @@ -280,6 +301,7 @@ github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0 github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20 h1:+/4aUeUoKr6AKfPE3mBhXA5spIV6UcKdTYDPNU2Tdmg= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= +github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-state-types v0.0.0-20200903145444-247639ffa6ad/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= @@ -290,6 +312,7 @@ github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe h github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= +github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b h1:fkRZSPrYpk42PV3/lIXiL0LHetxde7vyYYvSsttQtfg= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= github.com/filecoin-project/lotus v1.1.2 h1:cs74C5oNVoIIFmjovpSuJR3qXzXcqS9cpOT+oSmNRiE= github.com/filecoin-project/lotus v1.1.2/go.mod h1:jSlQv+/+WGox3TdEzBEfmXzvbot4OOsBiIh98t7AnAA= @@ -304,7 +327,9 @@ github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796/g github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -333,10 +358,12 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= @@ -367,6 +394,7 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -394,12 +422,15 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= +github.com/google/gopacket v1.1.18 h1:lum7VRA9kdlvBi7/v2p7/zcbkduHaCH/SVVyurs7OpY= github.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -415,6 +446,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= @@ -452,6 +484,7 @@ github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfm github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/gxed/pubsub v0.0.0-20180201040156-26ebdf44f824/go.mod h1:OiEWyHgK+CWrmOlVquHaIK1vhpUJydC9m0Je6mhaiNE= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= +github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1 h1:F9k+7wv5OIk1zcq23QpdiL0hfDuXPjuOmMNaC6fgQ0Q= github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e h1:3YKHER4nmd7b5qy5t0GWDTwSn4OyRgfAXSmo6VnryBY= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= @@ -488,9 +521,11 @@ github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= +github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -502,6 +537,7 @@ github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3 github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= +github.com/ipfs/go-bitswap v0.2.20 h1:Zfi5jDUoqxDThORUznqdeL77DdGniAzlccNJ4vr+Itc= github.com/ipfs/go-bitswap v0.2.20/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= @@ -535,6 +571,7 @@ github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13X github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.5 h1:cwOUcGMLdLPWgu3SlrCckCMznaGADbPqE0r8h768/Dg= github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs= +github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= @@ -563,12 +600,15 @@ github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86 github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= github.com/ipfs/go-ipfs-blockstore v1.0.1 h1:fnuVj4XdZp4yExhd0CnUwAiMNJHiPnfInhiuwz4lW1w= github.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= +github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= +github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7NapWLY8= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= github.com/ipfs/go-ipfs-cmds v0.1.0/go.mod h1:TiK4e7/V31tuEb8YWDF8lN3qrnDH+BS7ZqWIeYJlAs8= github.com/ipfs/go-ipfs-config v0.0.11/go.mod h1:wveA8UT5ywN26oKStByzmz1CO6cXwLKKM6Jn/Hfw08I= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= +github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= @@ -588,8 +628,10 @@ github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEB github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= +github.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY= github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= +github.com/ipfs/go-ipfs-routing v0.1.0 h1:gAJTT1cEeeLj6/DlLX6t+NxD9fQe2ymTO6qWRDI/HQQ= github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= @@ -635,32 +677,41 @@ github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ= github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= +github.com/ipfs/go-peertaskqueue v0.2.0 h1:2cSr7exUGKYyDeUyQ7P/nHPs9P7Ht/B+ROrpN1EJOjc= github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY= github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= +github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= +github.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4 h1:6phjU3kXvCEWOZpu+Ob0w6DzgPFZmDLgLPxJhD8RxEY= github.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4/go.mod h1:xrMEcuSq+D1vEwl+YAXsg/JfA98XGpXDwnkIL4Aimqw= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f h1:XpOuNQ5GbXxUcSukbQcW9jkE7REpaFGJU2/T00fo9kA= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= +github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6 h1:6Mq+tZGSEMEoJJ1NbJRhddeelkXZcU8yfH/ZRYUo/Es= github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0= +github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= +github.com/jbenet/go-cienv v0.1.0 h1:Vc/s0QbQtoxX8MwwSLWWh+xNNZvM3Lw7NsTcHrvvhMc= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= +github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c h1:uUx61FiAa1GI6ZmVd2wf2vULeQZIKG66eybjNXKYCz4= github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM9UuLw1tXnhJWN3piypTUO3vCIHYmG15KE/dU= github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= +github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= @@ -671,11 +722,13 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= @@ -688,6 +741,7 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -703,18 +757,23 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= +github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d h1:68u9r4wEvL3gYg2jvAOgROwZ3H+Y3hIDk4tbbmIjcYQ= github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= +github.com/libp2p/go-addr-util v0.0.2 h1:7cWK5cdA5x72jX0g8iLrQWm5TRJZ6CzGdPEhWj7plWU= github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= @@ -723,9 +782,11 @@ github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40J github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= github.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= +github.com/libp2p/go-conn-security-multistream v0.2.0 h1:uNiDjS58vrvJTg9jO6bySd1rMKejieG7v45ekqHbZ1M= github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= github.com/libp2p/go-eventbus v0.0.2/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk= github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= +github.com/libp2p/go-eventbus v0.2.1 h1:VanAdErQnpTioN2TowqNcOijf6YwhuODe4pPKSDpxGc= github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= @@ -745,6 +806,7 @@ github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qD github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= +github.com/libp2p/go-libp2p v0.11.0 h1:jb5mqdqYEBAybTEhD8io43Cz5LzVKuWxOK7znSN69jE= github.com/libp2p/go-libp2p v0.11.0/go.mod h1:3/ogJDXsbbepEfqtZKBR/DedzxJXCeK17t2Z9RE9bEE= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= @@ -754,6 +816,7 @@ github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQ github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= +github.com/libp2p/go-libp2p-autonat v0.3.2 h1:OhDSwVVaq7liTaRIsFFYvsaPp0pn2yi0WazejZ4DUmo= github.com/libp2p/go-libp2p-autonat v0.3.2/go.mod h1:0OzOi1/cVc7UcxfOddemYD5vzEqi4fwRbnZcJGLi68U= github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= @@ -761,6 +824,7 @@ github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMz github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= +github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk= github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= github.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE= github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= @@ -771,9 +835,11 @@ github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3 github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= +github.com/libp2p/go-libp2p-circuit v0.3.1 h1:69ENDoGnNN45BNDnBd+8SXSetDuw0eJFcGmOvvtOgBw= github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= +github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= @@ -822,6 +888,7 @@ github.com/libp2p/go-libp2p-kad-dht v0.8.3/go.mod h1:HnYYy8taJWESkqiESd1ngb9XX/X github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= +github.com/libp2p/go-libp2p-loggables v0.1.0 h1:h3w8QFfCt2UJl/0/NW4K829HX/0S4KD31PQ7m8UXXO8= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= github.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08= github.com/libp2p/go-libp2p-mplex v0.1.1/go.mod h1:KUQWpGkCzfV7UIpi8SKsAVxyBgz1c9R5EvxgnwLsb/I= @@ -829,16 +896,20 @@ github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3 github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= +github.com/libp2p/go-libp2p-mplex v0.2.4 h1:XFFXaN4jhqnIuJVjYOR3k6bnRj0mFfJOlIuDVww+4Zo= github.com/libp2p/go-libp2p-mplex v0.2.4/go.mod h1:mI7iOezdWFOisvUwaYd3IDrJ4oVmgoXK8H331ui39CE= github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= +github.com/libp2p/go-libp2p-nat v0.0.6 h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGSfvTkU= github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-net v0.0.1/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= github.com/libp2p/go-libp2p-net v0.0.2/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= github.com/libp2p/go-libp2p-netutil v0.0.1/go.mod h1:GdusFvujWZI9Vt0X5BKqwWWmZFxecf9Gt03cKxm2f/Q= +github.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= +github.com/libp2p/go-libp2p-noise v0.1.2 h1:IH9GRihQJTx56obm+GnpdPX4KeVIlvpXrP6xnJ0wxWk= github.com/libp2p/go-libp2p-noise v0.1.2/go.mod h1:9B10b7ueo7TIxZHHcjcDCo5Hd6kfKT2m77by82SFRfE= github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo= github.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es= @@ -855,6 +926,7 @@ github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/ github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= +github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= @@ -869,6 +941,7 @@ github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFA github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= +github.com/libp2p/go-libp2p-record v0.1.3 h1:R27hoScIhQf/A8XJZ8lYpnqh9LatJ5YbHs28kCIfql0= github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE= @@ -887,6 +960,7 @@ github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaT github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= +github.com/libp2p/go-libp2p-swarm v0.2.8 h1:cIUUvytBzNQmGSjnXFlI6UpoBGsaud82mJPIJVfkDlg= github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -894,7 +968,9 @@ github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MB github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= +github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8 h1:v4dvk7YEW8buwCdIVWnhpv0Hp/AAJKRWIxBhmLRZrsk= github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= +github.com/libp2p/go-libp2p-tls v0.1.3 h1:twKMhMu44jQO+HgQK9X8NHO5HkeJu2QbhLzLJpa8oNM= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= @@ -903,6 +979,7 @@ github.com/libp2p/go-libp2p-transport-upgrader v0.0.1/go.mod h1:NJpUAgQab/8K6K0m github.com/libp2p/go-libp2p-transport-upgrader v0.0.4/go.mod h1:RGq+tupk+oj7PzL2kn/m1w6YXxcIAYJYeI90h6BGgUc= github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= +github.com/libp2p/go-libp2p-transport-upgrader v0.3.0 h1:q3ULhsknEQ34eVDhv4YwKS8iet69ffs9+Fir6a7weN4= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8= github.com/libp2p/go-libp2p-yamux v0.1.3/go.mod h1:VGSQVrqkh6y4nm0189qqxMtvyBft44MOYYPpYKXiVt4= @@ -911,6 +988,7 @@ github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZ github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= +github.com/libp2p/go-libp2p-yamux v0.2.8 h1:0s3ELSLu2O7hWKfX1YjzudBKCP0kZ+m9e2+0veXzkn4= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= @@ -921,6 +999,7 @@ github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTW github.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= +github.com/libp2p/go-mplex v0.1.2 h1:qOg1s+WdGLlpkrczDqmhYzyk3vCfsQ8+RxRTQjOZWwI= github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= @@ -930,32 +1009,40 @@ github.com/libp2p/go-msgio v0.0.6 h1:lQ7Uc0kS1wb1EfRxO2Eir/RJoHkHn7t6o+EiwsYIKJA github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= +github.com/libp2p/go-nat v0.0.5 h1:qxnwkco8RLKqVh1NmjQ+tJ8p8khNLFxuElYG/TwqW4Q= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-netroute v0.1.3 h1:1ngWRx61us/EpaKkdqkMjKk/ufr/JlIFYQAxV2XX8Ig= github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.0.7 h1:eCAzdLejcNVBzP/iZM9vqHnQm+XyCEbSSIheIPRGNsw= github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= +github.com/libp2p/go-reuseport v0.0.2 h1:XSG94b1FJfGA01BUrT82imejHQyTxO4jEWqheyCXYvU= github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= +github.com/libp2p/go-reuseport-transport v0.0.4 h1:OZGz0RB620QDGpv300n1zaOcKGGAoGVf8h9txtt/1uM= github.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw= github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= +github.com/libp2p/go-sockaddr v0.1.0 h1:Y4s3/jNoryVRKEBrkJ576F17CPOaMIzUeCsg7dlTDj0= github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= github.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqXJyFvB0mR4A04sQ= github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw= github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= +github.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= github.com/libp2p/go-tcp-transport v0.0.1/go.mod h1:mnjg0o0O5TmXUaUIanYPUqkW4+u6mK0en8rlpA6BBTs= github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o= github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= +github.com/libp2p/go-tcp-transport v0.2.1 h1:ExZiVQV+h+qL16fzCWtd1HSzPsqWottJ8KXwWaVi8Ns= github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= @@ -965,6 +1052,7 @@ github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw github.com/libp2p/go-ws-transport v0.1.2/go.mod h1:dsh2Ld8F+XNmzpkaAijmg5Is+e9l6/1tK/6VFOdN69Y= github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= +github.com/libp2p/go-ws-transport v0.3.1 h1:ZX5rWB8nhRRJVaPO6tmkGI/Xx8XNboYX20PW5hXIscw= github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= @@ -973,6 +1061,7 @@ github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZ github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= +github.com/libp2p/go-yamux v1.3.7 h1:v40A1eSPJDIZwz2AvrV3cxpTZEGDP11QJbukmEhYyQI= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= @@ -998,6 +1087,7 @@ github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -1012,6 +1102,7 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -1033,6 +1124,7 @@ github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= +github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= @@ -1252,6 +1344,7 @@ github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmO github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= @@ -1267,9 +1360,12 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -1279,6 +1375,7 @@ github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJP github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= @@ -1300,19 +1397,23 @@ github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= @@ -1322,6 +1423,7 @@ github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFC github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= +github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= @@ -1355,6 +1457,7 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1370,6 +1473,7 @@ github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpP github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -1390,8 +1494,10 @@ github.com/terra-project/core v0.4.0-rc.4 h1:6ZK9KyUCRWw5kQmcBmTbKy6RZ8UU2ew9T3N github.com/terra-project/core v0.4.0-rc.4/go.mod h1:QoddSVukyuI5qM0rFp7xvKjTn/aoK3D177MUt1V7YXM= github.com/terra-project/go-cosmwasm v0.10.1-terra h1:3yvESyqndOoJKmmFyGKfQy7rLg2Gz4ULwwoCi4fDqAw= github.com/terra-project/go-cosmwasm v0.10.1-terra/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc= +github.com/terra-project/ledger-terra-go v0.11.1-terra h1:BnwRp8dyJMN5sROg8g6dXc5/Zoi44gd5c8Llf0Nobac= github.com/terra-project/ledger-terra-go v0.11.1-terra/go.mod h1:5fdyEuDNvsymbqag/EaaAeWAgyAebQe2VH38H+DnXnA= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1403,8 +1509,10 @@ github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= @@ -1413,10 +1521,12 @@ github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMI github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= +github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= +github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba h1:X4n8JG2e2biEZZXdBKt9HX7DN3bYGFUqljqqy0DqgnY= github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= @@ -1431,6 +1541,7 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163 h1:TtcUeY2XZSriVWR1pXyfCBWIf/NGC2iUdNw1lofUjUU= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= @@ -1445,6 +1556,7 @@ github.com/whyrusleeping/ledger-filecoin-go v0.9.1-0.20201010031517-c3dcc1bddce4 github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= +github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:E9S12nwJwEOXe2d6gT6qxdvqMnNq+VnSsKPgm2ZZNds= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= @@ -1453,12 +1565,16 @@ github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGw github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f h1:nMhj+x/m7ZQsHBz0L3gpytp0v6ogokdbrQDnhB8Kh7s= github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= +github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= +github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 h1:oWgZJmC1DorFZDpfMfWg7xk29yEOZiXmo/wZl+utTI8= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.12.1/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= @@ -1469,6 +1585,7 @@ go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= @@ -1489,12 +1606,14 @@ go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= +go.uber.org/goleak v1.0.0 h1:qsup4IcBdlmsnGfqyLl4Ntn3C2XCCuKAE7DwHpScyUo= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1502,6 +1621,7 @@ go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1547,6 +1667,7 @@ golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200513190911-00229845015e h1:rMqLP+9XLy+LdbCXHjJHAmTfXCr93W7oruWA6Hq1Alc= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1559,6 +1680,7 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367 h1:0IiAsCRByjO2QjX7ZPkw5oU9x+n1YqRL802rjC0c3Aw= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -1567,6 +1689,7 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1628,6 +1751,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1743,6 +1867,7 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3 h1:r3P/5xOq/dK1991B65Oy6E1fRF/2d/fSYZJ/fXGVfJc= golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1824,11 +1949,14 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1856,6 +1984,7 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1863,14 +1992,20 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= From 4f09bb5b1926aa535e3e01166ef36bdd7437d314 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Thu, 12 Nov 2020 10:58:50 +1100 Subject: [PATCH 225/335] chain/filecoin: improve errors --- chain/filecoin/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 05b8e7ad..f15349d4 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -162,7 +162,7 @@ func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (p actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef)) if err != nil { - return pack.U256{}, fmt.Errorf("searching state for addr: %v", addr) + return pack.U256{}, fmt.Errorf("searching state for addr %v: %v", addr, err) } return pack.NewU256FromU64(pack.NewU64(actor.Nonce)), nil @@ -177,7 +177,7 @@ func (client *Client) AccountBalance(ctx context.Context, addr address.Address) actor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef)) if err != nil { - return pack.U256{}, fmt.Errorf("searching state for addr: %v", addr) + return pack.U256{}, fmt.Errorf("searching state for addr %v: %v", addr, err) } balance := actor.Balance.Int From 47e1aac048712959399d962c12ea4afc5844e8f0 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 13 Nov 2020 12:54:18 +1100 Subject: [PATCH 226/335] chain/cosmos, chain/terra: set bech32 prefix on boot --- chain/cosmos/address.go | 18 +++++++----------- chain/cosmos/client.go | 6 ------ chain/cosmos/tx.go | 2 -- chain/terra/address_test.go | 2 +- chain/terra/terra.go | 14 ++++++++++++++ chain/terra/terra_test.go | 2 +- multichain_test.go | 8 ++++---- 7 files changed, 27 insertions(+), 25 deletions(-) diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index 63f9c172..33f63274 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -28,37 +28,34 @@ type AddressEncodeDecoder struct { } // NewAddressEncodeDecoder creates a new address encoder-decoder -func NewAddressEncodeDecoder(hrp string) AddressEncodeDecoder { +func NewAddressEncodeDecoder() AddressEncodeDecoder { return AddressEncodeDecoder{ - AddressEncoder: NewAddressEncoder(hrp), - AddressDecoder: NewAddressDecoder(hrp), + AddressEncoder: NewAddressEncoder(), + AddressDecoder: NewAddressDecoder(), } } // AddressEncoder implements the address.Encoder interface type AddressEncoder struct { - hrp string } // AddressDecoder implements the address.Decoder interface type AddressDecoder struct { - hrp string } // NewAddressDecoder creates a new address decoder -func NewAddressDecoder(hrp string) AddressDecoder { - return AddressDecoder{hrp: hrp} +func NewAddressDecoder() AddressDecoder { + return AddressDecoder{} } // NewAddressEncoder creates a new address encoder -func NewAddressEncoder(hrp string) AddressEncoder { - return AddressEncoder{hrp: hrp} +func NewAddressEncoder() AddressEncoder { + return AddressEncoder{} } // DecodeAddress consumes a human-readable representation of a cosmos // compatible address and decodes it to its raw bytes representation. func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { - sdk.GetConfig().SetBech32PrefixForAccount(decoder.hrp, decoder.hrp+"pub") rawAddr, err := sdk.AccAddressFromBech32(string(addr)) if err != nil { return nil, err @@ -69,7 +66,6 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd // EncodeAddress consumes raw bytes and encodes them to a human-readable // address format. func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { - sdk.GetConfig().SetBech32PrefixForAccount(encoder.hrp, encoder.hrp+"pub") bech32Addr := sdk.AccAddress(rawAddr) return address.Address(bech32Addr.String()), nil } diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index d231a68c..5ca24533 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -169,8 +169,6 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // AccountNonce returns the current nonce of the account. This is the nonce to // be used while building a new transaction. func (client *Client) AccountNonce(_ context.Context, addr address.Address) (pack.U256, error) { - types.GetConfig().SetBech32PrefixForAccount(client.hrp, client.hrp+"pub") - cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) @@ -187,8 +185,6 @@ func (client *Client) AccountNonce(_ context.Context, addr address.Address) (pac // AccountNumber returns the account number for a given address. func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pack.U64, error) { - types.GetConfig().SetBech32PrefixForAccount(client.hrp, client.hrp+"pub") - cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return 0, fmt.Errorf("bad address: '%v': %v", addr, err) @@ -205,8 +201,6 @@ func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pa // AccountBalance returns the account balancee for a given address. func (client *Client) AccountBalance(_ context.Context, addr address.Address) (pack.U256, error) { - types.GetConfig().SetBech32PrefixForAccount(client.hrp, client.hrp+"pub") - cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) diff --git a/chain/cosmos/tx.go b/chain/cosmos/tx.go index 5a91d39d..b96f229a 100644 --- a/chain/cosmos/tx.go +++ b/chain/cosmos/tx.go @@ -65,8 +65,6 @@ func NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder { // This transaction is unsigned, and must be signed before submitting to the // cosmos chain. func (builder txBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) { - types.GetConfig().SetBech32PrefixForAccount(builder.client.hrp, builder.client.hrp+"pub") - fromAddr, err := types.AccAddressFromBech32(string(from)) if err != nil { return nil, err diff --git a/chain/terra/address_test.go b/chain/terra/address_test.go index cb31d74b..9aeb8729 100644 --- a/chain/terra/address_test.go +++ b/chain/terra/address_test.go @@ -13,7 +13,7 @@ var _ = Describe("Terra", func() { Context("when decoding address", func() { Context("when decoding Terra address", func() { It("should work", func() { - decoder := terra.NewAddressDecoder("terra") + decoder := terra.NewAddressDecoder() addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" _, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) diff --git a/chain/terra/terra.go b/chain/terra/terra.go index 31a70dfc..4d6137e0 100644 --- a/chain/terra/terra.go +++ b/chain/terra/terra.go @@ -1,6 +1,7 @@ package terra import ( + "github.com/cosmos/cosmos-sdk/types" "github.com/renproject/multichain/api/account" "github.com/renproject/multichain/chain/cosmos" "github.com/terra-project/core/app" @@ -28,6 +29,19 @@ var ( NewGasEstimator = cosmos.NewGasEstimator ) +// Set the Bech32 address prefix for the globally-defined config variable inside +// Cosmos SDK. This is required as there are a number of functions inside the +// SDK that make use of this global config directly, instead of allowing us to +// provide a custom config. +func init() { + // TODO: This will prevent us from being able to support multiple + // Cosmos-compatible chains in the Multichain. This is expected to be + // resolved before v1.0 of the Cosmos SDK (issue being tracked here: + // https://github.com/cosmos/cosmos-sdk/issues/7448). + types.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") + types.GetConfig().Seal() +} + // NewClient returns returns a new Client with Terra codec. func NewClient(opts ClientOptions) *Client { return cosmos.NewClient(opts, app.MakeCodec(), "terra") diff --git a/chain/terra/terra_test.go b/chain/terra/terra_test.go index 8c5b6d5f..c462c68c 100644 --- a/chain/terra/terra_test.go +++ b/chain/terra/terra_test.go @@ -48,7 +48,7 @@ var _ = Describe("Terra", func() { // random recipient pkRecipient := secp256k1.GenPrivKey() - addrEncoder := terra.NewAddressEncoder("terra") + addrEncoder := terra.NewAddressEncoder() recipient, err := addrEncoder.EncodeAddress(address.RawAddress(pack.Bytes(pkRecipient.PubKey().Address()))) Expect(err).NotTo(HaveOccurred()) diff --git a/multichain_test.go b/multichain_test.go index 98d578ab..4fc32f5b 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -146,7 +146,7 @@ var _ = Describe("Multichain", func() { { multichain.Terra, func() multichain.AddressEncodeDecoder { - return terra.NewAddressEncodeDecoder("terra") + return terra.NewAddressEncodeDecoder() }, func() multichain.Address { pk := secp256k1.GenPrivKey() @@ -317,7 +317,7 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBytes) - addrEncoder := terra.NewAddressEncoder("terra") + addrEncoder := terra.NewAddressEncoder() senderAddr, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(pk.PubKey().Address()))) Expect(err).NotTo(HaveOccurred()) senderPrivKey := id.PrivKey{} @@ -330,7 +330,7 @@ var _ = Describe("Multichain", func() { Expect(err).NotTo(HaveOccurred()) var pk secp256k1.PrivKeySecp256k1 copy(pk[:], pkBytes) - addrEncoder := terra.NewAddressEncoder("terra") + addrEncoder := terra.NewAddressEncoder() addr, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(pk.PubKey().Address()))) Expect(err).NotTo(HaveOccurred()) return addr @@ -338,7 +338,7 @@ var _ = Describe("Multichain", func() { "http://127.0.0.1:26657", func() multichain.Address { recipientKey := secp256k1.GenPrivKey() - addrEncoder := terra.NewAddressEncoder("terra") + addrEncoder := terra.NewAddressEncoder() recipient, err := addrEncoder.EncodeAddress(multichain.RawAddress(pack.Bytes(recipientKey.PubKey().Address()))) Expect(err).NotTo(HaveOccurred()) return recipient From 4e5e107c6dd44aa3e2f398e71cf1fe7aa0432a8c Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 13 Nov 2020 14:24:21 +1100 Subject: [PATCH 227/335] multichain_test: fix modifying sealed config --- multichain_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/multichain_test.go b/multichain_test.go index 4fc32f5b..83181ef5 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -150,7 +150,6 @@ var _ = Describe("Multichain", func() { }, func() multichain.Address { pk := secp256k1.GenPrivKey() - cosmossdk.GetConfig().SetBech32PrefixForAccount("terra", "terrapub") addr := cosmossdk.AccAddress(pk.PubKey().Address()) return multichain.Address(addr.String()) }, From c02a353a3a878cc6e0dcb32b01da5fca056cb11e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 1 Dec 2020 17:15:14 +0530 Subject: [PATCH 228/335] feat: client to expose latest block api --- api/account/account.go | 3 +++ api/utxo/utxo.go | 3 +++ chain/bitcoin/bitcoin.go | 10 ++++++++++ chain/cosmos/client.go | 11 +++++++++++ chain/filecoin/client.go | 20 +++++++++++++++----- multichain_test.go | 24 ++++++++++++++++++++++++ 6 files changed, 66 insertions(+), 5 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index 6f36c48d..e3cc6fe5 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -62,6 +62,9 @@ type TxBuilder interface { // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { + // LatestBlock returns the most recent block. + LatestBlock(context.Context) (pack.U64, error) + // AccountBalance returns the current balance of the given account. AccountBalance(context.Context, address.Address) (pack.U256, error) diff --git a/api/utxo/utxo.go b/api/utxo/utxo.go index 11e0c872..ea753ae8 100644 --- a/api/utxo/utxo.go +++ b/api/utxo/utxo.go @@ -80,6 +80,9 @@ type TxBuilder interface { // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { + // LatestBlock returns the most recent block. + LatestBlock(context.Context) (pack.U64, error) + // Output returns the transaction output identified by the given outpoint. // It also returns the number of confirmations for the output. If the output // cannot be found before the context is done, or the output is invalid, diff --git a/chain/bitcoin/bitcoin.go b/chain/bitcoin/bitcoin.go index f23936ab..932c91c4 100644 --- a/chain/bitcoin/bitcoin.go +++ b/chain/bitcoin/bitcoin.go @@ -109,6 +109,16 @@ func NewClient(opts ClientOptions) Client { } } +// LatestBlock returns the most recent block. +func (client *client) LatestBlock(ctx context.Context) (pack.U64, error) { + var resp int64 + if err := client.send(ctx, &resp, "getblockcount"); err != nil { + return pack.NewU64(0), fmt.Errorf("get block count: %v", err) + } + + return pack.NewU64(uint64(resp)), nil +} + // Output associated with an outpoint, and its number of confirmations. func (client *client) Output(ctx context.Context, outpoint utxo.Outpoint) (utxo.Output, pack.U64, error) { resp := btcjson.TxRawResult{} diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 5ca24533..5a980403 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -13,6 +13,7 @@ import ( "github.com/renproject/pack" cliContext "github.com/cosmos/cosmos-sdk/client/context" + cliRpc "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" @@ -127,6 +128,16 @@ func NewClient(opts ClientOptions, cdc *codec.Codec, hrp string) *Client { } } +// LatestBlock returns the most recent block's number. +func (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) { + height, err := cliRpc.GetChainHeight(client.cliCtx) + if err != nil { + return pack.NewU64(0), fmt.Errorf("get chain height: %v", err) + } + + return pack.NewU64(uint64(height)), nil +} + // Tx query transaction with txHash func (client *Client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) { res, err := utils.QueryTx(client.cliCtx, hex.EncodeToString(txHash[:])) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index f15349d4..05d29aa6 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -85,6 +85,16 @@ func NewClient(opts ClientOptions) (*Client, error) { return &Client{opts, node, closer}, nil } +// LatestBlock returns the most recent block height. +func (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) { + headTipset, err := client.node.ChainHead(ctx) + if err != nil { + return pack.NewU64(0), fmt.Errorf("get chain head: %v", err) + } + + return pack.NewU64(uint64(headTipset.Height())), nil +} + // Tx returns the transaction uniquely identified by the given transaction // hash. It also returns the number of confirmations for the transaction. func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) { @@ -107,13 +117,13 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack } // get the most recent tipset and its height - headTipset, err := client.node.ChainHead(ctx) + chainHead, err := client.LatestBlock(ctx) if err != nil { - return nil, pack.NewU64(0), fmt.Errorf("getting head from chain: %v", err) + return nil, pack.NewU64(0), err } - confs := headTipset.Height() - messageLookup.Height + 1 + confs := uint64(chainHead) - uint64(messageLookup.Height) + 1 if confs < 0 { - return nil, pack.NewU64(0), fmt.Errorf("getting head from chain: negative confirmations") + return nil, pack.NewU64(0), fmt.Errorf("get chain head: negative confirmations") } // get the message @@ -122,7 +132,7 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack return nil, pack.NewU64(0), fmt.Errorf("getting txid %v from chain: %v", msgID, err) } - return &Tx{msg: *msg}, pack.NewU64(uint64(confs)), nil + return &Tx{msg: *msg}, pack.NewU64(confs), nil } // SubmitTx to the underlying blockchain network. diff --git a/multichain_test.go b/multichain_test.go index 83181ef5..57f4c985 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -515,6 +515,15 @@ var _ = Describe("Multichain", func() { time.Sleep(5 * time.Second) } }) + + It("should be able to fetch the latest block", func() { + // Initialise client + accountClient, _ := accountChain.initialise(accountChain.rpcURL) + + latestBlock, err := accountClient.LatestBlock(ctx) + Expect(err).NotTo(HaveOccurred()) + Expect(uint64(latestBlock)).To(BeNumerically(">", 1)) + }) }) } }) @@ -976,6 +985,21 @@ var _ = Describe("Multichain", func() { time.Sleep(10 * time.Second) } }) + + It("should be able to fetch the latest block", func() { + // get a random address + randAddr := make([]byte, 20) + rand.Read(randAddr) + pkhAddr, err := utxoChain.newAddressPKH(randAddr) + Expect(err).NotTo(HaveOccurred()) + + // initialise client + utxoClient, _, _ := utxoChain.initialise(utxoChain.rpcURL, pkhAddr) + + latestBlock, err := utxoClient.LatestBlock(ctx) + Expect(err).NotTo(HaveOccurred()) + Expect(uint64(latestBlock)).To(BeNumerically(">", 1)) + }) }) } }) From d4914055e6920d5aa0677136cd2ebf01dc015611 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 1 Dec 2020 17:23:52 +0530 Subject: [PATCH 229/335] chore: docs for the latest block methods --- api/account/account.go | 2 +- api/utxo/utxo.go | 2 +- chain/bitcoin/bitcoin.go | 2 +- chain/filecoin/client.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/account/account.go b/api/account/account.go index e3cc6fe5..82215edc 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -62,7 +62,7 @@ type TxBuilder interface { // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { - // LatestBlock returns the most recent block. + // LatestBlock returns the block number of the latest block. LatestBlock(context.Context) (pack.U64, error) // AccountBalance returns the current balance of the given account. diff --git a/api/utxo/utxo.go b/api/utxo/utxo.go index ea753ae8..f0c39a20 100644 --- a/api/utxo/utxo.go +++ b/api/utxo/utxo.go @@ -80,7 +80,7 @@ type TxBuilder interface { // The Client interface defines the functionality required to interact with a // chain over RPC. type Client interface { - // LatestBlock returns the most recent block. + // LatestBlock returns the the height of the longest blockchain. LatestBlock(context.Context) (pack.U64, error) // Output returns the transaction output identified by the given outpoint. diff --git a/chain/bitcoin/bitcoin.go b/chain/bitcoin/bitcoin.go index 932c91c4..bea76756 100644 --- a/chain/bitcoin/bitcoin.go +++ b/chain/bitcoin/bitcoin.go @@ -109,7 +109,7 @@ func NewClient(opts ClientOptions) Client { } } -// LatestBlock returns the most recent block. +// LatestBlock returns the height of the longest blockchain. func (client *client) LatestBlock(ctx context.Context) (pack.U64, error) { var resp int64 if err := client.send(ctx, &resp, "getblockcount"); err != nil { diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 05d29aa6..5222848d 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -85,7 +85,7 @@ func NewClient(opts ClientOptions) (*Client, error) { return &Client{opts, node, closer}, nil } -// LatestBlock returns the most recent block height. +// LatestBlock returns the block number at the current chain head. func (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) { headTipset, err := client.node.ChainHead(ctx) if err != nil { From 7d0bfb69653ac583c805ad899919623f257d8f90 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Dec 2020 08:35:06 +0000 Subject: [PATCH 230/335] ci: upgrade bitcoin cash node --- infra/bitcoincash/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/infra/bitcoincash/Dockerfile b/infra/bitcoincash/Dockerfile index fd3765a8..085e635a 100644 --- a/infra/bitcoincash/Dockerfile +++ b/infra/bitcoincash/Dockerfile @@ -1,14 +1,16 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic # Install bitcoind-abc. RUN apt-get update && apt-get install --yes software-properties-common && \ -add-apt-repository --yes ppa:bitcoin-abc/ppa && apt-get update && \ +add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update && \ +apt-get install --yes g++-7 && \ +add-apt-repository ppa:bitcoin-cash-node/ppa && apt-get update && \ apt-get install --yes bitcoind COPY bitcoin.conf /root/.bitcoin/ COPY run.sh /root/ RUN chmod +x /root/run.sh -EXPOSE 18443 +EXPOSE 19443 -ENTRYPOINT ["./root/run.sh"] \ No newline at end of file +ENTRYPOINT ["./root/run.sh"] From 64d9967e2b2d3e9c4778aa70396581c4e744b170 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 2 Dec 2020 18:41:14 +0530 Subject: [PATCH 231/335] fix: check negative bound for chain head --- chain/bitcoin/bitcoin.go | 3 +++ chain/cosmos/client.go | 3 +++ chain/filecoin/client.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/chain/bitcoin/bitcoin.go b/chain/bitcoin/bitcoin.go index bea76756..c51464bc 100644 --- a/chain/bitcoin/bitcoin.go +++ b/chain/bitcoin/bitcoin.go @@ -115,6 +115,9 @@ func (client *client) LatestBlock(ctx context.Context) (pack.U64, error) { if err := client.send(ctx, &resp, "getblockcount"); err != nil { return pack.NewU64(0), fmt.Errorf("get block count: %v", err) } + if resp < 0 { + return pack.NewU64(0), fmt.Errorf("unexpected block count, expected > 0, got: %v", resp) + } return pack.NewU64(uint64(resp)), nil } diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 5a980403..e47120e3 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -134,6 +134,9 @@ func (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) { if err != nil { return pack.NewU64(0), fmt.Errorf("get chain height: %v", err) } + if height < 0 { + return pack.NewU64(0), fmt.Errorf("unexpected chain height, expected > 0, got: %v", height) + } return pack.NewU64(uint64(height)), nil } diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 5222848d..08173711 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -91,6 +91,9 @@ func (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) { if err != nil { return pack.NewU64(0), fmt.Errorf("get chain head: %v", err) } + if headTipset.Height() < 0 { + return pack.NewU64(0), fmt.Errorf("unexpected chain head, expected > 0, got: %v", headTipset.Height()) + } return pack.NewU64(uint64(headTipset.Height())), nil } From 897ce1ae038b5038f5ef8b0abc7d36b6843078fc Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 21 Dec 2020 11:42:50 +0530 Subject: [PATCH 232/335] feat: support segwit addresses for bitcoin --- chain/bitcoin/address.go | 65 +++++++++++++++++++++++++++++-- multichain_test.go | 83 ++++++++++++++++++++++++++++++++-------- 2 files changed, 128 insertions(+), 20 deletions(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 3228c374..cb4d037b 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -2,10 +2,12 @@ package bitcoin import ( "fmt" + "strings" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" + "github.com/btcsuite/btcutil/bech32" "github.com/renproject/multichain/api/address" ) @@ -17,9 +19,9 @@ type AddressEncodeDecoder struct { // NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the // chain specific configurations -func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { +func NewAddressEncodeDecoder(params *chaincfg.Params, hrp string) AddressEncodeDecoder { return AddressEncodeDecoder{ - AddressEncoder: NewAddressEncoder(params), + AddressEncoder: NewAddressEncoder(params, hrp), AddressDecoder: NewAddressDecoder(params), } } @@ -28,16 +30,28 @@ func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { // the address.Encoder interface type AddressEncoder struct { params *chaincfg.Params + hrp string } // NewAddressEncoder constructs a new AddressEncoder with the chain specific // configurations -func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { - return AddressEncoder{params: params} +func NewAddressEncoder(params *chaincfg.Params, hrp string) AddressEncoder { + return AddressEncoder{params: params, hrp: hrp} } // EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + switch len(rawAddr) { + case 25: + return encoder.encodeBase58(rawAddr) + case 21: + return encoder.encodeBech32(rawAddr) + default: + return address.Address(""), fmt.Errorf("non-exhaustive pattern: raw address length %v", len(rawAddr)) + } +} + +func (encoder AddressEncoder) encodeBase58(rawAddr address.RawAddress) (address.Address, error) { // Validate that the base58 address is in fact in correct format. encodedAddr := base58.Encode([]byte(rawAddr)) if _, err := btcutil.DecodeAddress(encodedAddr, encoder.params); err != nil { @@ -47,6 +61,20 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address return address.Address(encodedAddr), nil } +func (encoder AddressEncoder) encodeBech32(rawAddr address.RawAddress) (address.Address, error) { + addrBase32, err := bech32.ConvertBits([]byte(rawAddr), 8, 5, false) + if err != nil { + return address.Address(""), fmt.Errorf("convert base: %v", err) + } + + addr, err := bech32.Encode(encoder.hrp, addrBase32) + if err != nil { + return address.Address(""), fmt.Errorf("encode bech32: %v", err) + } + + return address.Address(addr), nil +} + // AddressDecoder encapsulates the chain specific configurations and implements // the address.Decoder interface type AddressDecoder struct { @@ -61,6 +89,21 @@ func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { // DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { + if strings.HasPrefix(string(addr), "1") || + strings.HasPrefix(string(addr), "2") || + strings.HasPrefix(string(addr), "3") || + strings.HasPrefix(string(addr), "m") || + strings.HasPrefix(string(addr), "n") { + return decoder.decodeBase58(addr) + } else if strings.HasPrefix(string(addr), "bc") || + strings.HasPrefix(string(addr), "tb") { + return decoder.decodeBech32(addr) + } else { + return nil, fmt.Errorf("non-exhaustive pattern: address %v", addr) + } +} + +func (decoder AddressDecoder) decodeBase58(addr address.Address) (address.RawAddress, error) { // Decode the checksummed base58 format address. decoded, ver, err := base58.CheckDecode(string(addr)) if err != nil { @@ -78,3 +121,17 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd return nil, fmt.Errorf("unexpected address prefix") } } + +func (decoder AddressDecoder) decodeBech32(addr address.Address) (address.RawAddress, error) { + _, dataBase32, err := bech32.Decode(string(addr)) + if err != nil { + return nil, fmt.Errorf("decoding: %v", err) + } + + rawAddr, err := bech32.ConvertBits(dataBase32, 5, 8, true) + if err != nil { + return nil, fmt.Errorf("convert base: %v", err) + } + + return address.RawAddress(rawAddr), nil +} diff --git a/multichain_test.go b/multichain_test.go index 57f4c985..5bd4e47f 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -11,6 +11,7 @@ import ( "os/exec" "reflect" "strings" + "testing/quick" "time" "github.com/btcsuite/btcd/btcec" @@ -18,6 +19,7 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" + "github.com/btcsuite/btcutil/bech32" cosmossdk "github.com/cosmos/cosmos-sdk/types" filaddress "github.com/filecoin-project/go-address" filtypes "github.com/filecoin-project/lotus/chain/types" @@ -42,6 +44,9 @@ import ( ) var _ = Describe("Multichain", func() { + // new randomness + r := rand.New(rand.NewSource(time.Now().UnixNano())) + // Create context to work within. ctx := context.Background() @@ -66,7 +71,7 @@ var _ = Describe("Multichain", func() { { multichain.Bitcoin, func() multichain.AddressEncodeDecoder { - addrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + addrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams, "bc") return addrEncodeDecoder }, func() multichain.Address { @@ -98,8 +103,8 @@ var _ = Describe("Multichain", func() { }, func() multichain.Address { // Random bytes of script. - script := make([]byte, rand.Intn(100)) - rand.Read(script) + script := make([]byte, r.Intn(100)) + r.Read(script) // Create address script hash from the random script bytes. addrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) @@ -108,8 +113,8 @@ var _ = Describe("Multichain", func() { }, func() multichain.RawAddress { // Random bytes of script. - script := make([]byte, rand.Intn(100)) - rand.Read(script) + script := make([]byte, r.Intn(100)) + r.Read(script) // Create address script hash from the random script bytes. addrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) @@ -125,14 +130,14 @@ var _ = Describe("Multichain", func() { }, func() multichain.Address { pubKey := make([]byte, 64) - rand.Read(pubKey) + r.Read(pubKey) addr, err := filaddress.NewSecp256k1Address(pubKey) Expect(err).NotTo(HaveOccurred()) return multichain.Address(addr.String()) }, func() multichain.RawAddress { rawAddr := make([]byte, 20) - rand.Read(rawAddr) + r.Read(rawAddr) formattedRawAddr := append([]byte{byte(filaddress.SECP256K1)}, rawAddr[:]...) return multichain.RawAddress(pack.NewBytes(formattedRawAddr[:])) }, @@ -191,15 +196,15 @@ var _ = Describe("Multichain", func() { return multichain.RawAddress(pack.Bytes(addrBytes)) }, func() multichain.Address { - script := make([]byte, rand.Intn(100)) - rand.Read(script) + script := make([]byte, r.Intn(100)) + r.Read(script) addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) return multichain.Address(addrScriptHash.EncodeAddress()) }, func() multichain.RawAddress { - script := make([]byte, rand.Intn(100)) - rand.Read(script) + script := make([]byte, r.Intn(100)) + r.Read(script) addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) @@ -231,15 +236,15 @@ var _ = Describe("Multichain", func() { return multichain.RawAddress(pack.Bytes(base58.Decode(addrPubKeyHash.EncodeAddress()))) }, func() multichain.Address { - script := make([]byte, rand.Intn(100)) - rand.Read(script) + script := make([]byte, r.Intn(100)) + r.Read(script) addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) return multichain.Address(addrScriptHash.EncodeAddress()) }, func() multichain.RawAddress { - script := make([]byte, rand.Intn(100)) - rand.Read(script) + script := make([]byte, r.Intn(100)) + r.Read(script) addrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams) Expect(err).NotTo(HaveOccurred()) return multichain.RawAddress(pack.Bytes(base58.Decode(addrScriptHash.EncodeAddress()))) @@ -289,6 +294,52 @@ var _ = Describe("Multichain", func() { Expect(encodedAddr).To(Equal(scriptAddr)) }) } + + if chain.chain == multichain.Bitcoin { + It("should decode a Bech32 address correctly", func() { + segwitAddrs := []string{ + "bc1qp3gcp95e85rupv9zgj57j0lvsqnzcehawzaax3", + "bc1qh6fjfx39ae4ahvusc4eggyrwjm65zyu83mzwlx", + "bc1q3zqxadsagdwjp2fpddn8dk5ge8lf0nn0p750ar", + "bc1q2lthuszmh0mynte4nzsfqtjjseu6fdrmeffr62", + "bc1qdqkfrt2hpgncqwut88809he6wxysfw8w3cgsh4", + "bc1qna5zwwuqcst3dqqx8rmwa66jpa45w28tlypg54", + "bc1qjk2ytl6uctuxfsyf8dn6ptwfsthfat4hd78l0m", + "bc1qyg6zhg9dhmkj0wz4svsdz6g0ujll225v0wc5hx", + "bc1quvtmmjccre6plqslujw7qcy820fycg2q2a73an", + "bc1qztxl2qc3k90uud846qfeawqzz3aedhq48vv3lu", + "bc1qvkknfkfhfr0axql478klvjs6sanwj6njym5wf2", + "bc1qya5t2pj7hqpezcnwh72k69h4cgg3srqwtd0e6w", + } + for _, segwitAddr := range segwitAddrs { + decodedRawAddr, err := encodeDecoder.DecodeAddress(multichain.Address(segwitAddr)) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(string(encodedAddr)).To(Equal(segwitAddr)) + } + }) + + It("should encode a Bech32 address correctly", func() { + f := func() bool { + randBytesBase32 := make([]byte, 33) + for i := range randBytesBase32 { + randBytesBase32[i] = byte(r.Intn(32)) + } + randBytes, err := bech32.ConvertBits(randBytesBase32, 5, 8, true) + Expect(err).NotTo(HaveOccurred()) + + rawAddr := multichain.RawAddress(randBytes) + encodedAddr, err := encodeDecoder.EncodeAddress(rawAddr) + Expect(err).NotTo(HaveOccurred()) + decodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(decodedRawAddr).To(Equal(rawAddr)) + return true + } + Expect(quick.Check(f, nil)).To(Succeed()) + }) + } }) } }) @@ -989,7 +1040,7 @@ var _ = Describe("Multichain", func() { It("should be able to fetch the latest block", func() { // get a random address randAddr := make([]byte, 20) - rand.Read(randAddr) + r.Read(randAddr) pkhAddr, err := utxoChain.newAddressPKH(randAddr) Expect(err).NotTo(HaveOccurred()) From 89a9b8bdae34f8e96fdfdf63216f8bec4c789281 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 22 Dec 2020 12:51:16 +0530 Subject: [PATCH 233/335] fix: bech32 length not restricted --- chain/bitcoin/address.go | 11 ++++++++--- multichain_test.go | 14 +++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index cb4d037b..9d20df55 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -11,6 +11,13 @@ import ( "github.com/renproject/multichain/api/address" ) +const ( + // MainnetHRP is the human-readable part of the bech32 address for mainnet. + MainnetHRP = "bc" + // TestnetHRP is the human-readable part of the bech32 address for testnet. + TestnetHRP = "tb" +) + // AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder @@ -44,10 +51,8 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address switch len(rawAddr) { case 25: return encoder.encodeBase58(rawAddr) - case 21: - return encoder.encodeBech32(rawAddr) default: - return address.Address(""), fmt.Errorf("non-exhaustive pattern: raw address length %v", len(rawAddr)) + return encoder.encodeBech32(rawAddr) } } diff --git a/multichain_test.go b/multichain_test.go index 5bd4e47f..5ec8b627 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -310,6 +310,7 @@ var _ = Describe("Multichain", func() { "bc1qztxl2qc3k90uud846qfeawqzz3aedhq48vv3lu", "bc1qvkknfkfhfr0axql478klvjs6sanwj6njym5wf2", "bc1qya5t2pj7hqpezcnwh72k69h4cgg3srqwtd0e6w", + "bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k7grplx", } for _, segwitAddr := range segwitAddrs { decodedRawAddr, err := encodeDecoder.DecodeAddress(multichain.Address(segwitAddr)) @@ -321,11 +322,18 @@ var _ = Describe("Multichain", func() { }) It("should encode a Bech32 address correctly", func() { - f := func() bool { - randBytesBase32 := make([]byte, 33) + loop := func() bool { + l := 33 + f := byte(0) + if r.Intn(2) == 1 { + l = 65 + f = 1 + } + randBytesBase32 := make([]byte, l) for i := range randBytesBase32 { randBytesBase32[i] = byte(r.Intn(32)) } + randBytesBase32[0] = f randBytes, err := bech32.ConvertBits(randBytesBase32, 5, 8, true) Expect(err).NotTo(HaveOccurred()) @@ -337,7 +345,7 @@ var _ = Describe("Multichain", func() { Expect(decodedRawAddr).To(Equal(rawAddr)) return true } - Expect(quick.Check(f, nil)).To(Succeed()) + Expect(quick.Check(loop, nil)).To(Succeed()) }) } }) From 8ee714dfea35a624f506647bf2f7cc77463b0ec8 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 22 Dec 2020 16:18:01 +0530 Subject: [PATCH 234/335] fix: use btcutil for decoding --- chain/bitcoin/address.go | 97 ++++++++++++++-------------------------- multichain_test.go | 31 +++++-------- 2 files changed, 45 insertions(+), 83 deletions(-) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 9d20df55..8f875e90 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -2,22 +2,13 @@ package bitcoin import ( "fmt" - "strings" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" - "github.com/btcsuite/btcutil/bech32" "github.com/renproject/multichain/api/address" ) -const ( - // MainnetHRP is the human-readable part of the bech32 address for mainnet. - MainnetHRP = "bc" - // TestnetHRP is the human-readable part of the bech32 address for testnet. - TestnetHRP = "tb" -) - // AddressEncodeDecoder implements the address.EncodeDecoder interface type AddressEncodeDecoder struct { AddressEncoder @@ -26,9 +17,9 @@ type AddressEncodeDecoder struct { // NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the // chain specific configurations -func NewAddressEncodeDecoder(params *chaincfg.Params, hrp string) AddressEncodeDecoder { +func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder { return AddressEncodeDecoder{ - AddressEncoder: NewAddressEncoder(params, hrp), + AddressEncoder: NewAddressEncoder(params), AddressDecoder: NewAddressDecoder(params), } } @@ -37,13 +28,12 @@ func NewAddressEncodeDecoder(params *chaincfg.Params, hrp string) AddressEncodeD // the address.Encoder interface type AddressEncoder struct { params *chaincfg.Params - hrp string } // NewAddressEncoder constructs a new AddressEncoder with the chain specific // configurations -func NewAddressEncoder(params *chaincfg.Params, hrp string) AddressEncoder { - return AddressEncoder{params: params, hrp: hrp} +func NewAddressEncoder(params *chaincfg.Params) AddressEncoder { + return AddressEncoder{params: params} } // EncodeAddress implements the address.Encoder interface @@ -51,8 +41,10 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address switch len(rawAddr) { case 25: return encoder.encodeBase58(rawAddr) - default: + case 21, 33: return encoder.encodeBech32(rawAddr) + default: + return address.Address(""), fmt.Errorf("non-exhaustive pattern: address length %v", len(rawAddr)) } } @@ -67,17 +59,22 @@ func (encoder AddressEncoder) encodeBase58(rawAddr address.RawAddress) (address. } func (encoder AddressEncoder) encodeBech32(rawAddr address.RawAddress) (address.Address, error) { - addrBase32, err := bech32.ConvertBits([]byte(rawAddr), 8, 5, false) - if err != nil { - return address.Address(""), fmt.Errorf("convert base: %v", err) - } - - addr, err := bech32.Encode(encoder.hrp, addrBase32) - if err != nil { - return address.Address(""), fmt.Errorf("encode bech32: %v", err) + switch len(rawAddr) { + case 21: + addr, err := btcutil.NewAddressWitnessPubKeyHash(rawAddr[1:], encoder.params) + if err != nil { + return address.Address(""), fmt.Errorf("new address witness pubkey hash: %v", err) + } + return address.Address(addr.EncodeAddress()), nil + case 33: + addr, err := btcutil.NewAddressWitnessScriptHash(rawAddr[1:], encoder.params) + if err != nil { + return address.Address(""), fmt.Errorf("new address witness script hash: %v", err) + } + return address.Address(addr.EncodeAddress()), nil + default: + return address.Address(""), fmt.Errorf("non-exhaustive pattern: bech32 address length %v", len(rawAddr)) } - - return address.Address(addr), nil } // AddressDecoder encapsulates the chain specific configurations and implements @@ -94,49 +91,21 @@ func NewAddressDecoder(params *chaincfg.Params) AddressDecoder { // DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { - if strings.HasPrefix(string(addr), "1") || - strings.HasPrefix(string(addr), "2") || - strings.HasPrefix(string(addr), "3") || - strings.HasPrefix(string(addr), "m") || - strings.HasPrefix(string(addr), "n") { - return decoder.decodeBase58(addr) - } else if strings.HasPrefix(string(addr), "bc") || - strings.HasPrefix(string(addr), "tb") { - return decoder.decodeBech32(addr) - } else { - return nil, fmt.Errorf("non-exhaustive pattern: address %v", addr) - } -} - -func (decoder AddressDecoder) decodeBase58(addr address.Address) (address.RawAddress, error) { - // Decode the checksummed base58 format address. - decoded, ver, err := base58.CheckDecode(string(addr)) + decodedAddr, err := btcutil.DecodeAddress(string(addr), decoder.params) if err != nil { - return nil, fmt.Errorf("checking: %v", err) - } - if len(decoded) != 20 { - return nil, fmt.Errorf("expected len 20, got len %v", len(decoded)) + return nil, fmt.Errorf("decode address: %v", err) } - // Validate the address format. - switch ver { - case decoder.params.PubKeyHashAddrID, decoder.params.ScriptHashAddrID: + switch a := decodedAddr.(type) { + case *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash: return address.RawAddress(base58.Decode(string(addr))), nil + case *btcutil.AddressWitnessPubKeyHash: + rawAddr := append([]byte{a.WitnessVersion()}, a.WitnessProgram()...) + return address.RawAddress(rawAddr), nil + case *btcutil.AddressWitnessScriptHash: + rawAddr := append([]byte{a.WitnessVersion()}, a.WitnessProgram()...) + return address.RawAddress(rawAddr), nil default: - return nil, fmt.Errorf("unexpected address prefix") + return nil, fmt.Errorf("non-exhaustive pattern: address %T", a) } } - -func (decoder AddressDecoder) decodeBech32(addr address.Address) (address.RawAddress, error) { - _, dataBase32, err := bech32.Decode(string(addr)) - if err != nil { - return nil, fmt.Errorf("decoding: %v", err) - } - - rawAddr, err := bech32.ConvertBits(dataBase32, 5, 8, true) - if err != nil { - return nil, fmt.Errorf("convert base: %v", err) - } - - return address.RawAddress(rawAddr), nil -} diff --git a/multichain_test.go b/multichain_test.go index 5ec8b627..27f5165e 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -19,7 +19,6 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/base58" - "github.com/btcsuite/btcutil/bech32" cosmossdk "github.com/cosmos/cosmos-sdk/types" filaddress "github.com/filecoin-project/go-address" filtypes "github.com/filecoin-project/lotus/chain/types" @@ -71,7 +70,7 @@ var _ = Describe("Multichain", func() { { multichain.Bitcoin, func() multichain.AddressEncodeDecoder { - addrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams, "bc") + addrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) return addrEncodeDecoder }, func() multichain.Address { @@ -296,6 +295,8 @@ var _ = Describe("Multichain", func() { } if chain.chain == multichain.Bitcoin { + mainnetEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.MainNetParams) + It("should decode a Bech32 address correctly", func() { segwitAddrs := []string{ "bc1qp3gcp95e85rupv9zgj57j0lvsqnzcehawzaax3", @@ -310,12 +311,11 @@ var _ = Describe("Multichain", func() { "bc1qztxl2qc3k90uud846qfeawqzz3aedhq48vv3lu", "bc1qvkknfkfhfr0axql478klvjs6sanwj6njym5wf2", "bc1qya5t2pj7hqpezcnwh72k69h4cgg3srqwtd0e6w", - "bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k7grplx", } for _, segwitAddr := range segwitAddrs { - decodedRawAddr, err := encodeDecoder.DecodeAddress(multichain.Address(segwitAddr)) + decodedRawAddr, err := mainnetEncodeDecoder.DecodeAddress(multichain.Address(segwitAddr)) Expect(err).NotTo(HaveOccurred()) - encodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr) + encodedAddr, err := mainnetEncodeDecoder.EncodeAddress(decodedRawAddr) Expect(err).NotTo(HaveOccurred()) Expect(string(encodedAddr)).To(Equal(segwitAddr)) } @@ -323,24 +323,17 @@ var _ = Describe("Multichain", func() { It("should encode a Bech32 address correctly", func() { loop := func() bool { - l := 33 - f := byte(0) + l := 21 if r.Intn(2) == 1 { - l = 65 - f = 1 - } - randBytesBase32 := make([]byte, l) - for i := range randBytesBase32 { - randBytesBase32[i] = byte(r.Intn(32)) + l = 33 } - randBytesBase32[0] = f - randBytes, err := bech32.ConvertBits(randBytesBase32, 5, 8, true) - Expect(err).NotTo(HaveOccurred()) - + randBytes := make([]byte, l) + r.Read(randBytes) + randBytes[0] = byte(0) rawAddr := multichain.RawAddress(randBytes) - encodedAddr, err := encodeDecoder.EncodeAddress(rawAddr) + encodedAddr, err := mainnetEncodeDecoder.EncodeAddress(rawAddr) Expect(err).NotTo(HaveOccurred()) - decodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr) + decodedRawAddr, err := mainnetEncodeDecoder.DecodeAddress(encodedAddr) Expect(err).NotTo(HaveOccurred()) Expect(decodedRawAddr).To(Equal(rawAddr)) return true From 85c06ebfe092b2aa52f0fc0a5c69ef36921f56c6 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 19 Feb 2021 10:59:40 +1100 Subject: [PATCH 235/335] chain/cosmos: use provided context --- chain/cosmos/client.go | 75 +++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index e47120e3..12b423c7 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -182,58 +182,81 @@ func (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error { // AccountNonce returns the current nonce of the account. This is the nonce to // be used while building a new transaction. -func (client *Client) AccountNonce(_ context.Context, addr address.Address) (pack.U256, error) { +func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) { cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) } - accGetter := auth.NewAccountRetriever(client.cliCtx) - acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) - if err != nil { - return pack.U256{}, err - } + for { + select { + case <-ctx.Done(): + return pack.U256{}, ctx.Err() + default: + } + + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) + if err != nil { + continue + } - return pack.NewU256FromU64(pack.NewU64(acc.GetSequence())), nil + return pack.NewU256FromU64(pack.NewU64(acc.GetSequence())), nil + } } // AccountNumber returns the account number for a given address. -func (client *Client) AccountNumber(_ context.Context, addr address.Address) (pack.U64, error) { +func (client *Client) AccountNumber(ctx context.Context, addr address.Address) (pack.U64, error) { cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return 0, fmt.Errorf("bad address: '%v': %v", addr, err) } - accGetter := auth.NewAccountRetriever(client.cliCtx) - acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) - if err != nil { - return 0, err + for { + select { + case <-ctx.Done(): + return 0, ctx.Err() + default: + } + + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) + if err != nil { + continue + } + return pack.U64(acc.GetAccountNumber()), nil } - - return pack.U64(acc.GetAccountNumber()), nil } // AccountBalance returns the account balancee for a given address. -func (client *Client) AccountBalance(_ context.Context, addr address.Address) (pack.U256, error) { +func (client *Client) AccountBalance(ctx context.Context, addr address.Address) (pack.U256, error) { cosmosAddr, err := types.AccAddressFromBech32(string(addr)) if err != nil { return pack.U256{}, fmt.Errorf("bad address: '%v': %v", addr, err) } - accGetter := auth.NewAccountRetriever(client.cliCtx) - acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) - if err != nil { - return pack.U256{}, err - } + for { + select { + case <-ctx.Done(): + return pack.U256{}, ctx.Err() + default: + } - balance := acc.GetCoins().AmountOf(string(client.opts.CoinDenom)).BigInt() + accGetter := auth.NewAccountRetriever(client.cliCtx) + acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) + if err != nil { + continue + } - // If the balance exceeds `MaxU256`, return an error. - if pack.MaxU256.Int().Cmp(balance) == -1 { - return pack.U256{}, fmt.Errorf("balance %v for %v exceeds MaxU256", balance.String(), addr) - } + balance := acc.GetCoins().AmountOf(string(client.opts.CoinDenom)).BigInt() - return pack.NewU256FromInt(balance), nil + // If the balance exceeds `MaxU256`, return an error. + if pack.MaxU256.Int().Cmp(balance) == -1 { + return pack.U256{}, fmt.Errorf("balance %v for %v exceeds MaxU256", balance.String(), addr) + } + + return pack.NewU256FromInt(balance), nil + } } type transport struct { From fbe8b6b3566fa6ff10885eed5528c7ee856ffc62 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Mon, 22 Feb 2021 13:59:36 +1100 Subject: [PATCH 236/335] chain/cosmos: add retry timeout --- chain/cosmos/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chain/cosmos/client.go b/chain/cosmos/client.go index 12b423c7..ddeb2c86 100644 --- a/chain/cosmos/client.go +++ b/chain/cosmos/client.go @@ -198,6 +198,7 @@ func (client *Client) AccountNonce(ctx context.Context, addr address.Address) (p accGetter := auth.NewAccountRetriever(client.cliCtx) acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) if err != nil { + time.Sleep(client.opts.TimeoutRetry) continue } @@ -222,6 +223,7 @@ func (client *Client) AccountNumber(ctx context.Context, addr address.Address) ( accGetter := auth.NewAccountRetriever(client.cliCtx) acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) if err != nil { + time.Sleep(client.opts.TimeoutRetry) continue } return pack.U64(acc.GetAccountNumber()), nil @@ -245,6 +247,7 @@ func (client *Client) AccountBalance(ctx context.Context, addr address.Address) accGetter := auth.NewAccountRetriever(client.cliCtx) acc, err := accGetter.GetAccount(Address(cosmosAddr).AccAddress()) if err != nil { + time.Sleep(client.opts.TimeoutRetry) continue } From 9a276d5657b7956e3296c39ccaf18498175d1282 Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 23 Feb 2021 11:34:35 +1100 Subject: [PATCH 237/335] fix zcash address decoder --- chain/zcash/address.go | 18 ++++++++++--- chain/zcash/address_test.go | 51 +++++++++++++++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 6 deletions(-) diff --git a/chain/zcash/address.go b/chain/zcash/address.go index 05a07ece..674fb7f3 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -65,11 +65,11 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address var prefix []byte if len(rawAddr) == 26 { prefix = rawAddr[:2] - addrType, _, err = parsePrefix(prefix) + addrType, err = addressType(prefix, encoder.params) copy(hash[:], rawAddr[2:22]) } else { prefix = rawAddr[:1] - addrType, _, err = parsePrefix(prefix) + addrType, err = addressType(prefix, encoder.params) copy(hash[:], rawAddr[1:21]) } if err != nil { @@ -105,10 +105,10 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd var err error var hash [20]byte if len(decoded) == 26 { - addrType, _, err = parsePrefix(decoded[:2]) + addrType, err = addressType(decoded[:2], decoder.params) copy(hash[:], decoded[2:22]) } else { - addrType, _, err = parsePrefix(decoded[:1]) + addrType, err = addressType(decoded[:1], decoder.params) copy(hash[:], decoded[1:21]) } if err != nil { @@ -123,6 +123,16 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd } } +func addressType(prefix []byte, param *Params) (uint8, error) { + if bytes.Equal(prefix, param.P2PKHPrefix) { + return 0, nil + } + if bytes.Equal(prefix, param.P2SHPrefix) { + return 1, nil + } + return 0, btcutil.ErrUnknownAddressType +} + // An Address represents a Zcash address. type Address interface { btcutil.Address diff --git a/chain/zcash/address_test.go b/chain/zcash/address_test.go index a547ebfe..eef41ade 100644 --- a/chain/zcash/address_test.go +++ b/chain/zcash/address_test.go @@ -3,10 +3,11 @@ package zcash_test import ( "math/rand" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcutil" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + + "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcutil" "github.com/renproject/id" "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/chain/zcash" @@ -45,4 +46,50 @@ var _ = Describe("Zcash Address", func() { Expect(encodedAddr).To(Equal(addr)) }) }) + + Context("AddressEncodeDecoder", func() { + It("should give an error when decoding address on different network", func() { + params := []zcash.Params{ + zcash.MainNetParams, + zcash.TestNet3Params, + // zcash.RegressionNetParams, // disable Regression net as it has same prefix as testnet + } + + for i, param := range params { + // Generate a P2PKH address with the params + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), param.Params, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), ¶m) + Expect(err).NotTo(HaveOccurred()) + p2pkhAddr := address.Address(addrPubKeyHash.EncodeAddress()) + + // Generate a P2SH address with the params + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := zcash.NewAddressScriptHash(script, ¶m) + Expect(err).NotTo(HaveOccurred()) + p2shAddr := address.Address(addrScriptHash.EncodeAddress()) + + // Try decode the address using decoders with different network params + for j := range params { + addrEncodeDecoder := zcash.NewAddressEncodeDecoder(¶ms[j]) + _, err := addrEncodeDecoder.DecodeAddress(p2pkhAddr) + // Only the decoder has the same network param should work + if i == j { + Expect(err).NotTo(HaveOccurred()) + } else { + Expect(err).To(HaveOccurred()) + } + + _, err = addrEncodeDecoder.DecodeAddress(p2shAddr) + if i == j { + Expect(err).NotTo(HaveOccurred()) + } else { + Expect(err).To(HaveOccurred()) + } + } + } + }) + }) }) From 1d3fe5df8b5d7669e8588e54b8587b2ab16e605e Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 23 Feb 2021 11:44:57 +1100 Subject: [PATCH 238/335] update if condition in the test --- chain/zcash/address_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chain/zcash/address_test.go b/chain/zcash/address_test.go index eef41ade..49129591 100644 --- a/chain/zcash/address_test.go +++ b/chain/zcash/address_test.go @@ -1,6 +1,7 @@ package zcash_test import ( + "bytes" "math/rand" . "github.com/onsi/ginkgo" @@ -52,7 +53,7 @@ var _ = Describe("Zcash Address", func() { params := []zcash.Params{ zcash.MainNetParams, zcash.TestNet3Params, - // zcash.RegressionNetParams, // disable Regression net as it has same prefix as testnet + zcash.RegressionNetParams, } for i, param := range params { @@ -75,15 +76,16 @@ var _ = Describe("Zcash Address", func() { for j := range params { addrEncodeDecoder := zcash.NewAddressEncodeDecoder(¶ms[j]) _, err := addrEncodeDecoder.DecodeAddress(p2pkhAddr) - // Only the decoder has the same network param should work - if i == j { + // Check the prefix in the params instead of comparing the network directly + // because testnet and regression network has the same prefix. + if bytes.Equal(params[i].P2PKHPrefix, params[j].P2PKHPrefix) { Expect(err).NotTo(HaveOccurred()) } else { Expect(err).To(HaveOccurred()) } _, err = addrEncodeDecoder.DecodeAddress(p2shAddr) - if i == j { + if bytes.Equal(params[i].P2PKHPrefix, params[j].P2PKHPrefix) { Expect(err).NotTo(HaveOccurred()) } else { Expect(err).To(HaveOccurred()) From 3786db73c1bfe0a0bbfcb9bdbc88bf8efb31bc32 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 23 Feb 2021 12:06:00 +0530 Subject: [PATCH 239/335] chore: better errors and cleaning up redundant functions --- chain/zcash/address.go | 113 +++++++++++++++++------------------------ chain/zcash/utxo.go | 2 +- 2 files changed, 47 insertions(+), 68 deletions(-) diff --git a/chain/zcash/address.go b/chain/zcash/address.go index 674fb7f3..10c90b7d 100644 --- a/chain/zcash/address.go +++ b/chain/zcash/address.go @@ -3,7 +3,6 @@ package zcash import ( "bytes" "crypto/sha256" - "errors" "fmt" "github.com/btcsuite/btcd/chaincfg" @@ -55,79 +54,77 @@ func NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder { // EncodeAddress implements the address.Encoder interface func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { - if len(rawAddr) != 26 && len(rawAddr) != 25 { - return address.Address(""), fmt.Errorf("address of unknown length") - } - var addrType uint8 var err error var hash [20]byte var prefix []byte - if len(rawAddr) == 26 { - prefix = rawAddr[:2] - addrType, err = addressType(prefix, encoder.params) - copy(hash[:], rawAddr[2:22]) - } else { + + switch len(rawAddr) { + case ripemd160.Size + 5: prefix = rawAddr[:1] addrType, err = addressType(prefix, encoder.params) copy(hash[:], rawAddr[1:21]) + case ripemd160.Size + 6: + prefix = rawAddr[:2] + addrType, err = addressType(prefix, encoder.params) + copy(hash[:], rawAddr[2:22]) + default: + return address.Address(""), fmt.Errorf("validating address length: expected %v or %v, got %v", ripemd160.Size+5, ripemd160.Size+6, len(rawAddr)) } + if err != nil { - return address.Address(""), fmt.Errorf("parsing prefix: %v", err) + return address.Address(""), fmt.Errorf("parsing address type: %v", err) } switch addrType { case 0, 1: // P2PKH or P2SH return address.Address(pack.String(encodeAddress(hash[:], prefix))), nil default: - return address.Address(""), errors.New("unknown address") + return address.Address(""), fmt.Errorf("unexpected address type: %v", addrType) } } // DecodeAddress implements the address.Decoder interface func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { var decoded = base58.Decode(string(addr)) - if len(decoded) != 26 && len(decoded) != 25 { - return nil, base58.ErrInvalidFormat - } - - var cksum [4]byte - copy(cksum[:], decoded[len(decoded)-4:]) - if checksum(decoded[:len(decoded)-4]) != cksum { - return nil, base58.ErrChecksum - } - - if len(decoded)-6 != ripemd160.Size && len(decoded)-5 != ripemd160.Size { - return nil, errors.New("incorrect payload len") - } - var addrType uint8 var err error var hash [20]byte - if len(decoded) == 26 { - addrType, err = addressType(decoded[:2], decoder.params) - copy(hash[:], decoded[2:22]) - } else { + + switch len(decoded) { + case ripemd160.Size + 5: addrType, err = addressType(decoded[:1], decoder.params) copy(hash[:], decoded[1:21]) + case ripemd160.Size + 6: + addrType, err = addressType(decoded[:2], decoder.params) + copy(hash[:], decoded[2:22]) + default: + return nil, fmt.Errorf("validating address length: expected %v or %v, got %v", ripemd160.Size+5, ripemd160.Size+6, len(decoded)) } + if err != nil { - return nil, err + return nil, fmt.Errorf("parsing address type: %v", err) + } + + var cksum [4]byte + copy(cksum[:], decoded[len(decoded)-4:]) + if checksum(decoded[:len(decoded)-4]) != cksum { + return nil, fmt.Errorf("validating checksum: %v", base58.ErrChecksum) } switch addrType { case 0, 1: // P2PKH or P2SH return address.RawAddress(pack.Bytes(decoded)), nil default: - return nil, errors.New("unknown address") + return nil, fmt.Errorf("unexpected address type: %v", addrType) } } -func addressType(prefix []byte, param *Params) (uint8, error) { - if bytes.Equal(prefix, param.P2PKHPrefix) { +func addressType(prefix []byte, params *Params) (uint8, error) { + if bytes.Equal(prefix, params.P2PKHPrefix) { return 0, nil } - if bytes.Equal(prefix, param.P2SHPrefix) { + if bytes.Equal(prefix, params.P2SHPrefix) { return 1, nil } return 0, btcutil.ErrUnknownAddressType @@ -246,20 +243,24 @@ func (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool { // addressFromRawBytes decodes a string-representation of an address to an address // type that implements the zcash.Address interface -func addressFromRawBytes(addrBytes []byte) (Address, error) { +func addressFromRawBytes(addrBytes []byte, params *Params) (Address, error) { var addrType uint8 - var params *Params var err error var hash [20]byte - if len(addrBytes) == 26 { - addrType, params, err = parsePrefix(addrBytes[:2]) - copy(hash[:], addrBytes[2:22]) - } else { - addrType, params, err = parsePrefix(addrBytes[:1]) + + switch len(addrBytes) { + case ripemd160.Size + 5: + addrType, err = addressType(addrBytes[:1], params) copy(hash[:], addrBytes[1:21]) + case ripemd160.Size + 6: + addrType, err = addressType(addrBytes[:2], params) + copy(hash[:], addrBytes[2:22]) + default: + return nil, fmt.Errorf("validating address length: expected %v or %v, got %v", ripemd160.Size+5, ripemd160.Size+6, len(addrBytes)) } + if err != nil { - return nil, err + return nil, fmt.Errorf("parsing address type: %v", err) } switch addrType { @@ -267,9 +268,9 @@ func addressFromRawBytes(addrBytes []byte) (Address, error) { return NewAddressPubKeyHash(hash[:], params) case 1: // P2SH return NewAddressScriptHashFromHash(hash[:], params) + default: + return nil, fmt.Errorf("unexpected address type: %v", addrType) } - - return nil, errors.New("unknown address") } func encodeAddress(hash, prefix []byte) string { @@ -290,25 +291,3 @@ func checksum(input []byte) (cksum [4]byte) { copy(cksum[:], h2[:4]) return } - -func parsePrefix(prefix []byte) (uint8, *Params, error) { - if bytes.Equal(prefix, MainNetParams.P2PKHPrefix) { - return 0, &MainNetParams, nil - } - if bytes.Equal(prefix, MainNetParams.P2SHPrefix) { - return 1, &MainNetParams, nil - } - if bytes.Equal(prefix, TestNet3Params.P2PKHPrefix) { - return 0, &TestNet3Params, nil - } - if bytes.Equal(prefix, TestNet3Params.P2SHPrefix) { - return 1, &TestNet3Params, nil - } - if bytes.Equal(prefix, RegressionNetParams.P2PKHPrefix) { - return 0, &RegressionNetParams, nil - } - if bytes.Equal(prefix, RegressionNetParams.P2SHPrefix) { - return 1, &RegressionNetParams, nil - } - return 0, nil, btcutil.ErrUnknownAddressType -} diff --git a/chain/zcash/utxo.go b/chain/zcash/utxo.go index 42794dfe..46e09d20 100644 --- a/chain/zcash/utxo.go +++ b/chain/zcash/utxo.go @@ -85,7 +85,7 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi if err != nil { return &Tx{}, err } - addr, err := addressFromRawBytes(addrBytes) + addr, err := addressFromRawBytes(addrBytes, txBuilder.params) if err != nil { return &Tx{}, err } From bb1cfb281c1d5360f17079f98ffb2013d0dd569a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 24 Feb 2021 10:19:11 +0530 Subject: [PATCH 240/335] ci: wait for 8 minutes before running tests --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0aa033f5..75a7cc56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '5m' + time: '8m' - name: Check on docker containers run: docker ps -a From 1119b782918227899006423724145c0b33202067 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 24 Feb 2021 10:44:00 +0530 Subject: [PATCH 241/335] ci: increase the wait time even more --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 75a7cc56..6a23bccc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '8m' + time: '10m' - name: Check on docker containers run: docker ps -a From fd42c858ed5a2d4f4acd1d5837da12a4e3e405b5 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 4 Mar 2021 11:50:10 +0530 Subject: [PATCH 242/335] fix: prefix byte for script hash address --- chain/digibyte/digibyte.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/digibyte/digibyte.go b/chain/digibyte/digibyte.go index 1f86c0fc..70b246d5 100644 --- a/chain/digibyte/digibyte.go +++ b/chain/digibyte/digibyte.go @@ -132,7 +132,7 @@ var MainNetParams = chaincfg.Params{ // Address encoding magics PubKeyHashAddrID: 0x1e, // starts with 1 - ScriptHashAddrID: 0x32, // starts with 3 + ScriptHashAddrID: 0x3f, // starts with 3 PrivateKeyID: 0x80, // starts with 5 (uncompressed) or K (compressed) WitnessPubKeyHashAddrID: 0x06, // starts with p2 WitnessScriptHashAddrID: 0x0A, // starts with 7Xh From 254fa2680af280e49020e895f3d7fdbe11dd7fbf Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 27 Nov 2020 23:20:01 +0530 Subject: [PATCH 243/335] feat: solana-ffi for computing program derived addresses --- chain/solana/address.go | 6 +- chain/solana/solana-ffi/.gitignore | 11 + chain/solana/solana-ffi/Makefile | 20 + chain/solana/solana-ffi/rust/.gitignore | 1 + chain/solana/solana-ffi/rust/Cargo.lock | 2407 ++++++++++++++++++++ chain/solana/solana-ffi/rust/Cargo.toml | 15 + chain/solana/solana-ffi/rust/build.rs | 15 + chain/solana/solana-ffi/rust/cbindgen.toml | 18 + chain/solana/solana-ffi/rust/src/lib.rs | 41 + chain/solana/solana-ffi/solana-ffi.yml | 31 + chain/solana/solana.go | 38 +- chain/solana/solana_ffi.go | 27 + chain/solana/solana_ffi_test.go | 44 + chain/solana/solana_test.go | 14 +- chain/solana/solanarpc.go | 5 + go.sum | 7 + 16 files changed, 2680 insertions(+), 20 deletions(-) create mode 100644 chain/solana/solana-ffi/.gitignore create mode 100644 chain/solana/solana-ffi/Makefile create mode 100644 chain/solana/solana-ffi/rust/.gitignore create mode 100644 chain/solana/solana-ffi/rust/Cargo.lock create mode 100644 chain/solana/solana-ffi/rust/Cargo.toml create mode 100644 chain/solana/solana-ffi/rust/build.rs create mode 100644 chain/solana/solana-ffi/rust/cbindgen.toml create mode 100644 chain/solana/solana-ffi/rust/src/lib.rs create mode 100644 chain/solana/solana-ffi/solana-ffi.yml create mode 100644 chain/solana/solana_ffi.go create mode 100644 chain/solana/solana_ffi_test.go diff --git a/chain/solana/address.go b/chain/solana/address.go index 26de0b05..527f08a5 100644 --- a/chain/solana/address.go +++ b/chain/solana/address.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/btcsuite/btcutil/base58" - "github.com/renproject/pack" + "github.com/renproject/multichain/api/address" ) type AddressDecoder struct{} @@ -13,10 +13,10 @@ func NewAddressDecoder() AddressDecoder { return AddressDecoder{} } -func (AddressDecoder) DecodeAddress(encoded pack.String) (pack.Bytes, error) { +func (AddressDecoder) DecodeAddress(encoded address.Address) (address.RawAddress, error) { decoded := base58.Decode(string(encoded)) if len(decoded) != 32 { return nil, fmt.Errorf("expected address length 32, got address length %v", len(decoded)) } - return pack.Bytes(decoded), nil + return address.RawAddress(decoded), nil } diff --git a/chain/solana/solana-ffi/.gitignore b/chain/solana/solana-ffi/.gitignore new file mode 100644 index 00000000..568c57dc --- /dev/null +++ b/chain/solana/solana-ffi/.gitignore @@ -0,0 +1,11 @@ +*.exe +*.exe~ +*.dll +*.so +*.dylib +**/.install-solana-ffi +**/*.a +**/*.h +cgo/*.h +cgo/*.a +cgo/*.go diff --git a/chain/solana/solana-ffi/Makefile b/chain/solana/solana-ffi/Makefile new file mode 100644 index 00000000..e923690b --- /dev/null +++ b/chain/solana/solana-ffi/Makefile @@ -0,0 +1,20 @@ +DEPS:=solana-ffi.h libsolana-ffi.a + +all: $(DEPS) +.PHONY: all + +$(DEPS): .install-solana-ffi ; + +.install-solana-ffi: rust + cd rust && cargo build --release --all; cd .. + find ./rust/target/release -type f -name "solana-ffi.h" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/solana-ffi.h + find ./rust/target/release -type f -name "libsolana_ffi.a" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/libsolana_ffi.a + c-for-go --ccincl --ccdefs solana-ffi.yml + @touch $@ + +clean: + rm -rf $(DEPS) .install-solana-ffi + rm -rf cgo/*.go + rm -rf cgo/*.h + rm -rf cgo/*.a +.PHONY: clean diff --git a/chain/solana/solana-ffi/rust/.gitignore b/chain/solana/solana-ffi/rust/.gitignore new file mode 100644 index 00000000..eb5a316c --- /dev/null +++ b/chain/solana/solana-ffi/rust/.gitignore @@ -0,0 +1 @@ +target diff --git a/chain/solana/solana-ffi/rust/Cargo.lock b/chain/solana/solana-ffi/rust/Cargo.lock new file mode 100644 index 00000000..283caf9d --- /dev/null +++ b/chain/solana/solana-ffi/rust/Cargo.lock @@ -0,0 +1,2407 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "addr2line" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gimli 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "adler" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "aho-corasick" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "assert_matches" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "backtrace" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "addr2line 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "object 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bincode" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-padding 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bs58" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bumpalo" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "feature-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bytes" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cbindgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cc" +version = "1.0.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-queue" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ed25519" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "signature 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.0-pre.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "encoding_rs" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "form_urlencoded" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-channel" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-core" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-io" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-macro" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-sink" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-util" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "getrandom" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gimli" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "h2" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hermit-abi" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hex" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http-body" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "httparse" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "httpdate" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "humantime" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper" +version = "0.13.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper-rustls" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "indexmap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ipnet" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "itoa" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "jobserver" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "js-sys" +version = "0.3.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "libc" +version = "0.2.80" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memchr" +version = "2.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memmap" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memoffset" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime_guess" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio-uds" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "net2" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-integer" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "object" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "once_cell" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pbkdf2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-project" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-project-lite" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "proc-macro-nested" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ppv-lite86 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "regex" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "reqwest" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.26 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.9 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-rustls 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-test 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ring" +version = "0.16.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustls" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", + "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustversion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "sct" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_derive" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_json" +version = "1.0.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "signature" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "smallvec" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "socket2" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-crate-features" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519-dalek 1.0.0-pre.4 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-ffi" +version = "0.1.0" +dependencies = [ + "cbindgen 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-logger" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-program" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-sdk" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "assert_matches 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519-dalek 1.0.0-pre.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-crate-features 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "subtle" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "synstructure" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tempfile" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thiserror" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "thiserror-impl 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "time" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tinyvec" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "tinyvec_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "tokio" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-codec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-executor" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-fs" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-io" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-rustls" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-sync" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-timer" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-udp" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-uds" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-util" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "toml" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tower-service" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "tracing" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-core" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-futures" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "tinyvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "url" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-test" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-test-macro 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "web-sys" +version = "0.3.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "webpki" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "webpki-roots" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winreg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "zeroize" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "zeroize_derive 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "zeroize_derive" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[metadata] +"checksum addr2line 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" +"checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +"checksum aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +"checksum assert_matches 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "695579f0f2520f3774bb40461e5adb066459d4e0af4d59d20175484fb8e9edf1" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +"checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +"checksum backtrace 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" +"checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +"checksum base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +"checksum bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +"checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +"checksum block-padding 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +"checksum bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" +"checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" +"checksum bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +"checksum cbindgen 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea013096b5149f9cb90e6f3df69bd7889bd6dceffc5f8fb85dea6bd1c16d4f0f" +"checksum cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)" = "e450b8da92aa6f274e7c6437692f9f2ce6d701fb73bacfcf87897b3f89a4c20e" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +"checksum chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +"checksum clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" +"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +"checksum crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +"checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +"checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +"checksum curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" +"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +"checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +"checksum ed25519 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" +"checksum ed25519-dalek 1.0.0-pre.4 (registry+https://github.com/rust-lang/crates.io-index)" = "21a8a37f4e8b35af971e6db5e3897e7a6344caa3f92f6544f88125a1f5f0035a" +"checksum either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +"checksum encoding_rs 0.8.26 (registry+https://github.com/rust-lang/crates.io-index)" = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" +"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum feature-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" +"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +"checksum form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed" +"checksum futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +"checksum futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" +"checksum futures-io 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" +"checksum futures-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +"checksum futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" +"checksum futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" +"checksum futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" +"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +"checksum generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +"checksum getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" +"checksum gimli 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +"checksum h2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" +"checksum hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +"checksum hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" +"checksum hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +"checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +"checksum hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +"checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +"checksum hyper 0.13.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf" +"checksum hyper-rustls 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +"checksum indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +"checksum ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" +"checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +"checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +"checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" +"checksum js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" +"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +"checksum libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +"checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +"checksum memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +"checksum memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +"checksum miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +"checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +"checksum mio-uds 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum net2 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)" = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" +"checksum num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +"checksum num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +"checksum num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +"checksum object 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" +"checksum once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +"checksum opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum pin-project 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" +"checksum pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" +"checksum pin-project-internal 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" +"checksum pin-project-internal 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" +"checksum pin-project-lite 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" +"checksum pin-project-lite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" +"checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +"checksum ppv-lite86 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +"checksum proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +"checksum proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" +"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +"checksum proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +"checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +"checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +"checksum regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" +"checksum regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" +"checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +"checksum reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" +"checksum ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" +"checksum rustc-demangle 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +"checksum rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" +"checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +"checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +"checksum serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +"checksum serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +"checksum serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)" = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95" +"checksum serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +"checksum sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +"checksum sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +"checksum signature 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +"checksum socket2 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902" +"checksum solana-crate-features 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c93bab974b077441185f473f6502ebc45ff3f2b1a83cf9265ff88140a44c0383" +"checksum solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c042d8c40ef2208c30ee0c2e58041d0e0ee3e75d813b45fb1efd5697000cfd54" +"checksum solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d98db160b1f354bedf8e9092aa2d86c0bfefdd08c1bbc8d9354d21a508c43111" +"checksum solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b2bfdd104a5493214de0ab50b5490d049784f6fbc17e1cf6aa6936014d3f429f" +"checksum solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5f1c6b14b6f7f01a3b887b82a7c34f15f154233f433b52d4b4dd7df573892909" +"checksum solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "57b456565546b6fc6447c95e5e431eb8e08e426d475701dbc7b305e5f5a0da0b" +"checksum solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "62bf341463fee2efaa2da506fa98e374e3b6fff60e01af1834d68f7dc4e40187" +"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" +"checksum subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" +"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +"checksum syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4f34193997d92804d359ed09953e25d5138df6bcc055a71bf68ee89fdf9223" +"checksum synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +"checksum termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +"checksum thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" +"checksum thiserror-impl 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +"checksum time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +"checksum tinyvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" +"checksum tinyvec_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +"checksum tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff" +"checksum tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" +"checksum tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" +"checksum tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +"checksum tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" +"checksum tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +"checksum tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +"checksum tokio-rustls 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +"checksum tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +"checksum tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +"checksum tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +"checksum tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +"checksum tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" +"checksum tokio-uds 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" +"checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +"checksum toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645" +"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +"checksum tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +"checksum tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +"checksum tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" +"checksum try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +"checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +"checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +"checksum untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +"checksum url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" +"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +"checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +"checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" +"checksum wasm-bindgen-backend 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" +"checksum wasm-bindgen-futures 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" +"checksum wasm-bindgen-macro 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" +"checksum wasm-bindgen-macro-support 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" +"checksum wasm-bindgen-shared 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" +"checksum wasm-bindgen-test 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "34d1cdc8b98a557f24733d50a1199c4b0635e465eecba9c45b214544da197f64" +"checksum wasm-bindgen-test-macro 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "e8fb9c67be7439ee8ab1b7db502a49c05e51e2835b66796c705134d9b8e1a585" +"checksum web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" +"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" +"checksum webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +"checksum zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" +"checksum zeroize_derive 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" diff --git a/chain/solana/solana-ffi/rust/Cargo.toml b/chain/solana/solana-ffi/rust/Cargo.toml new file mode 100644 index 00000000..61219aab --- /dev/null +++ b/chain/solana/solana-ffi/rust/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "solana-ffi" +version = "0.1.0" +authors = ["Rohit Narurkar "] +edition = "2018" + +[lib] +crate-type = ["staticlib"] + +[dependencies] +libc = "0.2.58" +solana-sdk = "1.4.12" + +[build-dependencies] +cbindgen = "= 0.10.0" diff --git a/chain/solana/solana-ffi/rust/build.rs b/chain/solana/solana-ffi/rust/build.rs new file mode 100644 index 00000000..5e12c3b3 --- /dev/null +++ b/chain/solana/solana-ffi/rust/build.rs @@ -0,0 +1,15 @@ +extern crate cbindgen; + +use std::env; +use std::path::Path; + +fn main() { + println!("cargo:rerun-if-changed=src/"); + + let out_dir = env::var("OUT_DIR").unwrap(); + let hdr_out = Path::new(&out_dir).join("include/solana-ffi.h"); + + cbindgen::generate(std::env::var("CARGO_MANIFEST_DIR").unwrap()) + .expect("Could not generate header") + .write_to_file(hdr_out); +} diff --git a/chain/solana/solana-ffi/rust/cbindgen.toml b/chain/solana/solana-ffi/rust/cbindgen.toml new file mode 100644 index 00000000..998608b0 --- /dev/null +++ b/chain/solana/solana-ffi/rust/cbindgen.toml @@ -0,0 +1,18 @@ +header = """ +/* solana-ffi Header */ +#ifdef __cplusplus +extern "C" {{ +#endif +""" +trailer = """ +#ifdef __cplusplus +} /* extern "C" */ +#endif +""" + +include_guard = "SOLANA_FFI_H" +include_version = true +language = "C" + +[parse] +parse_deps = false diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs new file mode 100644 index 00000000..2ba60a77 --- /dev/null +++ b/chain/solana/solana-ffi/rust/src/lib.rs @@ -0,0 +1,41 @@ +extern crate libc; +use solana_sdk::pubkey::Pubkey; +use std::{ + ffi::{CStr, CString}, + str::FromStr, +}; + +#[no_mangle] +pub extern "C" fn hello(name: *const libc::c_char) -> *const libc::c_char { + let buf_name = unsafe { CStr::from_ptr(name).to_bytes() }; + let str_name = String::from_utf8(buf_name.to_vec()).unwrap(); + let greeting = format!("Hello {}!", str_name); + CString::new(greeting).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn unique_pubkey() -> *const libc::c_char { + let pubkey = Pubkey::new_unique(); + let pubkey = pubkey.to_string(); + CString::new(pubkey).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn program_derived_address( + seeds_pointer: *const u8, + seeds_size: libc::size_t, + program: *const libc::c_char, +) -> *const libc::c_char { + let seeds = + unsafe { std::slice::from_raw_parts(seeds_pointer as *const u8, seeds_size as usize) }; + + let buf_name = unsafe { CStr::from_ptr(program).to_bytes() }; + let program_str = String::from_utf8(buf_name.to_vec()).unwrap(); + let program_id = Pubkey::from_str(&program_str).unwrap(); + + let (derived_address, _) = Pubkey::find_program_address(&[seeds], &program_id); + + CString::new(derived_address.to_string()) + .unwrap() + .into_raw() +} diff --git a/chain/solana/solana-ffi/solana-ffi.yml b/chain/solana/solana-ffi/solana-ffi.yml new file mode 100644 index 00000000..65922fff --- /dev/null +++ b/chain/solana/solana-ffi/solana-ffi.yml @@ -0,0 +1,31 @@ +--- +GENERATOR: + PackageName: cgo + PackageDescription: + PackageLicense: + Options: + SafeStrings: true + Includes: + - solana-ffi.h + FlagGroups: + - {name: LDFLAGS, flags: ["-L${SRCDIR} -lsolana_ffi"]} + +PARSER: + Defines: + __has_include_next(x): 1 + IncludePaths: + - /usr/include + SourcesPaths: + - ./cgo/solana-ffi.h + +TRANSLATOR: + Rules: + function: + - {action: accept, from: "hello"} + - {action: accept, from: "unique_pubkey"} + - {action: accept, from: "program_derived_address"} + private: + - {transform: unexport} + post-global: + - {transform: export} + - {load: snakecase} diff --git a/chain/solana/solana.go b/chain/solana/solana.go index 110b7365..0927154f 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -7,7 +7,9 @@ import ( "github.com/btcsuite/btcutil/base58" "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" + "github.com/renproject/surge" "go.uber.org/zap" ) @@ -37,14 +39,42 @@ func NewClient(opts ClientOptions) *Client { return &Client{opts: opts} } -func (client *Client) CallContract(ctx context.Context, contract address.Address, input pack.Bytes) (output pack.Bytes, err error) { - if input != nil && len(input) != 0 { - return nil, fmt.Errorf("expected nil input, got %v input", input) +func FindProgramAddress(seeds []byte, program address.RawAddress) address.Address { + return address.Address("") +} + +type BurnCallContractInput struct { + Nonce pack.U256 +} + +type BurnCallContractOutput struct { + Amount pack.U256 + Recipient address.RawAddress + Confs pack.U64 + Payload pack.Bytes +} + +func (client *Client) CallContract( + ctx context.Context, + program address.Address, + calldata contract.CallData, +) (pack.Bytes, error) { + // Deserialise the calldata bytes. + input := BurnCallContractInput{} + if err := surge.FromBinary(&input, calldata); err != nil { + return pack.Bytes{}, fmt.Errorf("deserialise calldata: %v", err) + } + + addressDecoder := NewAddressDecoder() + decodedProgram, err := addressDecoder.DecodeAddress(program) + if err != nil { + return pack.Bytes(nil), fmt.Errorf("decode address: %v", err) } + burnLogAccount := FindProgramAddress(input.Nonce.Bytes(), decodedProgram) // Make an RPC call to "getAccountInfo" to get the data associated with the // account (we interpret the contract address as the account identifier). - params, err := json.Marshal(string(pack.String(contract))) + params, err := json.Marshal(string(burnLogAccount)) if err != nil { return pack.Bytes(nil), fmt.Errorf("encoding params: %v", err) } diff --git a/chain/solana/solana_ffi.go b/chain/solana/solana_ffi.go new file mode 100644 index 00000000..791ba7cc --- /dev/null +++ b/chain/solana/solana_ffi.go @@ -0,0 +1,27 @@ +package solana + +import ( + "github.com/btcsuite/btcutil/base58" + "github.com/renproject/multichain/chain/solana/solana-ffi/cgo" + "github.com/renproject/pack" +) + +func Hello(name string) string { + return cgo.Hello(name) +} + +func UniquePubkey() pack.Bytes32 { + pubkeyEncoded := cgo.UniquePubkey() + pubkeyDecoded := base58.Decode(pubkeyEncoded) + pubkey32 := pack.Bytes32{} + copy(pubkey32[:], pubkeyDecoded) + return pubkey32 +} + +func ProgramDerivedAddress(seeds []byte, program string) pack.Bytes32 { + programDerivedAddressEncoded := cgo.ProgramDerivedAddress(seeds, uint32(len(seeds)), program) + programDerivedAddressDecoded := base58.Decode(programDerivedAddressEncoded) + pubkey32 := pack.Bytes32{} + copy(pubkey32[:], programDerivedAddressDecoded) + return pubkey32 +} diff --git a/chain/solana/solana_ffi_test.go b/chain/solana/solana_ffi_test.go new file mode 100644 index 00000000..25e1f813 --- /dev/null +++ b/chain/solana/solana_ffi_test.go @@ -0,0 +1,44 @@ +package solana_test + +import ( + "github.com/btcsuite/btcutil/base58" + "github.com/ethereum/go-ethereum/crypto" + "github.com/renproject/multichain/chain/solana" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = FDescribe("Solana FFI", func() { + Context("FFI", func() { + It("should say hello", func() { + Expect(solana.Hello("Stranger")).To(Equal("Hello Stranger!")) + Expect(solana.Hello("Friend")).To(Equal("Hello Friend!")) + }) + + It("should create a unique pubkey", func() { + key1 := solana.UniquePubkey() + key2 := solana.UniquePubkey() + Expect(key1).NotTo(Equal(key2)) + }) + }) + + Context("Program Derived Address", func() { + It("should correctly compute 1", func() { + program := "6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4" + seeds := []byte("RenBridgeState") + programDerivedAddress := solana.ProgramDerivedAddress(seeds, program) + expectedDerivedAddress := base58.Decode("7gMf4XXqunXaagnMVf8c3KSKnANTjhDvn2HgVTxMb4ZD") + Expect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress)) + }) + + It("should correctly compute 2", func() { + program := "6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4" + selector := "BTC/toSolana" + selectorHash := crypto.Keccak256([]byte(selector)) + programDerivedAddress := solana.ProgramDerivedAddress(selectorHash, program) + expectedDerivedAddress := base58.Decode("6SPY5x3tmjLZ9SWcZFKhwpANrhYJagNNF4Sa4LAwtbCn") + Expect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress)) + }) + }) +}) diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 8286dcc4..8365036e 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -1,27 +1,15 @@ package solana_test import ( - "context" - - "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/chain/solana" - "github.com/renproject/pack" . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" ) var _ = Describe("Solana", func() { Context("...", func() { It("...", func() { - client := solana.NewClient(solana.DefaultClientOptions()) - _, err := client.CallContract( - context.Background(), - address.Address(pack.NewString("JBUjNGPApBQ3gw6w2UQPYr1978rkFEGqH1Zs3PZBrHec")), - pack.NewBytes([]byte{}), - ) - Expect(err).ToNot(HaveOccurred()) - // Expect(value).To(Equal()) + _ = solana.NewClient(solana.DefaultClientOptions()) }) }) }) diff --git a/chain/solana/solanarpc.go b/chain/solana/solanarpc.go index bab18c95..bfa5f1c8 100644 --- a/chain/solana/solanarpc.go +++ b/chain/solana/solanarpc.go @@ -16,3 +16,8 @@ type ResponseGetAccountInfo struct { Context AccountContext `json:"context"` Value AccountValue `json:"value"` } + +type BurnLog struct { + Amount int `json:"amount"` + Recipient [25]byte `json:"recipient"` +} diff --git a/go.sum b/go.sum index 83c8ff33..d99f88ee 100644 --- a/go.sum +++ b/go.sum @@ -270,12 +270,15 @@ github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGj github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= +github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.4 h1:gSNMv0qWwH16fGQs7ycOUrDjY6YCSsgLUl0I0KLjo8w= github.com/filecoin-project/go-address v0.0.4/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= +github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 h1:pIuR0dnMD0i+as8wNnjjHyQrnhP5O5bmba/lmgQeRgU= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= +github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.1 h1:S6Uuqcspqu81sWJ0He4OAfFLm1tSwPdVjtKTkl5m/xQ= github.com/filecoin-project/go-bitfield v0.2.1/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= @@ -316,9 +319,11 @@ github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= github.com/filecoin-project/lotus v1.1.2 h1:cs74C5oNVoIIFmjovpSuJR3qXzXcqS9cpOT+oSmNRiE= github.com/filecoin-project/lotus v1.1.2/go.mod h1:jSlQv+/+WGox3TdEzBEfmXzvbot4OOsBiIh98t7AnAA= +github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4= github.com/filecoin-project/specs-actors v0.9.12 h1:iIvk58tuMtmloFNHhAOQHG+4Gci6Lui0n7DYQGi3cJk= github.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= +github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4= github.com/filecoin-project/specs-actors/v2 v2.0.1/go.mod h1:v2NZVYinNIKA9acEMBm5wWXxqv5+frFEbekBFemYghY= github.com/filecoin-project/specs-actors/v2 v2.2.0 h1:IyCICb0NHYeD0sdSqjVGwWydn/7r7xXuxdpvGAcRCGY= github.com/filecoin-project/specs-actors/v2 v2.2.0/go.mod h1:rlv5Mx9wUhV8Qsz+vUezZNm+zL4tK08O0HreKKPB2Wc= @@ -593,6 +598,7 @@ github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CE github.com/ipfs/go-graphsync v0.3.0/go.mod h1:gEBvJUNelzMkaRPJTpg/jaKN4AQW/7wDWu0K92D8o10= github.com/ipfs/go-graphsync v0.3.1 h1:dJLYrck4oyJDfMVhGEKiWHxaY8oYMWko4m2Fi+4bofo= github.com/ipfs/go-graphsync v0.3.1/go.mod h1:bw4LiLM5Oq/uLdzEtih9LK8GrwSijv+XqYiWCTxHMqs= +github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= @@ -1565,6 +1571,7 @@ github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGw github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f h1:nMhj+x/m7ZQsHBz0L3gpytp0v6ogokdbrQDnhB8Kh7s= github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= From b578368ad1bb15e553bd8176db08e4c5ca510d77 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 1 Dec 2020 12:24:14 +0530 Subject: [PATCH 244/335] comment out code that doesn't compile --- chain/solana/solana-ffi/rust/Cargo.lock | 1426 ++++++++++++++++++++++- chain/solana/solana-ffi/rust/Cargo.toml | 5 +- chain/solana/solana-ffi/rust/src/lib.rs | 72 +- chain/solana/solana_ffi.go | 9 + 4 files changed, 1484 insertions(+), 28 deletions(-) diff --git a/chain/solana/solana-ffi/rust/Cargo.lock b/chain/solana/solana-ffi/rust/Cargo.lock index 283caf9d..19af8862 100644 --- a/chain/solana/solana-ffi/rust/Cargo.lock +++ b/chain/solana/solana-ffi/rust/Cargo.lock @@ -1,5 +1,14 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "addr2line" version = "0.14.0" @@ -13,6 +22,14 @@ name = "adler" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ahash" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "aho-corasick" version = "0.7.15" @@ -34,6 +51,11 @@ name = "arrayref" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "assert_matches" version = "1.4.0" @@ -68,6 +90,16 @@ dependencies = [ "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "base32" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "base64" version = "0.12.3" @@ -92,6 +124,20 @@ name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "blake3" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "block-buffer" version = "0.7.3" @@ -169,12 +215,33 @@ name = "bytes" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bzip2" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bzip2-sys 0.1.9+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.9+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cbindgen" -version = "0.10.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -212,6 +279,7 @@ dependencies = [ "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -238,6 +306,45 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cloudabi" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "console" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "terminal_size 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "termios 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "console" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "terminal_size 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "console_error_panic_hook" version = "0.1.6" @@ -247,6 +354,76 @@ dependencies = [ "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "const-random" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random-macro 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "const-random-macro" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "const_fn" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "core-foundation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "crc32fast" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-channel" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-deque" version = "0.7.3" @@ -257,6 +434,16 @@ dependencies = [ "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-epoch" version = "0.8.2" @@ -271,6 +458,19 @@ dependencies = [ "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-epoch" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "const_fn 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-queue" version = "0.2.3" @@ -291,6 +491,16 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -305,6 +515,15 @@ dependencies = [ "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "curve25519-dalek" version = "2.1.0" @@ -317,6 +536,36 @@ dependencies = [ "zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dashmap" +version = "3.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ahash 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "derivative" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dialoguer" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "console 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "digest" version = "0.8.1" @@ -333,6 +582,14 @@ dependencies = [ "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dir-diff" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ed25519" version = "1.0.3" @@ -360,6 +617,11 @@ name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "encoding_rs" version = "0.8.26" @@ -380,6 +642,26 @@ dependencies = [ "termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fake-simd" version = "0.1.2" @@ -390,11 +672,46 @@ name = "feature-probe" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "filetime" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "flate2" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "form_urlencoded" version = "1.0.0" @@ -404,6 +721,11 @@ dependencies = [ "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -501,8 +823,27 @@ dependencies = [ ] [[package]] -name = "getrandom" -version = "0.1.15" +name = "gethostname" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "getrandom" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "getrandom" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -515,6 +856,11 @@ name = "gimli" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "h2" version = "0.2.7" @@ -539,6 +885,14 @@ name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hermit-abi" version = "0.1.17" @@ -552,6 +906,16 @@ name = "hex" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "hidapi" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hmac" version = "0.7.1" @@ -665,6 +1029,33 @@ dependencies = [ "hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "indicatif" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "console 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "input_buffer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "instant" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "iovec" version = "0.1.4" @@ -691,6 +1082,35 @@ name = "itoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "jemalloc-ctl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "paste 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "jemalloc-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "fs_extra 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "jemallocator" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "jobserver" version = "0.1.21" @@ -707,6 +1127,18 @@ dependencies = [ "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "jsonrpc-core" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "keccak" version = "0.1.0" @@ -734,6 +1166,15 @@ name = "libc" version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "libloading" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libsecp256k1" version = "0.3.5" @@ -757,6 +1198,14 @@ dependencies = [ "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lock_api" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "log" version = "0.4.11" @@ -797,6 +1246,14 @@ dependencies = [ "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "memoffset" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mime" version = "0.3.16" @@ -859,6 +1316,23 @@ dependencies = [ "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "native-tls" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "net2" version = "0.2.35" @@ -869,6 +1343,18 @@ dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "nix" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -905,6 +1391,31 @@ dependencies = [ "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num_enum" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_enum_derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "number_prefix" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "object" version = "0.22.0" @@ -914,6 +1425,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "once_cell" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "parking_lot 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "opaque-debug" @@ -925,6 +1439,56 @@ name = "opaque-debug" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "openssl" +version = "0.10.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "openssl-sys" +version = "0.9.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ouroboros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ouroboros_macro 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ouroboros_macro" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot" version = "0.9.0" @@ -935,6 +1499,25 @@ dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "instant 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot_core" version = "0.6.2" @@ -949,6 +1532,50 @@ dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot_core" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "instant 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "paste" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "paste-impl 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "paste-impl" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pbkdf2" version = "0.3.0" @@ -963,6 +1590,14 @@ name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pin-project" version = "0.4.27" @@ -1014,11 +1649,24 @@ name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pkg-config" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ppv-lite86" version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro-hack" version = "0.5.19" @@ -1103,6 +1751,29 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rayon" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon-core" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-channel 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "redox_syscall" version = "0.1.57" @@ -1126,12 +1797,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "remove_dir_all" -version = "0.5.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ren-bridge" +version = "0.1.0" +source = "git+https://github.com/roynalnaruto/ren-bridge-solana#c3d54722b01859d0ffa82f10f522c356a178c0fd" +dependencies = [ + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "num_enum 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-associated-token-account 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "reqwest" version = "0.10.9" @@ -1183,11 +1872,25 @@ dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rpassword" +version = "4.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-demangle" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rustc_version" version = "0.2.3" @@ -1218,6 +1921,23 @@ name = "ryu" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "schannel" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "scoped-tls" version = "1.0.0" @@ -1237,6 +1957,27 @@ dependencies = [ "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "security-framework" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "security-framework-sys" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "semver" version = "0.9.0" @@ -1245,11 +1986,27 @@ dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "semver-parser" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "serde" version = "1.0.117" @@ -1297,6 +2054,17 @@ dependencies = [ "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sha2" version = "0.8.2" @@ -1337,6 +2105,11 @@ dependencies = [ "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "smallvec" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "socket2" version = "0.3.17" @@ -1348,6 +2121,87 @@ dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "solana-account-decoder" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-clap-utils" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-remote-wallet 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-client" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", + "indicatif 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 15.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-account-decoder 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-clap-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-net-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-transaction-status 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-version 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tungstenite 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-config-program" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "solana-crate-features" version = "1.4.12" @@ -1375,9 +2229,12 @@ dependencies = [ name = "solana-ffi" version = "0.1.0" dependencies = [ - "cbindgen 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cbindgen 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "ren-bridge 0.1.0 (git+https://github.com/roynalnaruto/ren-bridge-solana)", + "solana-client 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1387,67 +2244,191 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-logger" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-measure" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-metrics" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "gethostname 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-net-utils" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-clap-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-version 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-program" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "solana-frozen-abi-macro" +name = "solana-rayon-threadlimit" version = "1.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "solana-logger" +name = "solana-remote-wallet" version = "1.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base32 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "console 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", + "dialoguer 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hidapi 1.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "solana-program" +name = "solana-runtime" version = "1.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "blake3 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "dashmap 3.11.10 (registry+https://github.com/rust-lang/crates.io-index)", + "dir-diff 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "fs_extra 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ouroboros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-measure 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-rayon-threadlimit 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-secp256k1-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "symlink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1505,11 +2486,139 @@ dependencies = [ "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "solana-secp256k1-program" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-stake-program" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-transaction-status" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-account-decoder 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-runtime 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-memo 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-version" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "solana-vote-program" +version = "1.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "spl-associated-token-account" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "spl-memo" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "spl-token" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "num_enum 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "strsim" version = "0.8.0" @@ -1525,6 +2634,11 @@ name = "subtle" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "syn" version = "0.15.44" @@ -1556,6 +2670,17 @@ dependencies = [ "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tar" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "filetime 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tempfile" version = "3.1.0" @@ -1565,7 +2690,7 @@ dependencies = [ "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1577,6 +2702,23 @@ dependencies = [ "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "terminal_size" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termios" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -1621,6 +2763,29 @@ dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tiny-bip39" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tinyvec" version = "1.1.0" @@ -1890,11 +3055,35 @@ name = "try-lock" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "tungstenite" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "typenum" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicase" version = "2.6.0" @@ -1919,6 +3108,11 @@ dependencies = [ "tinyvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicode-segmentation" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicode-width" version = "0.1.8" @@ -1950,6 +3144,16 @@ dependencies = [ "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "utf-8" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "vcpkg" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "vec_map" version = "0.8.2" @@ -1960,6 +3164,21 @@ name = "version_check" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "walkdir" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "want" version = "0.3.0" @@ -2143,6 +3362,14 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "xattr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "zeroize" version = "1.1.1" @@ -2162,20 +3389,54 @@ dependencies = [ "synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "zstd" +version = "0.5.3+zstd.1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "zstd-safe 2.0.5+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "zstd-safe" +version = "2.0.5+zstd.1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd-sys 1.4.17+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "zstd-sys" +version = "1.4.17+zstd.1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", +] + [metadata] +"checksum Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" "checksum addr2line 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" "checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +"checksum ahash 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" "checksum aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +"checksum arrayvec 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" "checksum assert_matches 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "695579f0f2520f3774bb40461e5adb066459d4e0af4d59d20175484fb8e9edf1" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" "checksum backtrace 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" +"checksum base32 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" +"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" "checksum base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" "checksum bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +"checksum blake3 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" @@ -2187,32 +3448,62 @@ dependencies = [ "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" -"checksum cbindgen 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea013096b5149f9cb90e6f3df69bd7889bd6dceffc5f8fb85dea6bd1c16d4f0f" +"checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" +"checksum bzip2-sys 0.1.9+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ad3b39a260062fca31f7b0b12f207e8f2590a67d32ec7d59c20484b07ea7285e" +"checksum cbindgen 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1df6a11bba1d7cab86c166cecf4cf8acd7d02b7b65924d81b33d27197f22ee35" "checksum cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)" = "e450b8da92aa6f274e7c6437692f9f2ce6d701fb73bacfcf87897b3f89a4c20e" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" "checksum chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" "checksum clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum cloudabi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" +"checksum console 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" +"checksum console 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a50aab2529019abfabfa93f1e6c41ef392f91fbf179b347a7e96abb524884a08" "checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" +"checksum const-random 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "486d435a7351580347279f374cb8a3c16937485441db80181357b7c4d70f17ed" +"checksum const-random-macro 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "49a84d8ff70e3ec52311109b019c27672b4c1929e4cf7c18bcf0cd9fb5e230be" +"checksum const_fn 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c478836e029dcef17fb47c89023448c64f781a046e0300e257ad8225ae59afab" +"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +"checksum core-foundation 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +"checksum core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +"checksum crc32fast 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +"checksum crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +"checksum crossbeam-channel 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" "checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +"checksum crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" "checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +"checksum crossbeam-epoch 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" "checksum crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +"checksum crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" "checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +"checksum crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" "checksum curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" +"checksum dashmap 3.11.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" +"checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +"checksum dialoguer 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +"checksum dir-diff 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2860407d7d7e2e004bb2128510ad9e8d669e76fa005ccf567977b5d71b8b4a0b" "checksum ed25519 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" "checksum ed25519-dalek 1.0.0-pre.4 (registry+https://github.com/rust-lang/crates.io-index)" = "21a8a37f4e8b35af971e6db5e3897e7a6344caa3f92f6544f88125a1f5f0035a" "checksum either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" "checksum encoding_rs 0.8.26 (registry+https://github.com/rust-lang/crates.io-index)" = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +"checksum failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +"checksum failure_derive 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum feature-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" +"checksum filetime 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "0c122a393ea57648015bf06fbd3d372378992e86b9ff5a7a497b076a28c79efe" +"checksum flate2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" "checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +"checksum fs_extra 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed" @@ -2225,12 +3516,17 @@ dependencies = [ "checksum futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +"checksum gethostname 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028" "checksum getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" +"checksum getrandom 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" "checksum gimli 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum h2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" "checksum hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" "checksum hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +"checksum hidapi 1.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "76c352a18370f7e7e47bcbfcbdc5432b8c80c705b5d751a25232c659fcf5c775" "checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" "checksum hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" "checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" @@ -2242,43 +3538,70 @@ dependencies = [ "checksum hyper-rustls 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +"checksum indicatif 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" +"checksum input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" +"checksum instant 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" "checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" "checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +"checksum jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7" +"checksum jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" +"checksum jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" "checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" "checksum js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" +"checksum jsonrpc-core 15.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" "checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" +"checksum libloading 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1090080fe06ec2648d0da3881d9453d97e71a45f00eb179af7fdd7e3f686fdb0" "checksum libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" "checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +"checksum lock_api 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" "checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" "checksum memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +"checksum memoffset 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" "checksum miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" "checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" "checksum mio-uds 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum native-tls 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6fcc7939b5edc4e4f86b1b4a04bb1498afaaf871b1a6691838ed06fcb48d3a3f" "checksum net2 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)" = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" +"checksum nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" "checksum num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" "checksum num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" "checksum num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +"checksum num_enum 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066" +"checksum num_enum_derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" +"checksum number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" "checksum object 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" "checksum once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +"checksum openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)" = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" +"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +"checksum openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" +"checksum ouroboros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc04551635026d3ac7bc646698ea1836a85ed2a26b7094fe1d15d8b14854c4a2" +"checksum ouroboros_macro 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cec33dfceabec83cd0e95a5ce9d20e76ab3a5cbfef59659b8c927f69b93ed8ae" +"checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +"checksum parking_lot 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" "checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +"checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +"checksum parking_lot_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +"checksum paste 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" +"checksum paste-impl 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" "checksum pin-project 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" "checksum pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" "checksum pin-project-internal 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" @@ -2286,7 +3609,9 @@ dependencies = [ "checksum pin-project-lite 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" "checksum pin-project-lite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" "checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +"checksum pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" "checksum ppv-lite86 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +"checksum proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" "checksum proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" "checksum proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" @@ -2298,54 +3623,92 @@ dependencies = [ "checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +"checksum rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +"checksum rayon-core 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" "checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" "checksum regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" "checksum regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" -"checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +"checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" +"checksum ren-bridge 0.1.0 (git+https://github.com/roynalnaruto/ren-bridge-solana)" = "" "checksum reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" "checksum ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" +"checksum rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" "checksum rustc-demangle 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +"checksum rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" "checksum rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" "checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +"checksum schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" "checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" "checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +"checksum security-framework 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" +"checksum security-framework-sys 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" +"checksum semver 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "42ef146c2ad5e5f4b037cd6ce2ebb775401729b19a82040c1beac9d36c7d1428" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" "checksum serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" "checksum serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" "checksum serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)" = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95" "checksum serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" "checksum sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" "checksum sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" "checksum signature 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +"checksum smallvec 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" "checksum socket2 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902" +"checksum solana-account-decoder 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c7ce74ad009c4a62c3c7ed8338edbb3c0e68c467a657b2a8e6d617c5bc0e8163" +"checksum solana-clap-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3d561e5304778ecfc26105e91628da8db0c3b477c10bd24044fbf2a879fc96c3" +"checksum solana-client 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "63740f4d14c746a26c952e70fb5ae1920bb0adde077de635cd69c6a7c9b0dfac" +"checksum solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "fd1b02cbe559def67c208616afd99911c770a6c490a365260415ed6dc51ee855" "checksum solana-crate-features 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c93bab974b077441185f473f6502ebc45ff3f2b1a83cf9265ff88140a44c0383" "checksum solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c042d8c40ef2208c30ee0c2e58041d0e0ee3e75d813b45fb1efd5697000cfd54" "checksum solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d98db160b1f354bedf8e9092aa2d86c0bfefdd08c1bbc8d9354d21a508c43111" "checksum solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b2bfdd104a5493214de0ab50b5490d049784f6fbc17e1cf6aa6936014d3f429f" +"checksum solana-measure 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1feccd4eb61457f2b6a6d55045ef5dea2f8c8e1d2cdb187923967c66994c75d4" +"checksum solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "8d817e5588583eb8551c32e8079e3b47e2b43f3a8710e14fc65b48da37a0e762" +"checksum solana-net-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b79b09a7212502e24b5eeca6de49d8f2a77888ed9064dd421655a0e145511470" "checksum solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5f1c6b14b6f7f01a3b887b82a7c34f15f154233f433b52d4b4dd7df573892909" +"checksum solana-rayon-threadlimit 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "16fde85eceb3da9e3852b1351b0e5673b8e2df12d719264220e86f173808bd69" +"checksum solana-remote-wallet 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "76b090a151be9a745f3c90a7b8cc96aff698f0ec3855b0633bf36e6fc8468880" +"checksum solana-runtime 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4ec6a0eeb4f04a15dbb805804748a207ef6cac495929483ec6dbe7f72d7f8b4d" "checksum solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "57b456565546b6fc6447c95e5e431eb8e08e426d475701dbc7b305e5f5a0da0b" "checksum solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "62bf341463fee2efaa2da506fa98e374e3b6fff60e01af1834d68f7dc4e40187" +"checksum solana-secp256k1-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "96581c39b6f7aa2cdd7dd3ea7d144a17b700c6c17b4a3067066e3ad1660a7664" +"checksum solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3618e8a5ebdb38768d9a78863f4c8713a7a65d2970f19b3c1a1340c2c8f32177" +"checksum solana-transaction-status 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d28da856b55e4adc9dcbda11eaec2858a30f5ab95a89e1ad0c65f9da406f1170" +"checksum solana-version 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "92cec239d9026dbfe6f8b23cb37f78c3471f7e22ffe2b06900326446926540d1" +"checksum solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "00155e7c1e090830e44c08fb5b6c4cef6f58a358c14d17c68117a50a8c797d50" "checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum spl-associated-token-account 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41a25d15fe67b755f95c575ce074e6e39c809fea86b2edb1bf2ae8b0473d5a1d" +"checksum spl-memo 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "99775feb54f735a6826ea0af500c1f78f7a5974d6b17f1ac586cd114e2da7d80" +"checksum spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f77fa0b41cbc82d1d7c8f2d914b49e9a1a7b6e32af952d03383fb989c42bc89" +"checksum stable_deref_trait 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" +"checksum symlink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4f34193997d92804d359ed09953e25d5138df6bcc055a71bf68ee89fdf9223" "checksum synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +"checksum tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +"checksum terminal_size 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4bd2d183bd3fac5f5fe38ddbeb4dc9aec4a39a9d7d59e7491d900302da01cbe1" +"checksum termios 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" "checksum thiserror-impl 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +"checksum tiny-bip39 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +"checksum tiny-keccak 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" "checksum tinyvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" "checksum tinyvec_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" @@ -2370,17 +3733,24 @@ dependencies = [ "checksum tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" "checksum tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" "checksum try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +"checksum tungstenite 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e" "checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +"checksum ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +"checksum unicode-segmentation 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" "checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" "checksum untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" "checksum url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" +"checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" +"checksum vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" "checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" "checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" @@ -2403,5 +3773,9 @@ dependencies = [ "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +"checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" "checksum zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" "checksum zeroize_derive 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" +"checksum zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8" +"checksum zstd-safe 2.0.5+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055" +"checksum zstd-sys 1.4.17+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b" diff --git a/chain/solana/solana-ffi/rust/Cargo.toml b/chain/solana/solana-ffi/rust/Cargo.toml index 61219aab..fb2ae608 100644 --- a/chain/solana/solana-ffi/rust/Cargo.toml +++ b/chain/solana/solana-ffi/rust/Cargo.toml @@ -9,7 +9,10 @@ crate-type = ["staticlib"] [dependencies] libc = "0.2.58" +ren-bridge = { git = "https://github.com/roynalnaruto/ren-bridge-solana", features = ["no-entrypoint"] } +solana-client = "1.4.12" solana-sdk = "1.4.12" +spl-token = { version = "3.0.0", features = ["no-entrypoint"] } [build-dependencies] -cbindgen = "= 0.10.0" +cbindgen = "= 0.15.0" diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs index 2ba60a77..dbb8c362 100644 --- a/chain/solana/solana-ffi/rust/src/lib.rs +++ b/chain/solana/solana-ffi/rust/src/lib.rs @@ -1,5 +1,7 @@ extern crate libc; -use solana_sdk::pubkey::Pubkey; +use solana_sdk::{ + pubkey::Pubkey, +}; use std::{ ffi::{CStr, CString}, str::FromStr, @@ -39,3 +41,71 @@ pub extern "C" fn program_derived_address( .unwrap() .into_raw() } + +// #[no_mangle] +// pub extern "C" fn ren_bridge_initialize( +// keypair_path: *const libc::c_char, +// rpc_url: *const libc::c_char, +// authority_pointer: *const u8, +// ) -> *const libc::c_char { +// // Solana default signer and fee payer. +// let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; +// let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); +// let payer = read_keypair_file(&keypair_path).unwrap(); +// +// // Initialize client. +// let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; +// let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); +// let rpc_client = RpcClient::new(rpc_url); +// let commitment_config = CommitmentConfig::single_gossip(); +// let (recent_blockhash, _, _) = rpc_client +// .get_recent_blockhash_with_commitment(commitment_config) +// .unwrap() +// .value; +// +// // Construct the RenVM authority 20-bytes Ethereum compatible address. +// let authority_slice = +// unsafe { std::slice::from_raw_parts(authority_pointer as *const u8, 20usize) }; +// let mut authority = [0u8; 20usize]; +// authority.copy_from_slice(authority_slice); +// +// // Find derived address that will hold RenBridge's state. +// let (ren_bridge_account_id, _) = +// Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); +// +// // Build and sign the initialize transaction. +// let mut tx = Transaction::new_with_payer( +// &[initialize( +// &ren_bridge::id(), +// &payer.pubkey(), +// &ren_bridge_account_id, +// authority, +// ) +// .unwrap()], +// Some(&payer.pubkey()), +// ); +// tx.sign(&[&payer], recent_blockhash); +// +// // Broadcast transaction. +// let signature = rpc_client +// .send_transaction_with_config( +// &tx, +// RpcSendTransactionConfig { +// preflight_commitment: Some(commitment_config.commitment), +// ..RpcSendTransactionConfig::default() +// }, +// ) +// .unwrap(); +// +// CString::new(signature.to_string()).unwrap().into_raw() +// } +// +// #[no_mangle] +// pub extern "C" fn ren_bridge_mint() { +// unimplemented!(); +// } +// +// #[no_mangle] +// pub extern "C" fn ren_bridge_burn() { +// unimplemented!(); +// } diff --git a/chain/solana/solana_ffi.go b/chain/solana/solana_ffi.go index 791ba7cc..a971a13f 100644 --- a/chain/solana/solana_ffi.go +++ b/chain/solana/solana_ffi.go @@ -25,3 +25,12 @@ func ProgramDerivedAddress(seeds []byte, program string) pack.Bytes32 { copy(pubkey32[:], programDerivedAddressDecoded) return pubkey32 } + +// func RenBridgeInitialize( +// keypairPath string, +// rpcUrl string, +// authority pack.Bytes, +// ) pack.String { +// signature := cgo.RenBridgeInitialize(keypairPath, rpcUrl, []byte(authority)) +// return pack.String(signature) +// } From 693bd50bd12ace429b4d1950e1ba288f3b929b12 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Dec 2020 11:21:02 +0530 Subject: [PATCH 245/335] chore: wrap up docs/linting --- chain/solana/address.go | 29 +++++++++- chain/solana/solana-ffi/cgo/.gitignore | 4 ++ chain/solana/solana-ffi/rust/src/lib.rs | 76 ------------------------- chain/solana/solana-ffi/solana-ffi.yml | 1 - chain/solana/solana.go | 74 ++++++++++++++++++++---- chain/solana/solana_ffi.go | 40 +++++-------- chain/solana/solana_ffi_test.go | 22 +++---- chain/solana/solana_test.go | 33 ++++++++++- chain/solana/solanarpc.go | 7 +++ 9 files changed, 153 insertions(+), 133 deletions(-) create mode 100644 chain/solana/solana-ffi/cgo/.gitignore diff --git a/chain/solana/address.go b/chain/solana/address.go index 527f08a5..3dff6412 100644 --- a/chain/solana/address.go +++ b/chain/solana/address.go @@ -7,12 +7,37 @@ import ( "github.com/renproject/multichain/api/address" ) +// AddressDecoder implements the address.Decoder interface. type AddressDecoder struct{} -func NewAddressDecoder() AddressDecoder { - return AddressDecoder{} +// AddressEncoder implements the address.Encoder interface. +type AddressEncoder struct{} + +// AddressEncodeDecoder implements the address.EncodeDecoder interface. +type AddressEncodeDecoder struct { + AddressEncoder + AddressDecoder +} + +// NewAddressEncodeDecoder constructs and returns a new AddressEncodeDecoder. +func NewAddressEncodeDecoder() AddressEncodeDecoder { + return AddressEncodeDecoder{ + AddressEncoder: AddressEncoder{}, + AddressDecoder: AddressDecoder{}, + } +} + +// EncodeAddress consumes a raw byte-representation of an address and encodes it +// to the human-readable Base58 format. +func (AddressEncoder) EncodeAddress(rawAddress address.RawAddress) (address.Address, error) { + if len(rawAddress) != 32 { + return address.Address(""), fmt.Errorf("expected address length 32, got address length %v", len(rawAddress)) + } + return address.Address(base58.Encode(rawAddress)), nil } +// DecodeAddress consumes a human-readable Base58 format and decodes it into a +// raw byte-representation. func (AddressDecoder) DecodeAddress(encoded address.Address) (address.RawAddress, error) { decoded := base58.Decode(string(encoded)) if len(decoded) != 32 { diff --git a/chain/solana/solana-ffi/cgo/.gitignore b/chain/solana/solana-ffi/cgo/.gitignore new file mode 100644 index 00000000..5e7d2734 --- /dev/null +++ b/chain/solana/solana-ffi/cgo/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs index dbb8c362..464252db 100644 --- a/chain/solana/solana-ffi/rust/src/lib.rs +++ b/chain/solana/solana-ffi/rust/src/lib.rs @@ -7,14 +7,6 @@ use std::{ str::FromStr, }; -#[no_mangle] -pub extern "C" fn hello(name: *const libc::c_char) -> *const libc::c_char { - let buf_name = unsafe { CStr::from_ptr(name).to_bytes() }; - let str_name = String::from_utf8(buf_name.to_vec()).unwrap(); - let greeting = format!("Hello {}!", str_name); - CString::new(greeting).unwrap().into_raw() -} - #[no_mangle] pub extern "C" fn unique_pubkey() -> *const libc::c_char { let pubkey = Pubkey::new_unique(); @@ -41,71 +33,3 @@ pub extern "C" fn program_derived_address( .unwrap() .into_raw() } - -// #[no_mangle] -// pub extern "C" fn ren_bridge_initialize( -// keypair_path: *const libc::c_char, -// rpc_url: *const libc::c_char, -// authority_pointer: *const u8, -// ) -> *const libc::c_char { -// // Solana default signer and fee payer. -// let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; -// let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); -// let payer = read_keypair_file(&keypair_path).unwrap(); -// -// // Initialize client. -// let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; -// let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); -// let rpc_client = RpcClient::new(rpc_url); -// let commitment_config = CommitmentConfig::single_gossip(); -// let (recent_blockhash, _, _) = rpc_client -// .get_recent_blockhash_with_commitment(commitment_config) -// .unwrap() -// .value; -// -// // Construct the RenVM authority 20-bytes Ethereum compatible address. -// let authority_slice = -// unsafe { std::slice::from_raw_parts(authority_pointer as *const u8, 20usize) }; -// let mut authority = [0u8; 20usize]; -// authority.copy_from_slice(authority_slice); -// -// // Find derived address that will hold RenBridge's state. -// let (ren_bridge_account_id, _) = -// Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); -// -// // Build and sign the initialize transaction. -// let mut tx = Transaction::new_with_payer( -// &[initialize( -// &ren_bridge::id(), -// &payer.pubkey(), -// &ren_bridge_account_id, -// authority, -// ) -// .unwrap()], -// Some(&payer.pubkey()), -// ); -// tx.sign(&[&payer], recent_blockhash); -// -// // Broadcast transaction. -// let signature = rpc_client -// .send_transaction_with_config( -// &tx, -// RpcSendTransactionConfig { -// preflight_commitment: Some(commitment_config.commitment), -// ..RpcSendTransactionConfig::default() -// }, -// ) -// .unwrap(); -// -// CString::new(signature.to_string()).unwrap().into_raw() -// } -// -// #[no_mangle] -// pub extern "C" fn ren_bridge_mint() { -// unimplemented!(); -// } -// -// #[no_mangle] -// pub extern "C" fn ren_bridge_burn() { -// unimplemented!(); -// } diff --git a/chain/solana/solana-ffi/solana-ffi.yml b/chain/solana/solana-ffi/solana-ffi.yml index 65922fff..c8867469 100644 --- a/chain/solana/solana-ffi/solana-ffi.yml +++ b/chain/solana/solana-ffi/solana-ffi.yml @@ -21,7 +21,6 @@ PARSER: TRANSLATOR: Rules: function: - - {action: accept, from: "hello"} - {action: accept, from: "unique_pubkey"} - {action: accept, from: "program_derived_address"} private: diff --git a/chain/solana/solana.go b/chain/solana/solana.go index 0927154f..ee836901 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -2,6 +2,7 @@ package solana import ( "context" + "encoding/binary" "encoding/json" "fmt" @@ -13,13 +14,17 @@ import ( "go.uber.org/zap" ) +// DefaultClientRPCURL is the default RPC URL for the Solana cluster. const DefaultClientRPCURL = "http://localhost:8899" +// ClientOptions define the options to instantiate a new Solana client. type ClientOptions struct { Logger *zap.Logger RPCURL string } +// DefaultClientOptions return the client options used to instantiate a Solana +// client by default. func DefaultClientOptions() ClientOptions { logger, err := zap.NewDevelopment() if err != nil { @@ -31,29 +36,46 @@ func DefaultClientOptions() ClientOptions { } } +// Client represents a Solana client that implements the multichain Contract API. type Client struct { opts ClientOptions } +// NewClient returns a new solana.Client interface that implements the +// multichain Contract API. func NewClient(opts ClientOptions) *Client { return &Client{opts: opts} } -func FindProgramAddress(seeds []byte, program address.RawAddress) address.Address { - return address.Address("") +// FindProgramAddress is a wrapper function that calls the Solana FFI to find +// the deterministic program-derived address using the program and seeds. +func FindProgramAddress(seeds []byte, program address.RawAddress) (address.Address, error) { + addrEncodeDecoder := NewAddressEncodeDecoder() + encoded, err := addrEncodeDecoder.EncodeAddress(program) + if err != nil { + return address.Address(""), err + } + + return ProgramDerivedAddress(seeds, encoded), nil } +// BurnCallContractInput represents the data structure of the expected calldata +// for Solana's Contract API implementation. type BurnCallContractInput struct { - Nonce pack.U256 + Nonce pack.U64 } +// BurnCallContractOutput represents the data structure for Solana Contract +// implementation's output bytes. type BurnCallContractOutput struct { - Amount pack.U256 + Amount pack.U64 Recipient address.RawAddress Confs pack.U64 Payload pack.Bytes } +// CallContract implements the multichain Contract API. In the case of Solana, +// it is used to fetch burn logs associated with a particular burn nonce. func (client *Client) CallContract( ctx context.Context, program address.Address, @@ -65,16 +87,25 @@ func (client *Client) CallContract( return pack.Bytes{}, fmt.Errorf("deserialise calldata: %v", err) } - addressDecoder := NewAddressDecoder() - decodedProgram, err := addressDecoder.DecodeAddress(program) + addrEncodeDecoder := NewAddressEncodeDecoder() + decodedProgram, err := addrEncodeDecoder.DecodeAddress(program) if err != nil { return pack.Bytes(nil), fmt.Errorf("decode address: %v", err) } - burnLogAccount := FindProgramAddress(input.Nonce.Bytes(), decodedProgram) + + // little endian serialization of burn count (nonce) + nonceBytes := make([]byte, 8) + binary.LittleEndian.PutUint64(nonceBytes, uint64(input.Nonce)) + + // Find the program-derived address that will have persisted the burn log. + burnLogAccount, err := FindProgramAddress(nonceBytes, decodedProgram) + if err != nil { + return pack.Bytes(nil), fmt.Errorf("find program-derived address: %v", err) + } // Make an RPC call to "getAccountInfo" to get the data associated with the // account (we interpret the contract address as the account identifier). - params, err := json.Marshal(string(burnLogAccount)) + params, err := json.Marshal([]string{string(burnLogAccount)}) if err != nil { return pack.Bytes(nil), fmt.Errorf("encoding params: %v", err) } @@ -86,17 +117,36 @@ func (client *Client) CallContract( return pack.Bytes(nil), fmt.Errorf("decoding result: empty") } - // Decode the data associated with the account into pack-encoded bytes. + // Deserialise the account's info into the appropriate struct. info := ResponseGetAccountInfo{} if err := json.Unmarshal(*res.Result, &info); err != nil { return pack.Bytes(nil), fmt.Errorf("decoding result: %v", err) } - fmt.Printf("account data: %v", info.Value.Data) + // Decode the Base58 encoded account data into raw byte-representation. Since + // this holds the burn log's data, it should be 33 bytes in size. 8 bytes for + // the burn amount and 25 bytes for the recipient of the released assets. data := base58.Decode(info.Value.Data) - // data, err := base64.StdEncoding.DecodeString() if err != nil { return pack.Bytes(nil), fmt.Errorf("decoding result from base58: %v", err) } - return pack.NewBytes(data), nil + if len(data) != 33 { + return pack.Bytes(nil), fmt.Errorf("unexpected data length. Expected 33, got: %v", len(data)) + } + + // Serialize the burn log's data into raw bytes. + amount := binary.LittleEndian.Uint64(data[:8]) + recipient := pack.Bytes(data[8:]) + burnOut := BurnCallContractOutput{ + Amount: pack.NewU64(amount), + Recipient: address.RawAddress(recipient), + Confs: pack.NewU64(0), + Payload: pack.Bytes(nil), + } + burnOutBytes, err := surge.ToBinary(burnOut) + if err != nil { + return pack.Bytes(nil), fmt.Errorf("serialize burn log output: %v", err) + } + + return pack.NewBytes(burnOutBytes), nil } diff --git a/chain/solana/solana_ffi.go b/chain/solana/solana_ffi.go index a971a13f..1c51ebdc 100644 --- a/chain/solana/solana_ffi.go +++ b/chain/solana/solana_ffi.go @@ -1,36 +1,24 @@ package solana import ( - "github.com/btcsuite/btcutil/base58" + "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/chain/solana/solana-ffi/cgo" "github.com/renproject/pack" ) -func Hello(name string) string { - return cgo.Hello(name) +// UniquePubkey creates an atomically incrementing pubkey used for tests and +// benchmarking purposes. +func UniquePubkey() address.Address { + pubkey := cgo.UniquePubkey() + return address.Address(pubkey) } -func UniquePubkey() pack.Bytes32 { - pubkeyEncoded := cgo.UniquePubkey() - pubkeyDecoded := base58.Decode(pubkeyEncoded) - pubkey32 := pack.Bytes32{} - copy(pubkey32[:], pubkeyDecoded) - return pubkey32 +// ProgramDerivedAddress derives an address for an account that only the given +// program has the authority to sign. The address is of the same form as a +// Solana pubkey, except they are ensured to not be on the es25519 curve and +// thus have no associated private key. This address is deterministic, based +// upon the program and the seeds slice. +func ProgramDerivedAddress(seeds pack.Bytes, program address.Address) address.Address { + programDerivedAddressEncoded := cgo.ProgramDerivedAddress(seeds, uint32(len(seeds)), string(program)) + return address.Address(programDerivedAddressEncoded) } - -func ProgramDerivedAddress(seeds []byte, program string) pack.Bytes32 { - programDerivedAddressEncoded := cgo.ProgramDerivedAddress(seeds, uint32(len(seeds)), program) - programDerivedAddressDecoded := base58.Decode(programDerivedAddressEncoded) - pubkey32 := pack.Bytes32{} - copy(pubkey32[:], programDerivedAddressDecoded) - return pubkey32 -} - -// func RenBridgeInitialize( -// keypairPath string, -// rpcUrl string, -// authority pack.Bytes, -// ) pack.String { -// signature := cgo.RenBridgeInitialize(keypairPath, rpcUrl, []byte(authority)) -// return pack.String(signature) -// } diff --git a/chain/solana/solana_ffi_test.go b/chain/solana/solana_ffi_test.go index 25e1f813..7a3a3618 100644 --- a/chain/solana/solana_ffi_test.go +++ b/chain/solana/solana_ffi_test.go @@ -1,21 +1,17 @@ package solana_test import ( - "github.com/btcsuite/btcutil/base58" "github.com/ethereum/go-ethereum/crypto" + "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/chain/solana" + "github.com/renproject/pack" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) -var _ = FDescribe("Solana FFI", func() { +var _ = Describe("Solana FFI", func() { Context("FFI", func() { - It("should say hello", func() { - Expect(solana.Hello("Stranger")).To(Equal("Hello Stranger!")) - Expect(solana.Hello("Friend")).To(Equal("Hello Friend!")) - }) - It("should create a unique pubkey", func() { key1 := solana.UniquePubkey() key2 := solana.UniquePubkey() @@ -25,19 +21,19 @@ var _ = FDescribe("Solana FFI", func() { Context("Program Derived Address", func() { It("should correctly compute 1", func() { - program := "6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4" + program := address.Address("6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4") seeds := []byte("RenBridgeState") - programDerivedAddress := solana.ProgramDerivedAddress(seeds, program) - expectedDerivedAddress := base58.Decode("7gMf4XXqunXaagnMVf8c3KSKnANTjhDvn2HgVTxMb4ZD") + programDerivedAddress := solana.ProgramDerivedAddress(pack.Bytes(seeds), program) + expectedDerivedAddress := address.Address("7gMf4XXqunXaagnMVf8c3KSKnANTjhDvn2HgVTxMb4ZD") Expect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress)) }) It("should correctly compute 2", func() { - program := "6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4" + program := address.Address("6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4") selector := "BTC/toSolana" selectorHash := crypto.Keccak256([]byte(selector)) - programDerivedAddress := solana.ProgramDerivedAddress(selectorHash, program) - expectedDerivedAddress := base58.Decode("6SPY5x3tmjLZ9SWcZFKhwpANrhYJagNNF4Sa4LAwtbCn") + programDerivedAddress := solana.ProgramDerivedAddress(pack.Bytes(selectorHash), program) + expectedDerivedAddress := address.Address("6SPY5x3tmjLZ9SWcZFKhwpANrhYJagNNF4Sa4LAwtbCn") Expect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress)) }) }) diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 8365036e..deacba77 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -1,15 +1,42 @@ package solana_test import ( + "context" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/solana" + "github.com/renproject/pack" + "github.com/renproject/surge" . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" ) var _ = Describe("Solana", func() { - Context("...", func() { - It("...", func() { - _ = solana.NewClient(solana.DefaultClientOptions()) + Context("fetch burn log", func() { + It("should be able to fetch", func() { + client := solana.NewClient(solana.DefaultClientOptions()) + + burnCount := pack.NewU64(uint64(1)) + contractCallInput := solana.BurnCallContractInput{Nonce: burnCount} + calldata, err := surge.ToBinary(contractCallInput) + Expect(err).ToNot(HaveOccurred()) + program := multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP") + + burnLogBytes, err := client.CallContract(context.Background(), program, calldata) + Expect(err).NotTo(HaveOccurred()) + + burnLog := solana.BurnCallContractOutput{} + err = surge.FromBinary(&burnLog, burnLogBytes) + Expect(err).NotTo(HaveOccurred()) + Expect(burnLog.Amount).To(Equal(pack.U64(2000000000))) + expectedRecipient := multichain.Address("mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4") + bitcoinAddrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) + rawAddr, err := bitcoinAddrEncodeDecoder.DecodeAddress(expectedRecipient) + Expect(err).NotTo(HaveOccurred()) + Expect(burnLog.Recipient).To(Equal(rawAddr)) }) }) }) diff --git a/chain/solana/solanarpc.go b/chain/solana/solanarpc.go index bfa5f1c8..e88dc19b 100644 --- a/chain/solana/solanarpc.go +++ b/chain/solana/solanarpc.go @@ -1,9 +1,12 @@ package solana +// AccountContext is the JSON-interface of the account's context representing +// what slot the account's value has been returned for. type AccountContext struct { Slot int `json:"slot"` } +// AccountValue is the JSON-interface of the account's information. type AccountValue struct { Data string `json:"data"` Executable bool `json:"executable"` @@ -12,11 +15,15 @@ type AccountValue struct { RentEpoch int `json:"rentEpoch"` } +// ResponseGetAccountInfo is the JSON-interface of the response for the +// getAccountInfo query. type ResponseGetAccountInfo struct { Context AccountContext `json:"context"` Value AccountValue `json:"value"` } +// BurnLog is the data stored in a burn log account, that is received in its +// Base58 encoded format as a part of the getAccountInfo response. type BurnLog struct { Amount int `json:"amount"` Recipient [25]byte `json:"recipient"` From 1eea548f1d51b918cf7cac782cde0aeb54380a47 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Dec 2020 11:27:00 +0530 Subject: [PATCH 246/335] ci: build solana FFI --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a23bccc..0f58a5a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,8 @@ jobs: source $HOME/.cargo/env cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi make - cd $GITHUB_WORKSPACE + cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + make export PATH=$PATH:$(go env GOPATH)/bin go vet ./... From 628d84dce1ef75b59285760f3637377fbbfd03fb Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Dec 2020 12:42:44 +0530 Subject: [PATCH 247/335] chore: update program dependency to public repo --- chain/solana/solana-ffi/rust/Cargo.lock | 6 +++--- chain/solana/solana-ffi/rust/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chain/solana/solana-ffi/rust/Cargo.lock b/chain/solana/solana-ffi/rust/Cargo.lock index 19af8862..beb88f6a 100644 --- a/chain/solana/solana-ffi/rust/Cargo.lock +++ b/chain/solana/solana-ffi/rust/Cargo.lock @@ -1806,7 +1806,7 @@ dependencies = [ [[package]] name = "ren-bridge" version = "0.1.0" -source = "git+https://github.com/roynalnaruto/ren-bridge-solana#c3d54722b01859d0ffa82f10f522c356a178c0fd" +source = "git+https://github.com/renproject/ren-solana?branch=feat/solana-program#8f4ca587d96bab76261a0ff9bc64d4ef811636b2" dependencies = [ "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2231,7 +2231,7 @@ version = "0.1.0" dependencies = [ "cbindgen 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "ren-bridge 0.1.0 (git+https://github.com/roynalnaruto/ren-bridge-solana)", + "ren-bridge 0.1.0 (git+https://github.com/renproject/ren-solana?branch=feat/solana-program)", "solana-client 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3629,7 +3629,7 @@ dependencies = [ "checksum regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" "checksum regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" "checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -"checksum ren-bridge 0.1.0 (git+https://github.com/roynalnaruto/ren-bridge-solana)" = "" +"checksum ren-bridge 0.1.0 (git+https://github.com/renproject/ren-solana?branch=feat/solana-program)" = "" "checksum reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" "checksum ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" "checksum rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" diff --git a/chain/solana/solana-ffi/rust/Cargo.toml b/chain/solana/solana-ffi/rust/Cargo.toml index fb2ae608..52f4e8ff 100644 --- a/chain/solana/solana-ffi/rust/Cargo.toml +++ b/chain/solana/solana-ffi/rust/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["staticlib"] [dependencies] libc = "0.2.58" -ren-bridge = { git = "https://github.com/roynalnaruto/ren-bridge-solana", features = ["no-entrypoint"] } +ren-bridge = { git = "https://github.com/renproject/ren-solana", branch = "feat/solana-program", features = ["no-entrypoint"] } solana-client = "1.4.12" solana-sdk = "1.4.12" spl-token = { version = "3.0.0", features = ["no-entrypoint"] } From a1addea5127129a1c6b52e31221738cee0fd921e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Dec 2020 12:52:30 +0530 Subject: [PATCH 248/335] ci: install libudev package --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f58a5a0..e0a3e2b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env From 3bea426f26ea2f65b7a5202d14be5a7416650146 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Dec 2020 13:06:50 +0530 Subject: [PATCH 249/335] ci: install c-for-go --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0a3e2b0..eb62c9e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,6 +41,7 @@ jobs: go get -u golang.org/x/lint/golint go get -u github.com/loongy/covermerge go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go - name: Run vetting run: | From 759830e07264ad5451ae3e90317c3c26ebf98754 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 7 Dec 2020 13:25:02 +0530 Subject: [PATCH 250/335] ci: export go path before building --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb62c9e0..77c22735 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,12 +45,12 @@ jobs: - name: Run vetting run: | + export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi make cd $GITHUB_WORKSPACE/chain/solana/solana-ffi make - export PATH=$PATH:$(go env GOPATH)/bin go vet ./... - name: Run linting From 161ba0e89c519ee773a29f45ff5e9d2f550578c4 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 01:48:31 +0530 Subject: [PATCH 251/335] ci: fix FFI compilation for ubuntu --- chain/solana/solana-ffi/Makefile | 2 +- chain/solana/solana-ffi/solana-ffi.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/chain/solana/solana-ffi/Makefile b/chain/solana/solana-ffi/Makefile index e923690b..0e3eb587 100644 --- a/chain/solana/solana-ffi/Makefile +++ b/chain/solana/solana-ffi/Makefile @@ -9,7 +9,7 @@ $(DEPS): .install-solana-ffi ; cd rust && cargo build --release --all; cd .. find ./rust/target/release -type f -name "solana-ffi.h" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/solana-ffi.h find ./rust/target/release -type f -name "libsolana_ffi.a" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/libsolana_ffi.a - c-for-go --ccincl --ccdefs solana-ffi.yml + c-for-go --ccincl solana-ffi.yml @touch $@ clean: diff --git a/chain/solana/solana-ffi/solana-ffi.yml b/chain/solana/solana-ffi/solana-ffi.yml index c8867469..b4d43deb 100644 --- a/chain/solana/solana-ffi/solana-ffi.yml +++ b/chain/solana/solana-ffi/solana-ffi.yml @@ -8,11 +8,10 @@ GENERATOR: Includes: - solana-ffi.h FlagGroups: - - {name: LDFLAGS, flags: ["-L${SRCDIR} -lsolana_ffi"]} + - {name: LDFLAGS, flags: ["-L${SRCDIR} -lsolana_ffi -ldl -lm"]} PARSER: Defines: - __has_include_next(x): 1 IncludePaths: - /usr/include SourcesPaths: From 3b95333aefc66b03c4796aae357874c5c69ee2e6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 03:18:39 +0530 Subject: [PATCH 252/335] feat: FFI add support for more operations --- chain/solana/solana-ffi/rust/Cargo.lock | 144 +++++++++ chain/solana/solana-ffi/rust/Cargo.toml | 6 + chain/solana/solana-ffi/rust/src/lib.rs | 392 +++++++++++++++++++++++ chain/solana/solana-ffi/rust/src/util.rs | 95 ++++++ chain/solana/solana-ffi/solana-ffi.yml | 21 +- 5 files changed, 657 insertions(+), 1 deletion(-) create mode 100644 chain/solana/solana-ffi/rust/src/util.rs diff --git a/chain/solana/solana-ffi/rust/Cargo.lock b/chain/solana/solana-ffi/rust/Cargo.lock index beb88f6a..85318197 100644 --- a/chain/solana/solana-ffi/rust/Cargo.lock +++ b/chain/solana/solana-ffi/rust/Cargo.lock @@ -171,6 +171,44 @@ name = "block-padding" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "borsh" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "borsh-derive 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "borsh-derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "borsh-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "borsh-schema-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bs58" version = "0.3.1" @@ -536,6 +574,38 @@ dependencies = [ "zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "darling_macro 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "dashmap" version = "3.11.10" @@ -556,6 +626,29 @@ dependencies = [ "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "derive_builder" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_builder_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "derive_builder_core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "dialoguer" version = "0.6.2" @@ -1010,6 +1103,11 @@ dependencies = [ "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "idna" version = "0.2.0" @@ -1821,6 +1919,23 @@ dependencies = [ "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "renvm-sig" +version = "0.1.0" +source = "git+https://github.com/roynalnaruto/renvm-sig#dcbeee709830b99073e4206f3dec17c98cf6140f" +dependencies = [ + "borsh 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_builder 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "reqwest" version = "0.10.9" @@ -1891,6 +2006,11 @@ name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rustc_version" version = "0.2.3" @@ -2229,11 +2349,17 @@ dependencies = [ name = "solana-ffi" version = "0.1.0" dependencies = [ + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "cbindgen 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", "ren-bridge 0.1.0 (git+https://github.com/renproject/ren-solana?branch=feat/solana-program)", + "renvm-sig 0.1.0 (git+https://github.com/roynalnaruto/renvm-sig)", + "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "solana-client 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "spl-associated-token-account 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2624,6 +2750,11 @@ name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "subtle" version = "1.0.0" @@ -3441,6 +3572,10 @@ dependencies = [ "checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" "checksum block-padding 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +"checksum borsh 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "30f3fd65922359a7c6e791bc9b2bba1b977ea0c0b96a528ac48007f535fb4184" +"checksum borsh-derive 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b2d74755d937d261d5e9bdef87e0addfbc1ace0214f7776f21532d6e97325356" +"checksum borsh-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c9f966cb7a42c8ed83546ef481bc1d1dec888fe5f84a4737d5c2094a483e41e" +"checksum borsh-schema-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5df2543b56ebc2b4493e70d024ebde2cbb48d97bf7b1a16318eff30bd02669b8" "checksum bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" "checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" "checksum bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" @@ -3481,8 +3616,13 @@ dependencies = [ "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" "checksum crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" "checksum curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" +"checksum darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +"checksum darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +"checksum darling_macro 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" "checksum dashmap 3.11.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" "checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +"checksum derive_builder 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" +"checksum derive_builder_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" "checksum dialoguer 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" @@ -3536,6 +3676,7 @@ dependencies = [ "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" "checksum hyper 0.13.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf" "checksum hyper-rustls 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +"checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" "checksum indicatif 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" @@ -3630,11 +3771,13 @@ dependencies = [ "checksum regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" "checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" "checksum ren-bridge 0.1.0 (git+https://github.com/renproject/ren-solana?branch=feat/solana-program)" = "" +"checksum renvm-sig 0.1.0 (git+https://github.com/roynalnaruto/renvm-sig)" = "" "checksum reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" "checksum ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" "checksum rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" "checksum rustc-demangle 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" "checksum rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +"checksum rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" "checksum rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" @@ -3691,6 +3834,7 @@ dependencies = [ "checksum spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f77fa0b41cbc82d1d7c8f2d914b49e9a1a7b6e32af952d03383fb989c42bc89" "checksum stable_deref_trait 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" "checksum symlink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" diff --git a/chain/solana/solana-ffi/rust/Cargo.toml b/chain/solana/solana-ffi/rust/Cargo.toml index 52f4e8ff..b5d025d1 100644 --- a/chain/solana/solana-ffi/rust/Cargo.toml +++ b/chain/solana/solana-ffi/rust/Cargo.toml @@ -8,10 +8,16 @@ edition = "2018" crate-type = ["staticlib"] [dependencies] +arrayref = "0.3.6" +bincode = "1.3.1" +digest = "0.9.0" libc = "0.2.58" ren-bridge = { git = "https://github.com/renproject/ren-solana", branch = "feat/solana-program", features = ["no-entrypoint"] } +renvm-sig = { git = "https://github.com/roynalnaruto/renvm-sig" } +sha3 = "0.9.1" solana-client = "1.4.12" solana-sdk = "1.4.12" +spl-associated-token-account = { version = "1.0.0", features = ["no-entrypoint"] } spl-token = { version = "3.0.0", features = ["no-entrypoint"] } [build-dependencies] diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs index 464252db..4d042dec 100644 --- a/chain/solana/solana-ffi/rust/src/lib.rs +++ b/chain/solana/solana-ffi/rust/src/lib.rs @@ -1,12 +1,28 @@ extern crate libc; +use arrayref::array_refs; +use digest::Digest; +use ren_bridge::{ + instruction::{burn, initialize, initialize_token, mint}, + state::RenBridge, +}; +use renvm_sig::{RenVM, RenVmMsgBuilder}; +use solana_client::{rpc_client::RpcClient, rpc_config::RpcSendTransactionConfig}; use solana_sdk::{ + commitment_config::CommitmentConfig, + program_pack::Pack, pubkey::Pubkey, + signature::{read_keypair_file, Signer}, + transaction::Transaction, }; +use spl_associated_token_account::{create_associated_token_account, get_associated_token_address}; +use spl_token::instruction::burn_checked; use std::{ ffi::{CStr, CString}, str::FromStr, }; +mod util; + #[no_mangle] pub extern "C" fn unique_pubkey() -> *const libc::c_char { let pubkey = Pubkey::new_unique(); @@ -33,3 +49,379 @@ pub extern "C" fn program_derived_address( .unwrap() .into_raw() } + +#[no_mangle] +pub extern "C" fn ren_bridge_initialize( + keypair_path: *const libc::c_char, + rpc_url: *const libc::c_char, + authority_pointer: *const u8, +) -> *const libc::c_char { + // Solana default signer and fee payer. + let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; + let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); + let payer = read_keypair_file(&keypair_path).unwrap(); + + // Initialize client. + let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; + let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); + let rpc_client = RpcClient::new(rpc_url); + let commitment_config = CommitmentConfig::single_gossip(); + let (recent_blockhash, _, _) = rpc_client + .get_recent_blockhash_with_commitment(commitment_config) + .unwrap() + .value; + + // Construct the RenVM authority 20-bytes Ethereum compatible address. + let authority_slice = + unsafe { std::slice::from_raw_parts(authority_pointer as *const u8, 20usize) }; + let mut authority = [0u8; 20usize]; + authority.copy_from_slice(authority_slice); + + // Find derived address that will hold RenBridge's state. + let (ren_bridge_account_id, _) = + Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); + + // Build and sign the initialize transaction. + let mut tx = Transaction::new_with_payer( + &[initialize( + &ren_bridge::id(), + &payer.pubkey(), + &ren_bridge_account_id, + authority, + ) + .unwrap()], + Some(&payer.pubkey()), + ); + tx.sign(&[&payer], recent_blockhash); + + // Broadcast transaction. + let signature = rpc_client + .send_transaction_with_config( + &tx, + RpcSendTransactionConfig { + preflight_commitment: Some(commitment_config.commitment), + ..RpcSendTransactionConfig::default() + }, + ) + .unwrap(); + + CString::new(signature.to_string()).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn ren_bridge_initialize_token( + keypair_path: *const libc::c_char, + rpc_url: *const libc::c_char, + selector: *const libc::c_char, +) -> *const libc::c_char { + // Solana default signer and fee payer. + let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; + let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); + let payer = read_keypair_file(&keypair_path).unwrap(); + + // Initialize client. + let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; + let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); + let rpc_client = RpcClient::new(rpc_url); + let commitment_config = CommitmentConfig::single_gossip(); + let (recent_blockhash, _, _) = rpc_client + .get_recent_blockhash_with_commitment(commitment_config) + .unwrap() + .value; + + // Get selector hash. + let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; + let selector = String::from_utf8(buf_name.to_vec()).unwrap(); + let mut hasher = sha3::Keccak256::new(); + hasher.update(selector.as_bytes()); + let selector_hash: [u8; 32] = hasher.finalize().into(); + + // Derived address that will be the token mint. + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + + // Build and sign the initialize transaction. + let mut tx = Transaction::new_with_payer( + &[initialize_token( + &ren_bridge::id(), + &payer.pubkey(), + &token_mint_id, + &spl_token::id(), + selector_hash, + ) + .unwrap()], + Some(&payer.pubkey()), + ); + tx.sign(&[&payer], recent_blockhash); + + // Broadcast transaction. + let signature = rpc_client + .send_transaction_with_config( + &tx, + RpcSendTransactionConfig { + preflight_commitment: Some(commitment_config.commitment), + ..RpcSendTransactionConfig::default() + }, + ) + .unwrap(); + + CString::new(signature.to_string()).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn ren_bridge_initialize_account( + keypair_path: *const libc::c_char, + rpc_url: *const libc::c_char, + selector: *const libc::c_char, +) -> *const libc::c_char { + // Solana default signer and fee payer. + let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; + let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); + let payer = read_keypair_file(&keypair_path).unwrap(); + + // Initialize client. + let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; + let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); + let rpc_client = RpcClient::new(rpc_url); + let commitment_config = CommitmentConfig::single_gossip(); + let (recent_blockhash, _, _) = rpc_client + .get_recent_blockhash_with_commitment(commitment_config) + .unwrap() + .value; + + // Get selector hash. + let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; + let selector = String::from_utf8(buf_name.to_vec()).unwrap(); + let mut hasher = sha3::Keccak256::new(); + hasher.update(selector.as_bytes()); + let selector_hash: [u8; 32] = hasher.finalize().into(); + + // Derived address that will be the token mint. + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + + // Build and sign transaction. + let mut tx = Transaction::new_with_payer( + &[create_associated_token_account( + &payer.pubkey(), + &payer.pubkey(), + &token_mint_id, + )], + Some(&payer.pubkey()), + ); + tx.sign(&[&payer], recent_blockhash); + + // Broadcast transaction. + let signature = rpc_client + .send_transaction_with_config( + &tx, + RpcSendTransactionConfig { + preflight_commitment: Some(commitment_config.commitment), + ..RpcSendTransactionConfig::default() + }, + ) + .unwrap(); + + CString::new(signature.to_string()).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn ren_bridge_get_burn_count(rpc_url: *const libc::c_char) -> u64 { + // Initialize client. + let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; + let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); + let rpc_client = RpcClient::new(rpc_url); + + // Fetch account data. + let (ren_bridge_account_id, _) = + Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); + let ren_bridge_account_data = rpc_client.get_account_data(&ren_bridge_account_id).unwrap(); + let ren_bridge_state = RenBridge::unpack_unchecked(&ren_bridge_account_data).unwrap(); + + ren_bridge_state.burn_count + 1 +} + +#[no_mangle] +pub extern "C" fn ren_bridge_mint( + keypair_path: *const libc::c_char, + rpc_url: *const libc::c_char, + authority_secret: *const libc::c_char, + selector: *const libc::c_char, + amount: u64, +) -> *const libc::c_char { + // Solana default signer and fee payer. + let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; + let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); + let payer = read_keypair_file(&keypair_path).unwrap(); + + // RenVM authority secret. + let buf_name = unsafe { CStr::from_ptr(authority_secret).to_bytes() }; + let authority_secret = String::from_utf8(buf_name.to_vec()).unwrap(); + let renvm = RenVM::from_str(&authority_secret).unwrap(); + let renvm_authority = renvm.address(); + + // Initialize client. + let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; + let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); + let rpc_client = RpcClient::new(rpc_url); + let commitment_config = CommitmentConfig::single_gossip(); + let (recent_blockhash, _, _) = rpc_client + .get_recent_blockhash_with_commitment(commitment_config) + .unwrap() + .value; + + // Get selector hash. + let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; + let selector = String::from_utf8(buf_name.to_vec()).unwrap(); + let mut hasher = sha3::Keccak256::new(); + hasher.update(selector.as_bytes()); + let selector_hash: [u8; 32] = hasher.finalize().into(); + + // Derived address that will be the token mint. + let (ren_bridge_account_id, _) = + Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + let (mint_authority_id, _) = + Pubkey::find_program_address(&[&token_mint_id.to_bytes()], &ren_bridge::id()); + let associated_token_account = get_associated_token_address(&payer.pubkey(), &token_mint_id); + + // Construct RenVM mint message and sign it. + let renvm_mint_msg = RenVmMsgBuilder::default() + .amount(amount) + .to(associated_token_account.to_bytes()) + .s_hash(selector_hash) + .build() + .unwrap(); + let msg_hash = renvm_mint_msg.get_digest().unwrap(); + let renvm_sig = renvm.sign(&renvm_mint_msg).unwrap(); + let (sig_r, sig_s, sig_v) = array_refs![&renvm_sig, 32, 32, 1]; + let (mint_log_account_id, _) = + Pubkey::find_program_address(&[&msg_hash[..]], &ren_bridge::id()); + let mut tx = Transaction::new_with_payer( + &[ + mint( + &ren_bridge::id(), + &payer.pubkey(), + &ren_bridge_account_id, + &token_mint_id, + &associated_token_account, + &mint_log_account_id, + &mint_authority_id, + &spl_token::id(), + ) + .unwrap(), + util::mint_secp_instruction( + sig_r, + sig_s, + u8::from_le_bytes(*sig_v), + &util::encode_msg( + renvm_mint_msg.amount, + &renvm_mint_msg.s_hash, + &renvm_mint_msg.to, + &renvm_mint_msg.p_hash, + &renvm_mint_msg.n_hash, + ), + renvm_authority[..].to_vec(), + ), + ], + Some(&payer.pubkey()), + ); + tx.sign(&[&payer], recent_blockhash); + + // Broadcast transaction. + let signature = rpc_client + .send_transaction_with_config( + &tx, + RpcSendTransactionConfig { + preflight_commitment: Some(commitment_config.commitment), + ..RpcSendTransactionConfig::default() + }, + ) + .unwrap(); + + CString::new(signature.to_string()).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn ren_bridge_burn( + keypair_path: *const libc::c_char, + rpc_url: *const libc::c_char, + selector: *const libc::c_char, + burn_count: u64, + burn_amount: u64, + recipient_pointer: *const u8, +) -> *const libc::c_char { + // Solana default signer and fee payer. + let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; + let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); + let payer = read_keypair_file(&keypair_path).unwrap(); + + // Initialize client. + let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; + let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); + let rpc_client = RpcClient::new(rpc_url); + let commitment_config = CommitmentConfig::single_gossip(); + let (recent_blockhash, _, _) = rpc_client + .get_recent_blockhash_with_commitment(commitment_config) + .unwrap() + .value; + + // Get selector hash. + let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; + let selector = String::from_utf8(buf_name.to_vec()).unwrap(); + let mut hasher = sha3::Keccak256::new(); + hasher.update(selector.as_bytes()); + let selector_hash: [u8; 32] = hasher.finalize().into(); + + // Derived address that will be the token mint. + let (ren_bridge_account_id, _) = + Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + let associated_token_account = get_associated_token_address(&payer.pubkey(), &token_mint_id); + + // Construct the 25-bytes address of release recipient of the underlying assets. + let recipient_slice = + unsafe { std::slice::from_raw_parts(recipient_pointer as *const u8, 25usize) }; + let mut release_recipient = [0u8; 25usize]; + release_recipient.copy_from_slice(recipient_slice); + + let (burn_log_account_id, _) = + Pubkey::find_program_address(&[&burn_count.to_le_bytes()[..]], &ren_bridge::id()); + let mut tx = Transaction::new_with_payer( + &[ + burn_checked( + &spl_token::id(), + &associated_token_account, + &token_mint_id, + &payer.pubkey(), + &[], + burn_amount, + 9u8, + ) + .unwrap(), + burn( + &ren_bridge::id(), + &payer.pubkey(), + &associated_token_account, + &ren_bridge_account_id, + &token_mint_id, + &burn_log_account_id, + release_recipient, + ) + .unwrap(), + ], + Some(&payer.pubkey()), + ); + tx.sign(&[&payer], recent_blockhash); + + // Broadcast transaction. + let signature = rpc_client + .send_transaction_with_config( + &tx, + RpcSendTransactionConfig { + preflight_commitment: Some(commitment_config.commitment), + ..RpcSendTransactionConfig::default() + }, + ) + .unwrap(); + + CString::new(signature.to_string()).unwrap().into_raw() +} diff --git a/chain/solana/solana-ffi/rust/src/util.rs b/chain/solana/solana-ffi/rust/src/util.rs new file mode 100644 index 00000000..349aa53c --- /dev/null +++ b/chain/solana/solana-ffi/rust/src/util.rs @@ -0,0 +1,95 @@ +use ren_bridge::types::{ + RenVmMintMessage, Secp256k1InstructionData, RENVM_MINT_MESSAGE_SIZE, RENVM_MINT_SECP_DATA_SIZE, +}; +use solana_sdk::{ + instruction::Instruction, + program_pack::Pack, + secp256k1::{ + SecpSignatureOffsets, HASHED_PUBKEY_SERIALIZED_SIZE, SIGNATURE_OFFSETS_SERIALIZED_SIZE, + }, +}; + +/// Constructs a Secp256k1 instruction for RenVM mint to be verified by Solana Secp256k1 program. +pub fn mint_secp_instruction( + sig_r: &[u8; 32], + sig_s: &[u8; 32], + sig_v: u8, + message_arr: &[u8], + eth_addr: Vec, +) -> Instruction { + // Assert that the data we've received is of the correct size. + assert_eq!(message_arr.len(), RENVM_MINT_MESSAGE_SIZE); + assert_eq!( + eth_addr.len() + sig_r.len() + sig_s.len() + 1 + message_arr.len(), + RENVM_MINT_SECP_DATA_SIZE - 1, + ); + + // Allocate appropriate size for our instruction data. + let mut instruction_data = vec![]; + let data_start = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE; + let total_size = data_start + RENVM_MINT_SECP_DATA_SIZE; + instruction_data.resize(total_size, 0); + + // Calculate the offsets for a single ECDSA signature. + let num_signatures = 1; + instruction_data[0] = num_signatures; + let eth_addr_offset = data_start + 1; + let signature_offset = eth_addr_offset + eth_addr.len(); + let message_data_offset = signature_offset + sig_r.len() + sig_s.len() + 1; + + // Copy data from slice into sized arrays. + let mut addr = [0u8; HASHED_PUBKEY_SERIALIZED_SIZE]; + addr.copy_from_slice(ð_addr[..]); + let mut msg = [0u8; RENVM_MINT_MESSAGE_SIZE]; + msg.copy_from_slice(message_arr); + + // Write Secp256k1InstructionData data. + let secp256k1_instruction_data = Secp256k1InstructionData::MintSignature { + eth_addr: addr, + sig_r: *sig_r, + sig_s: *sig_s, + sig_v: sig_v - 27, + msg: msg, + }; + let packed_data = secp256k1_instruction_data.pack(); + instruction_data[data_start..total_size].copy_from_slice(packed_data.as_slice()); + + // Write offsets data. + let offsets = SecpSignatureOffsets { + signature_offset: signature_offset as u16, + signature_instruction_index: 1, + eth_address_offset: eth_addr_offset as u16, + eth_address_instruction_index: 1, + message_data_offset: message_data_offset as u16, + message_data_size: message_arr.len() as u16, + message_instruction_index: 1, + }; + let writer = std::io::Cursor::new(&mut instruction_data[1..data_start]); + bincode::serialize_into(writer, &offsets).unwrap(); + + Instruction { + program_id: solana_sdk::secp256k1_program::id(), + accounts: vec![], + data: instruction_data, + } +} + +/// ABI-encode the values for creating the signature hash. +pub fn encode_msg( + amount: u64, + shash: &[u8; 32], + to: &[u8; 32], + p_hash: &[u8; 32], + n_hash: &[u8; 32], +) -> Vec { + let mut encoded_msg = vec![0u8; RENVM_MINT_MESSAGE_SIZE]; + let msg = RenVmMintMessage { + p_hash: *p_hash, + amount: amount, + selector_hash: *shash, + to: *to, + n_hash: *n_hash, + }; + msg.pack_into_slice(encoded_msg.as_mut_slice()); + encoded_msg +} diff --git a/chain/solana/solana-ffi/solana-ffi.yml b/chain/solana/solana-ffi/solana-ffi.yml index b4d43deb..652587ec 100644 --- a/chain/solana/solana-ffi/solana-ffi.yml +++ b/chain/solana/solana-ffi/solana-ffi.yml @@ -8,7 +8,20 @@ GENERATOR: Includes: - solana-ffi.h FlagGroups: - - {name: LDFLAGS, flags: ["-L${SRCDIR} -lsolana_ffi -ldl -lm"]} + - {name: "LDFLAGS", flags: [ + "-L${SRCDIR}", + "-lsolana_ffi", + "-ldl", + "-lm", + ]} + - {name: "darwin LDFLAGS", flags: [ + "-F/Library/Frameworks", + "-framework Security", + "-framework CoreServices", + "-framework IOKit", + "-framework IOSurface", + "-framework AppKit", + ]} PARSER: Defines: @@ -22,6 +35,12 @@ TRANSLATOR: function: - {action: accept, from: "unique_pubkey"} - {action: accept, from: "program_derived_address"} + - {action: accept, from: "ren_bridge_initialize"} + - {action: accept, from: "ren_bridge_initialize_token"} + - {action: accept, from: "ren_bridge_initialize_account"} + - {action: accept, from: "ren_bridge_get_burn_count"} + - {action: accept, from: "ren_bridge_mint"} + - {action: accept, from: "ren_bridge_burn"} private: - {transform: unexport} post-global: From d1eb45dc596fc12533f1ca924299cc545eb30a85 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 03:32:10 +0530 Subject: [PATCH 253/335] fix: separate out flags for linux --- chain/solana/solana-ffi/solana-ffi.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chain/solana/solana-ffi/solana-ffi.yml b/chain/solana/solana-ffi/solana-ffi.yml index 652587ec..06ba5a29 100644 --- a/chain/solana/solana-ffi/solana-ffi.yml +++ b/chain/solana/solana-ffi/solana-ffi.yml @@ -11,8 +11,14 @@ GENERATOR: - {name: "LDFLAGS", flags: [ "-L${SRCDIR}", "-lsolana_ffi", + ]} + - {name: "linux LDFLAGS", flags: [ + "-lcrypto", "-ldl", "-lm", + "-lrt", + "-lssl", + "-ludev", ]} - {name: "darwin LDFLAGS", flags: [ "-F/Library/Frameworks", From b382f7d56d707d981b131780a2e63d20d77e1a7a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 13:42:30 +0530 Subject: [PATCH 254/335] test: mint burn and call contract tests for Solana using FFI --- chain/solana/solana_test.go | 79 ++++++++++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 14 deletions(-) diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index deacba77..388fe890 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -2,41 +2,92 @@ package solana_test import ( "context" + "encoding/hex" + "os" + "time" "github.com/btcsuite/btcd/chaincfg" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/solana" + "github.com/renproject/multichain/chain/solana/solana-ffi/cgo" "github.com/renproject/pack" "github.com/renproject/surge" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("Solana", func() { - Context("fetch burn log", func() { - It("should be able to fetch", func() { - client := solana.NewClient(solana.DefaultClientOptions()) + // Setup logger. + loggerConfig := zap.NewDevelopmentConfig() + loggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder + logger, err := loggerConfig.Build() + Expect(err).ToNot(HaveOccurred()) - burnCount := pack.NewU64(uint64(1)) - contractCallInput := solana.BurnCallContractInput{Nonce: burnCount} - calldata, err := surge.ToBinary(contractCallInput) - Expect(err).ToNot(HaveOccurred()) + Context("mint and burn", func() { + It("should succeed", func() { + // Base58 address of the RenBridge program that is deployed to Solana. program := multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP") - burnLogBytes, err := client.CallContract(context.Background(), program, calldata) + // Construct user's keypair path (~/.config/solana/id.json). + userHomeDir, err := os.UserHomeDir() Expect(err).NotTo(HaveOccurred()) + keypairPath := userHomeDir + "/.config/solana/id.json" - burnLog := solana.BurnCallContractOutput{} - err = surge.FromBinary(&burnLog, burnLogBytes) + // RenVM secret and corresponding authority (20-byte Ethereum address). + renVmSecret := "0000000000000000000000000000000000000000000000000000000000000001" + renVmAuthority := "7E5F4552091A69125d5DfCb7b8C2659029395Bdf" + renVmAuthorityBytes, err := hex.DecodeString(renVmAuthority) Expect(err).NotTo(HaveOccurred()) - Expect(burnLog.Amount).To(Equal(pack.U64(2000000000))) - expectedRecipient := multichain.Address("mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4") + + // Initialize RenBridge program. + initializeSig := cgo.RenBridgeInitialize(keypairPath, solana.DefaultClientRPCURL, renVmAuthorityBytes) + logger.Debug("Initialize", zap.String("tx signature", string(initializeSig))) + + // Initialize RenBTC token. + time.Sleep(10 * time.Second) + selector := "BTC/toSolana" + initializeTokenSig := cgo.RenBridgeInitializeToken(keypairPath, solana.DefaultClientRPCURL, selector) + logger.Debug("InitializeToken", zap.String("tx signature", string(initializeTokenSig))) + + // Initialize a new token account. + time.Sleep(10 * time.Second) + initializeAccountSig := cgo.RenBridgeInitializeAccount(keypairPath, solana.DefaultClientRPCURL, selector) + logger.Debug("InitializeAccount", zap.String("tx signature", string(initializeAccountSig))) + + // Mint some tokens. + time.Sleep(10 * time.Second) + mintAmount := uint64(10000000000) // 10 tokens. + mintSig := cgo.RenBridgeMint(keypairPath, solana.DefaultClientRPCURL, renVmSecret, selector, mintAmount) + logger.Debug("Mint", zap.String("tx signature", string(mintSig))) + + // Burn some tokens. + time.Sleep(10 * time.Second) + recipient := multichain.Address("mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4") bitcoinAddrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) - rawAddr, err := bitcoinAddrEncodeDecoder.DecodeAddress(expectedRecipient) + recipientRawAddr, err := bitcoinAddrEncodeDecoder.DecodeAddress(recipient) + Expect(err).NotTo(HaveOccurred()) + burnCount := cgo.RenBridgeGetBurnCount(solana.DefaultClientRPCURL) + burnAmount := uint64(5000000000) // 5 tokens. + burnSig := cgo.RenBridgeBurn(keypairPath, solana.DefaultClientRPCURL, selector, burnCount, burnAmount, []byte(recipientRawAddr)) + logger.Debug("Burn", zap.String("tx signature", string(burnSig))) + + // Fetch burn log. + time.Sleep(20 * time.Second) + client := solana.NewClient(solana.DefaultClientOptions()) + contractCallInput := solana.BurnCallContractInput{Nonce: pack.NewU64(burnCount)} + calldata, err := surge.ToBinary(contractCallInput) + Expect(err).ToNot(HaveOccurred()) + burnLogBytes, err := client.CallContract(context.Background(), program, calldata) + Expect(err).NotTo(HaveOccurred()) + burnLog := solana.BurnCallContractOutput{} + err = surge.FromBinary(&burnLog, burnLogBytes) Expect(err).NotTo(HaveOccurred()) - Expect(burnLog.Recipient).To(Equal(rawAddr)) + Expect(burnLog.Amount).To(Equal(pack.U64(burnAmount))) + Expect(burnLog.Recipient).To(Equal(recipientRawAddr)) }) }) }) From b5dccc9d50233457b49adda391fab4d093d9d869 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 16:29:51 +0530 Subject: [PATCH 255/335] fix: uint64 mismatch between Linux and Darwin --- chain/solana/solana-ffi/rust/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs index 4d042dec..c45ba253 100644 --- a/chain/solana/solana-ffi/rust/src/lib.rs +++ b/chain/solana/solana-ffi/rust/src/lib.rs @@ -224,7 +224,7 @@ pub extern "C" fn ren_bridge_initialize_account( } #[no_mangle] -pub extern "C" fn ren_bridge_get_burn_count(rpc_url: *const libc::c_char) -> u64 { +pub extern "C" fn ren_bridge_get_burn_count(rpc_url: *const libc::c_char) -> libc::c_ulonglong { // Initialize client. let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); @@ -245,7 +245,7 @@ pub extern "C" fn ren_bridge_mint( rpc_url: *const libc::c_char, authority_secret: *const libc::c_char, selector: *const libc::c_char, - amount: u64, + amount: libc::c_ulonglong, ) -> *const libc::c_char { // Solana default signer and fee payer. let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; @@ -345,8 +345,8 @@ pub extern "C" fn ren_bridge_burn( keypair_path: *const libc::c_char, rpc_url: *const libc::c_char, selector: *const libc::c_char, - burn_count: u64, - burn_amount: u64, + burn_count: libc::c_ulonglong, + burn_amount: libc::c_ulonglong, recipient_pointer: *const u8, ) -> *const libc::c_char { // Solana default signer and fee payer. From 0489333860069471d90adaf5d7d3531ddb8c9dc9 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 16:35:11 +0530 Subject: [PATCH 256/335] ci: test solana mint-burn in CI --- .github/workflows/test.yml | 11 ++++ infra/docker-compose.yaml | 13 ----- infra/solana/Dockerfile | 19 ------- infra/solana/run.sh | 108 ------------------------------------- 4 files changed, 11 insertions(+), 140 deletions(-) delete mode 100644 infra/solana/Dockerfile delete mode 100644 infra/solana/run.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77c22735..5ae69fc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,6 +90,17 @@ jobs: cd $GITHUB_WORKSPACE CI=true go test -timeout 1500s + - name: Run tests for Solana + run: | + sh -c "$(curl -sSfL https://release.solana.com/v1.4.14/install)" + git clone https://github.com/renproject/ren-solana.git + cd ren-solana + git checkout feat/solana-program + echo ${{ secrets.REN_BRIDGE_PROGRAM_ID }} > ~/.config/solana/ren-bridge-program.json + ./setup.sh + cd $GITHUB_WORKSPACE/chain/solana + go test -timeout 100s + build: runs-on: ubuntu-latest steps: diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index b30be3fb..d558c1cd 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -112,19 +112,6 @@ services: entrypoint: - "/root/run.sh" - # - # Solana - # - solana: - build: - context: ./solana - ports: - - "0.0.0.0:8899:8899" - - "0.0.0.0:8900:8900" - - "0.0.0.0:9900:9900" - entrypoint: - - "./root/run.sh" - # # Zcash # diff --git a/infra/solana/Dockerfile b/infra/solana/Dockerfile deleted file mode 100644 index 43633d56..00000000 --- a/infra/solana/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM debian:buster - -RUN apt-get update --fix-missing -RUN apt-get install --yes curl bzip2 libssl-dev - -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - -RUN apt-get install --yes nodejs - -RUN curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v1.2.13/install/solana-install-init.sh | sh -s - v1.2.13 - -COPY run.sh /root/run.sh -RUN chmod +x /root/run.sh - -EXPOSE 8899/tcp -EXPOSE 8900 -EXPOSE 9900 - -ENTRYPOINT ["./root/run.sh"] -CMD [""] \ No newline at end of file diff --git a/infra/solana/run.sh b/infra/solana/run.sh deleted file mode 100644 index f40bd4aa..00000000 --- a/infra/solana/run.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash -# -# Run a minimal Solana cluster. Ctrl-C to exit. -# -# Before running this script ensure standard Solana programs are available -# in the PATH, or that `cargo build` ran successfully -# -set -e - -# Update path -PATH="/root/.local/share/solana/install/active_release/bin:$PATH" - -# Prefer possible `cargo build` binaries over PATH binaries -cd "$(dirname "$0")/" - -profile=debug -if [[ -n $NDEBUG ]]; then - profile=release -fi -PATH=$PWD/target/$profile:$PATH - -ok=true -for program in solana-{faucet,genesis,keygen,validator}; do - $program -V || ok=false -done -$ok || { - echo - echo "Unable to locate required programs. Try building them first with:" - echo - echo " $ cargo build --all" - echo - exit 1 -} - -export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info -export RUST_BACKTRACE=1 -dataDir=$PWD/config/"$(basename "$0" .sh)" -ledgerDir=$PWD/config/ledger - -set -x -validator_identity="$dataDir/validator-identity.json" -if [[ -e $validator_identity ]]; then - echo "Use existing validator keypair" -else - solana-keygen new --no-passphrase -so "$validator_identity" -fi -validator_vote_account="$dataDir/validator-vote-account.json" -if [[ -e $validator_vote_account ]]; then - echo "Use existing validator vote account keypair" -else - solana-keygen new --no-passphrase -so "$validator_vote_account" -fi -validator_stake_account="$dataDir/validator-stake-account.json" -if [[ -e $validator_stake_account ]]; then - echo "Use existing validator stake account keypair" -else - solana-keygen new --no-passphrase -so "$validator_stake_account" -fi -faucet="$dataDir"/faucet.json -if [[ -e $faucet ]]; then - echo "Use existing faucet keypair" -else - solana-keygen new --no-passphrase -fso "$faucet" -fi - -if [[ -e "$ledgerDir"/genesis.bin || -e "$ledgerDir"/genesis.tar.bz2 ]]; then - echo "Use existing genesis" -else - # shellcheck disable=SC2086 - solana-genesis \ - --hashes-per-tick sleep \ - --faucet-pubkey "$dataDir"/faucet.json \ - --faucet-lamports 500000000000000000 \ - --bootstrap-validator \ - "$dataDir"/validator-identity.json \ - "$dataDir"/validator-vote-account.json \ - "$dataDir"/validator-stake-account.json \ - --ledger "$ledgerDir" \ - --operating-mode development \ - $SOLANA_RUN_SH_GENESIS_ARGS -fi - -abort() { - set +e - kill "$faucet" "$validator" - wait "$validator" -} -trap abort INT TERM EXIT - -solana-faucet --keypair "$dataDir"/faucet.json & -faucet=$! - -args=( - --identity "$dataDir"/validator-identity.json - --vote-account "$dataDir"/validator-vote-account.json - --ledger "$ledgerDir" - --gossip-port 8001 - --rpc-port 8899 - --rpc-faucet-address 127.0.0.1:9900 - --log - - --enable-rpc-exit - --enable-rpc-transaction-history - --init-complete-file "$dataDir"/init-completed -) -solana-validator "${args[@]}" & -validator=$! - -wait "$validator" \ No newline at end of file From 22dc768347bd460677275e6582819e389d94d493 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 17:31:17 +0530 Subject: [PATCH 257/335] fix: export path for build-bpf and solana commands --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ae69fc6..2776b463 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,6 +93,7 @@ jobs: - name: Run tests for Solana run: | sh -c "$(curl -sSfL https://release.solana.com/v1.4.14/install)" + export PATH="/root/.local/share/solana/install/active_release/bin:$PATH" git clone https://github.com/renproject/ren-solana.git cd ren-solana git checkout feat/solana-program From 49b98c769646a534d04ba373cfa47ded1880d411 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 8 Dec 2020 21:35:08 +0530 Subject: [PATCH 258/335] fix: update export path for solana cli tools --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2776b463..af61a802 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,7 +93,7 @@ jobs: - name: Run tests for Solana run: | sh -c "$(curl -sSfL https://release.solana.com/v1.4.14/install)" - export PATH="/root/.local/share/solana/install/active_release/bin:$PATH" + export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" git clone https://github.com/renproject/ren-solana.git cd ren-solana git checkout feat/solana-program From 486ab0f48e60c3dc0b056b349aac59799edf3cfd Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 4 Mar 2021 20:44:47 +0530 Subject: [PATCH 259/335] chore: upgrade compatibility and naming --- .github/workflows/test.yml | 6 +- chain/solana/solana-ffi/rust/Cargo.lock | 3612 +++++++++++----------- chain/solana/solana-ffi/rust/Cargo.toml | 8 +- chain/solana/solana-ffi/rust/src/lib.rs | 127 +- chain/solana/solana-ffi/rust/src/util.rs | 4 +- chain/solana/solana-ffi/solana-ffi.yml | 11 +- chain/solana/solana_ffi_test.go | 2 +- chain/solana/solana_test.go | 21 +- 8 files changed, 1927 insertions(+), 1864 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af61a802..6b0141cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,12 +92,12 @@ jobs: - name: Run tests for Solana run: | - sh -c "$(curl -sSfL https://release.solana.com/v1.4.14/install)" + sh -c "$(curl -sSfL https://release.solana.com/v1.5.13/install)" export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" git clone https://github.com/renproject/ren-solana.git cd ren-solana - git checkout feat/solana-program - echo ${{ secrets.REN_BRIDGE_PROGRAM_ID }} > ~/.config/solana/ren-bridge-program.json + git checkout feat/gateway + echo ${{ secrets.GATEWAY_PROGRAM_ID }} > ~/.config/solana/gateway-program.json ./setup.sh cd $GITHUB_WORKSPACE/chain/solana go test -timeout 100s diff --git a/chain/solana/solana-ffi/rust/Cargo.lock b/chain/solana/solana-ffi/rust/Cargo.lock index 85318197..66a518fd 100644 --- a/chain/solana/solana-ffi/rust/Cargo.lock +++ b/chain/solana/solana-ffi/rust/Cargo.lock @@ -4,1919 +4,2230 @@ name = "Inflector" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "regex", ] [[package]] name = "addr2line" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ - "gimli 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gimli", ] [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.3.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "const-random 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" [[package]] name = "aho-corasick" version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" dependencies = [ - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] name = "arrayref" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "assert_matches" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", + "winapi 0.3.9", ] [[package]] name = "autocfg" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.55" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" dependencies = [ - "addr2line 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "object 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "addr2line", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "serde", ] [[package]] name = "base32" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" [[package]] name = "base64" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "base64" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "base64" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bincode" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d175dfa69e619905c4c3cdb7c3c203fa3bdd5d51184e3afdb2742c0280493772" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "serde", ] [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "blake3" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "arrayvec", + "cc", + "cfg-if 0.1.10", + "constant_time_eq", + "crypto-mac 0.8.0", + "digest 0.9.0", ] [[package]] name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding 0.1.5", + "byte-tools", + "byteorder", + "generic-array 0.12.4", ] [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding 0.2.1", + "generic-array 0.14.4", ] [[package]] name = "block-padding" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" dependencies = [ - "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools", ] [[package]] name = "block-padding" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "borsh" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b13fa9bf62be34702e5ee4526aff22530ae22fe34a0c4290d30d5e4e782e6" dependencies = [ - "borsh-derive 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "borsh-derive 0.7.2", +] + +[[package]] +name = "borsh" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a26c53ddf60281f18e7a29b20db7ba3db82a9d81b9650bfaa02d646f50d364" +dependencies = [ + "borsh-derive 0.8.1", + "hashbrown", ] [[package]] name = "borsh-derive" -version = "0.7.1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6aaa45f8eec26e4bf71e7e5492cf53a91591af8f871f422d550e7cc43f6b927" +dependencies = [ + "borsh-derive-internal 0.7.2", + "borsh-schema-derive-internal 0.7.2", + "proc-macro2 1.0.24", + "syn 1.0.60", +] + +[[package]] +name = "borsh-derive" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b637a47728b78a78cd7f4b85bf06d71ef4221840e059a38f048be2422bf673b2" dependencies = [ - "borsh-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "borsh-schema-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "borsh-derive-internal 0.8.1", + "borsh-schema-derive-internal 0.8.1", + "proc-macro-crate", + "proc-macro2 1.0.24", + "syn 1.0.60", ] [[package]] name = "borsh-derive-internal" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61621b9d3cca65cc54e2583db84ef912d59ae60d2f04ba61bc0d7fc57556bda2" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d813fa25eb0bed78c36492cff4415f38c760d6de833d255ba9095bd8ebb7d725" +dependencies = [ + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "borsh-schema-derive-internal" -version = "0.7.1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b38abfda570837b0949c2c7ebd31417e15607861c23eacb2f668c69f6f3bf7" +dependencies = [ + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf78ee4a98c8cb9eba1bac3d3e2a1ea3d7673c719ce691e67b5cbafc472d3b7" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "bs58" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" [[package]] name = "bumpalo" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" [[package]] name = "bv" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" dependencies = [ - "feature-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "feature-probe", + "serde", ] [[package]] name = "byte-tools" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "either", + "iovec", ] [[package]] name = "bytes" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "bytes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0dcbc35f504eb6fc275a6d20e4ebcda18cf50d40ba6fabff8c711fa16cb3b16" + +[[package]] +name = "bytes" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "bzip2" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" dependencies = [ - "bzip2-sys 0.1.9+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "bzip2-sys", + "libc", ] [[package]] name = "bzip2-sys" -version = "0.1.9+1.0.8" +version = "0.1.10+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c" dependencies = [ - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "pkg-config", ] [[package]] name = "cbindgen" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df6a11bba1d7cab86c166cecf4cf8acd7d02b7b65924d81b33d27197f22ee35" dependencies = [ - "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", + "clap", + "heck", + "indexmap", + "log", + "proc-macro2 1.0.24", + "quote 1.0.9", + "serde", + "serde_json", + "syn 1.0.60", + "tempfile", + "toml", ] [[package]] name = "cc" version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e450b8da92aa6f274e7c6437692f9f2ce6d701fb73bacfcf87897b3f89a4c20e" dependencies = [ - "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver", + "num_cpus", ] [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "num-integer", + "num-traits", + "serde", + "time", + "winapi 0.3.9", ] [[package]] name = "clap" version = "2.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "atty", + "bitflags", + "strsim 0.8.0", + "textwrap", + "unicode-width", + "vec_map", ] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", ] [[package]] name = "console" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" dependencies = [ - "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "terminal_size 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "termios 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "termios", + "unicode-width", + "winapi 0.3.9", + "winapi-util", ] [[package]] name = "console" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "terminal_size 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "console_error_panic_hook" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "const-random" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "const-random-macro 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "const-random-macro" -version = "0.1.12" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc80946b3480f421c2f17ed1cb841753a371c7c5104f51d507e13f532c856aa" dependencies = [ - "getrandom 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "unicode-width", + "winapi 0.3.9", ] -[[package]] -name = "const_fn" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "core-foundation" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" dependencies = [ - "core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", + "libc", ] [[package]] name = "core-foundation-sys" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" + +[[package]] +name = "cpuid-bool" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] name = "crc32fast" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", ] [[package]] name = "crossbeam-channel" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] name = "crossbeam-channel" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "crossbeam-utils 0.8.3", ] [[package]] name = "crossbeam-deque" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" dependencies = [ - "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.8.2", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] name = "crossbeam-deque" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-epoch 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "crossbeam-epoch 0.9.3", + "crossbeam-utils 0.8.3", ] [[package]] name = "crossbeam-epoch" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "lazy_static", + "maybe-uninit", + "memoffset 0.5.6", + "scopeguard", ] [[package]] name = "crossbeam-epoch" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "const_fn 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "crossbeam-utils 0.8.3", + "lazy_static", + "memoffset 0.6.1", + "scopeguard", ] [[package]] name = "crossbeam-queue" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] name = "crossbeam-utils" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cfg-if 0.1.10", + "lazy_static", ] [[package]] name = "crossbeam-utils" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cfg-if 1.0.0", + "lazy_static", ] [[package]] name = "crunchy" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-mac" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.4", + "subtle 1.0.0", ] [[package]] name = "crypto-mac" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4", + "subtle 2.4.0", +] + +[[package]] +name = "crypto-mac" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" +dependencies = [ + "generic-array 0.14.4", + "subtle 2.4.0", ] [[package]] name = "curve25519-dalek" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434e1720189a637d44fe464f4df1e6eb900b4835255b14354497c78af37d9bb8" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle 2.4.0", + "zeroize", ] [[package]] name = "darling" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" dependencies = [ - "darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "darling_macro 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "darling_core", + "darling_macro", ] [[package]] name = "darling_core" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" dependencies = [ - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv", + "ident_case", + "proc-macro2 1.0.24", + "quote 1.0.9", + "strsim 0.9.3", + "syn 1.0.60", ] [[package]] name = "darling_macro" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ - "darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "darling_core", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "dashmap" -version = "3.11.10" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" dependencies = [ - "ahash 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "num_cpus", + "rayon", ] [[package]] name = "derivative" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "derive_builder" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ - "darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_builder_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "darling", + "derive_builder_core", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "derive_builder_core" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ - "darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "darling", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "dialoguer" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" dependencies = [ - "console 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "console 0.11.3", + "lazy_static", + "tempfile", ] [[package]] name = "digest" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.4", ] [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.14.4", ] [[package]] name = "dir-diff" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2860407d7d7e2e004bb2128510ad9e8d669e76fa005ccf567977b5d71b8b4a0b" dependencies = [ - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir", ] [[package]] name = "ed25519" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" dependencies = [ - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "signature 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "signature", ] [[package]] name = "ed25519-dalek" version = "1.0.0-pre.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a8a37f4e8b35af971e6db5e3897e7a6344caa3f92f6544f88125a1f5f0035a" dependencies = [ - "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.8.2", + "zeroize", ] [[package]] name = "either" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encode_unicode" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.26" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", ] [[package]] name = "env_logger" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "humantime", + "log", + "regex", + "termcolor", ] [[package]] name = "failure" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" dependencies = [ - "backtrace 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "failure_derive", ] [[package]] name = "failure_derive" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", + "synstructure", ] [[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "feature-probe" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] name = "filetime" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.5", + "winapi 0.3.9", ] [[package]] name = "flate2" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types-shared", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "percent-encoding", ] [[package]] name = "fs_extra" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" [[package]] name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "fuchsia-zircon-sys", ] [[package]] name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures-channel" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939" dependencies = [ - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", ] [[package]] name = "futures-core" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94" [[package]] name = "futures-io" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59" [[package]] name = "futures-macro" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7" dependencies = [ - "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "futures-sink" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3" [[package]] name = "futures-task" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80" [[package]] name = "futures-util" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1" dependencies = [ - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-io", + "futures-macro", + "futures-task", + "memchr", + "pin-project-lite 0.2.5", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", +] + +[[package]] +name = "gateway" +version = "0.1.0" +source = "git+https://github.com/renproject/ren-solana?branch=feat/gateway#1efbaf251170cd2e00405330ee2585fa4186cd92" +dependencies = [ + "arrayref", + "digest 0.9.0", + "num-derive", + "num-traits", + "num_enum", + "remove_dir_all", + "sha3", + "solana-program", + "spl-associated-token-account", + "spl-token", + "thiserror", ] [[package]] name = "generic-array" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ - "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] name = "generic-array" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "typenum", + "version_check", ] [[package]] name = "gethostname" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.9", ] [[package]] name = "getrandom" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] name = "gimli" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" [[package]] name = "glob" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "h2" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio 0.2.25", + "tokio-util", + "tracing", + "tracing-futures", ] [[package]] name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash", +] [[package]] name = "heck" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" dependencies = [ - "unicode-segmentation 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "hex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hidapi" version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c352a18370f7e7e47bcbfcbdc5432b8c80c705b5d751a25232c659fcf5c775" dependencies = [ - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "pkg-config", ] [[package]] name = "hmac" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" dependencies = [ - "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.7.0", + "digest 0.8.1", +] + +[[package]] +name = "hmac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +dependencies = [ + "crypto-mac 0.10.0", + "digest 0.9.0", ] [[package]] name = "hmac-drbg" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" dependencies = [ - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1", + "generic-array 0.12.4", + "hmac 0.7.1", ] [[package]] name = "http" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.0.1", + "fnv", + "itoa", ] [[package]] name = "http-body" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6", + "http", ] [[package]] name = "httparse" -version = "1.3.4" +version = "1.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" [[package]] name = "httpdate" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "humantime" -version = "1.3.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.13.9" +version = "0.13.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project", + "socket2", + "tokio 0.2.25", + "tower-service", + "tracing", + "want", ] [[package]] name = "hyper-rustls" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.9 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6", + "futures-util", + "hyper", + "log", + "rustls", + "tokio 0.2.25", + "tokio-rustls", + "webpki", ] [[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "indexmap" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "hashbrown", ] [[package]] name = "indicatif" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" dependencies = [ - "console 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "console 0.14.0", + "lazy_static", + "number_prefix", + "regex", ] [[package]] name = "input_buffer" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6", ] [[package]] name = "instant" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", ] [[package]] name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "ipnet" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" [[package]] name = "itertools" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ - "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "either", ] [[package]] name = "itoa" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "jemalloc-ctl" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7" dependencies = [ - "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "jemalloc-sys", + "libc", + "paste", ] [[package]] name = "jemalloc-sys" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" dependencies = [ - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "fs_extra 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "fs_extra", + "libc", ] [[package]] name = "jemallocator" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" dependencies = [ - "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "jemalloc-sys", + "libc", ] [[package]] name = "jobserver" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "js-sys" -version = "0.3.45" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78" dependencies = [ - "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", ] [[package]] name = "jsonrpc-core" version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" dependencies = [ - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "futures", + "log", + "serde", + "serde_derive", + "serde_json", ] [[package]] name = "keccak" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "spin", ] [[package]] name = "libc" -version = "0.2.80" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "265d751d31d6780a3f956bb5b8022feba2d94eeee5a84ba64f4212eedca42213" [[package]] name = "libloading" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "winapi 0.3.9", ] [[package]] name = "libsecp256k1" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.4.0", + "typenum", ] [[package]] name = "lock_api" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" dependencies = [ - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard", ] [[package]] name = "lock_api" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" dependencies = [ - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard", ] [[package]] name = "log" -version = "0.4.11" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "maybe-uninit" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] -name = "memmap" -version = "0.7.0" +name = "memmap2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "memoffset" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "memoffset" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" dependencies = [ - "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mime", + "unicase", ] [[package]] name = "miniz_oxide" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ - "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "adler", + "autocfg", ] [[package]] name = "mio" -version = "0.6.22" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow 0.2.2", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5dede4e2065b3842b8b0af444119f3aa331cc7cc2dd20388bfb0f5d5a38823a" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "log", + "miow 0.3.6", + "ntapi", + "winapi 0.3.9", ] [[package]] name = "mio-uds" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec", + "libc", + "mio 0.6.23", ] [[package]] name = "miow" -version = "0.2.1" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "miow" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2", + "winapi 0.3.9", ] [[package]] name = "native-tls" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] name = "net2" -version = "0.2.35" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", ] [[package]] name = "nix" -version = "0.17.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ccba0cfe4fdf15982d1674c69b1fd80bad427d293849982668dfe454bd61f2" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cc", + "cfg-if 1.0.0", + "libc", +] + +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", ] [[package]] name = "num-derive" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "num-integer" version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "num-traits", ] [[package]] name = "num-traits" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "num_cpus" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] [[package]] name = "num_enum" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066" dependencies = [ - "derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_enum_derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "derivative", + "num_enum_derive", ] [[package]] name = "num_enum_derive" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" dependencies = [ - "proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "number_prefix" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" [[package]] name = "object" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" [[package]] name = "once_cell" -version = "1.5.2" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" dependencies = [ - "parking_lot 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.11.1", ] [[package]] name = "opaque-debug" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.30" +version = "0.10.32" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", ] [[package]] name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" -version = "0.9.58" +version = "0.9.60" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "ouroboros" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc04551635026d3ac7bc646698ea1836a85ed2a26b7094fe1d15d8b14854c4a2" dependencies = [ - "ouroboros_macro 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stable_deref_trait 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ouroboros_macro", + "stable_deref_trait", ] [[package]] name = "ouroboros_macro" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cec33dfceabec83cd0e95a5ce9d20e76ab3a5cbfef59659b8c927f69b93ed8ae" dependencies = [ - "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "Inflector", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "parking_lot" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" dependencies = [ - "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.4", + "parking_lot_core 0.6.2", + "rustc_version", ] [[package]] name = "parking_lot" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" dependencies = [ - "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.4", + "parking_lot_core 0.7.2", ] [[package]] name = "parking_lot" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ - "instant 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "lock_api 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "instant", + "lock_api 0.4.2", + "parking_lot_core 0.8.3", ] [[package]] name = "parking_lot_core" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "rustc_version", + "smallvec 0.6.14", + "winapi 0.3.9", ] [[package]] name = "parking_lot_core" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "smallvec 1.6.1", + "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "instant 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.5", + "smallvec 1.6.1", + "winapi 0.3.9", ] [[package]] name = "paste" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" dependencies = [ - "paste-impl 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", + "paste-impl", + "proc-macro-hack", ] [[package]] name = "paste-impl" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" dependencies = [ - "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack", ] [[package]] name = "pbkdf2" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "crypto-mac 0.7.0", ] [[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "pest" -version = "2.1.3" +name = "pbkdf2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3b8c0d71734018084da0c0354193a5edfb81b20d2d57a92c5b154aefc554a4a" dependencies = [ - "ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-mac 0.10.0", ] [[package]] -name = "pin-project" -version = "0.4.27" +name = "percent-encoding" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "pin-project-internal 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] -name = "pin-project" -version = "1.0.2" +name = "pest" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" dependencies = [ - "pin-project-internal 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-trie", ] [[package]] -name = "pin-project-internal" -version = "0.4.27" +name = "pin-project" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "pin-project-lite" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "ppv-lite86" version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro-crate" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", + "toml", ] [[package]] name = "proc-macro-hack" version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro-nested" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0", ] [[package]] name = "proc-macro2" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.1", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "quote" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", ] [[package]] name = "quote" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", ] [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ - "getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "rand_chacha 0.3.0", + "rand_core 0.6.2", + "rand_hc 0.3.0", ] [[package]] name = "rand_chacha" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "ppv-lite86 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.2", ] [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +dependencies = [ + "getrandom 0.2.2", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.6.2", ] [[package]] name = "rayon" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "crossbeam-deque 0.8.0", + "either", + "rayon-core", ] [[package]] name = "rayon-core" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ - "crossbeam-channel 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.5.0", + "crossbeam-deque 0.8.0", + "crossbeam-utils 0.8.3", + "lazy_static", + "num_cpus", ] [[package]] name = "redox_syscall" version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + +[[package]] +name = "redox_syscall" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +dependencies = [ + "bitflags", +] [[package]] name = "regex" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" dependencies = [ - "aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" [[package]] name = "remove_dir_all" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ren-bridge" -version = "0.1.0" -source = "git+https://github.com/renproject/ren-solana?branch=feat/solana-program#8f4ca587d96bab76261a0ff9bc64d4ef811636b2" -dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "num_enum 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-associated-token-account 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] @@ -1924,2002 +2235,1805 @@ name = "renvm-sig" version = "0.1.0" source = "git+https://github.com/roynalnaruto/renvm-sig#dcbeee709830b99073e4206f3dec17c98cf6140f" dependencies = [ - "borsh 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_builder 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "borsh 0.7.2", + "derive_builder", + "digest 0.9.0", + "libsecp256k1", + "rand 0.7.3", + "rustc-hex", + "serde", + "sha3", + "thiserror", + "tiny-keccak", ] [[package]] name = "reqwest" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.26 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.9 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-test 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +version = "0.10.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" +dependencies = [ + "base64 0.13.0", + "bytes 0.5.6", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite 0.2.5", + "rustls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio 0.2.25", + "tokio-rustls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", ] [[package]] name = "ring" version = "0.16.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" dependencies = [ - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "lazy_static", + "libc", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.9", ] [[package]] name = "rpassword" version = "4.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.9", ] [[package]] name = "rustc-demangle" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" [[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hex" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0", ] [[package]] name = "rustls" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ - "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.12.3", + "log", + "ring", + "sct", + "webpki", ] [[package]] name = "rustversion" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" [[package]] name = "ryu" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "schannel" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "winapi 0.3.9", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" dependencies = [ - "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "security-framework" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfd318104249865096c8da1dfabf09ddbb6d0330ea176812a62ec75e40c4166" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee48cdde5ed250b0d3252818f646e174ab414036edb884dde62d80a3ac6082d" dependencies = [ - "core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", + "libc", ] [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser 0.7.0", ] [[package]] name = "semver" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "semver-parser 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser 0.10.2", ] [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "semver-parser" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" dependencies = [ - "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pest", ] [[package]] name = "serde" -version = "1.0.117" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" dependencies = [ - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde_bytes" version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" dependencies = [ - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "serde_json" -version = "1.0.59" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" dependencies = [ - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa", + "ryu", + "serde", ] [[package]] name = "serde_urlencoded" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" dependencies = [ - "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "form_urlencoded", + "itoa", + "ryu", + "serde", ] [[package]] name = "sha-1" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", ] [[package]] name = "sha2" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" dependencies = [ - "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpuid-bool", + "digest 0.9.0", + "opaque-debug 0.3.0", ] [[package]] name = "sha3" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" dependencies = [ - "block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug 0.3.0", +] + +[[package]] +name = "signal-hook-registry" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" +dependencies = [ + "libc", ] [[package]] name = "signature" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" dependencies = [ - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit", ] [[package]] name = "smallvec" -version = "1.5.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "winapi 0.3.9", ] [[package]] name = "solana-account-decoder" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cd480a29ba8a1f123b7924997a4b0585abcb7441ed89fe80cfd3a4d3fd0a52" dependencies = [ - "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "Inflector", + "base64 0.12.3", + "bincode", + "bs58", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-config-program", + "solana-sdk", + "solana-stake-program", + "solana-vote-program", + "spl-token", + "thiserror", + "zstd", ] [[package]] name = "solana-clap-utils" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf22b70b05528db77b0a4a093a6b2ce88c4d85a178b8db00e0822e4524ab18" dependencies = [ - "chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-remote-wallet 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-bip39 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono", + "clap", + "rpassword", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "url", ] [[package]] name = "solana-client" -version = "1.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", - "indicatif 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 15.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-account-decoder 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-clap-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-net-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-transaction-status 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-version 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tungstenite 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +version = "1.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139f8e26ce589cfdcbfc5b6dfa5c90842efd55fe3b7e8a129574d328baa015ac" +dependencies = [ + "base64 0.13.0", + "bincode", + "bs58", + "clap", + "indicatif", + "jsonrpc-core", + "log", + "net2", + "rayon", + "reqwest", + "semver 0.11.0", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-clap-utils", + "solana-net-utils", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "thiserror", + "tungstenite", + "url", ] [[package]] name = "solana-config-program" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "019da3587ac94ae31456f99300fd8fc391a54a8e1ec34017c8d73edf31c4dd0d" dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode", + "chrono", + "log", + "rand_core 0.6.2", + "serde", + "serde_derive", + "solana-sdk", ] [[package]] name = "solana-crate-features" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4efe3deef81070a0199d6a61564f687922065ab378572c03e20e6fe927b846d" dependencies = [ - "backtrace 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.4 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "bytes 0.4.12", + "cc", + "curve25519-dalek", + "ed25519-dalek", + "either", + "lazy_static", + "libc", + "rand_chacha 0.2.2", + "regex-syntax", + "reqwest", + "serde", + "syn 0.15.44", + "syn 1.0.60", + "tokio 0.1.22", + "winapi 0.3.9", ] [[package]] name = "solana-ffi" version = "0.1.0" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cbindgen 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "ren-bridge 0.1.0 (git+https://github.com/renproject/ren-solana?branch=feat/solana-program)", - "renvm-sig 0.1.0 (git+https://github.com/roynalnaruto/renvm-sig)", - "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-client 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-associated-token-account 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "bincode", + "cbindgen", + "digest 0.9.0", + "gateway", + "libc", + "renvm-sig", + "sha3", + "solana-client", + "solana-sdk", + "spl-associated-token-account", + "spl-token", ] [[package]] name = "solana-frozen-abi" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca562dc5282f8124e3df791b527904a85b6b4361c1899b39d09aeb7afa974b3" dependencies = [ - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58", + "bv", + "generic-array 0.14.4", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_derive", + "sha2 0.9.3", + "solana-frozen-abi-macro", + "solana-logger", + "thiserror", ] [[package]] name = "solana-frozen-abi-macro" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31181207a88d8b474f528ec9b5f21b4d46e014a345ad3d866e0b6c82f421fc8" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "proc-macro2 1.0.24", + "quote 1.0.9", + "rustc_version", + "syn 1.0.60", ] [[package]] name = "solana-logger" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ca735bd55081a956e3d72921d342ac5967b87443cc8a5b6d58fbca5b524c72d" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger", + "lazy_static", + "log", ] [[package]] name = "solana-measure" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "378a00f3c127b57ff292c99428f2c1785817595ad6d90996d9105d4f02b120ef" dependencies = [ - "jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "jemalloc-ctl", + "jemallocator", + "log", + "solana-metrics", + "solana-sdk", ] [[package]] name = "solana-metrics" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "041e03c930970e209bddbe48c6d8602b0ae9932f3ba45598840f51c976f92ff0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gethostname 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", ] [[package]] name = "solana-net-utils" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670e76ff45db1a558dc585200b671f5720162afc39a532a33e93a7be2ce50e3f" dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-clap-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-version 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode", + "clap", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2", + "solana-clap-utils", + "solana-logger", + "solana-version", + "tokio 0.3.7", + "url", ] [[package]] name = "solana-program" -version = "1.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +version = "1.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ccfa5ffff5bbf054a4193f1e1a2325cf4d2ff80324712aa2f8dd5018663fbc" +dependencies = [ + "bincode", + "borsh 0.8.1", + "borsh-derive 0.8.1", + "bs58", + "bv", + "curve25519-dalek", + "hex", + "itertools", + "lazy_static", + "log", + "num-derive", + "num-traits", + "rand 0.7.3", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.9.3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-sdk-macro", + "thiserror", ] [[package]] name = "solana-rayon-threadlimit" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135449bacc9f97b20c3d6c7570ac6929d818d8657b14d4da075de25c6d12dbc8" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "num_cpus", ] [[package]] name = "solana-remote-wallet" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8916159ba07cfa09dcc29db8958b48f9d20256268b1d1e6952d0c37ed4e6c6b" dependencies = [ - "base32 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "console 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "dialoguer 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hidapi 1.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base32", + "console 0.11.3", + "dialoguer", + "hidapi", + "log", + "num-derive", + "num-traits", + "parking_lot 0.10.2", + "semver 0.9.0", + "solana-sdk", + "thiserror", + "url", ] [[package]] name = "solana-runtime" -version = "1.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "blake3 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "dashmap 3.11.10 (registry+https://github.com/rust-lang/crates.io-index)", - "dir-diff 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "fs_extra 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "libloading 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ouroboros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-measure 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-rayon-threadlimit 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-secp256k1-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "symlink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +version = "1.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48b0fb7b8bd0ff04a3b85473dea1253624c7c09237ed9c23c76d1c0bc8d54123" +dependencies = [ + "bincode", + "blake3", + "bv", + "byteorder", + "bzip2", + "crossbeam-channel 0.4.4", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "fs_extra", + "itertools", + "lazy_static", + "libc", + "libloading", + "log", + "memmap2", + "num-derive", + "num-traits", + "num_cpus", + "ouroboros", + "rand 0.7.3", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-measure", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-secp256k1-program", + "solana-stake-program", + "solana-vote-program", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", ] [[package]] name = "solana-sdk" -version = "1.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "assert_matches 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.4 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-crate-features 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +version = "1.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cd657a3b0d99240641b9b2e0e38746f4640b63ffdb8cca60d0922ab877ad730" +dependencies = [ + "assert_matches", + "bincode", + "bs58", + "bv", + "byteorder", + "chrono", + "digest 0.9.0", + "ed25519-dalek", + "generic-array 0.14.4", + "hex", + "hmac 0.10.1", + "itertools", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive", + "num-traits", + "pbkdf2 0.6.0", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.9.3", + "sha3", + "solana-crate-features", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", ] [[package]] name = "solana-sdk-macro" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8c8f6b1b2883bf6ac14245b10db27ceb55d1f72ccd032f4ae2c688fb78865a" dependencies = [ - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "bs58", + "proc-macro2 1.0.24", + "quote 1.0.9", + "rustversion", + "syn 1.0.60", ] [[package]] name = "solana-secp256k1-program" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab2a19373b3b1f5d0b5fcd2046f3d9c9e7b1a4d2e82fe53a757320db1ef8ec0" dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode", + "digest 0.9.0", + "libsecp256k1", + "rand 0.7.3", + "sha3", + "solana-logger", + "solana-sdk", ] [[package]] name = "solana-stake-program" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210d47d4d5a87a107740e9fdda2ea90d7200a2dda8e2f1fbbe8b6f02758fff06" dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-sdk", + "solana-vote-program", + "thiserror", ] [[package]] name = "solana-transaction-status" -version = "1.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-account-decoder 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-runtime 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-memo 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", +version = "1.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3828ec2506ef9b6097db70186f0a988d7b23f60aade036fd89562e43c4a615e7" +dependencies = [ + "Inflector", + "base64 0.12.3", + "bincode", + "bs58", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-runtime", + "solana-sdk", + "solana-stake-program", + "solana-vote-program", + "spl-memo 2.0.1", + "spl-memo 3.0.0", + "spl-token", + "thiserror", ] [[package]] name = "solana-version" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d475eaa3f426c1e7bc94c576e2489e0bdfddc57f39b76fb65277f748cb9ade22" dependencies = [ - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-sdk", ] [[package]] name = "solana-vote-program" -version = "1.4.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96174e87a76ff8e22bb9ec5255d15dc403e4500de053eaef16185033b7ea3abc" dependencies = [ - "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-metrics", + "solana-sdk", + "thiserror", ] [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spl-associated-token-account" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4adc47eebe5d2b662cbaaba1843719c28a67e5ec5d0460bc3ca60900a51f74e2" dependencies = [ - "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-program", + "spl-token", ] [[package]] name = "spl-memo" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb2b771f6146dec14ef5fbf498f9374652c54badc3befc8c40c1d426dd45d720" dependencies = [ - "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-program", ] [[package]] -name = "spl-token" +name = "spl-memo" version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e76b60c6f58279b5469beb1705744e9778ee94d643c8e3e2ff91874c59bb3c63" dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "num_enum 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-program", +] + +[[package]] +name = "spl-token" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b795e50d15dfd35aa5460b80a16414503a322be115a417a43db987c5824c6798" +dependencies = [ + "arrayref", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", ] [[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" [[package]] name = "subtle" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "symlink" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" [[package]] name = "syn" version = "0.15.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", ] [[package]] name = "syn" -version = "1.0.51" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "unicode-xid 0.2.1", ] [[package]] name = "synstructure" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", + "unicode-xid 0.2.1", ] [[package]] name = "tar" -version = "0.4.30" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bcfbd6a598361fda270d82469fff3d65089dc33e175c9a131f7b4cd395f228" dependencies = [ - "filetime 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime", + "libc", + "xattr", ] [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "rand 0.8.3", + "redox_syscall 0.2.5", + "remove_dir_all", + "winapi 0.3.9", ] [[package]] name = "termcolor" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" dependencies = [ - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "terminal_size" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ca8ced750734db02076f44132d802af0b33b09942331f4459dde8636fd2406" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.9", ] [[package]] name = "termios" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width", ] [[package]] name = "thiserror" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" dependencies = [ - "thiserror-impl 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "thread_local" -version = "1.0.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell", ] [[package]] name = "time" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi 0.3.9", ] [[package]] name = "tiny-bip39" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" dependencies = [ - "failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "failure", + "hmac 0.7.1", + "once_cell", + "pbkdf2 0.3.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.8.2", + "unicode-normalization", ] [[package]] name = "tiny-keccak" version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crunchy", ] [[package]] name = "tinyvec" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" dependencies = [ - "tinyvec_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyvec_macros", ] [[package]] name = "tinyvec_macros" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures", + "mio 0.6.23", + "num_cpus", + "tokio-codec", + "tokio-current-thread", + "tokio-executor", + "tokio-fs", + "tokio-io", + "tokio-reactor", + "tokio-sync", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", + "tokio-udp", + "tokio-uds", ] [[package]] name = "tokio" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "memchr", + "mio 0.6.23", + "num_cpus", + "pin-project-lite 0.1.12", + "slab", +] + +[[package]] +name = "tokio" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46409491c9375a693ce7032101970a54f8a2010efb77e13f70788f0d84489e39" +dependencies = [ + "autocfg", + "bytes 0.6.0", + "futures-core", + "libc", + "memchr", + "mio 0.7.9", + "num_cpus", + "once_cell", + "parking_lot 0.11.1", + "pin-project-lite 0.2.5", + "signal-hook-registry", + "slab", + "tokio-macros", + "winapi 0.3.9", ] [[package]] name = "tokio-codec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures", + "tokio-io", ] [[package]] name = "tokio-current-thread" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" dependencies = [ - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures", + "tokio-executor", ] [[package]] name = "tokio-executor" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2", + "futures", ] [[package]] name = "tokio-fs" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" dependencies = [ - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures", + "tokio-io", + "tokio-threadpool", ] [[package]] name = "tokio-io" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures", + "log", +] + +[[package]] +name = "tokio-macros" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46dfffa59fc3c8aad216ed61bdc2c263d2b9d87a9c8ac9de0c11a813e51b6db7" +dependencies = [ + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", ] [[package]] name = "tokio-reactor" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2", + "futures", + "lazy_static", + "log", + "mio 0.6.23", + "num_cpus", + "parking_lot 0.9.0", + "slab", + "tokio-executor", + "tokio-io", + "tokio-sync", ] [[package]] name = "tokio-rustls" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "rustls", + "tokio 0.2.25", + "webpki", ] [[package]] name = "tokio-sync" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" dependencies = [ - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv", + "futures", ] [[package]] name = "tokio-tcp" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures", + "iovec", + "mio 0.6.23", + "tokio-io", + "tokio-reactor", ] [[package]] name = "tokio-threadpool" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" dependencies = [ - "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.3", + "crossbeam-queue", + "crossbeam-utils 0.7.2", + "futures", + "lazy_static", + "log", + "num_cpus", + "slab", + "tokio-executor", ] [[package]] name = "tokio-timer" version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2", + "futures", + "slab", + "tokio-executor", ] [[package]] name = "tokio-udp" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures", + "log", + "mio 0.6.23", + "tokio-codec", + "tokio-io", + "tokio-reactor", ] [[package]] name = "tokio-uds" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12", + "futures", + "iovec", + "libc", + "log", + "mio 0.6.23", + "mio-uds", + "tokio-codec", + "tokio-io", + "tokio-reactor", ] [[package]] name = "tokio-util" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6", + "futures-core", + "futures-sink", + "log", + "pin-project-lite 0.1.12", + "tokio 0.2.25", ] [[package]] name = "toml" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "tower-service" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" dependencies = [ - "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "log", + "pin-project-lite 0.2.5", + "tracing-core", ] [[package]] name = "tracing-core" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "tracing-futures" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "pin-project 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project", + "tracing", ] [[package]] name = "try-lock" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0", + "byteorder", + "bytes 0.5.6", + "http", + "httparse", + "input_buffer", + "log", + "native-tls", + "rand 0.7.3", + "sha-1", + "url", + "utf-8", ] [[package]] name = "typenum" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] name = "ucd-trie" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check", ] [[package]] name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", ] [[package]] name = "unicode-normalization" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" dependencies = [ - "tinyvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyvec", ] [[package]] name = "unicode-segmentation" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" [[package]] name = "unicode-width" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "unicode-xid" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" dependencies = [ - "form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "form_urlencoded", + "idna", + "matches", + "percent-encoding", ] [[package]] name = "utf-8" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "vcpkg" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" [[package]] name = "vec_map" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "walkdir" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file", + "winapi 0.3.9", + "winapi-util", ] [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "try-lock", ] [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.68" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "serde", + "serde_json", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.68" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8" dependencies = [ - "bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo", + "lazy_static", + "log", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.18" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e67a5806118af01f0d9045915676b22aaebecf4178ae7021bc171dab0b897ab" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.68" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b" dependencies = [ - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.9", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.68" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.68" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "wasm-bindgen-test" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-test-macro 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "wasm-bindgen-test-macro" -version = "0.3.18" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1" [[package]] name = "web-sys" -version = "0.3.45" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b" dependencies = [ - "js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys", + "wasm-bindgen", ] [[package]] name = "webpki" version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" dependencies = [ - "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ring", + "untrusted", ] [[package]] name = "webpki-roots" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" dependencies = [ - "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki", ] [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winreg" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] name = "ws2_32-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "zeroize" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36" dependencies = [ - "zeroize_derive 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize_derive", ] [[package]] name = "zeroize_derive" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" dependencies = [ - "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.9", + "syn 1.0.60", + "synstructure", ] [[package]] name = "zstd" -version = "0.5.3+zstd.1.4.5" +version = "0.5.4+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910" dependencies = [ - "zstd-safe 2.0.5+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd-safe", ] [[package]] name = "zstd-safe" -version = "2.0.5+zstd.1.4.5" +version = "2.0.6+zstd.1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e" dependencies = [ - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", - "zstd-sys 1.4.17+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "zstd-sys", ] [[package]] name = "zstd-sys" -version = "1.4.17+zstd.1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -"checksum addr2line 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" -"checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" -"checksum ahash 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" -"checksum aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -"checksum arrayvec 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" -"checksum assert_matches 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "695579f0f2520f3774bb40461e5adb066459d4e0af4d59d20175484fb8e9edf1" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -"checksum backtrace 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" -"checksum base32 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" -"checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" -"checksum base64 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" -"checksum bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum blake3 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" -"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -"checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -"checksum block-padding 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -"checksum borsh 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "30f3fd65922359a7c6e791bc9b2bba1b977ea0c0b96a528ac48007f535fb4184" -"checksum borsh-derive 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b2d74755d937d261d5e9bdef87e0addfbc1ace0214f7776f21532d6e97325356" -"checksum borsh-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c9f966cb7a42c8ed83546ef481bc1d1dec888fe5f84a4737d5c2094a483e41e" -"checksum borsh-schema-derive-internal 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5df2543b56ebc2b4493e70d024ebde2cbb48d97bf7b1a16318eff30bd02669b8" -"checksum bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" -"checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" -"checksum bv 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" -"checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" -"checksum bzip2-sys 0.1.9+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ad3b39a260062fca31f7b0b12f207e8f2590a67d32ec7d59c20484b07ea7285e" -"checksum cbindgen 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1df6a11bba1d7cab86c166cecf4cf8acd7d02b7b65924d81b33d27197f22ee35" -"checksum cc 1.0.49 (registry+https://github.com/rust-lang/crates.io-index)" = "e450b8da92aa6f274e7c6437692f9f2ce6d701fb73bacfcf87897b3f89a4c20e" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -"checksum chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -"checksum clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cloudabi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -"checksum console 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" -"checksum console 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a50aab2529019abfabfa93f1e6c41ef392f91fbf179b347a7e96abb524884a08" -"checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" -"checksum const-random 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "486d435a7351580347279f374cb8a3c16937485441db80181357b7c4d70f17ed" -"checksum const-random-macro 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "49a84d8ff70e3ec52311109b019c27672b4c1929e4cf7c18bcf0cd9fb5e230be" -"checksum const_fn 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c478836e029dcef17fb47c89023448c64f781a046e0300e257ad8225ae59afab" -"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -"checksum core-foundation 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" -"checksum core-foundation-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" -"checksum crc32fast 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -"checksum crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -"checksum crossbeam-channel 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" -"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -"checksum crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" -"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -"checksum crossbeam-epoch 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" -"checksum crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -"checksum crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" -"checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -"checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -"checksum crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -"checksum curve25519-dalek 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5" -"checksum darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -"checksum darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" -"checksum darling_macro 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" -"checksum dashmap 3.11.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0f260e2fc850179ef410018660006951c1b55b79e8087e87111a2c388994b9b5" -"checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" -"checksum derive_builder 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" -"checksum derive_builder_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" -"checksum dialoguer 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" -"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -"checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -"checksum dir-diff 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2860407d7d7e2e004bb2128510ad9e8d669e76fa005ccf567977b5d71b8b4a0b" -"checksum ed25519 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" -"checksum ed25519-dalek 1.0.0-pre.4 (registry+https://github.com/rust-lang/crates.io-index)" = "21a8a37f4e8b35af971e6db5e3897e7a6344caa3f92f6544f88125a1f5f0035a" -"checksum either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" -"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" -"checksum encoding_rs 0.8.26 (registry+https://github.com/rust-lang/crates.io-index)" = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" -"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -"checksum failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -"checksum failure_derive 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum feature-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" -"checksum filetime 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "0c122a393ea57648015bf06fbd3d372378992e86b9ff5a7a497b076a28c79efe" -"checksum flate2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" -"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -"checksum form_urlencoded 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" -"checksum fs_extra 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed" -"checksum futures-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" -"checksum futures-core 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" -"checksum futures-io 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" -"checksum futures-macro 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" -"checksum futures-sink 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" -"checksum futures-task 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" -"checksum futures-util 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" -"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -"checksum generic-array 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -"checksum gethostname 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028" -"checksum getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" -"checksum getrandom 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" -"checksum gimli 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" -"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -"checksum h2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -"checksum hashbrown 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" -"checksum hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" -"checksum hidapi 1.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "76c352a18370f7e7e47bcbfcbdc5432b8c80c705b5d751a25232c659fcf5c775" -"checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" -"checksum hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" -"checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" -"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.13.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf" -"checksum hyper-rustls 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" -"checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" -"checksum indicatif 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" -"checksum input_buffer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" -"checksum instant 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" -"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -"checksum ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" -"checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -"checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" -"checksum jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7" -"checksum jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" -"checksum jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" -"checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" -"checksum js-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" -"checksum jsonrpc-core 15.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" -"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" -"checksum libloading 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1090080fe06ec2648d0da3881d9453d97e71a45f00eb179af7fdd7e3f686fdb0" -"checksum libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" -"checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -"checksum lock_api 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" -"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -"checksum memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" -"checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -"checksum memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -"checksum memoffset 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" -"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -"checksum miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" -"checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" -"checksum mio-uds 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6fcc7939b5edc4e4f86b1b4a04bb1498afaaf871b1a6691838ed06fcb48d3a3f" -"checksum net2 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)" = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853" -"checksum nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" -"checksum num-derive 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -"checksum num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -"checksum num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -"checksum num_enum 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066" -"checksum num_enum_derive 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" -"checksum number_prefix 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" -"checksum object 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" -"checksum once_cell 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" -"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" -"checksum opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -"checksum openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)" = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" -"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" -"checksum ouroboros 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc04551635026d3ac7bc646698ea1836a85ed2a26b7094fe1d15d8b14854c4a2" -"checksum ouroboros_macro 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cec33dfceabec83cd0e95a5ce9d20e76ab3a5cbfef59659b8c927f69b93ed8ae" -"checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -"checksum parking_lot 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -"checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -"checksum parking_lot_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" -"checksum paste 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -"checksum paste-impl 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" -"checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -"checksum pin-project 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" -"checksum pin-project 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" -"checksum pin-project-internal 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" -"checksum pin-project-internal 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" -"checksum pin-project-lite 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" -"checksum pin-project-lite 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" -"checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -"checksum pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" -"checksum ppv-lite86 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" -"checksum proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -"checksum proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" -"checksum proc-macro-nested 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" -"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -"checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" -"checksum rayon-core 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" -"checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" -"checksum regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" -"checksum regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" -"checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -"checksum ren-bridge 0.1.0 (git+https://github.com/renproject/ren-solana?branch=feat/solana-program)" = "" -"checksum renvm-sig 0.1.0 (git+https://github.com/roynalnaruto/renvm-sig)" = "" -"checksum reqwest 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "fb15d6255c792356a0f578d8a645c677904dc02e862bebe2ecc18e0c01b9a0ce" -"checksum ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" -"checksum rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" -"checksum rustc-demangle 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" -"checksum rustc-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -"checksum rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum rustls 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" -"checksum rustversion 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" -"checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" -"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -"checksum schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -"checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" -"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -"checksum security-framework 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" -"checksum security-framework-sys 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" -"checksum semver 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "42ef146c2ad5e5f4b037cd6ce2ebb775401729b19a82040c1beac9d36c7d1428" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" -"checksum serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -"checksum serde_derive 1.0.117 (registry+https://github.com/rust-lang/crates.io-index)" = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" -"checksum serde_json 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)" = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95" -"checksum serde_urlencoded 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -"checksum sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -"checksum sha3 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -"checksum signature 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -"checksum smallvec 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85" -"checksum socket2 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "2c29947abdee2a218277abeca306f25789c938e500ea5a9d4b12a5a504466902" -"checksum solana-account-decoder 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c7ce74ad009c4a62c3c7ed8338edbb3c0e68c467a657b2a8e6d617c5bc0e8163" -"checksum solana-clap-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3d561e5304778ecfc26105e91628da8db0c3b477c10bd24044fbf2a879fc96c3" -"checksum solana-client 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "63740f4d14c746a26c952e70fb5ae1920bb0adde077de635cd69c6a7c9b0dfac" -"checksum solana-config-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "fd1b02cbe559def67c208616afd99911c770a6c490a365260415ed6dc51ee855" -"checksum solana-crate-features 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c93bab974b077441185f473f6502ebc45ff3f2b1a83cf9265ff88140a44c0383" -"checksum solana-frozen-abi 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "c042d8c40ef2208c30ee0c2e58041d0e0ee3e75d813b45fb1efd5697000cfd54" -"checksum solana-frozen-abi-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d98db160b1f354bedf8e9092aa2d86c0bfefdd08c1bbc8d9354d21a508c43111" -"checksum solana-logger 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b2bfdd104a5493214de0ab50b5490d049784f6fbc17e1cf6aa6936014d3f429f" -"checksum solana-measure 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1feccd4eb61457f2b6a6d55045ef5dea2f8c8e1d2cdb187923967c66994c75d4" -"checksum solana-metrics 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "8d817e5588583eb8551c32e8079e3b47e2b43f3a8710e14fc65b48da37a0e762" -"checksum solana-net-utils 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b79b09a7212502e24b5eeca6de49d8f2a77888ed9064dd421655a0e145511470" -"checksum solana-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5f1c6b14b6f7f01a3b887b82a7c34f15f154233f433b52d4b4dd7df573892909" -"checksum solana-rayon-threadlimit 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "16fde85eceb3da9e3852b1351b0e5673b8e2df12d719264220e86f173808bd69" -"checksum solana-remote-wallet 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "76b090a151be9a745f3c90a7b8cc96aff698f0ec3855b0633bf36e6fc8468880" -"checksum solana-runtime 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4ec6a0eeb4f04a15dbb805804748a207ef6cac495929483ec6dbe7f72d7f8b4d" -"checksum solana-sdk 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "57b456565546b6fc6447c95e5e431eb8e08e426d475701dbc7b305e5f5a0da0b" -"checksum solana-sdk-macro 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "62bf341463fee2efaa2da506fa98e374e3b6fff60e01af1834d68f7dc4e40187" -"checksum solana-secp256k1-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "96581c39b6f7aa2cdd7dd3ea7d144a17b700c6c17b4a3067066e3ad1660a7664" -"checksum solana-stake-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3618e8a5ebdb38768d9a78863f4c8713a7a65d2970f19b3c1a1340c2c8f32177" -"checksum solana-transaction-status 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d28da856b55e4adc9dcbda11eaec2858a30f5ab95a89e1ad0c65f9da406f1170" -"checksum solana-version 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "92cec239d9026dbfe6f8b23cb37f78c3471f7e22ffe2b06900326446926540d1" -"checksum solana-vote-program 1.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "00155e7c1e090830e44c08fb5b6c4cef6f58a358c14d17c68117a50a8c797d50" -"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -"checksum spl-associated-token-account 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41a25d15fe67b755f95c575ce074e6e39c809fea86b2edb1bf2ae8b0473d5a1d" -"checksum spl-memo 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "99775feb54f735a6826ea0af500c1f78f7a5974d6b17f1ac586cd114e2da7d80" -"checksum spl-token 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f77fa0b41cbc82d1d7c8f2d914b49e9a1a7b6e32af952d03383fb989c42bc89" -"checksum stable_deref_trait 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" -"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" -"checksum subtle 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd" -"checksum symlink 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" -"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.51 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4f34193997d92804d359ed09953e25d5138df6bcc055a71bf68ee89fdf9223" -"checksum synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" -"checksum tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" -"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -"checksum terminal_size 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4bd2d183bd3fac5f5fe38ddbeb4dc9aec4a39a9d7d59e7491d900302da01cbe1" -"checksum termios 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" -"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thiserror 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" -"checksum thiserror-impl 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -"checksum tiny-bip39 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" -"checksum tiny-keccak 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -"checksum tinyvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" -"checksum tinyvec_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" -"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d7ad61edd59bfcc7e80dababf0f4aed2e6d5e0ba1659356ae889752dfc12ff" -"checksum tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -"checksum tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -"checksum tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -"checksum tokio-fs 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -"checksum tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -"checksum tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -"checksum tokio-rustls 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" -"checksum tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -"checksum tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -"checksum tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -"checksum tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -"checksum tokio-udp 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -"checksum tokio-uds 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -"checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -"checksum toml 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645" -"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" -"checksum tracing 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" -"checksum tracing-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" -"checksum tracing-futures 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" -"checksum try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" -"checksum tungstenite 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e" -"checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" -"checksum ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" -"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" -"checksum unicode-segmentation 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" -"checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" -"checksum untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -"checksum url 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" -"checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" -"checksum vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" -"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" -"checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -"checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum wasm-bindgen 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" -"checksum wasm-bindgen-backend 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" -"checksum wasm-bindgen-futures 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da" -"checksum wasm-bindgen-macro 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" -"checksum wasm-bindgen-macro-support 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" -"checksum wasm-bindgen-shared 0.2.68 (registry+https://github.com/rust-lang/crates.io-index)" = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" -"checksum wasm-bindgen-test 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "34d1cdc8b98a557f24733d50a1199c4b0635e465eecba9c45b214544da197f64" -"checksum wasm-bindgen-test-macro 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "e8fb9c67be7439ee8ab1b7db502a49c05e51e2835b66796c705134d9b8e1a585" -"checksum web-sys 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" -"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -"checksum webpki-roots 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" -"checksum zeroize 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a" -"checksum zeroize_derive 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" -"checksum zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8" -"checksum zstd-safe 2.0.5+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055" -"checksum zstd-sys 1.4.17+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b" +version = "1.4.18+zstd.1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" +dependencies = [ + "cc", + "glob", + "itertools", + "libc", +] diff --git a/chain/solana/solana-ffi/rust/Cargo.toml b/chain/solana/solana-ffi/rust/Cargo.toml index b5d025d1..31d01b3a 100644 --- a/chain/solana/solana-ffi/rust/Cargo.toml +++ b/chain/solana/solana-ffi/rust/Cargo.toml @@ -12,11 +12,11 @@ arrayref = "0.3.6" bincode = "1.3.1" digest = "0.9.0" libc = "0.2.58" -ren-bridge = { git = "https://github.com/renproject/ren-solana", branch = "feat/solana-program", features = ["no-entrypoint"] } -renvm-sig = { git = "https://github.com/roynalnaruto/renvm-sig" } +gateway = { git = "https://github.com/renproject/ren-solana", branch = "feat/gateway", features = ["no-entrypoint"] } +renvm-sig = { git = "https://github.com/roynalnaruto/renvm-sig", branch = "master" } sha3 = "0.9.1" -solana-client = "1.4.12" -solana-sdk = "1.4.12" +solana-client = "^1.5.0" +solana-sdk = "^1.5.0" spl-associated-token-account = { version = "1.0.0", features = ["no-entrypoint"] } spl-token = { version = "3.0.0", features = ["no-entrypoint"] } diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs index c45ba253..e55b9097 100644 --- a/chain/solana/solana-ffi/rust/src/lib.rs +++ b/chain/solana/solana-ffi/rust/src/lib.rs @@ -1,9 +1,9 @@ extern crate libc; use arrayref::array_refs; use digest::Digest; -use ren_bridge::{ - instruction::{burn, initialize, initialize_token, mint}, - state::RenBridge, +use gateway::{ + instruction::{burn, initialize, mint}, + state::Gateway, }; use renvm_sig::{RenVM, RenVmMsgBuilder}; use solana_client::{rpc_client::RpcClient, rpc_config::RpcSendTransactionConfig}; @@ -51,10 +51,11 @@ pub extern "C" fn program_derived_address( } #[no_mangle] -pub extern "C" fn ren_bridge_initialize( +pub extern "C" fn gateway_initialize( keypair_path: *const libc::c_char, rpc_url: *const libc::c_char, authority_pointer: *const u8, + selector: *const libc::c_char, ) -> *const libc::c_char { // Solana default signer and fee payer. let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; @@ -65,7 +66,7 @@ pub extern "C" fn ren_bridge_initialize( let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::single_gossip(); + let commitment_config = CommitmentConfig::confirmed(); let (recent_blockhash, _, _) = rpc_client .get_recent_blockhash_with_commitment(commitment_config) .unwrap() @@ -77,58 +78,6 @@ pub extern "C" fn ren_bridge_initialize( let mut authority = [0u8; 20usize]; authority.copy_from_slice(authority_slice); - // Find derived address that will hold RenBridge's state. - let (ren_bridge_account_id, _) = - Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); - - // Build and sign the initialize transaction. - let mut tx = Transaction::new_with_payer( - &[initialize( - &ren_bridge::id(), - &payer.pubkey(), - &ren_bridge_account_id, - authority, - ) - .unwrap()], - Some(&payer.pubkey()), - ); - tx.sign(&[&payer], recent_blockhash); - - // Broadcast transaction. - let signature = rpc_client - .send_transaction_with_config( - &tx, - RpcSendTransactionConfig { - preflight_commitment: Some(commitment_config.commitment), - ..RpcSendTransactionConfig::default() - }, - ) - .unwrap(); - - CString::new(signature.to_string()).unwrap().into_raw() -} - -#[no_mangle] -pub extern "C" fn ren_bridge_initialize_token( - keypair_path: *const libc::c_char, - rpc_url: *const libc::c_char, - selector: *const libc::c_char, -) -> *const libc::c_char { - // Solana default signer and fee payer. - let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; - let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); - let payer = read_keypair_file(&keypair_path).unwrap(); - - // Initialize client. - let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; - let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); - let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::single_gossip(); - let (recent_blockhash, _, _) = rpc_client - .get_recent_blockhash_with_commitment(commitment_config) - .unwrap() - .value; - // Get selector hash. let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; let selector = String::from_utf8(buf_name.to_vec()).unwrap(); @@ -136,14 +85,20 @@ pub extern "C" fn ren_bridge_initialize_token( hasher.update(selector.as_bytes()); let selector_hash: [u8; 32] = hasher.finalize().into(); + // Find derived address that will hold Gateway's state. + let (gateway_account_id, _) = + Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + // Derived address that will be the token mint. - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); // Build and sign the initialize transaction. let mut tx = Transaction::new_with_payer( - &[initialize_token( - &ren_bridge::id(), + &[initialize( + &gateway::id(), &payer.pubkey(), + &gateway_account_id, + authority, &token_mint_id, &spl_token::id(), selector_hash, @@ -168,7 +123,7 @@ pub extern "C" fn ren_bridge_initialize_token( } #[no_mangle] -pub extern "C" fn ren_bridge_initialize_account( +pub extern "C" fn gateway_initialize_account( keypair_path: *const libc::c_char, rpc_url: *const libc::c_char, selector: *const libc::c_char, @@ -182,7 +137,7 @@ pub extern "C" fn ren_bridge_initialize_account( let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::single_gossip(); + let commitment_config = CommitmentConfig::confirmed(); let (recent_blockhash, _, _) = rpc_client .get_recent_blockhash_with_commitment(commitment_config) .unwrap() @@ -196,7 +151,7 @@ pub extern "C" fn ren_bridge_initialize_account( let selector_hash: [u8; 32] = hasher.finalize().into(); // Derived address that will be the token mint. - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); // Build and sign transaction. let mut tx = Transaction::new_with_payer( @@ -224,23 +179,23 @@ pub extern "C" fn ren_bridge_initialize_account( } #[no_mangle] -pub extern "C" fn ren_bridge_get_burn_count(rpc_url: *const libc::c_char) -> libc::c_ulonglong { +pub extern "C" fn gateway_get_burn_count(rpc_url: *const libc::c_char) -> libc::c_ulonglong { // Initialize client. let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); let rpc_client = RpcClient::new(rpc_url); // Fetch account data. - let (ren_bridge_account_id, _) = - Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); - let ren_bridge_account_data = rpc_client.get_account_data(&ren_bridge_account_id).unwrap(); - let ren_bridge_state = RenBridge::unpack_unchecked(&ren_bridge_account_data).unwrap(); + let (gateway_account_id, _) = + Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + let gateway_account_data = rpc_client.get_account_data(&gateway_account_id).unwrap(); + let gateway_state = Gateway::unpack_unchecked(&gateway_account_data).unwrap(); - ren_bridge_state.burn_count + 1 + gateway_state.burn_count + 1 } #[no_mangle] -pub extern "C" fn ren_bridge_mint( +pub extern "C" fn gateway_mint( keypair_path: *const libc::c_char, rpc_url: *const libc::c_char, authority_secret: *const libc::c_char, @@ -262,7 +217,7 @@ pub extern "C" fn ren_bridge_mint( let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::single_gossip(); + let commitment_config = CommitmentConfig::confirmed(); let (recent_blockhash, _, _) = rpc_client .get_recent_blockhash_with_commitment(commitment_config) .unwrap() @@ -276,11 +231,11 @@ pub extern "C" fn ren_bridge_mint( let selector_hash: [u8; 32] = hasher.finalize().into(); // Derived address that will be the token mint. - let (ren_bridge_account_id, _) = - Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + let (gateway_account_id, _) = + Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); let (mint_authority_id, _) = - Pubkey::find_program_address(&[&token_mint_id.to_bytes()], &ren_bridge::id()); + Pubkey::find_program_address(&[&token_mint_id.to_bytes()], &gateway::id()); let associated_token_account = get_associated_token_address(&payer.pubkey(), &token_mint_id); // Construct RenVM mint message and sign it. @@ -294,13 +249,13 @@ pub extern "C" fn ren_bridge_mint( let renvm_sig = renvm.sign(&renvm_mint_msg).unwrap(); let (sig_r, sig_s, sig_v) = array_refs![&renvm_sig, 32, 32, 1]; let (mint_log_account_id, _) = - Pubkey::find_program_address(&[&msg_hash[..]], &ren_bridge::id()); + Pubkey::find_program_address(&[&msg_hash[..]], &gateway::id()); let mut tx = Transaction::new_with_payer( &[ mint( - &ren_bridge::id(), + &gateway::id(), &payer.pubkey(), - &ren_bridge_account_id, + &gateway_account_id, &token_mint_id, &associated_token_account, &mint_log_account_id, @@ -341,7 +296,7 @@ pub extern "C" fn ren_bridge_mint( } #[no_mangle] -pub extern "C" fn ren_bridge_burn( +pub extern "C" fn gateway_burn( keypair_path: *const libc::c_char, rpc_url: *const libc::c_char, selector: *const libc::c_char, @@ -358,7 +313,7 @@ pub extern "C" fn ren_bridge_burn( let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::single_gossip(); + let commitment_config = CommitmentConfig::confirmed(); let (recent_blockhash, _, _) = rpc_client .get_recent_blockhash_with_commitment(commitment_config) .unwrap() @@ -372,9 +327,9 @@ pub extern "C" fn ren_bridge_burn( let selector_hash: [u8; 32] = hasher.finalize().into(); // Derived address that will be the token mint. - let (ren_bridge_account_id, _) = - Pubkey::find_program_address(&[b"RenBridgeState"], &ren_bridge::id()); - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &ren_bridge::id()); + let (gateway_account_id, _) = + Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); let associated_token_account = get_associated_token_address(&payer.pubkey(), &token_mint_id); // Construct the 25-bytes address of release recipient of the underlying assets. @@ -384,7 +339,7 @@ pub extern "C" fn ren_bridge_burn( release_recipient.copy_from_slice(recipient_slice); let (burn_log_account_id, _) = - Pubkey::find_program_address(&[&burn_count.to_le_bytes()[..]], &ren_bridge::id()); + Pubkey::find_program_address(&[&burn_count.to_le_bytes()[..]], &gateway::id()); let mut tx = Transaction::new_with_payer( &[ burn_checked( @@ -398,10 +353,10 @@ pub extern "C" fn ren_bridge_burn( ) .unwrap(), burn( - &ren_bridge::id(), + &gateway::id(), &payer.pubkey(), &associated_token_account, - &ren_bridge_account_id, + &gateway_account_id, &token_mint_id, &burn_log_account_id, release_recipient, diff --git a/chain/solana/solana-ffi/rust/src/util.rs b/chain/solana/solana-ffi/rust/src/util.rs index 349aa53c..c80202a2 100644 --- a/chain/solana/solana-ffi/rust/src/util.rs +++ b/chain/solana/solana-ffi/rust/src/util.rs @@ -1,10 +1,10 @@ -use ren_bridge::types::{ +use gateway::types::{ RenVmMintMessage, Secp256k1InstructionData, RENVM_MINT_MESSAGE_SIZE, RENVM_MINT_SECP_DATA_SIZE, }; use solana_sdk::{ instruction::Instruction, program_pack::Pack, - secp256k1::{ + secp256k1_instruction::{ SecpSignatureOffsets, HASHED_PUBKEY_SERIALIZED_SIZE, SIGNATURE_OFFSETS_SERIALIZED_SIZE, }, }; diff --git a/chain/solana/solana-ffi/solana-ffi.yml b/chain/solana/solana-ffi/solana-ffi.yml index 06ba5a29..832e7d8c 100644 --- a/chain/solana/solana-ffi/solana-ffi.yml +++ b/chain/solana/solana-ffi/solana-ffi.yml @@ -41,12 +41,11 @@ TRANSLATOR: function: - {action: accept, from: "unique_pubkey"} - {action: accept, from: "program_derived_address"} - - {action: accept, from: "ren_bridge_initialize"} - - {action: accept, from: "ren_bridge_initialize_token"} - - {action: accept, from: "ren_bridge_initialize_account"} - - {action: accept, from: "ren_bridge_get_burn_count"} - - {action: accept, from: "ren_bridge_mint"} - - {action: accept, from: "ren_bridge_burn"} + - {action: accept, from: "gateway_initialize"} + - {action: accept, from: "gateway_initialize_account"} + - {action: accept, from: "gateway_get_burn_count"} + - {action: accept, from: "gateway_mint"} + - {action: accept, from: "gateway_burn"} private: - {transform: unexport} post-global: diff --git a/chain/solana/solana_ffi_test.go b/chain/solana/solana_ffi_test.go index 7a3a3618..34a91d1b 100644 --- a/chain/solana/solana_ffi_test.go +++ b/chain/solana/solana_ffi_test.go @@ -22,7 +22,7 @@ var _ = Describe("Solana FFI", func() { Context("Program Derived Address", func() { It("should correctly compute 1", func() { program := address.Address("6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4") - seeds := []byte("RenBridgeState") + seeds := []byte("GatewayState") programDerivedAddress := solana.ProgramDerivedAddress(pack.Bytes(seeds), program) expectedDerivedAddress := address.Address("7gMf4XXqunXaagnMVf8c3KSKnANTjhDvn2HgVTxMb4ZD") Expect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress)) diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 388fe890..629a1565 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -29,7 +29,7 @@ var _ = Describe("Solana", func() { Context("mint and burn", func() { It("should succeed", func() { - // Base58 address of the RenBridge program that is deployed to Solana. + // Base58 address of the Gateway program that is deployed to Solana. program := multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP") // Construct user's keypair path (~/.config/solana/id.json). @@ -43,25 +43,20 @@ var _ = Describe("Solana", func() { renVmAuthorityBytes, err := hex.DecodeString(renVmAuthority) Expect(err).NotTo(HaveOccurred()) - // Initialize RenBridge program. - initializeSig := cgo.RenBridgeInitialize(keypairPath, solana.DefaultClientRPCURL, renVmAuthorityBytes) - logger.Debug("Initialize", zap.String("tx signature", string(initializeSig))) - - // Initialize RenBTC token. - time.Sleep(10 * time.Second) + // Initialize Gateway for the RenBTC token. selector := "BTC/toSolana" - initializeTokenSig := cgo.RenBridgeInitializeToken(keypairPath, solana.DefaultClientRPCURL, selector) - logger.Debug("InitializeToken", zap.String("tx signature", string(initializeTokenSig))) + initializeSig := cgo.GatewayInitialize(keypairPath, solana.DefaultClientRPCURL, renVmAuthorityBytes, selector) + logger.Debug("Initialize", zap.String("tx signature", string(initializeSig))) // Initialize a new token account. time.Sleep(10 * time.Second) - initializeAccountSig := cgo.RenBridgeInitializeAccount(keypairPath, solana.DefaultClientRPCURL, selector) + initializeAccountSig := cgo.GatewayInitializeAccount(keypairPath, solana.DefaultClientRPCURL, selector) logger.Debug("InitializeAccount", zap.String("tx signature", string(initializeAccountSig))) // Mint some tokens. time.Sleep(10 * time.Second) mintAmount := uint64(10000000000) // 10 tokens. - mintSig := cgo.RenBridgeMint(keypairPath, solana.DefaultClientRPCURL, renVmSecret, selector, mintAmount) + mintSig := cgo.GatewayMint(keypairPath, solana.DefaultClientRPCURL, renVmSecret, selector, mintAmount) logger.Debug("Mint", zap.String("tx signature", string(mintSig))) // Burn some tokens. @@ -70,9 +65,9 @@ var _ = Describe("Solana", func() { bitcoinAddrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) recipientRawAddr, err := bitcoinAddrEncodeDecoder.DecodeAddress(recipient) Expect(err).NotTo(HaveOccurred()) - burnCount := cgo.RenBridgeGetBurnCount(solana.DefaultClientRPCURL) + burnCount := cgo.GatewayGetBurnCount(solana.DefaultClientRPCURL) burnAmount := uint64(5000000000) // 5 tokens. - burnSig := cgo.RenBridgeBurn(keypairPath, solana.DefaultClientRPCURL, selector, burnCount, burnAmount, []byte(recipientRawAddr)) + burnSig := cgo.GatewayBurn(keypairPath, solana.DefaultClientRPCURL, selector, burnCount, burnAmount, []byte(recipientRawAddr)) logger.Debug("Burn", zap.String("tx signature", string(burnSig))) // Fetch burn log. From 66c16de1471ff803c100f9e34a4f2c590d9cadf7 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 5 Mar 2021 00:01:00 +0530 Subject: [PATCH 260/335] fix: since seed changed, the expected address also changed --- chain/solana/solana_ffi_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/solana/solana_ffi_test.go b/chain/solana/solana_ffi_test.go index 34a91d1b..65519767 100644 --- a/chain/solana/solana_ffi_test.go +++ b/chain/solana/solana_ffi_test.go @@ -24,7 +24,7 @@ var _ = Describe("Solana FFI", func() { program := address.Address("6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4") seeds := []byte("GatewayState") programDerivedAddress := solana.ProgramDerivedAddress(pack.Bytes(seeds), program) - expectedDerivedAddress := address.Address("7gMf4XXqunXaagnMVf8c3KSKnANTjhDvn2HgVTxMb4ZD") + expectedDerivedAddress := address.Address("APthNc29MGRJRkKahDRNrSNA2o1e8p6aFAJNRV8ZdJaV") Expect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress)) }) From 1deab1979bfe4d0326ecb5452bee8638a6b51ce0 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 9 Mar 2021 12:46:27 +0530 Subject: [PATCH 261/335] fix: ci | ffi | add method for gateway address --- .github/workflows/test.yml | 55 ++++++++++++++++++++----- chain/solana/solana-ffi/rust/Cargo.toml | 2 +- chain/solana/solana.go | 25 +++++++++++ 3 files changed, 70 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b0141cd..18ac117d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,6 +60,41 @@ jobs: go get -u golang.org/x/lint/golint golint $(go list ./... | grep -v filecoin-ffi) + - name: Setup environment for Solana tests + run: | + sh -c "$(curl -sSfL https://release.solana.com/v1.5.13/install)" + cd $GITHUB_WORKSPACE + export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" + git clone https://github.com/renproject/ren-solana.git + cd ren-solana + echo ${{ secrets.GATEWAY_PROGRAM_ID }} > ~/.config/solana/gateway-program.json + ./setup.sh + + - name: Sleep until the node is up + uses: jakejarvis/wait-action@master + with: + time: '1m' + + - name: Check on docker containers + run: docker ps -a + + - name: Run tests for Solana + run: | + export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" + cd $GITHUB_WORKSPACE/ren-solana + solana airdrop --url http://0.0.0.0:8899 10 + solana program deploy --final \ + --keypair ~/.config/solana/id.json \ + --program-id ~/.config/solana/gateway-program.json \ + target/deploy/gateway.so + cd $GITHUB_WORKSPACE/chain/solana + go test -timeout 100s + + - name: Remove docker containers + run: | + cd $GITHUB_WORKSPACE/ren-solana + npx solana-localnet down + - name: Run multichain infrastructure run: | cd $GITHUB_WORKSPACE/infra @@ -76,7 +111,7 @@ jobs: - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '10m' + time: '15m' - name: Check on docker containers run: docker ps -a @@ -90,17 +125,15 @@ jobs: cd $GITHUB_WORKSPACE CI=true go test -timeout 1500s - - name: Run tests for Solana + - name: Remove docker containers run: | - sh -c "$(curl -sSfL https://release.solana.com/v1.5.13/install)" - export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - git clone https://github.com/renproject/ren-solana.git - cd ren-solana - git checkout feat/gateway - echo ${{ secrets.GATEWAY_PROGRAM_ID }} > ~/.config/solana/gateway-program.json - ./setup.sh - cd $GITHUB_WORKSPACE/chain/solana - go test -timeout 100s + docker rm -f \ + infra_bitcoin_1 \ + infra_bitcoincash_1 \ + infra_dogecoin_1 \ + infra_terra_1 \ + infra_zcash_1 \ + infra_filecoin_1 build: runs-on: ubuntu-latest diff --git a/chain/solana/solana-ffi/rust/Cargo.toml b/chain/solana/solana-ffi/rust/Cargo.toml index 31d01b3a..a956d65a 100644 --- a/chain/solana/solana-ffi/rust/Cargo.toml +++ b/chain/solana/solana-ffi/rust/Cargo.toml @@ -12,7 +12,7 @@ arrayref = "0.3.6" bincode = "1.3.1" digest = "0.9.0" libc = "0.2.58" -gateway = { git = "https://github.com/renproject/ren-solana", branch = "feat/gateway", features = ["no-entrypoint"] } +gateway = { git = "https://github.com/renproject/ren-solana", branch = "master", features = ["no-entrypoint"] } renvm-sig = { git = "https://github.com/roynalnaruto/renvm-sig", branch = "master" } sha3 = "0.9.1" solana-client = "^1.5.0" diff --git a/chain/solana/solana.go b/chain/solana/solana.go index ee836901..26c29748 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/btcsuite/btcutil/base58" + "github.com/renproject/multichain" "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" @@ -14,6 +15,23 @@ import ( "go.uber.org/zap" ) +var ( + // GatewayRenBTC is the address of the Gateway program deployed on Solana + // for the selector "BTC/toSolana". + GatewayRenBTC = "9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP" +) + +// GatewayProgram returns the address of the deployed Gateway program for the +// given asset. +func GatewayProgram(asset multichain.Asset) (multichain.Address, error) { + switch asset { + case multichain.BTC: + return multichain.Address(GatewayRenBTC), nil + default: + return multichain.Address(""), fmt.Errorf("unsupported asset: %v", asset) + } +} + // DefaultClientRPCURL is the default RPC URL for the Solana cluster. const DefaultClientRPCURL = "http://localhost:8899" @@ -36,6 +54,13 @@ func DefaultClientOptions() ClientOptions { } } +// WithRPCURL returns a modified version of the options with the given API +// rpc-url +func (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions { + opts.RPCURL = string(rpcURL) + return opts +} + // Client represents a Solana client that implements the multichain Contract API. type Client struct { opts ClientOptions From 7627240d5d9de67796846ee857d3b16042a629f2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 9 Mar 2021 18:56:39 +0530 Subject: [PATCH 262/335] fix: recipient len | changes requested from review --- chain/solana/solana-ffi/rust/Cargo.lock | 2 +- chain/solana/solana-ffi/rust/src/lib.rs | 25 ++++----- chain/solana/solana.go | 74 +++---------------------- chain/solana/solana_test.go | 22 ++++---- 4 files changed, 31 insertions(+), 92 deletions(-) diff --git a/chain/solana/solana-ffi/rust/Cargo.lock b/chain/solana/solana-ffi/rust/Cargo.lock index 66a518fd..b44fdc06 100644 --- a/chain/solana/solana-ffi/rust/Cargo.lock +++ b/chain/solana/solana-ffi/rust/Cargo.lock @@ -1024,7 +1024,7 @@ dependencies = [ [[package]] name = "gateway" version = "0.1.0" -source = "git+https://github.com/renproject/ren-solana?branch=feat/gateway#1efbaf251170cd2e00405330ee2585fa4186cd92" +source = "git+https://github.com/renproject/ren-solana?branch=master#1623b451913bb2b689a8f8426845f48750cf2eb3" dependencies = [ "arrayref", "digest 0.9.0", diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs index e55b9097..aece1edb 100644 --- a/chain/solana/solana-ffi/rust/src/lib.rs +++ b/chain/solana/solana-ffi/rust/src/lib.rs @@ -86,8 +86,7 @@ pub extern "C" fn gateway_initialize( let selector_hash: [u8; 32] = hasher.finalize().into(); // Find derived address that will hold Gateway's state. - let (gateway_account_id, _) = - Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); // Derived address that will be the token mint. let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); @@ -186,8 +185,7 @@ pub extern "C" fn gateway_get_burn_count(rpc_url: *const libc::c_char) -> libc:: let rpc_client = RpcClient::new(rpc_url); // Fetch account data. - let (gateway_account_id, _) = - Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); let gateway_account_data = rpc_client.get_account_data(&gateway_account_id).unwrap(); let gateway_state = Gateway::unpack_unchecked(&gateway_account_data).unwrap(); @@ -231,8 +229,7 @@ pub extern "C" fn gateway_mint( let selector_hash: [u8; 32] = hasher.finalize().into(); // Derived address that will be the token mint. - let (gateway_account_id, _) = - Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); let (mint_authority_id, _) = Pubkey::find_program_address(&[&token_mint_id.to_bytes()], &gateway::id()); @@ -248,8 +245,7 @@ pub extern "C" fn gateway_mint( let msg_hash = renvm_mint_msg.get_digest().unwrap(); let renvm_sig = renvm.sign(&renvm_mint_msg).unwrap(); let (sig_r, sig_s, sig_v) = array_refs![&renvm_sig, 32, 32, 1]; - let (mint_log_account_id, _) = - Pubkey::find_program_address(&[&msg_hash[..]], &gateway::id()); + let (mint_log_account_id, _) = Pubkey::find_program_address(&[&msg_hash[..]], &gateway::id()); let mut tx = Transaction::new_with_payer( &[ mint( @@ -302,6 +298,7 @@ pub extern "C" fn gateway_burn( selector: *const libc::c_char, burn_count: libc::c_ulonglong, burn_amount: libc::c_ulonglong, + recipient_len: libc::size_t, recipient_pointer: *const u8, ) -> *const libc::c_char { // Solana default signer and fee payer. @@ -327,16 +324,14 @@ pub extern "C" fn gateway_burn( let selector_hash: [u8; 32] = hasher.finalize().into(); // Derived address that will be the token mint. - let (gateway_account_id, _) = - Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); + let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); let associated_token_account = get_associated_token_address(&payer.pubkey(), &token_mint_id); // Construct the 25-bytes address of release recipient of the underlying assets. - let recipient_slice = - unsafe { std::slice::from_raw_parts(recipient_pointer as *const u8, 25usize) }; - let mut release_recipient = [0u8; 25usize]; - release_recipient.copy_from_slice(recipient_slice); + let recipient_slice = unsafe { + std::slice::from_raw_parts(recipient_pointer as *const u8, recipient_len as usize) + }; let (burn_log_account_id, _) = Pubkey::find_program_address(&[&burn_count.to_le_bytes()[..]], &gateway::id()); @@ -359,7 +354,7 @@ pub extern "C" fn gateway_burn( &gateway_account_id, &token_mint_id, &burn_log_account_id, - release_recipient, + recipient_slice.to_vec(), ) .unwrap(), ], diff --git a/chain/solana/solana.go b/chain/solana/solana.go index 26c29748..2acb2f6e 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -2,36 +2,16 @@ package solana import ( "context" - "encoding/binary" "encoding/json" "fmt" "github.com/btcsuite/btcutil/base58" - "github.com/renproject/multichain" "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" - "github.com/renproject/surge" "go.uber.org/zap" ) -var ( - // GatewayRenBTC is the address of the Gateway program deployed on Solana - // for the selector "BTC/toSolana". - GatewayRenBTC = "9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP" -) - -// GatewayProgram returns the address of the deployed Gateway program for the -// given asset. -func GatewayProgram(asset multichain.Asset) (multichain.Address, error) { - switch asset { - case multichain.BTC: - return multichain.Address(GatewayRenBTC), nil - default: - return multichain.Address(""), fmt.Errorf("unsupported asset: %v", asset) - } -} - // DefaultClientRPCURL is the default RPC URL for the Solana cluster. const DefaultClientRPCURL = "http://localhost:8899" @@ -84,21 +64,6 @@ func FindProgramAddress(seeds []byte, program address.RawAddress) (address.Addre return ProgramDerivedAddress(seeds, encoded), nil } -// BurnCallContractInput represents the data structure of the expected calldata -// for Solana's Contract API implementation. -type BurnCallContractInput struct { - Nonce pack.U64 -} - -// BurnCallContractOutput represents the data structure for Solana Contract -// implementation's output bytes. -type BurnCallContractOutput struct { - Amount pack.U64 - Recipient address.RawAddress - Confs pack.U64 - Payload pack.Bytes -} - // CallContract implements the multichain Contract API. In the case of Solana, // it is used to fetch burn logs associated with a particular burn nonce. func (client *Client) CallContract( @@ -106,24 +71,14 @@ func (client *Client) CallContract( program address.Address, calldata contract.CallData, ) (pack.Bytes, error) { - // Deserialise the calldata bytes. - input := BurnCallContractInput{} - if err := surge.FromBinary(&input, calldata); err != nil { - return pack.Bytes{}, fmt.Errorf("deserialise calldata: %v", err) - } - addrEncodeDecoder := NewAddressEncodeDecoder() decodedProgram, err := addrEncodeDecoder.DecodeAddress(program) if err != nil { return pack.Bytes(nil), fmt.Errorf("decode address: %v", err) } - // little endian serialization of burn count (nonce) - nonceBytes := make([]byte, 8) - binary.LittleEndian.PutUint64(nonceBytes, uint64(input.Nonce)) - // Find the program-derived address that will have persisted the burn log. - burnLogAccount, err := FindProgramAddress(nonceBytes, decodedProgram) + burnLogAccount, err := FindProgramAddress([]byte(calldata), decodedProgram) if err != nil { return pack.Bytes(nil), fmt.Errorf("find program-derived address: %v", err) } @@ -149,29 +104,18 @@ func (client *Client) CallContract( } // Decode the Base58 encoded account data into raw byte-representation. Since - // this holds the burn log's data, it should be 33 bytes in size. 8 bytes for - // the burn amount and 25 bytes for the recipient of the released assets. + // this holds the burn log's data, it should be 41 bytes in size. + // + // burn amount: 8 bytes + // recipient length: 1 byte + // recipient: 32 bytes data := base58.Decode(info.Value.Data) if err != nil { return pack.Bytes(nil), fmt.Errorf("decoding result from base58: %v", err) } - if len(data) != 33 { - return pack.Bytes(nil), fmt.Errorf("unexpected data length. Expected 33, got: %v", len(data)) - } - - // Serialize the burn log's data into raw bytes. - amount := binary.LittleEndian.Uint64(data[:8]) - recipient := pack.Bytes(data[8:]) - burnOut := BurnCallContractOutput{ - Amount: pack.NewU64(amount), - Recipient: address.RawAddress(recipient), - Confs: pack.NewU64(0), - Payload: pack.Bytes(nil), - } - burnOutBytes, err := surge.ToBinary(burnOut) - if err != nil { - return pack.Bytes(nil), fmt.Errorf("serialize burn log output: %v", err) + if len(data) != 41 { + return pack.Bytes(nil), fmt.Errorf("unexpected data length. Expected 41, got: %v", len(data)) } - return pack.NewBytes(burnOutBytes), nil + return pack.NewBytes(data), nil } diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 629a1565..14c154c2 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -2,6 +2,7 @@ package solana_test import ( "context" + "encoding/binary" "encoding/hex" "os" "time" @@ -12,7 +13,6 @@ import ( "github.com/renproject/multichain/chain/solana" "github.com/renproject/multichain/chain/solana/solana-ffi/cgo" "github.com/renproject/pack" - "github.com/renproject/surge" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -67,22 +67,22 @@ var _ = Describe("Solana", func() { Expect(err).NotTo(HaveOccurred()) burnCount := cgo.GatewayGetBurnCount(solana.DefaultClientRPCURL) burnAmount := uint64(5000000000) // 5 tokens. - burnSig := cgo.GatewayBurn(keypairPath, solana.DefaultClientRPCURL, selector, burnCount, burnAmount, []byte(recipientRawAddr)) + burnSig := cgo.GatewayBurn(keypairPath, solana.DefaultClientRPCURL, selector, burnCount, burnAmount, uint32(len(recipientRawAddr)), []byte(recipientRawAddr)) logger.Debug("Burn", zap.String("tx signature", string(burnSig))) // Fetch burn log. time.Sleep(20 * time.Second) client := solana.NewClient(solana.DefaultClientOptions()) - contractCallInput := solana.BurnCallContractInput{Nonce: pack.NewU64(burnCount)} - calldata, err := surge.ToBinary(contractCallInput) - Expect(err).ToNot(HaveOccurred()) - burnLogBytes, err := client.CallContract(context.Background(), program, calldata) + calldata := make([]byte, 8) + binary.LittleEndian.PutUint64(calldata, burnCount) + data, err := client.CallContract(context.Background(), program, multichain.ContractCallData(calldata)) Expect(err).NotTo(HaveOccurred()) - burnLog := solana.BurnCallContractOutput{} - err = surge.FromBinary(&burnLog, burnLogBytes) - Expect(err).NotTo(HaveOccurred()) - Expect(burnLog.Amount).To(Equal(pack.U64(burnAmount))) - Expect(burnLog.Recipient).To(Equal(recipientRawAddr)) + + fetchedAmount := binary.LittleEndian.Uint64(data[:8]) + recipientLen := uint8(data[8:9][0]) + fetchedRecipient := pack.Bytes(data[9 : 9+int(recipientLen)]) + Expect(fetchedAmount).To(Equal(burnAmount)) + Expect([]byte(fetchedRecipient)).To(Equal([]byte(recipientRawAddr))) }) }) }) From d7b3ecff2a7d662c48e356e786fa203506924c7a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 10 Mar 2021 10:36:12 +0530 Subject: [PATCH 263/335] fix: remove app-specific condition from callcontract --- chain/solana/solana.go | 9 +-------- chain/solana/solana_test.go | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/chain/solana/solana.go b/chain/solana/solana.go index 2acb2f6e..c511b62f 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -104,18 +104,11 @@ func (client *Client) CallContract( } // Decode the Base58 encoded account data into raw byte-representation. Since - // this holds the burn log's data, it should be 41 bytes in size. - // - // burn amount: 8 bytes - // recipient length: 1 byte - // recipient: 32 bytes + // this holds the burn log's data. data := base58.Decode(info.Value.Data) if err != nil { return pack.Bytes(nil), fmt.Errorf("decoding result from base58: %v", err) } - if len(data) != 41 { - return pack.Bytes(nil), fmt.Errorf("unexpected data length. Expected 41, got: %v", len(data)) - } return pack.NewBytes(data), nil } diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 14c154c2..b18d6488 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -77,6 +77,7 @@ var _ = Describe("Solana", func() { binary.LittleEndian.PutUint64(calldata, burnCount) data, err := client.CallContract(context.Background(), program, multichain.ContractCallData(calldata)) Expect(err).NotTo(HaveOccurred()) + Expect(len(data)).To(Equal(41)) fetchedAmount := binary.LittleEndian.Uint64(data[:8]) recipientLen := uint8(data[8:9][0]) From b78b0a3738cde84fcb4e9c4ef2d9287371b97c40 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 10 Mar 2021 12:29:17 +0530 Subject: [PATCH 264/335] feat: add solana-ffi as submodule --- .gitmodules | 3 + chain/solana/solana-ffi | 1 + chain/solana/solana-ffi/.gitignore | 11 - chain/solana/solana-ffi/Makefile | 20 - chain/solana/solana-ffi/cgo/.gitignore | 4 - chain/solana/solana-ffi/rust/.gitignore | 1 - chain/solana/solana-ffi/rust/Cargo.lock | 4039 -------------------- chain/solana/solana-ffi/rust/Cargo.toml | 24 - chain/solana/solana-ffi/rust/build.rs | 15 - chain/solana/solana-ffi/rust/cbindgen.toml | 18 - chain/solana/solana-ffi/rust/src/lib.rs | 377 -- chain/solana/solana-ffi/rust/src/util.rs | 95 - chain/solana/solana-ffi/solana-ffi.yml | 53 - chain/solana/solana_ffi.go | 2 +- chain/solana/solana_test.go | 2 +- go.mod | 2 + 16 files changed, 8 insertions(+), 4659 deletions(-) create mode 160000 chain/solana/solana-ffi delete mode 100644 chain/solana/solana-ffi/.gitignore delete mode 100644 chain/solana/solana-ffi/Makefile delete mode 100644 chain/solana/solana-ffi/cgo/.gitignore delete mode 100644 chain/solana/solana-ffi/rust/.gitignore delete mode 100644 chain/solana/solana-ffi/rust/Cargo.lock delete mode 100644 chain/solana/solana-ffi/rust/Cargo.toml delete mode 100644 chain/solana/solana-ffi/rust/build.rs delete mode 100644 chain/solana/solana-ffi/rust/cbindgen.toml delete mode 100644 chain/solana/solana-ffi/rust/src/lib.rs delete mode 100644 chain/solana/solana-ffi/rust/src/util.rs delete mode 100644 chain/solana/solana-ffi/solana-ffi.yml diff --git a/.gitmodules b/.gitmodules index e1b9bf3c..fba83b42 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "chain/filecoin/filecoin-ffi"] path = chain/filecoin/filecoin-ffi url = https://github.com/filecoin-project/filecoin-ffi +[submodule "chain/solana/solana-ffi"] + path = chain/solana/solana-ffi + url = https://github.com/renproject/solana-ffi diff --git a/chain/solana/solana-ffi b/chain/solana/solana-ffi new file mode 160000 index 00000000..44840392 --- /dev/null +++ b/chain/solana/solana-ffi @@ -0,0 +1 @@ +Subproject commit 44840392296fa690cd777a55dce19fd4844c1559 diff --git a/chain/solana/solana-ffi/.gitignore b/chain/solana/solana-ffi/.gitignore deleted file mode 100644 index 568c57dc..00000000 --- a/chain/solana/solana-ffi/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.exe -*.exe~ -*.dll -*.so -*.dylib -**/.install-solana-ffi -**/*.a -**/*.h -cgo/*.h -cgo/*.a -cgo/*.go diff --git a/chain/solana/solana-ffi/Makefile b/chain/solana/solana-ffi/Makefile deleted file mode 100644 index 0e3eb587..00000000 --- a/chain/solana/solana-ffi/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -DEPS:=solana-ffi.h libsolana-ffi.a - -all: $(DEPS) -.PHONY: all - -$(DEPS): .install-solana-ffi ; - -.install-solana-ffi: rust - cd rust && cargo build --release --all; cd .. - find ./rust/target/release -type f -name "solana-ffi.h" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/solana-ffi.h - find ./rust/target/release -type f -name "libsolana_ffi.a" -print0 | xargs -0 ls -t | head -n 1 | xargs -I {} cp {} ./cgo/libsolana_ffi.a - c-for-go --ccincl solana-ffi.yml - @touch $@ - -clean: - rm -rf $(DEPS) .install-solana-ffi - rm -rf cgo/*.go - rm -rf cgo/*.h - rm -rf cgo/*.a -.PHONY: clean diff --git a/chain/solana/solana-ffi/cgo/.gitignore b/chain/solana/solana-ffi/cgo/.gitignore deleted file mode 100644 index 5e7d2734..00000000 --- a/chain/solana/solana-ffi/cgo/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore diff --git a/chain/solana/solana-ffi/rust/.gitignore b/chain/solana/solana-ffi/rust/.gitignore deleted file mode 100644 index eb5a316c..00000000 --- a/chain/solana/solana-ffi/rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/chain/solana/solana-ffi/rust/Cargo.lock b/chain/solana/solana-ffi/rust/Cargo.lock deleted file mode 100644 index b44fdc06..00000000 --- a/chain/solana/solana-ffi/rust/Cargo.lock +++ /dev/null @@ -1,4039 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - -[[package]] -name = "aho-corasick" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "backtrace" -version = "0.3.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" -dependencies = [ - "addr2line", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "serde", -] - -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bincode" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d175dfa69e619905c4c3cdb7c3c203fa3bdd5d51184e3afdb2742c0280493772" -dependencies = [ - "byteorder", - "serde", -] - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "blake3" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if 0.1.10", - "constant_time_eq", - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.4", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "borsh" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b13fa9bf62be34702e5ee4526aff22530ae22fe34a0c4290d30d5e4e782e6" -dependencies = [ - "borsh-derive 0.7.2", -] - -[[package]] -name = "borsh" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a26c53ddf60281f18e7a29b20db7ba3db82a9d81b9650bfaa02d646f50d364" -dependencies = [ - "borsh-derive 0.8.1", - "hashbrown", -] - -[[package]] -name = "borsh-derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6aaa45f8eec26e4bf71e7e5492cf53a91591af8f871f422d550e7cc43f6b927" -dependencies = [ - "borsh-derive-internal 0.7.2", - "borsh-schema-derive-internal 0.7.2", - "proc-macro2 1.0.24", - "syn 1.0.60", -] - -[[package]] -name = "borsh-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b637a47728b78a78cd7f4b85bf06d71ef4221840e059a38f048be2422bf673b2" -dependencies = [ - "borsh-derive-internal 0.8.1", - "borsh-schema-derive-internal 0.8.1", - "proc-macro-crate", - "proc-macro2 1.0.24", - "syn 1.0.60", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61621b9d3cca65cc54e2583db84ef912d59ae60d2f04ba61bc0d7fc57556bda2" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d813fa25eb0bed78c36492cff4415f38c760d6de833d255ba9095bd8ebb7d725" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b38abfda570837b0949c2c7ebd31417e15607861c23eacb2f668c69f6f3bf7" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf78ee4a98c8cb9eba1bac3d3e2a1ea3d7673c719ce691e67b5cbafc472d3b7" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - -[[package]] -name = "bumpalo" -version = "3.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" - -[[package]] -name = "bv" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -dependencies = [ - "feature-probe", - "serde", -] - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" - -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "either", - "iovec", -] - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "bytes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0dcbc35f504eb6fc275a6d20e4ebcda18cf50d40ba6fabff8c711fa16cb3b16" - -[[package]] -name = "bytes" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" - -[[package]] -name = "bzip2" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.10+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "cbindgen" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df6a11bba1d7cab86c166cecf4cf8acd7d02b7b65924d81b33d27197f22ee35" -dependencies = [ - "clap", - "heck", - "indexmap", - "log", - "proc-macro2 1.0.24", - "quote 1.0.9", - "serde", - "serde_json", - "syn 1.0.60", - "tempfile", - "toml", -] - -[[package]] -name = "cc" -version = "1.0.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e450b8da92aa6f274e7c6437692f9f2ce6d701fb73bacfcf87897b3f89a4c20e" -dependencies = [ - "jobserver", - "num_cpus", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "serde", - "time", - "winapi 0.3.9", -] - -[[package]] -name = "clap" -version = "2.33.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "console" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c0994e656bba7b922d8dd1245db90672ffb701e684e45be58f20719d69abc5a" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "termios", - "unicode-width", - "winapi 0.3.9", - "winapi-util", -] - -[[package]] -name = "console" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc80946b3480f421c2f17ed1cb841753a371c7c5104f51d507e13f532c856aa" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "regex", - "terminal_size", - "unicode-width", - "winapi 0.3.9", -] - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "core-foundation" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" - -[[package]] -name = "cpuid-bool" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" - -[[package]] -name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.3", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch 0.9.3", - "crossbeam-utils 0.8.3", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.3", - "lazy_static", - "memoffset 0.6.1", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" -dependencies = [ - "autocfg", - "cfg-if 1.0.0", - "lazy_static", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-mac" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -dependencies = [ - "generic-array 0.12.4", - "subtle 1.0.0", -] - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array 0.14.4", - "subtle 2.4.0", -] - -[[package]] -name = "crypto-mac" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" -dependencies = [ - "generic-array 0.14.4", - "subtle 2.4.0", -] - -[[package]] -name = "curve25519-dalek" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434e1720189a637d44fe464f4df1e6eb900b4835255b14354497c78af37d9bb8" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle 2.4.0", - "zeroize", -] - -[[package]] -name = "darling" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2 1.0.24", - "quote 1.0.9", - "strsim 0.9.3", - "syn 1.0.60", -] - -[[package]] -name = "darling_macro" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" -dependencies = [ - "darling_core", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "dashmap" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" -dependencies = [ - "cfg-if 1.0.0", - "num_cpus", - "rayon", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "derive_builder" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" -dependencies = [ - "darling", - "derive_builder_core", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "derive_builder_core" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" -dependencies = [ - "darling", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "dialoguer" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aa86af7b19b40ef9cbef761ed411a49f0afa06b7b6dcd3dfe2f96a3c546138" -dependencies = [ - "console 0.11.3", - "lazy_static", - "tempfile", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "dir-diff" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2860407d7d7e2e004bb2128510ad9e8d669e76fa005ccf567977b5d71b8b4a0b" -dependencies = [ - "walkdir", -] - -[[package]] -name = "ed25519" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" -dependencies = [ - "serde", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.0-pre.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a8a37f4e8b35af971e6db5e3897e7a6344caa3f92f6544f88125a1f5f0035a" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.8.2", - "zeroize", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encoding_rs" -version = "0.8.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "env_logger" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", - "synstructure", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "filetime" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.2.5", - "winapi 0.3.9", -] - -[[package]] -name = "flate2" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" -dependencies = [ - "cfg-if 1.0.0", - "crc32fast", - "libc", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "fs_extra" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - -[[package]] -name = "futures-channel" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94" - -[[package]] -name = "futures-io" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59" - -[[package]] -name = "futures-macro" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7" -dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "futures-sink" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3" - -[[package]] -name = "futures-task" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80" - -[[package]] -name = "futures-util" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1" -dependencies = [ - "futures-core", - "futures-io", - "futures-macro", - "futures-task", - "memchr", - "pin-project-lite 0.2.5", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "gateway" -version = "0.1.0" -source = "git+https://github.com/renproject/ren-solana?branch=master#1623b451913bb2b689a8f8426845f48750cf2eb3" -dependencies = [ - "arrayref", - "digest 0.9.0", - "num-derive", - "num-traits", - "num_enum", - "remove_dir_all", - "sha3", - "solana-program", - "spl-associated-token-account", - "spl-token", - "thiserror", -] - -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "gethostname" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" - -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - -[[package]] -name = "h2" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio 0.2.25", - "tokio-util", - "tracing", - "tracing-futures", -] - -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash", -] - -[[package]] -name = "heck" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hidapi" -version = "1.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c352a18370f7e7e47bcbfcbdc5432b8c80c705b5d751a25232c659fcf5c775" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "hmac" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" -dependencies = [ - "crypto-mac 0.7.0", - "digest 0.8.1", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac-drbg" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" -dependencies = [ - "digest 0.8.1", - "generic-array 0.12.4", - "hmac 0.7.1", -] - -[[package]] -name = "http" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" -dependencies = [ - "bytes 1.0.1", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes 0.5.6", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" - -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.13.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" -dependencies = [ - "bytes 0.5.6", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project", - "socket2", - "tokio 0.2.25", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" -dependencies = [ - "bytes 0.5.6", - "futures-util", - "hyper", - "log", - "rustls", - "tokio 0.2.25", - "tokio-rustls", - "webpki", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "indicatif" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7baab56125e25686df467fe470785512329883aab42696d661247aca2a2896e4" -dependencies = [ - "console 0.14.0", - "lazy_static", - "number_prefix", - "regex", -] - -[[package]] -name = "input_buffer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" -dependencies = [ - "bytes 0.5.6", -] - -[[package]] -name = "instant" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "ipnet" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" - -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" - -[[package]] -name = "jemalloc-ctl" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7" -dependencies = [ - "jemalloc-sys", - "libc", - "paste", -] - -[[package]] -name = "jemalloc-sys" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" -dependencies = [ - "cc", - "fs_extra", - "libc", -] - -[[package]] -name = "jemallocator" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" -dependencies = [ - "jemalloc-sys", - "libc", -] - -[[package]] -name = "jobserver" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jsonrpc-core" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" -dependencies = [ - "futures", - "log", - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] - -[[package]] -name = "libc" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265d751d31d6780a3f956bb5b8022feba2d94eeee5a84ba64f4212eedca42213" - -[[package]] -name = "libloading" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" -dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.9", -] - -[[package]] -name = "libsecp256k1" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" -dependencies = [ - "arrayref", - "crunchy", - "digest 0.8.1", - "hmac-drbg", - "rand 0.7.3", - "sha2 0.8.2", - "subtle 2.4.0", - "typenum", -] - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "lock_api" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" - -[[package]] -name = "memmap2" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow 0.2.2", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5dede4e2065b3842b8b0af444119f3aa331cc7cc2dd20388bfb0f5d5a38823a" -dependencies = [ - "libc", - "log", - "miow 0.3.6", - "ntapi", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio 0.6.23", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "miow" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" -dependencies = [ - "socket2", - "winapi 0.3.9", -] - -[[package]] -name = "native-tls" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "nix" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ccba0cfe4fdf15982d1674c69b1fd80bad427d293849982668dfe454bd61f2" -dependencies = [ - "bitflags", - "cc", - "cfg-if 1.0.0", - "libc", -] - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066" -dependencies = [ - "derivative", - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e" -dependencies = [ - "proc-macro-crate", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "number_prefix" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" - -[[package]] -name = "object" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" - -[[package]] -name = "once_cell" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" -dependencies = [ - "parking_lot 0.11.1", -] - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" - -[[package]] -name = "openssl-sys" -version = "0.9.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "ouroboros" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc04551635026d3ac7bc646698ea1836a85ed2a26b7094fe1d15d8b14854c4a2" -dependencies = [ - "ouroboros_macro", - "stable_deref_trait", -] - -[[package]] -name = "ouroboros_macro" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec33dfceabec83cd0e95a5ce9d20e76ab3a5cbfef59659b8c927f69b93ed8ae" -dependencies = [ - "Inflector", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.2", - "rustc_version", -] - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - -[[package]] -name = "parking_lot" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" -dependencies = [ - "instant", - "lock_api 0.4.2", - "parking_lot_core 0.8.3", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version", - "smallvec 0.6.14", - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec 1.6.1", - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.5", - "smallvec 1.6.1", - "winapi 0.3.9", -] - -[[package]] -name = "paste" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] - -[[package]] -name = "paste-impl" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" -dependencies = [ - "proc-macro-hack", -] - -[[package]] -name = "pbkdf2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -dependencies = [ - "byteorder", - "crypto-mac 0.7.0", -] - -[[package]] -name = "pbkdf2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b8c0d71734018084da0c0354193a5edfb81b20d2d57a92c5b154aefc554a4a" -dependencies = [ - "crypto-mac 0.10.0", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - -[[package]] -name = "pin-project" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf491442e4b033ed1c722cb9f0df5fcfcf4de682466c46469c36bc47dc5548a" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" - -[[package]] -name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - -[[package]] -name = "proc-macro2" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" -dependencies = [ - "unicode-xid 0.2.1", -] - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - -[[package]] -name = "quote" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" -dependencies = [ - "proc-macro2 1.0.24", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" -dependencies = [ - "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", - "rand_hc 0.3.0", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.2", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.2", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core 0.6.2", -] - -[[package]] -name = "rayon" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" -dependencies = [ - "autocfg", - "crossbeam-deque 0.8.0", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" -dependencies = [ - "crossbeam-channel 0.5.0", - "crossbeam-deque 0.8.0", - "crossbeam-utils 0.8.3", - "lazy_static", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local", -] - -[[package]] -name = "regex-syntax" -version = "0.6.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" - -[[package]] -name = "remove_dir_all" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "renvm-sig" -version = "0.1.0" -source = "git+https://github.com/roynalnaruto/renvm-sig#dcbeee709830b99073e4206f3dec17c98cf6140f" -dependencies = [ - "borsh 0.7.2", - "derive_builder", - "digest 0.9.0", - "libsecp256k1", - "rand 0.7.3", - "rustc-hex", - "serde", - "sha3", - "thiserror", - "tiny-keccak", -] - -[[package]] -name = "reqwest" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" -dependencies = [ - "base64 0.13.0", - "bytes 0.5.6", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project-lite 0.2.5", - "rustls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio 0.2.25", - "tokio-rustls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" -dependencies = [ - "cc", - "lazy_static", - "libc", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "rpassword" -version = "4.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustls" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" -dependencies = [ - "base64 0.12.3", - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustversion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi 0.3.9", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "security-framework" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfd318104249865096c8da1dfabf09ddbb6d0330ea176812a62ec75e40c4166" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee48cdde5ed250b0d3252818f646e174ab414036edb884dde62d80a3ac6082d" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser 0.10.2", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.123" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.123" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "serde_json" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha-1" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - -[[package]] -name = "sha2" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpuid-bool", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", -] - -[[package]] -name = "signal-hook-registry" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - -[[package]] -name = "smallvec" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "solana-account-decoder" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cd480a29ba8a1f123b7924997a4b0585abcb7441ed89fe80cfd3a4d3fd0a52" -dependencies = [ - "Inflector", - "base64 0.12.3", - "bincode", - "bs58", - "bv", - "lazy_static", - "serde", - "serde_derive", - "serde_json", - "solana-config-program", - "solana-sdk", - "solana-stake-program", - "solana-vote-program", - "spl-token", - "thiserror", - "zstd", -] - -[[package]] -name = "solana-clap-utils" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbf22b70b05528db77b0a4a093a6b2ce88c4d85a178b8db00e0822e4524ab18" -dependencies = [ - "chrono", - "clap", - "rpassword", - "solana-remote-wallet", - "solana-sdk", - "thiserror", - "tiny-bip39", - "url", -] - -[[package]] -name = "solana-client" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139f8e26ce589cfdcbfc5b6dfa5c90842efd55fe3b7e8a129574d328baa015ac" -dependencies = [ - "base64 0.13.0", - "bincode", - "bs58", - "clap", - "indicatif", - "jsonrpc-core", - "log", - "net2", - "rayon", - "reqwest", - "semver 0.11.0", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-net-utils", - "solana-sdk", - "solana-transaction-status", - "solana-version", - "solana-vote-program", - "thiserror", - "tungstenite", - "url", -] - -[[package]] -name = "solana-config-program" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "019da3587ac94ae31456f99300fd8fc391a54a8e1ec34017c8d73edf31c4dd0d" -dependencies = [ - "bincode", - "chrono", - "log", - "rand_core 0.6.2", - "serde", - "serde_derive", - "solana-sdk", -] - -[[package]] -name = "solana-crate-features" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4efe3deef81070a0199d6a61564f687922065ab378572c03e20e6fe927b846d" -dependencies = [ - "backtrace", - "bytes 0.4.12", - "cc", - "curve25519-dalek", - "ed25519-dalek", - "either", - "lazy_static", - "libc", - "rand_chacha 0.2.2", - "regex-syntax", - "reqwest", - "serde", - "syn 0.15.44", - "syn 1.0.60", - "tokio 0.1.22", - "winapi 0.3.9", -] - -[[package]] -name = "solana-ffi" -version = "0.1.0" -dependencies = [ - "arrayref", - "bincode", - "cbindgen", - "digest 0.9.0", - "gateway", - "libc", - "renvm-sig", - "sha3", - "solana-client", - "solana-sdk", - "spl-associated-token-account", - "spl-token", -] - -[[package]] -name = "solana-frozen-abi" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca562dc5282f8124e3df791b527904a85b6b4361c1899b39d09aeb7afa974b3" -dependencies = [ - "bs58", - "bv", - "generic-array 0.14.4", - "log", - "memmap2", - "rustc_version", - "serde", - "serde_derive", - "sha2 0.9.3", - "solana-frozen-abi-macro", - "solana-logger", - "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31181207a88d8b474f528ec9b5f21b4d46e014a345ad3d866e0b6c82f421fc8" -dependencies = [ - "lazy_static", - "proc-macro2 1.0.24", - "quote 1.0.9", - "rustc_version", - "syn 1.0.60", -] - -[[package]] -name = "solana-logger" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca735bd55081a956e3d72921d342ac5967b87443cc8a5b6d58fbca5b524c72d" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - -[[package]] -name = "solana-measure" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "378a00f3c127b57ff292c99428f2c1785817595ad6d90996d9105d4f02b120ef" -dependencies = [ - "jemalloc-ctl", - "jemallocator", - "log", - "solana-metrics", - "solana-sdk", -] - -[[package]] -name = "solana-metrics" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "041e03c930970e209bddbe48c6d8602b0ae9932f3ba45598840f51c976f92ff0" -dependencies = [ - "env_logger", - "gethostname", - "lazy_static", - "log", - "reqwest", - "solana-sdk", -] - -[[package]] -name = "solana-net-utils" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670e76ff45db1a558dc585200b671f5720162afc39a532a33e93a7be2ce50e3f" -dependencies = [ - "bincode", - "clap", - "log", - "nix", - "rand 0.7.3", - "serde", - "serde_derive", - "socket2", - "solana-clap-utils", - "solana-logger", - "solana-version", - "tokio 0.3.7", - "url", -] - -[[package]] -name = "solana-program" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4ccfa5ffff5bbf054a4193f1e1a2325cf4d2ff80324712aa2f8dd5018663fbc" -dependencies = [ - "bincode", - "borsh 0.8.1", - "borsh-derive 0.8.1", - "bs58", - "bv", - "curve25519-dalek", - "hex", - "itertools", - "lazy_static", - "log", - "num-derive", - "num-traits", - "rand 0.7.3", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "sha2 0.9.3", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-sdk-macro", - "thiserror", -] - -[[package]] -name = "solana-rayon-threadlimit" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135449bacc9f97b20c3d6c7570ac6929d818d8657b14d4da075de25c6d12dbc8" -dependencies = [ - "lazy_static", - "num_cpus", -] - -[[package]] -name = "solana-remote-wallet" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8916159ba07cfa09dcc29db8958b48f9d20256268b1d1e6952d0c37ed4e6c6b" -dependencies = [ - "base32", - "console 0.11.3", - "dialoguer", - "hidapi", - "log", - "num-derive", - "num-traits", - "parking_lot 0.10.2", - "semver 0.9.0", - "solana-sdk", - "thiserror", - "url", -] - -[[package]] -name = "solana-runtime" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48b0fb7b8bd0ff04a3b85473dea1253624c7c09237ed9c23c76d1c0bc8d54123" -dependencies = [ - "bincode", - "blake3", - "bv", - "byteorder", - "bzip2", - "crossbeam-channel 0.4.4", - "dashmap", - "dir-diff", - "flate2", - "fnv", - "fs_extra", - "itertools", - "lazy_static", - "libc", - "libloading", - "log", - "memmap2", - "num-derive", - "num-traits", - "num_cpus", - "ouroboros", - "rand 0.7.3", - "rayon", - "regex", - "rustc_version", - "serde", - "serde_derive", - "solana-config-program", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-measure", - "solana-metrics", - "solana-rayon-threadlimit", - "solana-sdk", - "solana-secp256k1-program", - "solana-stake-program", - "solana-vote-program", - "symlink", - "tar", - "tempfile", - "thiserror", - "zstd", -] - -[[package]] -name = "solana-sdk" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd657a3b0d99240641b9b2e0e38746f4640b63ffdb8cca60d0922ab877ad730" -dependencies = [ - "assert_matches", - "bincode", - "bs58", - "bv", - "byteorder", - "chrono", - "digest 0.9.0", - "ed25519-dalek", - "generic-array 0.14.4", - "hex", - "hmac 0.10.1", - "itertools", - "lazy_static", - "libsecp256k1", - "log", - "memmap2", - "num-derive", - "num-traits", - "pbkdf2 0.6.0", - "rand 0.7.3", - "rand_chacha 0.2.2", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.9.3", - "sha3", - "solana-crate-features", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-program", - "solana-sdk-macro", - "thiserror", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8c8f6b1b2883bf6ac14245b10db27ceb55d1f72ccd032f4ae2c688fb78865a" -dependencies = [ - "bs58", - "proc-macro2 1.0.24", - "quote 1.0.9", - "rustversion", - "syn 1.0.60", -] - -[[package]] -name = "solana-secp256k1-program" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab2a19373b3b1f5d0b5fcd2046f3d9c9e7b1a4d2e82fe53a757320db1ef8ec0" -dependencies = [ - "bincode", - "digest 0.9.0", - "libsecp256k1", - "rand 0.7.3", - "sha3", - "solana-logger", - "solana-sdk", -] - -[[package]] -name = "solana-stake-program" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "210d47d4d5a87a107740e9fdda2ea90d7200a2dda8e2f1fbbe8b6f02758fff06" -dependencies = [ - "bincode", - "log", - "num-derive", - "num-traits", - "rustc_version", - "serde", - "serde_derive", - "solana-config-program", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-metrics", - "solana-sdk", - "solana-vote-program", - "thiserror", -] - -[[package]] -name = "solana-transaction-status" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3828ec2506ef9b6097db70186f0a988d7b23f60aade036fd89562e43c4a615e7" -dependencies = [ - "Inflector", - "base64 0.12.3", - "bincode", - "bs58", - "lazy_static", - "serde", - "serde_derive", - "serde_json", - "solana-account-decoder", - "solana-runtime", - "solana-sdk", - "solana-stake-program", - "solana-vote-program", - "spl-memo 2.0.1", - "spl-memo 3.0.0", - "spl-token", - "thiserror", -] - -[[package]] -name = "solana-version" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d475eaa3f426c1e7bc94c576e2489e0bdfddc57f39b76fb65277f748cb9ade22" -dependencies = [ - "log", - "rustc_version", - "serde", - "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-sdk", -] - -[[package]] -name = "solana-vote-program" -version = "1.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96174e87a76ff8e22bb9ec5255d15dc403e4500de053eaef16185033b7ea3abc" -dependencies = [ - "bincode", - "log", - "num-derive", - "num-traits", - "rustc_version", - "serde", - "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-metrics", - "solana-sdk", - "thiserror", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spl-associated-token-account" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4adc47eebe5d2b662cbaaba1843719c28a67e5ec5d0460bc3ca60900a51f74e2" -dependencies = [ - "solana-program", - "spl-token", -] - -[[package]] -name = "spl-memo" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2b771f6146dec14ef5fbf498f9374652c54badc3befc8c40c1d426dd45d720" -dependencies = [ - "solana-program", -] - -[[package]] -name = "spl-memo" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e76b60c6f58279b5469beb1705744e9778ee94d643c8e3e2ff91874c59bb3c63" -dependencies = [ - "solana-program", -] - -[[package]] -name = "spl-token" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b795e50d15dfd35aa5460b80a16414503a322be115a417a43db987c5824c6798" -dependencies = [ - "arrayref", - "num-derive", - "num-traits", - "num_enum", - "solana-program", - "thiserror", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "strsim" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - -[[package]] -name = "subtle" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" - -[[package]] -name = "symlink" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - -[[package]] -name = "syn" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "unicode-xid 0.2.1", -] - -[[package]] -name = "synstructure" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", - "unicode-xid 0.2.1", -] - -[[package]] -name = "tar" -version = "0.4.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0bcfbd6a598361fda270d82469fff3d65089dc33e175c9a131f7b4cd395f228" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "tempfile" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "rand 0.8.3", - "redox_syscall 0.2.5", - "remove_dir_all", - "winapi 0.3.9", -] - -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "terminal_size" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ca8ced750734db02076f44132d802af0b33b09942331f4459dde8636fd2406" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "termios" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" -dependencies = [ - "libc", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "tiny-bip39" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" -dependencies = [ - "failure", - "hmac 0.7.1", - "once_cell", - "pbkdf2 0.3.0", - "rand 0.7.3", - "rustc-hash", - "sha2 0.8.2", - "unicode-normalization", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures", - "mio 0.6.23", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - -[[package]] -name = "tokio" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "memchr", - "mio 0.6.23", - "num_cpus", - "pin-project-lite 0.1.12", - "slab", -] - -[[package]] -name = "tokio" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46409491c9375a693ce7032101970a54f8a2010efb77e13f70788f0d84489e39" -dependencies = [ - "autocfg", - "bytes 0.6.0", - "futures-core", - "libc", - "memchr", - "mio 0.7.9", - "num_cpus", - "once_cell", - "parking_lot 0.11.1", - "pin-project-lite 0.2.5", - "signal-hook-registry", - "slab", - "tokio-macros", - "winapi 0.3.9", -] - -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures", - "tokio-io", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures", -] - -[[package]] -name = "tokio-fs" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures", - "tokio-io", - "tokio-threadpool", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures", - "log", -] - -[[package]] -name = "tokio-macros" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46dfffa59fc3c8aad216ed61bdc2c263d2b9d87a9c8ac9de0c11a813e51b6db7" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures", - "lazy_static", - "log", - "mio 0.6.23", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", -] - -[[package]] -name = "tokio-rustls" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" -dependencies = [ - "futures-core", - "rustls", - "tokio 0.2.25", - "webpki", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "mio 0.6.23", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque 0.7.3", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-udp" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes 0.4.12", - "futures", - "log", - "mio 0.6.23", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-uds" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -dependencies = [ - "bytes 0.4.12", - "futures", - "iovec", - "libc", - "log", - "mio 0.6.23", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project-lite 0.1.12", - "tokio 0.2.25", -] - -[[package]] -name = "toml" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" -dependencies = [ - "serde", -] - -[[package]] -name = "tower-service" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" - -[[package]] -name = "tracing" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" -dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.5", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "tungstenite" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e" -dependencies = [ - "base64 0.11.0", - "byteorder", - "bytes 0.5.6", - "http", - "httparse", - "input_buffer", - "log", - "native-tls", - "rand 0.7.3", - "sha-1", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" - -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" - -[[package]] -name = "unicode-width" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" - -[[package]] -name = "vcpkg" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "walkdir" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -dependencies = [ - "same-file", - "winapi 0.3.9", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasm-bindgen" -version = "0.2.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7" -dependencies = [ - "cfg-if 1.0.0", - "serde", - "serde_json", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e67a5806118af01f0d9045915676b22aaebecf4178ae7021bc171dab0b897ab" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b" -dependencies = [ - "quote 1.0.9", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1" - -[[package]] -name = "web-sys" -version = "0.3.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" -dependencies = [ - "webpki", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "xattr" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" -dependencies = [ - "libc", -] - -[[package]] -name = "zeroize" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.9", - "syn 1.0.60", - "synstructure", -] - -[[package]] -name = "zstd" -version = "0.5.4+zstd.1.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "2.0.6+zstd.1.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "1.4.18+zstd.1.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" -dependencies = [ - "cc", - "glob", - "itertools", - "libc", -] diff --git a/chain/solana/solana-ffi/rust/Cargo.toml b/chain/solana/solana-ffi/rust/Cargo.toml deleted file mode 100644 index a956d65a..00000000 --- a/chain/solana/solana-ffi/rust/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "solana-ffi" -version = "0.1.0" -authors = ["Rohit Narurkar "] -edition = "2018" - -[lib] -crate-type = ["staticlib"] - -[dependencies] -arrayref = "0.3.6" -bincode = "1.3.1" -digest = "0.9.0" -libc = "0.2.58" -gateway = { git = "https://github.com/renproject/ren-solana", branch = "master", features = ["no-entrypoint"] } -renvm-sig = { git = "https://github.com/roynalnaruto/renvm-sig", branch = "master" } -sha3 = "0.9.1" -solana-client = "^1.5.0" -solana-sdk = "^1.5.0" -spl-associated-token-account = { version = "1.0.0", features = ["no-entrypoint"] } -spl-token = { version = "3.0.0", features = ["no-entrypoint"] } - -[build-dependencies] -cbindgen = "= 0.15.0" diff --git a/chain/solana/solana-ffi/rust/build.rs b/chain/solana/solana-ffi/rust/build.rs deleted file mode 100644 index 5e12c3b3..00000000 --- a/chain/solana/solana-ffi/rust/build.rs +++ /dev/null @@ -1,15 +0,0 @@ -extern crate cbindgen; - -use std::env; -use std::path::Path; - -fn main() { - println!("cargo:rerun-if-changed=src/"); - - let out_dir = env::var("OUT_DIR").unwrap(); - let hdr_out = Path::new(&out_dir).join("include/solana-ffi.h"); - - cbindgen::generate(std::env::var("CARGO_MANIFEST_DIR").unwrap()) - .expect("Could not generate header") - .write_to_file(hdr_out); -} diff --git a/chain/solana/solana-ffi/rust/cbindgen.toml b/chain/solana/solana-ffi/rust/cbindgen.toml deleted file mode 100644 index 998608b0..00000000 --- a/chain/solana/solana-ffi/rust/cbindgen.toml +++ /dev/null @@ -1,18 +0,0 @@ -header = """ -/* solana-ffi Header */ -#ifdef __cplusplus -extern "C" {{ -#endif -""" -trailer = """ -#ifdef __cplusplus -} /* extern "C" */ -#endif -""" - -include_guard = "SOLANA_FFI_H" -include_version = true -language = "C" - -[parse] -parse_deps = false diff --git a/chain/solana/solana-ffi/rust/src/lib.rs b/chain/solana/solana-ffi/rust/src/lib.rs deleted file mode 100644 index aece1edb..00000000 --- a/chain/solana/solana-ffi/rust/src/lib.rs +++ /dev/null @@ -1,377 +0,0 @@ -extern crate libc; -use arrayref::array_refs; -use digest::Digest; -use gateway::{ - instruction::{burn, initialize, mint}, - state::Gateway, -}; -use renvm_sig::{RenVM, RenVmMsgBuilder}; -use solana_client::{rpc_client::RpcClient, rpc_config::RpcSendTransactionConfig}; -use solana_sdk::{ - commitment_config::CommitmentConfig, - program_pack::Pack, - pubkey::Pubkey, - signature::{read_keypair_file, Signer}, - transaction::Transaction, -}; -use spl_associated_token_account::{create_associated_token_account, get_associated_token_address}; -use spl_token::instruction::burn_checked; -use std::{ - ffi::{CStr, CString}, - str::FromStr, -}; - -mod util; - -#[no_mangle] -pub extern "C" fn unique_pubkey() -> *const libc::c_char { - let pubkey = Pubkey::new_unique(); - let pubkey = pubkey.to_string(); - CString::new(pubkey).unwrap().into_raw() -} - -#[no_mangle] -pub extern "C" fn program_derived_address( - seeds_pointer: *const u8, - seeds_size: libc::size_t, - program: *const libc::c_char, -) -> *const libc::c_char { - let seeds = - unsafe { std::slice::from_raw_parts(seeds_pointer as *const u8, seeds_size as usize) }; - - let buf_name = unsafe { CStr::from_ptr(program).to_bytes() }; - let program_str = String::from_utf8(buf_name.to_vec()).unwrap(); - let program_id = Pubkey::from_str(&program_str).unwrap(); - - let (derived_address, _) = Pubkey::find_program_address(&[seeds], &program_id); - - CString::new(derived_address.to_string()) - .unwrap() - .into_raw() -} - -#[no_mangle] -pub extern "C" fn gateway_initialize( - keypair_path: *const libc::c_char, - rpc_url: *const libc::c_char, - authority_pointer: *const u8, - selector: *const libc::c_char, -) -> *const libc::c_char { - // Solana default signer and fee payer. - let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; - let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); - let payer = read_keypair_file(&keypair_path).unwrap(); - - // Initialize client. - let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; - let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); - let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::confirmed(); - let (recent_blockhash, _, _) = rpc_client - .get_recent_blockhash_with_commitment(commitment_config) - .unwrap() - .value; - - // Construct the RenVM authority 20-bytes Ethereum compatible address. - let authority_slice = - unsafe { std::slice::from_raw_parts(authority_pointer as *const u8, 20usize) }; - let mut authority = [0u8; 20usize]; - authority.copy_from_slice(authority_slice); - - // Get selector hash. - let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; - let selector = String::from_utf8(buf_name.to_vec()).unwrap(); - let mut hasher = sha3::Keccak256::new(); - hasher.update(selector.as_bytes()); - let selector_hash: [u8; 32] = hasher.finalize().into(); - - // Find derived address that will hold Gateway's state. - let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); - - // Derived address that will be the token mint. - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); - - // Build and sign the initialize transaction. - let mut tx = Transaction::new_with_payer( - &[initialize( - &gateway::id(), - &payer.pubkey(), - &gateway_account_id, - authority, - &token_mint_id, - &spl_token::id(), - selector_hash, - ) - .unwrap()], - Some(&payer.pubkey()), - ); - tx.sign(&[&payer], recent_blockhash); - - // Broadcast transaction. - let signature = rpc_client - .send_transaction_with_config( - &tx, - RpcSendTransactionConfig { - preflight_commitment: Some(commitment_config.commitment), - ..RpcSendTransactionConfig::default() - }, - ) - .unwrap(); - - CString::new(signature.to_string()).unwrap().into_raw() -} - -#[no_mangle] -pub extern "C" fn gateway_initialize_account( - keypair_path: *const libc::c_char, - rpc_url: *const libc::c_char, - selector: *const libc::c_char, -) -> *const libc::c_char { - // Solana default signer and fee payer. - let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; - let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); - let payer = read_keypair_file(&keypair_path).unwrap(); - - // Initialize client. - let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; - let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); - let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::confirmed(); - let (recent_blockhash, _, _) = rpc_client - .get_recent_blockhash_with_commitment(commitment_config) - .unwrap() - .value; - - // Get selector hash. - let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; - let selector = String::from_utf8(buf_name.to_vec()).unwrap(); - let mut hasher = sha3::Keccak256::new(); - hasher.update(selector.as_bytes()); - let selector_hash: [u8; 32] = hasher.finalize().into(); - - // Derived address that will be the token mint. - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); - - // Build and sign transaction. - let mut tx = Transaction::new_with_payer( - &[create_associated_token_account( - &payer.pubkey(), - &payer.pubkey(), - &token_mint_id, - )], - Some(&payer.pubkey()), - ); - tx.sign(&[&payer], recent_blockhash); - - // Broadcast transaction. - let signature = rpc_client - .send_transaction_with_config( - &tx, - RpcSendTransactionConfig { - preflight_commitment: Some(commitment_config.commitment), - ..RpcSendTransactionConfig::default() - }, - ) - .unwrap(); - - CString::new(signature.to_string()).unwrap().into_raw() -} - -#[no_mangle] -pub extern "C" fn gateway_get_burn_count(rpc_url: *const libc::c_char) -> libc::c_ulonglong { - // Initialize client. - let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; - let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); - let rpc_client = RpcClient::new(rpc_url); - - // Fetch account data. - let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); - let gateway_account_data = rpc_client.get_account_data(&gateway_account_id).unwrap(); - let gateway_state = Gateway::unpack_unchecked(&gateway_account_data).unwrap(); - - gateway_state.burn_count + 1 -} - -#[no_mangle] -pub extern "C" fn gateway_mint( - keypair_path: *const libc::c_char, - rpc_url: *const libc::c_char, - authority_secret: *const libc::c_char, - selector: *const libc::c_char, - amount: libc::c_ulonglong, -) -> *const libc::c_char { - // Solana default signer and fee payer. - let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; - let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); - let payer = read_keypair_file(&keypair_path).unwrap(); - - // RenVM authority secret. - let buf_name = unsafe { CStr::from_ptr(authority_secret).to_bytes() }; - let authority_secret = String::from_utf8(buf_name.to_vec()).unwrap(); - let renvm = RenVM::from_str(&authority_secret).unwrap(); - let renvm_authority = renvm.address(); - - // Initialize client. - let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; - let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); - let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::confirmed(); - let (recent_blockhash, _, _) = rpc_client - .get_recent_blockhash_with_commitment(commitment_config) - .unwrap() - .value; - - // Get selector hash. - let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; - let selector = String::from_utf8(buf_name.to_vec()).unwrap(); - let mut hasher = sha3::Keccak256::new(); - hasher.update(selector.as_bytes()); - let selector_hash: [u8; 32] = hasher.finalize().into(); - - // Derived address that will be the token mint. - let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); - let (mint_authority_id, _) = - Pubkey::find_program_address(&[&token_mint_id.to_bytes()], &gateway::id()); - let associated_token_account = get_associated_token_address(&payer.pubkey(), &token_mint_id); - - // Construct RenVM mint message and sign it. - let renvm_mint_msg = RenVmMsgBuilder::default() - .amount(amount) - .to(associated_token_account.to_bytes()) - .s_hash(selector_hash) - .build() - .unwrap(); - let msg_hash = renvm_mint_msg.get_digest().unwrap(); - let renvm_sig = renvm.sign(&renvm_mint_msg).unwrap(); - let (sig_r, sig_s, sig_v) = array_refs![&renvm_sig, 32, 32, 1]; - let (mint_log_account_id, _) = Pubkey::find_program_address(&[&msg_hash[..]], &gateway::id()); - let mut tx = Transaction::new_with_payer( - &[ - mint( - &gateway::id(), - &payer.pubkey(), - &gateway_account_id, - &token_mint_id, - &associated_token_account, - &mint_log_account_id, - &mint_authority_id, - &spl_token::id(), - ) - .unwrap(), - util::mint_secp_instruction( - sig_r, - sig_s, - u8::from_le_bytes(*sig_v), - &util::encode_msg( - renvm_mint_msg.amount, - &renvm_mint_msg.s_hash, - &renvm_mint_msg.to, - &renvm_mint_msg.p_hash, - &renvm_mint_msg.n_hash, - ), - renvm_authority[..].to_vec(), - ), - ], - Some(&payer.pubkey()), - ); - tx.sign(&[&payer], recent_blockhash); - - // Broadcast transaction. - let signature = rpc_client - .send_transaction_with_config( - &tx, - RpcSendTransactionConfig { - preflight_commitment: Some(commitment_config.commitment), - ..RpcSendTransactionConfig::default() - }, - ) - .unwrap(); - - CString::new(signature.to_string()).unwrap().into_raw() -} - -#[no_mangle] -pub extern "C" fn gateway_burn( - keypair_path: *const libc::c_char, - rpc_url: *const libc::c_char, - selector: *const libc::c_char, - burn_count: libc::c_ulonglong, - burn_amount: libc::c_ulonglong, - recipient_len: libc::size_t, - recipient_pointer: *const u8, -) -> *const libc::c_char { - // Solana default signer and fee payer. - let buf_name = unsafe { CStr::from_ptr(keypair_path).to_bytes() }; - let keypair_path = String::from_utf8(buf_name.to_vec()).unwrap(); - let payer = read_keypair_file(&keypair_path).unwrap(); - - // Initialize client. - let buf_name = unsafe { CStr::from_ptr(rpc_url).to_bytes() }; - let rpc_url = String::from_utf8(buf_name.to_vec()).unwrap(); - let rpc_client = RpcClient::new(rpc_url); - let commitment_config = CommitmentConfig::confirmed(); - let (recent_blockhash, _, _) = rpc_client - .get_recent_blockhash_with_commitment(commitment_config) - .unwrap() - .value; - - // Get selector hash. - let buf_name = unsafe { CStr::from_ptr(selector).to_bytes() }; - let selector = String::from_utf8(buf_name.to_vec()).unwrap(); - let mut hasher = sha3::Keccak256::new(); - hasher.update(selector.as_bytes()); - let selector_hash: [u8; 32] = hasher.finalize().into(); - - // Derived address that will be the token mint. - let (gateway_account_id, _) = Pubkey::find_program_address(&[b"GatewayState"], &gateway::id()); - let (token_mint_id, _) = Pubkey::find_program_address(&[&selector_hash[..]], &gateway::id()); - let associated_token_account = get_associated_token_address(&payer.pubkey(), &token_mint_id); - - // Construct the 25-bytes address of release recipient of the underlying assets. - let recipient_slice = unsafe { - std::slice::from_raw_parts(recipient_pointer as *const u8, recipient_len as usize) - }; - - let (burn_log_account_id, _) = - Pubkey::find_program_address(&[&burn_count.to_le_bytes()[..]], &gateway::id()); - let mut tx = Transaction::new_with_payer( - &[ - burn_checked( - &spl_token::id(), - &associated_token_account, - &token_mint_id, - &payer.pubkey(), - &[], - burn_amount, - 9u8, - ) - .unwrap(), - burn( - &gateway::id(), - &payer.pubkey(), - &associated_token_account, - &gateway_account_id, - &token_mint_id, - &burn_log_account_id, - recipient_slice.to_vec(), - ) - .unwrap(), - ], - Some(&payer.pubkey()), - ); - tx.sign(&[&payer], recent_blockhash); - - // Broadcast transaction. - let signature = rpc_client - .send_transaction_with_config( - &tx, - RpcSendTransactionConfig { - preflight_commitment: Some(commitment_config.commitment), - ..RpcSendTransactionConfig::default() - }, - ) - .unwrap(); - - CString::new(signature.to_string()).unwrap().into_raw() -} diff --git a/chain/solana/solana-ffi/rust/src/util.rs b/chain/solana/solana-ffi/rust/src/util.rs deleted file mode 100644 index c80202a2..00000000 --- a/chain/solana/solana-ffi/rust/src/util.rs +++ /dev/null @@ -1,95 +0,0 @@ -use gateway::types::{ - RenVmMintMessage, Secp256k1InstructionData, RENVM_MINT_MESSAGE_SIZE, RENVM_MINT_SECP_DATA_SIZE, -}; -use solana_sdk::{ - instruction::Instruction, - program_pack::Pack, - secp256k1_instruction::{ - SecpSignatureOffsets, HASHED_PUBKEY_SERIALIZED_SIZE, SIGNATURE_OFFSETS_SERIALIZED_SIZE, - }, -}; - -/// Constructs a Secp256k1 instruction for RenVM mint to be verified by Solana Secp256k1 program. -pub fn mint_secp_instruction( - sig_r: &[u8; 32], - sig_s: &[u8; 32], - sig_v: u8, - message_arr: &[u8], - eth_addr: Vec, -) -> Instruction { - // Assert that the data we've received is of the correct size. - assert_eq!(message_arr.len(), RENVM_MINT_MESSAGE_SIZE); - assert_eq!( - eth_addr.len() + sig_r.len() + sig_s.len() + 1 + message_arr.len(), - RENVM_MINT_SECP_DATA_SIZE - 1, - ); - - // Allocate appropriate size for our instruction data. - let mut instruction_data = vec![]; - let data_start = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE; - let total_size = data_start + RENVM_MINT_SECP_DATA_SIZE; - instruction_data.resize(total_size, 0); - - // Calculate the offsets for a single ECDSA signature. - let num_signatures = 1; - instruction_data[0] = num_signatures; - let eth_addr_offset = data_start + 1; - let signature_offset = eth_addr_offset + eth_addr.len(); - let message_data_offset = signature_offset + sig_r.len() + sig_s.len() + 1; - - // Copy data from slice into sized arrays. - let mut addr = [0u8; HASHED_PUBKEY_SERIALIZED_SIZE]; - addr.copy_from_slice(ð_addr[..]); - let mut msg = [0u8; RENVM_MINT_MESSAGE_SIZE]; - msg.copy_from_slice(message_arr); - - // Write Secp256k1InstructionData data. - let secp256k1_instruction_data = Secp256k1InstructionData::MintSignature { - eth_addr: addr, - sig_r: *sig_r, - sig_s: *sig_s, - sig_v: sig_v - 27, - msg: msg, - }; - let packed_data = secp256k1_instruction_data.pack(); - instruction_data[data_start..total_size].copy_from_slice(packed_data.as_slice()); - - // Write offsets data. - let offsets = SecpSignatureOffsets { - signature_offset: signature_offset as u16, - signature_instruction_index: 1, - eth_address_offset: eth_addr_offset as u16, - eth_address_instruction_index: 1, - message_data_offset: message_data_offset as u16, - message_data_size: message_arr.len() as u16, - message_instruction_index: 1, - }; - let writer = std::io::Cursor::new(&mut instruction_data[1..data_start]); - bincode::serialize_into(writer, &offsets).unwrap(); - - Instruction { - program_id: solana_sdk::secp256k1_program::id(), - accounts: vec![], - data: instruction_data, - } -} - -/// ABI-encode the values for creating the signature hash. -pub fn encode_msg( - amount: u64, - shash: &[u8; 32], - to: &[u8; 32], - p_hash: &[u8; 32], - n_hash: &[u8; 32], -) -> Vec { - let mut encoded_msg = vec![0u8; RENVM_MINT_MESSAGE_SIZE]; - let msg = RenVmMintMessage { - p_hash: *p_hash, - amount: amount, - selector_hash: *shash, - to: *to, - n_hash: *n_hash, - }; - msg.pack_into_slice(encoded_msg.as_mut_slice()); - encoded_msg -} diff --git a/chain/solana/solana-ffi/solana-ffi.yml b/chain/solana/solana-ffi/solana-ffi.yml deleted file mode 100644 index 832e7d8c..00000000 --- a/chain/solana/solana-ffi/solana-ffi.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -GENERATOR: - PackageName: cgo - PackageDescription: - PackageLicense: - Options: - SafeStrings: true - Includes: - - solana-ffi.h - FlagGroups: - - {name: "LDFLAGS", flags: [ - "-L${SRCDIR}", - "-lsolana_ffi", - ]} - - {name: "linux LDFLAGS", flags: [ - "-lcrypto", - "-ldl", - "-lm", - "-lrt", - "-lssl", - "-ludev", - ]} - - {name: "darwin LDFLAGS", flags: [ - "-F/Library/Frameworks", - "-framework Security", - "-framework CoreServices", - "-framework IOKit", - "-framework IOSurface", - "-framework AppKit", - ]} - -PARSER: - Defines: - IncludePaths: - - /usr/include - SourcesPaths: - - ./cgo/solana-ffi.h - -TRANSLATOR: - Rules: - function: - - {action: accept, from: "unique_pubkey"} - - {action: accept, from: "program_derived_address"} - - {action: accept, from: "gateway_initialize"} - - {action: accept, from: "gateway_initialize_account"} - - {action: accept, from: "gateway_get_burn_count"} - - {action: accept, from: "gateway_mint"} - - {action: accept, from: "gateway_burn"} - private: - - {transform: unexport} - post-global: - - {transform: export} - - {load: snakecase} diff --git a/chain/solana/solana_ffi.go b/chain/solana/solana_ffi.go index 1c51ebdc..7e52742d 100644 --- a/chain/solana/solana_ffi.go +++ b/chain/solana/solana_ffi.go @@ -2,7 +2,7 @@ package solana import ( "github.com/renproject/multichain/api/address" - "github.com/renproject/multichain/chain/solana/solana-ffi/cgo" + "github.com/renproject/solana-ffi/cgo" "github.com/renproject/pack" ) diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index b18d6488..d1b7ceac 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -11,7 +11,7 @@ import ( "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/solana" - "github.com/renproject/multichain/chain/solana/solana-ffi/cgo" + "github.com/renproject/solana-ffi/cgo" "github.com/renproject/pack" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/go.mod b/go.mod index 0b489eae..d2441b64 100644 --- a/go.mod +++ b/go.mod @@ -32,4 +32,6 @@ replace github.com/CosmWasm/go-cosmwasm => github.com/terra-project/go-cosmwasm replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi +replace github.com/renproject/solana-ffi => ./chain/solana/solana-ffi + replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 From 1e881353e7f63fe97e3ec9579dfdc56a17f1c78c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 10 Mar 2021 12:52:04 +0530 Subject: [PATCH 265/335] chore: placeholder version of solana-ffi --- go.mod | 1 + 1 file changed, 1 insertion(+) diff --git a/go.mod b/go.mod index d2441b64..f1830b60 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/onsi/gomega v1.10.1 github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.5 + github.com/renproject/solana-ffi v0.0.0-00010101000000-000000000000 github.com/renproject/surge v1.2.6 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.4.0-rc.4 From bb832611506a33753cebb5ce0ecce8b470ed4c63 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 10 Mar 2021 12:58:11 +0530 Subject: [PATCH 266/335] replace invalid version with appropriate placeholder version --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index f1830b60..8f00b974 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/onsi/gomega v1.10.1 github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.5 - github.com/renproject/solana-ffi v0.0.0-00010101000000-000000000000 + github.com/renproject/solana-ffi v0.1.0 github.com/renproject/surge v1.2.6 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.4.0-rc.4 From 7d0f37ec0668a5c23e7faf20ac8fbebea27d3d30 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 10 Mar 2021 13:20:10 +0530 Subject: [PATCH 267/335] ci: build solana-ffi in multichain image --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 32283cf9..53650c31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,3 +16,12 @@ WORKDIR $GOPATH/src/github.com/filecoin-project/filecoin-ffi RUN git checkout a62d00da59d1b0fb RUN make RUN go install + +WORKDIR $GOPATH +RUN mkdir -p src/github.com/renproject +WORKDIR $GOPATH/src/github.com/renproject +RUN git clone https://github.com/renproject/solana-ffi +WORKDIR $GOPATH/src/github.com/renproject/solana-ffi +RUN git checkout 44840392296fa690cd777a55dce19fd4844c1559 +RUN make clean && make +RUN go install From 235615171a8b39b57f21885134d1bb730f73104b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 10 Mar 2021 19:01:40 +0530 Subject: [PATCH 268/335] fix: install rust and dependencies before building image --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53650c31..4b8aa047 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,15 @@ FROM golang RUN apt update -y -RUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl wget +RUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev libssl-dev libudev-dev gcc git bzr jq pkg-config curl wget RUN apt upgrade -y ENV GO111MODULE=on ENV GOPROXY=https://proxy.golang.org +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + RUN mkdir -p $(go env GOPATH) WORKDIR $GOPATH RUN mkdir -p src/github.com/filecoin-project @@ -18,10 +21,11 @@ RUN make RUN go install WORKDIR $GOPATH +RUN go get -u github.com/xlab/c-for-go RUN mkdir -p src/github.com/renproject WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi RUN git checkout 44840392296fa690cd777a55dce19fd4844c1559 RUN make clean && make -RUN go install +RUN go install ./... From 28d2341355b3f9fab73d512dcae411f2c76f83c6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 11 Mar 2021 11:44:32 +0530 Subject: [PATCH 269/335] ci: separate out multichain tests in separate jobs --- .github/workflows/test.yml | 428 +++++++++++++++++++++++++++++++++--- chain/solana/solana_ffi.go | 2 +- chain/solana/solana_test.go | 2 +- multichain_test.go | 27 +++ 4 files changed, 429 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18ac117d..bc264baf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: go on: [push] jobs: - test: + test-solana: runs-on: ubuntu-latest steps: - name: Set up Go 1.13 @@ -53,13 +53,6 @@ jobs: make go vet ./... - - name: Run linting - run: | - cd $GITHUB_WORKSPACE - export PATH=$PATH:$(go env GOPATH)/bin - go get -u golang.org/x/lint/golint - golint $(go list ./... | grep -v filecoin-ffi) - - name: Setup environment for Solana tests run: | sh -c "$(curl -sSfL https://release.solana.com/v1.5.13/install)" @@ -90,28 +83,160 @@ jobs: cd $GITHUB_WORKSPACE/chain/solana go test -timeout 100s - - name: Remove docker containers + test-filecoin: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 + - name: Install dependency packages run: | - cd $GITHUB_WORKSPACE/ren-solana - npx solana-localnet down + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go + + - name: Run vetting + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make + cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + make + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint $(go list ./... | grep -v filecoin-ffi) - name: Run multichain infrastructure run: | cd $GITHUB_WORKSPACE/infra source .env - docker-compose up -d --build \ - bitcoin \ - bitcoincash \ - dogecoin \ - terra \ - zcash - docker run -d -p 1234:1234 -h 0.0.0.0 \ + docker run -d -p 1234:1234 -h 0.0.0.0 \ --name infra_filecoin_1 rohitnarurkar/multichain_filecoin:latest - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '15m' + time: '1m' + + - name: Check on docker containers + run: docker ps -a + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + go test \ + -fil=true \ + -timeout 1500s + + test-zcash: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 + - name: Install dependency packages + run: | + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go + + - name: Run vetting + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make + cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + make + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint $(go list ./... | grep -v filecoin-ffi) + + - name: Run multichain infrastructure + run: | + cd $GITHUB_WORKSPACE/infra + source .env + docker-compose up -d --build zcash + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: '1m' - name: Check on docker containers run: docker ps -a @@ -123,17 +248,264 @@ jobs: export PATH=$PATH:$(go env GOPATH)/bin source ./infra/.env cd $GITHUB_WORKSPACE - CI=true go test -timeout 1500s + go test \ + -zec=true \ + -timeout 1500s + + test-terra: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 + - name: Install dependency packages + run: | + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go - - name: Remove docker containers + - name: Run vetting run: | - docker rm -f \ - infra_bitcoin_1 \ - infra_bitcoincash_1 \ - infra_dogecoin_1 \ - infra_terra_1 \ - infra_zcash_1 \ - infra_filecoin_1 + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make + cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + make + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint $(go list ./... | grep -v filecoin-ffi) + + - name: Run multichain infrastructure + run: | + cd $GITHUB_WORKSPACE/infra + source .env + docker-compose up -d --build terra + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: '1m' + + - name: Check on docker containers + run: docker ps -a + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + go test \ + -luna=true \ + -timeout 1500s + + test-dogecoin: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 + - name: Install dependency packages + run: | + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go + + - name: Run vetting + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make + cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + make + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint $(go list ./... | grep -v filecoin-ffi) + + - name: Run multichain infrastructure + run: | + cd $GITHUB_WORKSPACE/infra + source .env + docker-compose up -d --build dogecoin + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: '1m' + + - name: Check on docker containers + run: docker ps -a + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + go test \ + -doge=true \ + -timeout 1500s + + test-btc-bch: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 + - name: Install dependency packages + run: | + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go + + - name: Run vetting + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make + cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + make + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint $(go list ./... | grep -v filecoin-ffi) + + - name: Run multichain infrastructure + run: | + cd $GITHUB_WORKSPACE/infra + source .env + docker-compose up -d --build \ + bitcoin \ + bitcoincash + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: '1m' + + - name: Check on docker containers + run: docker ps -a + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + go test \ + -btc=true \ + -bch=true \ + -timeout 1500s build: runs-on: ubuntu-latest diff --git a/chain/solana/solana_ffi.go b/chain/solana/solana_ffi.go index 7e52742d..dcffa4a5 100644 --- a/chain/solana/solana_ffi.go +++ b/chain/solana/solana_ffi.go @@ -2,8 +2,8 @@ package solana import ( "github.com/renproject/multichain/api/address" - "github.com/renproject/solana-ffi/cgo" "github.com/renproject/pack" + "github.com/renproject/solana-ffi/cgo" ) // UniquePubkey creates an atomically incrementing pubkey used for tests and diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index d1b7ceac..8f5988cf 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -11,8 +11,8 @@ import ( "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/solana" - "github.com/renproject/solana-ffi/cgo" "github.com/renproject/pack" + "github.com/renproject/solana-ffi/cgo" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/multichain_test.go b/multichain_test.go index 27f5165e..7898ec75 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -5,6 +5,7 @@ import ( "context" "encoding/hex" "encoding/json" + "flag" "fmt" "math/rand" "os" @@ -42,6 +43,15 @@ import ( . "github.com/onsi/gomega" ) +var ( + testBTC = flag.Bool("btc", false, "Pass this flag to test Bitcoin") + testBCH = flag.Bool("bch", false, "Pass this flag to test Bitcoincash") + testDOGE = flag.Bool("doge", false, "Pass this flag to test Dogecoin") + testFIL = flag.Bool("fil", false, "Pass this flag to test Filecoin") + testLUNA = flag.Bool("luna", false, "Pass this flag to test Terra") + testZEC = flag.Bool("zec", false, "Pass this flag to test Zcash") +) + var _ = Describe("Multichain", func() { // new randomness r := rand.New(rand.NewSource(time.Now().UnixNano())) @@ -55,6 +65,15 @@ var _ = Describe("Multichain", func() { logger, err := loggerConfig.Build() Expect(err).ToNot(HaveOccurred()) + // Populate the test flags by underlying asset chain. + testFlags := map[multichain.Chain]bool{} + testFlags[multichain.Bitcoin] = *testBTC + testFlags[multichain.BitcoinCash] = *testBCH + testFlags[multichain.Dogecoin] = *testDOGE + testFlags[multichain.Filecoin] = *testFIL + testFlags[multichain.Terra] = *testLUNA + testFlags[multichain.Zcash] = *testZEC + // // ADDRESS API // @@ -496,6 +515,10 @@ var _ = Describe("Multichain", func() { for _, accountChain := range accountChainTable { accountChain := accountChain + if !testFlags[accountChain.chain] { + continue + } + Context(fmt.Sprintf("%v", accountChain.chain), func() { Specify("build, broadcast and fetch tx", func() { // Load private key and the associated address. @@ -699,6 +722,10 @@ var _ = Describe("Multichain", func() { for _, utxoChain := range utxoChainTable { utxoChain := utxoChain + if !testFlags[utxoChain.chain] { + continue + } + Context(fmt.Sprintf("%v", utxoChain.chain), func() { Specify("(P2PKH) build, broadcast and fetch tx", func() { // Load private key. From 92a368d5324ed6702b4afb8d7055455a941faef0 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 11 Mar 2021 12:05:29 +0530 Subject: [PATCH 270/335] fix: wait longer for filecoin local node to be up before testing --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc264baf..1b8683d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -152,7 +152,7 @@ jobs: - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '1m' + time: '10m' - name: Check on docker containers run: docker ps -a From 88b259dda74f0b754240ce9eb865da12af8579e2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 11 Mar 2021 13:46:58 +0530 Subject: [PATCH 271/335] fix: add missing declarations for Solana --- multichain.go | 4 ++- multichain_test.go | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/multichain.go b/multichain.go index 436a7fc0..630cf026 100644 --- a/multichain.go +++ b/multichain.go @@ -254,7 +254,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Filecoin, Terra: + case BinanceSmartChain, Ethereum, Filecoin, Solana, Terra: return ChainTypeAccountBased // These chains are handled separately because they are mock chains. These @@ -300,6 +300,8 @@ func (chain Chain) NativeAsset() Asset { return ETH case Filecoin: return FIL + case Solana: + return SOL case Terra: return LUNA case Zcash: diff --git a/multichain_test.go b/multichain_test.go index 7898ec75..bd15348a 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -74,6 +74,70 @@ var _ = Describe("Multichain", func() { testFlags[multichain.Terra] = *testLUNA testFlags[multichain.Zcash] = *testZEC + Context("Multichain Declarations", func() { + Context("All supporting chains/assets are declared", func() { + accountChains := []struct { + chain multichain.Chain + asset multichain.Asset + }{ + { + multichain.Filecoin, + multichain.FIL, + }, + { + multichain.Solana, + multichain.SOL, + }, + { + multichain.Terra, + multichain.LUNA, + }, + } + utxoChains := []struct { + chain multichain.Chain + asset multichain.Asset + }{ + { + multichain.Bitcoin, + multichain.BTC, + }, + { + multichain.BitcoinCash, + multichain.BCH, + }, + { + multichain.DigiByte, + multichain.DGB, + }, + { + multichain.Dogecoin, + multichain.DOGE, + }, + { + multichain.Zcash, + multichain.ZEC, + }, + } + + for _, accountChain := range accountChains { + accountChain := accountChain + Specify(fmt.Sprintf("Chain=%v, Asset=%v should be supported", accountChain.chain, accountChain.asset), func() { + Expect(accountChain.chain.IsAccountBased()).To(BeTrue()) + Expect(accountChain.chain.NativeAsset()).To(Equal(accountChain.asset)) + Expect(accountChain.asset.OriginChain()).To(Equal(accountChain.chain)) + }) + } + for _, utxoChain := range utxoChains { + utxoChain := utxoChain + Specify(fmt.Sprintf("Chain=%v, Asset=%v should be supported", utxoChain.chain, utxoChain.asset), func() { + Expect(utxoChain.chain.IsUTXOBased()).To(BeTrue()) + Expect(utxoChain.chain.NativeAsset()).To(Equal(utxoChain.asset)) + Expect(utxoChain.asset.OriginChain()).To(Equal(utxoChain.chain)) + }) + } + }) + }) + // // ADDRESS API // From 2144be52e6ecbc091699fecc23b5dcbe144e4e67 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 11 Mar 2021 14:53:29 +0530 Subject: [PATCH 272/335] feat: add configs for Fantom --- multichain.go | 4 +++- multichain_test.go | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/multichain.go b/multichain.go index 630cf026..b2c7bd38 100644 --- a/multichain.go +++ b/multichain.go @@ -254,7 +254,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Filecoin, Solana, Terra: + case BinanceSmartChain, Ethereum, Fantom, Filecoin, Solana, Terra: return ChainTypeAccountBased // These chains are handled separately because they are mock chains. These @@ -298,6 +298,8 @@ func (chain Chain) NativeAsset() Asset { return DOGE case Ethereum: return ETH + case Fantom: + return FTM case Filecoin: return FIL case Solana: diff --git a/multichain_test.go b/multichain_test.go index bd15348a..220e702e 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -74,12 +74,19 @@ var _ = Describe("Multichain", func() { testFlags[multichain.Terra] = *testLUNA testFlags[multichain.Zcash] = *testZEC + // + // Multichain Configs + // Context("Multichain Declarations", func() { Context("All supporting chains/assets are declared", func() { accountChains := []struct { chain multichain.Chain asset multichain.Asset }{ + { + multichain.Fantom, + multichain.FTM, + }, { multichain.Filecoin, multichain.FIL, From 6ca24c4ca28b387b636263776f167bf4b7eaf607 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 12 Mar 2021 16:04:39 +0530 Subject: [PATCH 273/335] bump up solana-ffi version --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 8f00b974..7236ec99 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/onsi/gomega v1.10.1 github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.5 - github.com/renproject/solana-ffi v0.1.0 + github.com/renproject/solana-ffi v0.1.1 github.com/renproject/surge v1.2.6 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.4.0-rc.4 From d7bfa1d8acf9314a78b34e65d8697b7be74b0b06 Mon Sep 17 00:00:00 2001 From: Jaz Gulati Date: Fri, 19 Mar 2021 08:17:01 +1100 Subject: [PATCH 274/335] chain/filecoin: validate message id --- chain/filecoin/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 08173711..4fb1763c 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -118,6 +118,9 @@ func (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack if messageLookup.Receipt.ExitCode.IsError() { return nil, pack.NewU64(0), fmt.Errorf("executing transaction: %v", messageLookup.Receipt.ExitCode.String()) } + if !messageLookup.Message.Equals(msgID) { + return nil, pack.U64(0), fmt.Errorf("searching state for txid: expected %v, got %v", msgID, messageLookup.Message) + } // get the most recent tipset and its height chainHead, err := client.LatestBlock(ctx) From 8309f6e2e22dc36026f7644a8542f99f94072c2c Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Fri, 19 Mar 2021 12:48:03 +1100 Subject: [PATCH 275/335] tx.Hash function will return the signed message's cid if the tx has been signed --- chain/filecoin/account.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/chain/filecoin/account.go b/chain/filecoin/account.go index 601c4431..82261a42 100644 --- a/chain/filecoin/account.go +++ b/chain/filecoin/account.go @@ -8,6 +8,7 @@ import ( filaddress "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/lotus/chain/types" "github.com/minio/blake2b-simd" "github.com/renproject/multichain/api/account" @@ -66,6 +67,19 @@ type Tx struct { // Generally, hashes are irreversible hash functions that consume the // content of the transaction. func (tx Tx) Hash() pack.Bytes { + if !tx.signature.Equal(&pack.Bytes65{}) { + // construct crypto.Signature + signature := crypto.Signature{ + Type: crypto.SigTypeSecp256k1, + Data: tx.signature.Bytes(), + } + // construct types.SignedMessage + signedMessage := types.SignedMessage{ + Message: tx.msg, + Signature: signature, + } + return pack.NewBytes(signedMessage.Cid().Bytes()) + } return pack.NewBytes(tx.msg.Cid().Bytes()) } From 5f7b1cc4587b87c7530ccbab065d2949185dfae9 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 22 Mar 2021 05:17:10 +0000 Subject: [PATCH 276/335] feat: setup fakenet --- infra/.env | 6 ++++++ infra/docker-compose.yaml | 4 ---- infra/fantom/Dockerfile | 28 ++++++++++++++++++---------- infra/fantom/run.sh | 10 ---------- 4 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 infra/fantom/run.sh diff --git a/infra/.env b/infra/.env index 92ced4f5..38cb50c5 100644 --- a/infra/.env +++ b/infra/.env @@ -52,6 +52,12 @@ export DOGECOIN_ADDRESS=n3PSSpR4zqUKWH4tcRjP9aTwJ4GmixQXmt export ETHEREUM_MNEMONIC="clutch captain shoe salt awake harvest setup primary inmate ugly among become" export ETHEREUM_ADDRESS=0xa0df350d2637096571F7A701CBc1C5fdE30dF76A +# +# Fantom +# +export FANTOM_PK=163f5f0f9a621d72fedd85ffca3d08d131ab4e812181e0d30ffd1c885d20aac7 +export FANTOM_ADDRESS=0x239fA7623354eC26520dE878B52f13Fe84b06971 + # # Filecoin # diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index d558c1cd..2a90ea13 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -96,10 +96,6 @@ services: context: ./fantom ports: - "0.0.0.0:18545:18545" - entrypoint: - - "./root/run.sh" - - "${FANTOM_MNEMONIC}" - - "${FANTOM_ADDRESS}" # # Filecoin diff --git a/infra/fantom/Dockerfile b/infra/fantom/Dockerfile index 8438e3b4..3e31438d 100644 --- a/infra/fantom/Dockerfile +++ b/infra/fantom/Dockerfile @@ -1,15 +1,23 @@ -FROM ubuntu:xenial +FROM ubuntu:groovy -RUN apt-get update --fix-missing -RUN apt-get install --yes curl +# Install dependencies +RUN apt-get update -y +RUN apt-get install -y build-essential git wget -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - -RUN apt-get install --yes nodejs -RUN npm install -g ganache-cli +# Install Go +RUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz +RUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin -COPY run.sh /root/run.sh -RUN chmod +x /root/run.sh +# Build lachesis +WORKDIR /app +RUN git clone https://github.com/Fantom-foundation/go-lachesis.git +WORKDIR /app/go-lachesis +RUN git checkout tags/v0.7.0-rc.1 -b lachesis-v7rc1 +RUN make build +ENV PATH=$PATH:/app/go-lachesis/build -EXPOSE 8545 +# Expose the default port of the JSON-RPC server +EXPOSE 18545 -ENTRYPOINT ["./root/run.sh"] \ No newline at end of file +ENTRYPOINT [ "lachesis", "--fakenet", "1/1", "--rpc", "--rpcvhosts", "*", "--rpcaddr", "0.0.0.0" ] diff --git a/infra/fantom/run.sh b/infra/fantom/run.sh deleted file mode 100644 index 5880da45..00000000 --- a/infra/fantom/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -MNEMONIC=$1 -ADDRESS=$2 - -ganache-cli \ - -h 0.0.0.0 \ - -k muirGlacier \ - -i 420 \ - -m "$MNEMONIC" \ - -u $ADDRESS \ No newline at end of file From a1a0b5bf97a871c41b7c4044d68198101ecd9425 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 23 Mar 2021 11:15:09 +0530 Subject: [PATCH 277/335] fix: cosmos addrs are expected to be 20-bytes long --- chain/cosmos/address.go | 8 ++++++++ chain/terra/address_test.go | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/chain/cosmos/address.go b/chain/cosmos/address.go index 33f63274..daffb7ed 100644 --- a/chain/cosmos/address.go +++ b/chain/cosmos/address.go @@ -1,6 +1,8 @@ package cosmos import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/renproject/multichain/api/address" ) @@ -60,12 +62,18 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd if err != nil { return nil, err } + if len(rawAddr) != sdk.AddrLen { + return nil, fmt.Errorf("unexpected address length: want=%v, got=%v", sdk.AddrLen, len(rawAddr)) + } return address.RawAddress(rawAddr), nil } // EncodeAddress consumes raw bytes and encodes them to a human-readable // address format. func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) { + if len(rawAddr) != sdk.AddrLen { + return address.Address(""), fmt.Errorf("unexpected address length: want=%v, got=%v", sdk.AddrLen, len(rawAddr)) + } bech32Addr := sdk.AccAddress(rawAddr) return address.Address(bech32Addr.String()), nil } diff --git a/chain/terra/address_test.go b/chain/terra/address_test.go index 9aeb8729..76568bfa 100644 --- a/chain/terra/address_test.go +++ b/chain/terra/address_test.go @@ -1,6 +1,8 @@ package terra_test import ( + "fmt" + "github.com/renproject/multichain" "github.com/renproject/multichain/chain/terra" "github.com/renproject/pack" @@ -18,6 +20,10 @@ var _ = Describe("Terra", func() { addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" _, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) Expect(err).ToNot(HaveOccurred()) + + addrStr = "" + _, err = decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) + Expect(err).Should(MatchError(fmt.Errorf("unexpected address length: want=20, got=0"))) }) }) }) From 7c085240ff9912520ff9217af53596bdc249ce7d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 23 Mar 2021 11:32:24 +0530 Subject: [PATCH 278/335] test: add more invalid address scenarios --- chain/terra/address_test.go | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/chain/terra/address_test.go b/chain/terra/address_test.go index 76568bfa..37288b64 100644 --- a/chain/terra/address_test.go +++ b/chain/terra/address_test.go @@ -13,16 +13,32 @@ import ( var _ = Describe("Terra", func() { Context("when decoding address", func() { - Context("when decoding Terra address", func() { + decoder := terra.NewAddressDecoder() + Context("when decoding a valid address", func() { It("should work", func() { - decoder := terra.NewAddressDecoder() - addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma" _, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) Expect(err).ToNot(HaveOccurred()) - - addrStr = "" - _, err = decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) + }) + }) + Context("when decoding an address with invalid prefix", func() { + It("should fail", func() { + addrStr := "cosmosztez03dp94y2x55fkhmrvj37ck204geq33msma" + _, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) + Expect(err).To(HaveOccurred()) + }) + }) + Context("when decoding an invalid address", func() { + It("should fail", func() { + addrStr := "terra1ztez03dp94y2x55fkhmrvj37ck204geq33msm" + _, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) + Expect(err).To(HaveOccurred()) + }) + }) + Context("when decoding an empty address", func() { + It("should fail", func() { + addrStr := "" + _, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr))) Expect(err).Should(MatchError(fmt.Errorf("unexpected address length: want=20, got=0"))) }) }) From 7f9967baba03b8839b7093aafd0e34062e256c84 Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 23 Mar 2021 22:33:16 +1100 Subject: [PATCH 279/335] update base image for bitcoin local infra --- infra/bitcoin/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/bitcoin/Dockerfile b/infra/bitcoin/Dockerfile index 24688872..bb1688ca 100644 --- a/infra/bitcoin/Dockerfile +++ b/infra/bitcoin/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic RUN apt-get update && apt-get install --yes software-properties-common RUN apt-get install --yes curl From 4e4d2e8e192194cb41e9b3bfe74235c0910584b1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 31 Mar 2021 00:36:37 +0500 Subject: [PATCH 280/335] feat: fetch and deserialize gateway registry account data --- chain/solana/solana.go | 73 +++++++++++++++++++++++++++++++++++++++ chain/solana/solanarpc.go | 10 ++++++ go.mod | 1 + go.sum | 2 ++ 4 files changed, 86 insertions(+) diff --git a/chain/solana/solana.go b/chain/solana/solana.go index c511b62f..861facab 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -6,6 +6,7 @@ import ( "fmt" "github.com/btcsuite/btcutil/base58" + "github.com/near/borsh-go" "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" @@ -64,6 +65,78 @@ func FindProgramAddress(seeds []byte, program address.RawAddress) (address.Addre return ProgramDerivedAddress(seeds, encoded), nil } +// GetGatewayBySelectorHash queries the gateway registry account on Solana for +// the deployed gateway address of the specific RenVM selector hash. +func (client *Client) GetGatewayBySelectorHash(registryProgram address.Address, shash pack.Bytes32) (address.Address, error) { + gateways, err := client.GetGateways(registryProgram) + if err != nil { + return address.Address(""), err + } + gateway, ok := gateways[shash] + if !ok { + return address.Address(""), fmt.Errorf("gateway registry does not contain selector=%v", shash) + } + return gateway, nil +} + +// GetGateways queries the gateway registry account on Solana to fetch all +// the gateway addresses and returns a map of RenVM selector hashes to their +// gateway addresses. +func (client *Client) GetGateways(registryProgram address.Address) (map[pack.Bytes32]address.Address, error) { + registry, err := client.getGatewayRegistry(registryProgram) + if err != nil { + return nil, fmt.Errorf("get gateway registry: %v", err) + } + + gateways := make(map[pack.Bytes32]address.Address) + addrEncodeDecoder := NewAddressEncodeDecoder() + for i := 0; i < int(registry.Count); i++ { + selector := registry.Selectors[i] + gateway, err := addrEncodeDecoder.EncodeAddress(address.RawAddress(registry.Gateways[i][:])) + if err != nil { + return nil, fmt.Errorf("encode address: %v", err) + } + gateways[selector] = gateway + } + + return gateways, nil +} + +func (client *Client) getGatewayRegistry(registryProgram address.Address) (gatewayRegistry, error) { + params, err := json.Marshal([]string{string(registryProgram)}) + if err != nil { + return gatewayRegistry{}, fmt.Errorf("encoding params: %v", err) + } + res, err := SendDataWithRetry("getAccountInfo", params, client.opts.RPCURL) + if err != nil { + return gatewayRegistry{}, fmt.Errorf("calling rpc method \"getAccountInfo\": %v", err) + } + if res.Result == nil { + return gatewayRegistry{}, fmt.Errorf("decoding result: empty") + } + + // Deserialise the account's info into the appropriate struct. + info := ResponseGetAccountInfo{} + if err := json.Unmarshal(*res.Result, &info); err != nil { + return gatewayRegistry{}, fmt.Errorf("decoding result: %v", err) + } + + // Decode the Base58 encoded account data into raw byte-representation. Since + // this holds the burn log's data. + data := base58.Decode(info.Value.Data) + if err != nil { + return gatewayRegistry{}, fmt.Errorf("decoding result from base58: %v", err) + } + + registry := new(gatewayRegistry) + err = borsh.Deserialize(registry, data) + if err != nil { + return gatewayRegistry{}, fmt.Errorf("deserializing gateway registry data: %v", err) + } + + return *registry, nil +} + // CallContract implements the multichain Contract API. In the case of Solana, // it is used to fetch burn logs associated with a particular burn nonce. func (client *Client) CallContract( diff --git a/chain/solana/solanarpc.go b/chain/solana/solanarpc.go index e88dc19b..e39c101e 100644 --- a/chain/solana/solanarpc.go +++ b/chain/solana/solanarpc.go @@ -28,3 +28,13 @@ type BurnLog struct { Amount int `json:"amount"` Recipient [25]byte `json:"recipient"` } + +type Bytes32 = [32]byte + +type gatewayRegistry struct { + IsInitialised bool + Owner Bytes32 + Count uint64 + Selectors []Bytes32 + Gateways []Bytes32 +} diff --git a/go.mod b/go.mod index 7236ec99..368be482 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,7 @@ require ( github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/multiformats/go-varint v0.0.6 + github.com/near/borsh-go v0.3.0 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/renproject/id v0.4.2 diff --git a/go.sum b/go.sum index d99f88ee..2dc1a876 100644 --- a/go.sum +++ b/go.sum @@ -1225,6 +1225,8 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/near/borsh-go v0.3.0 h1:+DvG7eApOD3KrHIh7TwZvYzhXUF/OzMTC6aRTUEtW+8= +github.com/near/borsh-go v0.3.0/go.mod h1:NeMochZp7jN/pYFuxLkrZtmLqbADmnp/y1+/dL+AsyQ= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c/go.mod h1:7qN3Y0BvzRUf4LofcoJplQL10lsFDb4PYlePTVwrP28= From 6cb1f637d28e32cbb2f20df3c7c67606e42b0cd1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 1 Apr 2021 04:25:14 +0500 Subject: [PATCH 281/335] test: fixes and test the gateway registry methods --- .github/workflows/test.yml | 18 ++++++++++++++++ chain/solana/solana.go | 38 +++++++++++++++++----------------- chain/solana/solana_test.go | 41 ++++++++++++++++++++++++++++++++++++- chain/solana/solanarpc.go | 17 ++++++++------- 4 files changed, 87 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b8683d5..b16952e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,6 +61,7 @@ jobs: git clone https://github.com/renproject/ren-solana.git cd ren-solana echo ${{ secrets.GATEWAY_PROGRAM_ID }} > ~/.config/solana/gateway-program.json + echo ${{ secrets.GATEWAY_REGISTRY_PROGRAM_ID }} > ~/.config/solana/gateway-registry-program.json ./setup.sh - name: Sleep until the node is up @@ -80,6 +81,23 @@ jobs: --keypair ~/.config/solana/id.json \ --program-id ~/.config/solana/gateway-program.json \ target/deploy/gateway.so + solana program deploy --final \ + --keypair ~/.config/solana/id.json \ + --program-id ~/.config/solana/gateway-registry-program.json \ + target/deploy/gateway_registry.so + target/debug/gateway-registry initialize \ + --owner ~/.config/solana/id.json \ + --fee-payer ~/.config/solana/id.json + target/debug/gateway-registry update \ + --owner ~/.config/solana/id.json \ + --fee-payer ~/.config/solana/id.json \ + --selector "BTC/toSolana" \ + --gateway "9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP" + target/debug/gateway-registry update \ + --owner ~/.config/solana/id.json \ + --fee-payer ~/.config/solana/id.json \ + --selector "ZEC/toSolana" \ + --gateway "9rCXCJDsnS53QtdXvYhYCAxb6yBE16KAQx5zHWfHe9QF" cd $GITHUB_WORKSPACE/chain/solana go test -timeout 100s diff --git a/chain/solana/solana.go b/chain/solana/solana.go index 861facab..c5fa507f 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -2,6 +2,7 @@ package solana import ( "context" + "encoding/base64" "encoding/json" "fmt" @@ -102,39 +103,41 @@ func (client *Client) GetGateways(registryProgram address.Address) (map[pack.Byt return gateways, nil } -func (client *Client) getGatewayRegistry(registryProgram address.Address) (gatewayRegistry, error) { - params, err := json.Marshal([]string{string(registryProgram)}) - if err != nil { - return gatewayRegistry{}, fmt.Errorf("encoding params: %v", err) - } +func (client *Client) getGatewayRegistry(registryProgram address.Address) (GatewayRegistry, error) { + seeds := []byte("GatewayRegistryState") + programDerivedAddress := ProgramDerivedAddress(pack.Bytes(seeds), registryProgram) + + // Fetch account info with base64 encoding. The default base58 encoding does + // not support account data that is larger than 128 bytes, hence base64. + params := json.RawMessage(fmt.Sprintf(`["%v", {"encoding":"base64"}]`, string(programDerivedAddress))) res, err := SendDataWithRetry("getAccountInfo", params, client.opts.RPCURL) if err != nil { - return gatewayRegistry{}, fmt.Errorf("calling rpc method \"getAccountInfo\": %v", err) + return GatewayRegistry{}, fmt.Errorf("calling rpc method \"getAccountInfo\": %v", err) } if res.Result == nil { - return gatewayRegistry{}, fmt.Errorf("decoding result: empty") + return GatewayRegistry{}, fmt.Errorf("decoding result: empty") } // Deserialise the account's info into the appropriate struct. info := ResponseGetAccountInfo{} if err := json.Unmarshal(*res.Result, &info); err != nil { - return gatewayRegistry{}, fmt.Errorf("decoding result: %v", err) + return GatewayRegistry{}, fmt.Errorf("decoding result: %v", err) } // Decode the Base58 encoded account data into raw byte-representation. Since // this holds the burn log's data. - data := base58.Decode(info.Value.Data) + data, err := base64.RawStdEncoding.DecodeString(info.Value.Data[0]) if err != nil { - return gatewayRegistry{}, fmt.Errorf("decoding result from base58: %v", err) + return GatewayRegistry{}, fmt.Errorf("decoding base64 value: %v", err) } - registry := new(gatewayRegistry) - err = borsh.Deserialize(registry, data) + registry := GatewayRegistry{} + err = borsh.Deserialize(®istry, data) if err != nil { - return gatewayRegistry{}, fmt.Errorf("deserializing gateway registry data: %v", err) + return GatewayRegistry{}, fmt.Errorf("deserializing gateway registry data: %v", err) } - return *registry, nil + return registry, nil } // CallContract implements the multichain Contract API. In the case of Solana, @@ -158,10 +161,7 @@ func (client *Client) CallContract( // Make an RPC call to "getAccountInfo" to get the data associated with the // account (we interpret the contract address as the account identifier). - params, err := json.Marshal([]string{string(burnLogAccount)}) - if err != nil { - return pack.Bytes(nil), fmt.Errorf("encoding params: %v", err) - } + params := json.RawMessage(fmt.Sprintf(`["%v", {"encoding":"base58"}]`, string(burnLogAccount))) res, err := SendDataWithRetry("getAccountInfo", params, client.opts.RPCURL) if err != nil { return pack.Bytes(nil), fmt.Errorf("calling rpc method \"getAccountInfo\": %v", err) @@ -178,7 +178,7 @@ func (client *Client) CallContract( // Decode the Base58 encoded account data into raw byte-representation. Since // this holds the burn log's data. - data := base58.Decode(info.Value.Data) + data := base58.Decode(info.Value.Data[0]) if err != nil { return pack.Bytes(nil), fmt.Errorf("decoding result from base58: %v", err) } diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 8f5988cf..8e3bb1d9 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/btcsuite/btcd/chaincfg" + "github.com/ethereum/go-ethereum/crypto" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/solana" @@ -27,7 +28,7 @@ var _ = Describe("Solana", func() { logger, err := loggerConfig.Build() Expect(err).ToNot(HaveOccurred()) - Context("mint and burn", func() { + Context("When minting and burning", func() { It("should succeed", func() { // Base58 address of the Gateway program that is deployed to Solana. program := multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP") @@ -86,4 +87,42 @@ var _ = Describe("Solana", func() { Expect([]byte(fetchedRecipient)).To(Equal([]byte(recipientRawAddr))) }) }) + + FContext("When getting Gateways from Registry", func() { + It("should deserialize successfully", func() { + // Solana client using default client options. + client := solana.NewClient(solana.DefaultClientOptions()) + + // Base58 address of the Gateway registry program deployed to Solana. + registryProgram := multichain.Address("3cvX9BpLMJsFTuEWSQBaTcd4TXgAmefqgNSJbufpyWyz") + + // The registry (in the CI test environment) is pre-populated with gateway + // addresses for BTC/toSolana and ZEC/toSolana selectors. + btcSelectorHash := [32]byte{} + copy(btcSelectorHash[:], crypto.Keccak256([]byte("BTC/toSolana"))) + zecSelectorHash := [32]byte{} + copy(zecSelectorHash[:], crypto.Keccak256([]byte("ZEC/toSolana"))) + unknownSelectorHash := [32]byte{} + copy(unknownSelectorHash[:], crypto.Keccak256([]byte("UNKNOWN/toSolana"))) + + expectedBtcGateway := multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP") + expectedZecGateway := multichain.Address("9rCXCJDsnS53QtdXvYhYCAxb6yBE16KAQx5zHWfHe9QF") + + btcGateway, err := client.GetGatewayBySelectorHash(registryProgram, pack.Bytes32(btcSelectorHash)) + Expect(err).NotTo(HaveOccurred()) + Expect(btcGateway).To(Equal(expectedBtcGateway)) + zecGateway, err := client.GetGatewayBySelectorHash(registryProgram, pack.Bytes32(zecSelectorHash)) + Expect(err).NotTo(HaveOccurred()) + Expect(zecGateway).To(Equal(expectedZecGateway)) + _, err = client.GetGatewayBySelectorHash(registryProgram, pack.Bytes32(unknownSelectorHash)) + Expect(err).To(HaveOccurred()) + + gateways, err := client.GetGateways(registryProgram) + Expect(err).NotTo(HaveOccurred()) + expectedGatewaysMap := make(map[pack.Bytes32]multichain.Address) + expectedGatewaysMap[btcSelectorHash] = expectedBtcGateway + expectedGatewaysMap[zecSelectorHash] = expectedZecGateway + Expect(gateways).To(Equal(expectedGatewaysMap)) + }) + }) }) diff --git a/chain/solana/solanarpc.go b/chain/solana/solanarpc.go index e39c101e..0afc68bc 100644 --- a/chain/solana/solanarpc.go +++ b/chain/solana/solanarpc.go @@ -8,11 +8,11 @@ type AccountContext struct { // AccountValue is the JSON-interface of the account's information. type AccountValue struct { - Data string `json:"data"` - Executable bool `json:"executable"` - Lamports int `json:"lamports"` - Owner string `json:"owner"` - RentEpoch int `json:"rentEpoch"` + Data [2]string `json:"data"` + Executable bool `json:"executable"` + Lamports int `json:"lamports"` + Owner string `json:"owner"` + RentEpoch int `json:"rentEpoch"` } // ResponseGetAccountInfo is the JSON-interface of the response for the @@ -29,10 +29,13 @@ type BurnLog struct { Recipient [25]byte `json:"recipient"` } +// Bytes32 is an alias for [32]byte type Bytes32 = [32]byte -type gatewayRegistry struct { - IsInitialised bool +// GatewayRegistry defines the state of gateway registry, serialized and +// deserialized by the borsh schema. +type GatewayRegistry struct { + IsInitialised uint8 Owner Bytes32 Count uint64 Selectors []Bytes32 From 3bcfb2d4f75bb232e8358ec9462dec8f5a9df7b8 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 1 Apr 2021 04:55:16 +0500 Subject: [PATCH 282/335] fix: remove focused test --- chain/solana/solana_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 8e3bb1d9..6be97567 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -88,7 +88,7 @@ var _ = Describe("Solana", func() { }) }) - FContext("When getting Gateways from Registry", func() { + Context("When getting Gateways from Registry", func() { It("should deserialize successfully", func() { // Solana client using default client options. client := solana.NewClient(solana.DefaultClientOptions()) From 6a00c4b5e74a811de0ec519cb4108058c494c134 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 1 Apr 2021 06:03:15 +0500 Subject: [PATCH 283/335] fix: remove app-specific code from multichain --- chain/solana/solana.go | 62 +++++-------------------------------- chain/solana/solana_test.go | 48 +++++++++++++++------------- 2 files changed, 35 insertions(+), 75 deletions(-) diff --git a/chain/solana/solana.go b/chain/solana/solana.go index c5fa507f..af35b3c3 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/btcsuite/btcutil/base58" - "github.com/near/borsh-go" "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" @@ -66,78 +65,33 @@ func FindProgramAddress(seeds []byte, program address.RawAddress) (address.Addre return ProgramDerivedAddress(seeds, encoded), nil } -// GetGatewayBySelectorHash queries the gateway registry account on Solana for -// the deployed gateway address of the specific RenVM selector hash. -func (client *Client) GetGatewayBySelectorHash(registryProgram address.Address, shash pack.Bytes32) (address.Address, error) { - gateways, err := client.GetGateways(registryProgram) - if err != nil { - return address.Address(""), err - } - gateway, ok := gateways[shash] - if !ok { - return address.Address(""), fmt.Errorf("gateway registry does not contain selector=%v", shash) - } - return gateway, nil -} - -// GetGateways queries the gateway registry account on Solana to fetch all -// the gateway addresses and returns a map of RenVM selector hashes to their -// gateway addresses. -func (client *Client) GetGateways(registryProgram address.Address) (map[pack.Bytes32]address.Address, error) { - registry, err := client.getGatewayRegistry(registryProgram) - if err != nil { - return nil, fmt.Errorf("get gateway registry: %v", err) - } - - gateways := make(map[pack.Bytes32]address.Address) - addrEncodeDecoder := NewAddressEncodeDecoder() - for i := 0; i < int(registry.Count); i++ { - selector := registry.Selectors[i] - gateway, err := addrEncodeDecoder.EncodeAddress(address.RawAddress(registry.Gateways[i][:])) - if err != nil { - return nil, fmt.Errorf("encode address: %v", err) - } - gateways[selector] = gateway - } - - return gateways, nil -} - -func (client *Client) getGatewayRegistry(registryProgram address.Address) (GatewayRegistry, error) { - seeds := []byte("GatewayRegistryState") - programDerivedAddress := ProgramDerivedAddress(pack.Bytes(seeds), registryProgram) - +// GetAccountInfo fetches and returns the account data. +func (client *Client) GetAccountData(account address.Address) (pack.Bytes, error) { // Fetch account info with base64 encoding. The default base58 encoding does // not support account data that is larger than 128 bytes, hence base64. - params := json.RawMessage(fmt.Sprintf(`["%v", {"encoding":"base64"}]`, string(programDerivedAddress))) + params := json.RawMessage(fmt.Sprintf(`["%v", {"encoding":"base64"}]`, string(account))) res, err := SendDataWithRetry("getAccountInfo", params, client.opts.RPCURL) if err != nil { - return GatewayRegistry{}, fmt.Errorf("calling rpc method \"getAccountInfo\": %v", err) + return nil, fmt.Errorf("calling rpc method \"getAccountInfo\": %v", err) } if res.Result == nil { - return GatewayRegistry{}, fmt.Errorf("decoding result: empty") + return nil, fmt.Errorf("decoding result: empty") } // Deserialise the account's info into the appropriate struct. info := ResponseGetAccountInfo{} if err := json.Unmarshal(*res.Result, &info); err != nil { - return GatewayRegistry{}, fmt.Errorf("decoding result: %v", err) + return nil, fmt.Errorf("decoding result: %v", err) } // Decode the Base58 encoded account data into raw byte-representation. Since // this holds the burn log's data. data, err := base64.RawStdEncoding.DecodeString(info.Value.Data[0]) if err != nil { - return GatewayRegistry{}, fmt.Errorf("decoding base64 value: %v", err) - } - - registry := GatewayRegistry{} - err = borsh.Deserialize(®istry, data) - if err != nil { - return GatewayRegistry{}, fmt.Errorf("deserializing gateway registry data: %v", err) + return nil, fmt.Errorf("decoding base64 value: %v", err) } - return registry, nil + return pack.Bytes(data), nil } // CallContract implements the multichain Contract API. In the case of Solana, diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 6be97567..18614c71 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -9,6 +9,7 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/ethereum/go-ethereum/crypto" + "github.com/near/borsh-go" "github.com/renproject/multichain" "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/solana" @@ -95,6 +96,17 @@ var _ = Describe("Solana", func() { // Base58 address of the Gateway registry program deployed to Solana. registryProgram := multichain.Address("3cvX9BpLMJsFTuEWSQBaTcd4TXgAmefqgNSJbufpyWyz") + seeds := []byte("GatewayRegistryState") + registryState := solana.ProgramDerivedAddress(pack.Bytes(seeds), registryProgram) + + // Fetch account data at gateway registry's state + accountData, err := client.GetAccountData(registryState) + Expect(err).NotTo(HaveOccurred()) + + // Deserialize the account data into registry state's structure. + registry := solana.GatewayRegistry{} + err = borsh.Deserialize(®istry, []byte(accountData)) + Expect(err).NotTo(HaveOccurred()) // The registry (in the CI test environment) is pre-populated with gateway // addresses for BTC/toSolana and ZEC/toSolana selectors. @@ -102,27 +114,21 @@ var _ = Describe("Solana", func() { copy(btcSelectorHash[:], crypto.Keccak256([]byte("BTC/toSolana"))) zecSelectorHash := [32]byte{} copy(zecSelectorHash[:], crypto.Keccak256([]byte("ZEC/toSolana"))) - unknownSelectorHash := [32]byte{} - copy(unknownSelectorHash[:], crypto.Keccak256([]byte("UNKNOWN/toSolana"))) - - expectedBtcGateway := multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP") - expectedZecGateway := multichain.Address("9rCXCJDsnS53QtdXvYhYCAxb6yBE16KAQx5zHWfHe9QF") - - btcGateway, err := client.GetGatewayBySelectorHash(registryProgram, pack.Bytes32(btcSelectorHash)) - Expect(err).NotTo(HaveOccurred()) - Expect(btcGateway).To(Equal(expectedBtcGateway)) - zecGateway, err := client.GetGatewayBySelectorHash(registryProgram, pack.Bytes32(zecSelectorHash)) - Expect(err).NotTo(HaveOccurred()) - Expect(zecGateway).To(Equal(expectedZecGateway)) - _, err = client.GetGatewayBySelectorHash(registryProgram, pack.Bytes32(unknownSelectorHash)) - Expect(err).To(HaveOccurred()) - - gateways, err := client.GetGateways(registryProgram) - Expect(err).NotTo(HaveOccurred()) - expectedGatewaysMap := make(map[pack.Bytes32]multichain.Address) - expectedGatewaysMap[btcSelectorHash] = expectedBtcGateway - expectedGatewaysMap[zecSelectorHash] = expectedZecGateway - Expect(gateways).To(Equal(expectedGatewaysMap)) + zero := pack.NewU256FromU8(pack.U8(0)).Bytes32() + + addrEncodeDecoder := solana.NewAddressEncodeDecoder() + expectedBtcGateway, _ := addrEncodeDecoder.DecodeAddress(multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP")) + expectedZecGateway, _ := addrEncodeDecoder.DecodeAddress(multichain.Address("9rCXCJDsnS53QtdXvYhYCAxb6yBE16KAQx5zHWfHe9QF")) + + Expect(registry.Count).To(Equal(uint64(2))) + Expect(registry.Selectors[0]).To(Equal(btcSelectorHash)) + Expect(registry.Selectors[1]).To(Equal(zecSelectorHash)) + Expect(registry.Selectors[2]).To(Equal(zero)) + Expect(len(registry.Selectors)).To(Equal(32)) + Expect(registry.Gateways[0][:]).To(Equal([]byte(expectedBtcGateway))) + Expect(registry.Gateways[1][:]).To(Equal([]byte(expectedZecGateway))) + Expect(registry.Gateways[2]).To(Equal(zero)) + Expect(len(registry.Gateways)).To(Equal(32)) }) }) }) From b87b2f6b0d57378ad41eee7839fa02114e428c54 Mon Sep 17 00:00:00 2001 From: Soumya Ghosh Dastidar Date: Fri, 9 Apr 2021 11:13:46 +0530 Subject: [PATCH 284/335] Updated solana-ffi submodule and Dockerfile Signed-off-by: Soumya Ghosh Dastidar --- Dockerfile | 20 ++++++++++++++++---- chain/solana/solana-ffi | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4b8aa047..f5178498 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,20 @@ FROM golang -RUN apt update -y -RUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev libssl-dev libudev-dev gcc git bzr jq pkg-config curl wget -RUN apt upgrade -y +RUN apt-get update && \ + apt-get install -y \ + mesa-opencl-icd \ + ocl-icd-opencl-dev \ + libssl-dev \ + libudev-dev \ + gcc \ + git \ + bzr \ + jq \ + pkg-config \ + curl \ + wget && \ + apt-get upgrade -y && \ + rm -rf /var/lib/apt/lists/* ENV GO111MODULE=on ENV GOPROXY=https://proxy.golang.org @@ -26,6 +38,6 @@ RUN mkdir -p src/github.com/renproject WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi -RUN git checkout 44840392296fa690cd777a55dce19fd4844c1559 +RUN git checkout 4bd204b6017173c1425468db8566f053abb49f0b RUN make clean && make RUN go install ./... diff --git a/chain/solana/solana-ffi b/chain/solana/solana-ffi index 44840392..4bd204b6 160000 --- a/chain/solana/solana-ffi +++ b/chain/solana/solana-ffi @@ -1 +1 @@ -Subproject commit 44840392296fa690cd777a55dce19fd4844c1559 +Subproject commit 4bd204b6017173c1425468db8566f053abb49f0b From 83ca4dc6a17907eed28a1455ab9fd6b52615a9ce Mon Sep 17 00:00:00 2001 From: Soumya Ghosh Dastidar Date: Fri, 9 Apr 2021 12:01:42 +0530 Subject: [PATCH 285/335] Added comment in Dockerfile Signed-off-by: Soumya Ghosh Dastidar --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index f5178498..70b68f94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM golang +# doing all updates and installs in a single step and removing the apt cache helps reduce the image size RUN apt-get update && \ apt-get install -y \ mesa-opencl-icd \ From 5af9f0a046080da60bfbefc6c6b2e1f4a28b8fd3 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 27 Apr 2021 05:33:15 +0500 Subject: [PATCH 286/335] fix: bitcoincash addressFromRawBytes should account for legacy addr --- chain/bitcoincash/address.go | 8 ++- chain/bitcoincash/address_test.go | 104 ++++++++++++++++++------------ 2 files changed, 69 insertions(+), 43 deletions(-) diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index aae61fbb..f72d3a48 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -137,7 +137,7 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd func encodeLegacyAddress(rawAddr address.RawAddress, params *chaincfg.Params) (address.Address, error) { // Validate that the base58 address is in fact in correct format. encodedAddr := base58.Encode([]byte(rawAddr)) - if _, err := btcutil.DecodeAddress(encodedAddr, &chaincfg.RegressionNetParams); err != nil { + if _, err := btcutil.DecodeAddress(encodedAddr, params); err != nil { return address.Address(""), fmt.Errorf("address validation error: %v", err) } @@ -329,7 +329,11 @@ func addressFromRawBytes(addrBytes []byte, params *chaincfg.Params) (Address, er return nil, btcutil.ErrUnknownAddressType } default: - return nil, errors.New("decoded address is of unknown size") + addr, err := btcutil.DecodeAddress(base58.Encode(addrBytes), params) + if err != nil { + return nil, err + } + return AddressLegacy{Address: addr}, nil } } diff --git a/chain/bitcoincash/address_test.go b/chain/bitcoincash/address_test.go index 773eef4f..73857928 100644 --- a/chain/bitcoincash/address_test.go +++ b/chain/bitcoincash/address_test.go @@ -1,6 +1,7 @@ package bitcoincash_test import ( + "fmt" "math/rand" "github.com/btcsuite/btcd/btcec" @@ -13,52 +14,73 @@ import ( "github.com/renproject/multichain/chain/bitcoincash" ) -var _ = Describe("Bitcoin Cash Address", func() { - Context("address", func() { - addrEncodeDecoder := bitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams) +var _ = Describe("Bitcoin Cash", func() { + Context("Address Encode/Decode", func() { + addrEncodeDecoders := []struct { + network *chaincfg.Params + encodeDecoder bitcoincash.AddressEncodeDecoder + }{ + { + &chaincfg.MainNetParams, + bitcoincash.NewAddressEncodeDecoder(&chaincfg.MainNetParams), + }, + { + &chaincfg.TestNet3Params, + bitcoincash.NewAddressEncodeDecoder(&chaincfg.TestNet3Params), + }, + { + &chaincfg.RegressionNetParams, + bitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams), + }, + } - It("addr pub key hash", func() { - pk := id.NewPrivKey() - wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) - Expect(err).NotTo(HaveOccurred()) - addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams) - Expect(err).NotTo(HaveOccurred()) - addr := address.Address(addrPubKeyHash.EncodeAddress()) + for _, addrEncodeDecoder := range addrEncodeDecoders { + addrEncodeDecoder := addrEncodeDecoder + Context(fmt.Sprintf("Encode/Decode for %v network", addrEncodeDecoder.network.Name), func() { + Specify("AddressPubKeyHash", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), addrEncodeDecoder.network, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), addrEncodeDecoder.network) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) - decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) - Expect(err).NotTo(HaveOccurred()) - encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) - Expect(err).NotTo(HaveOccurred()) - Expect(encodedAddr).To(Equal(addr)) - }) + decodedRawAddr, err := addrEncodeDecoder.encodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) - It("addr script hash", func() { - script := make([]byte, rand.Intn(100)) - rand.Read(script) - addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams) - Expect(err).NotTo(HaveOccurred()) - addr := address.Address(addrScriptHash.EncodeAddress()) + Specify("AddressScriptHash", func() { + script := make([]byte, rand.Intn(100)) + rand.Read(script) + addrScriptHash, err := bitcoincash.NewAddressScriptHash(script, addrEncodeDecoder.network) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrScriptHash.EncodeAddress()) - decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) - Expect(err).NotTo(HaveOccurred()) - encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) - Expect(err).NotTo(HaveOccurred()) - Expect(encodedAddr).To(Equal(addr)) - }) + decodedRawAddr, err := addrEncodeDecoder.encodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) - It("legacy addr", func() { - pk := id.NewPrivKey() - wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true) - Expect(err).NotTo(HaveOccurred()) - addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams) - Expect(err).NotTo(HaveOccurred()) - addr := address.Address(addrPubKeyHash.EncodeAddress()) + Specify("AddressLegacy", func() { + pk := id.NewPrivKey() + wif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), addrEncodeDecoder.network, true) + Expect(err).NotTo(HaveOccurred()) + addrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), addrEncodeDecoder.network) + Expect(err).NotTo(HaveOccurred()) + addr := address.Address(addrPubKeyHash.EncodeAddress()) - decodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr) - Expect(err).NotTo(HaveOccurred()) - encodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr) - Expect(err).NotTo(HaveOccurred()) - Expect(encodedAddr).To(Equal(addr)) - }) + decodedRawAddr, err := addrEncodeDecoder.encodeDecoder.DecodeAddress(addr) + Expect(err).NotTo(HaveOccurred()) + encodedAddr, err := addrEncodeDecoder.encodeDecoder.EncodeAddress(decodedRawAddr) + Expect(err).NotTo(HaveOccurred()) + Expect(encodedAddr).To(Equal(addr)) + }) + }) + } }) }) From 48b56d7e9c0b18e35ef53f5ce4e5957ad73fbfc4 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 27 Apr 2021 12:12:57 +0500 Subject: [PATCH 287/335] refactor: application specific structs moved out of multichain --- chain/solana/solana_test.go | 15 ++++++++++++++- chain/solana/solanarpc.go | 20 -------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 18614c71..7e5e6ec5 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -22,6 +22,19 @@ import ( . "github.com/onsi/gomega" ) +// Bytes32 is an alias for [32]byte +type Bytes32 = [32]byte + +// GatewayRegistry defines the state of gateway registry, serialized and +// deserialized by the borsh schema. +type GatewayRegistry struct { + IsInitialised uint8 + Owner Bytes32 + Count uint64 + Selectors []Bytes32 + Gateways []Bytes32 +} + var _ = Describe("Solana", func() { // Setup logger. loggerConfig := zap.NewDevelopmentConfig() @@ -104,7 +117,7 @@ var _ = Describe("Solana", func() { Expect(err).NotTo(HaveOccurred()) // Deserialize the account data into registry state's structure. - registry := solana.GatewayRegistry{} + registry := GatewayRegistry{} err = borsh.Deserialize(®istry, []byte(accountData)) Expect(err).NotTo(HaveOccurred()) diff --git a/chain/solana/solanarpc.go b/chain/solana/solanarpc.go index 0afc68bc..a69c2803 100644 --- a/chain/solana/solanarpc.go +++ b/chain/solana/solanarpc.go @@ -21,23 +21,3 @@ type ResponseGetAccountInfo struct { Context AccountContext `json:"context"` Value AccountValue `json:"value"` } - -// BurnLog is the data stored in a burn log account, that is received in its -// Base58 encoded format as a part of the getAccountInfo response. -type BurnLog struct { - Amount int `json:"amount"` - Recipient [25]byte `json:"recipient"` -} - -// Bytes32 is an alias for [32]byte -type Bytes32 = [32]byte - -// GatewayRegistry defines the state of gateway registry, serialized and -// deserialized by the borsh schema. -type GatewayRegistry struct { - IsInitialised uint8 - Owner Bytes32 - Count uint64 - Selectors []Bytes32 - Gateways []Bytes32 -} From 3e302c60626f380ba5173c78ce26db16d7ab096d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 May 2021 00:04:02 +0500 Subject: [PATCH 288/335] update multichain infra dockerfiles --- infra/ethereum/run.sh | 13 +++++++------ infra/fantom/Dockerfile | 14 +++++++------- infra/terra/Dockerfile | 24 ++++++++++++++++-------- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/infra/ethereum/run.sh b/infra/ethereum/run.sh index 5880da45..bb3daf40 100644 --- a/infra/ethereum/run.sh +++ b/infra/ethereum/run.sh @@ -2,9 +2,10 @@ MNEMONIC=$1 ADDRESS=$2 -ganache-cli \ - -h 0.0.0.0 \ - -k muirGlacier \ - -i 420 \ - -m "$MNEMONIC" \ - -u $ADDRESS \ No newline at end of file +ganache-cli \ + -h 0.0.0.0 \ + -k muirGlacier \ + -l 14969745 \ + -i 420 \ + -m "$MNEMONIC" \ + -u $ADDRESS diff --git a/infra/fantom/Dockerfile b/infra/fantom/Dockerfile index 3e31438d..2c2118e1 100644 --- a/infra/fantom/Dockerfile +++ b/infra/fantom/Dockerfile @@ -9,15 +9,15 @@ RUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz RUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz ENV PATH=$PATH:/usr/local/go/bin -# Build lachesis +# Build Opera WORKDIR /app -RUN git clone https://github.com/Fantom-foundation/go-lachesis.git -WORKDIR /app/go-lachesis -RUN git checkout tags/v0.7.0-rc.1 -b lachesis-v7rc1 -RUN make build -ENV PATH=$PATH:/app/go-lachesis/build +RUN git clone https://github.com/Fantom-foundation/go-opera.git +WORKDIR /app/go-opera +RUN git checkout release/1.0.0-rc.4 +RUN make +ENV PATH=$PATH:/app/go-opera/build # Expose the default port of the JSON-RPC server EXPOSE 18545 -ENTRYPOINT [ "lachesis", "--fakenet", "1/1", "--rpc", "--rpcvhosts", "*", "--rpcaddr", "0.0.0.0" ] +ENTRYPOINT [ "opera", "--fakenet", "1/1", "--http", "--http.api=eth,net", "--http.vhosts", "*", "--http.addr", "0.0.0.0" ] diff --git a/infra/terra/Dockerfile b/infra/terra/Dockerfile index d307f8bf..9602daf0 100644 --- a/infra/terra/Dockerfile +++ b/infra/terra/Dockerfile @@ -1,17 +1,25 @@ FROM ubuntu:xenial -RUN apt-get update --fix-missing && apt-get install --yes software-properties-common wget -RUN wget -c https://github.com/terra-project/core/releases/download/v0.4.0-rc.2/terra_0.4.0_rc.2_Linux_x86_64.tar.gz -O - | tar xz -RUN mkdir -p /app/bin -RUN mv ./terrad ./terracli /app/bin -RUN chmod +x /app/bin/terrad -RUN chmod +x /app/bin/terracli -RUN ln -s /app/bin/terrad /usr/bin/terrad -RUN ln -s /app/bin/terracli /usr/bin/terracli +RUN apt-get update --fix-missing && apt-get install --yes software-properties-common build-essential wget curl git + +RUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz +RUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin + +WORKDIR /app +RUN git clone https://github.com/terra-project/core.git +WORKDIR /app/core +RUN git fetch --all -p +RUN git checkout v0.4.6 +RUN make install COPY run.sh /root/run.sh RUN chmod +x /root/run.sh EXPOSE 26657 +ENV PATH=$PATH:/root/go/bin + +WORKDIR / + ENTRYPOINT ["./root/run.sh"] From 9d8d7be42ae9358ebabf08dc54ac1cbbeb449c7b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 May 2021 00:04:19 +0500 Subject: [PATCH 289/335] upgrade solana ffi and test the associated token account --- chain/solana/solana-ffi | 2 +- chain/solana/solana_ffi_test.go | 11 +++ go.mod | 2 +- go.sum | 145 -------------------------------- 4 files changed, 13 insertions(+), 147 deletions(-) diff --git a/chain/solana/solana-ffi b/chain/solana/solana-ffi index 4bd204b6..df7838d7 160000 --- a/chain/solana/solana-ffi +++ b/chain/solana/solana-ffi @@ -1 +1 @@ -Subproject commit 4bd204b6017173c1425468db8566f053abb49f0b +Subproject commit df7838d724f5eaf262ed77ed93b35b3f1f652bd3 diff --git a/chain/solana/solana_ffi_test.go b/chain/solana/solana_ffi_test.go index 65519767..f61548a1 100644 --- a/chain/solana/solana_ffi_test.go +++ b/chain/solana/solana_ffi_test.go @@ -5,6 +5,7 @@ import ( "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/chain/solana" "github.com/renproject/pack" + "github.com/renproject/solana-ffi/cgo" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -37,4 +38,14 @@ var _ = Describe("Solana FFI", func() { Expect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress)) }) }) + + Context("Associated Token Account", func() { + It("should correctly calculate", func() { + walletAddress := "fYq3qkHoVogcPnkxFWAwiJGJs29Xtg4FZ6xcAHWd51w" + selector := "BTC/toSolana" + assTokenAccount := cgo.AssociatedTokenAccount(walletAddress, selector) + expectedAssTokenAccount := "GxMKqib75YSD5RegZP8A7ZkSv8uBFmfNsNXzGptBdqdo" + Expect(assTokenAccount).To(Equal(expectedAssTokenAccount)) + }) + }) }) diff --git a/go.mod b/go.mod index 368be482..2d1dba2a 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/onsi/gomega v1.10.1 github.com/renproject/id v0.4.2 github.com/renproject/pack v0.2.5 - github.com/renproject/solana-ffi v0.1.1 + github.com/renproject/solana-ffi v0.1.2 github.com/renproject/surge v1.2.6 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.4.0-rc.4 diff --git a/go.sum b/go.sum index 2dc1a876..8b982411 100644 --- a/go.sum +++ b/go.sum @@ -44,7 +44,6 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= @@ -60,26 +59,20 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo= -github.com/Stebalien/go-bitfield v0.0.1 h1:X3kbSSPUaJK60wV2hjOPZwmpljr6VGCqdq4cBLhbQBo= github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= -github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= @@ -103,7 +96,6 @@ github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6Q github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -183,28 +175,22 @@ github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/V github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= -github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= -github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f h1:BOaYiTvg8p9vBUXpklC22XSK/mifLF7lG9jtmYYi3Tc= github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= @@ -225,7 +211,6 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= @@ -246,7 +231,6 @@ github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -258,37 +242,28 @@ github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJ github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.4 h1:gSNMv0qWwH16fGQs7ycOUrDjY6YCSsgLUl0I0KLjo8w= github.com/filecoin-project/go-address v0.0.4/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= -github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 h1:pIuR0dnMD0i+as8wNnjjHyQrnhP5O5bmba/lmgQeRgU= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= -github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.1 h1:S6Uuqcspqu81sWJ0He4OAfFLm1tSwPdVjtKTkl5m/xQ= github.com/filecoin-project/go-bitfield v0.2.1/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= -github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v0.9.0 h1:nTT8j7Hu3TM0wRWrGy83/ctawG7sleJGdFWtIsUsKgY= github.com/filecoin-project/go-data-transfer v0.9.0/go.mod h1:i2CqUy7TMQGKukj9BgqIxiP8nDHDXU2VLd771KVaCaQ= -github.com/filecoin-project/go-ds-versioning v0.1.0 h1:y/X6UksYTsK8TLCI7rttCKEvl8btmWxyFMEeeWGUxIQ= github.com/filecoin-project/go-ds-versioning v0.1.0/go.mod h1:mp16rb4i2QPmxBnmanUx8i/XANp+PFCCJWiAb+VW4/s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= @@ -304,7 +279,6 @@ github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0 github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20 h1:+/4aUeUoKr6AKfPE3mBhXA5spIV6UcKdTYDPNU2Tdmg= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= -github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-state-types v0.0.0-20200903145444-247639ffa6ad/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I= @@ -315,15 +289,12 @@ github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe h github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= -github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b h1:fkRZSPrYpk42PV3/lIXiL0LHetxde7vyYYvSsttQtfg= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= github.com/filecoin-project/lotus v1.1.2 h1:cs74C5oNVoIIFmjovpSuJR3qXzXcqS9cpOT+oSmNRiE= github.com/filecoin-project/lotus v1.1.2/go.mod h1:jSlQv+/+WGox3TdEzBEfmXzvbot4OOsBiIh98t7AnAA= -github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4= github.com/filecoin-project/specs-actors v0.9.12 h1:iIvk58tuMtmloFNHhAOQHG+4Gci6Lui0n7DYQGi3cJk= github.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= -github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4= github.com/filecoin-project/specs-actors/v2 v2.0.1/go.mod h1:v2NZVYinNIKA9acEMBm5wWXxqv5+frFEbekBFemYghY= github.com/filecoin-project/specs-actors/v2 v2.2.0 h1:IyCICb0NHYeD0sdSqjVGwWydn/7r7xXuxdpvGAcRCGY= github.com/filecoin-project/specs-actors/v2 v2.2.0/go.mod h1:rlv5Mx9wUhV8Qsz+vUezZNm+zL4tK08O0HreKKPB2Wc= @@ -332,9 +303,7 @@ github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796/g github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= -github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -363,15 +332,12 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -399,7 +365,6 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -427,15 +392,12 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= -github.com/google/gopacket v1.1.18 h1:lum7VRA9kdlvBi7/v2p7/zcbkduHaCH/SVVyurs7OpY= github.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -451,7 +413,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= @@ -477,7 +438,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= @@ -489,7 +449,6 @@ github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfm github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/gxed/pubsub v0.0.0-20180201040156-26ebdf44f824/go.mod h1:OiEWyHgK+CWrmOlVquHaIK1vhpUJydC9m0Je6mhaiNE= github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE= -github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1 h1:F9k+7wv5OIk1zcq23QpdiL0hfDuXPjuOmMNaC6fgQ0Q= github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e h1:3YKHER4nmd7b5qy5t0GWDTwSn4OyRgfAXSmo6VnryBY= github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY= @@ -526,11 +485,9 @@ github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= -github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -542,7 +499,6 @@ github.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3 github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.20 h1:Zfi5jDUoqxDThORUznqdeL77DdGniAzlccNJ4vr+Itc= github.com/ipfs/go-bitswap v0.2.20/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= @@ -576,7 +532,6 @@ github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13X github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.5 h1:cwOUcGMLdLPWgu3SlrCckCMznaGADbPqE0r8h768/Dg= github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs= -github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= @@ -598,7 +553,6 @@ github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CE github.com/ipfs/go-graphsync v0.3.0/go.mod h1:gEBvJUNelzMkaRPJTpg/jaKN4AQW/7wDWu0K92D8o10= github.com/ipfs/go-graphsync v0.3.1 h1:dJLYrck4oyJDfMVhGEKiWHxaY8oYMWko4m2Fi+4bofo= github.com/ipfs/go-graphsync v0.3.1/go.mod h1:bw4LiLM5Oq/uLdzEtih9LK8GrwSijv+XqYiWCTxHMqs= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= @@ -606,15 +560,12 @@ github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86 github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= github.com/ipfs/go-ipfs-blockstore v1.0.1 h1:fnuVj4XdZp4yExhd0CnUwAiMNJHiPnfInhiuwz4lW1w= github.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= -github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= -github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7NapWLY8= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= github.com/ipfs/go-ipfs-cmds v0.1.0/go.mod h1:TiK4e7/V31tuEb8YWDF8lN3qrnDH+BS7ZqWIeYJlAs8= github.com/ipfs/go-ipfs-config v0.0.11/go.mod h1:wveA8UT5ywN26oKStByzmz1CO6cXwLKKM6Jn/Hfw08I= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= @@ -634,10 +585,8 @@ github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEB github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY= github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= github.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs= -github.com/ipfs/go-ipfs-routing v0.1.0 h1:gAJTT1cEeeLj6/DlLX6t+NxD9fQe2ymTO6qWRDI/HQQ= github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= @@ -683,41 +632,32 @@ github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ= github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.2.0 h1:2cSr7exUGKYyDeUyQ7P/nHPs9P7Ht/B+ROrpN1EJOjc= github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY= github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= -github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= -github.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4 h1:6phjU3kXvCEWOZpu+Ob0w6DzgPFZmDLgLPxJhD8RxEY= github.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4/go.mod h1:xrMEcuSq+D1vEwl+YAXsg/JfA98XGpXDwnkIL4Aimqw= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f h1:XpOuNQ5GbXxUcSukbQcW9jkE7REpaFGJU2/T00fo9kA= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= -github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6 h1:6Mq+tZGSEMEoJJ1NbJRhddeelkXZcU8yfH/ZRYUo/Es= github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0= -github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= -github.com/jbenet/go-cienv v0.1.0 h1:Vc/s0QbQtoxX8MwwSLWWh+xNNZvM3Lw7NsTcHrvvhMc= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= -github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c h1:uUx61FiAa1GI6ZmVd2wf2vULeQZIKG66eybjNXKYCz4= github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM9UuLw1tXnhJWN3piypTUO3vCIHYmG15KE/dU= github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= -github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= @@ -728,13 +668,11 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= @@ -747,7 +685,6 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -763,23 +700,18 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= -github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d h1:68u9r4wEvL3gYg2jvAOgROwZ3H+Y3hIDk4tbbmIjcYQ= github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= -github.com/libp2p/go-addr-util v0.0.2 h1:7cWK5cdA5x72jX0g8iLrQWm5TRJZ6CzGdPEhWj7plWU= github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= @@ -788,11 +720,9 @@ github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40J github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= github.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= -github.com/libp2p/go-conn-security-multistream v0.2.0 h1:uNiDjS58vrvJTg9jO6bySd1rMKejieG7v45ekqHbZ1M= github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= github.com/libp2p/go-eventbus v0.0.2/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk= github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= -github.com/libp2p/go-eventbus v0.2.1 h1:VanAdErQnpTioN2TowqNcOijf6YwhuODe4pPKSDpxGc= github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= @@ -812,7 +742,6 @@ github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qD github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= -github.com/libp2p/go-libp2p v0.11.0 h1:jb5mqdqYEBAybTEhD8io43Cz5LzVKuWxOK7znSN69jE= github.com/libp2p/go-libp2p v0.11.0/go.mod h1:3/ogJDXsbbepEfqtZKBR/DedzxJXCeK17t2Z9RE9bEE= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= @@ -822,7 +751,6 @@ github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQ github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= -github.com/libp2p/go-libp2p-autonat v0.3.2 h1:OhDSwVVaq7liTaRIsFFYvsaPp0pn2yi0WazejZ4DUmo= github.com/libp2p/go-libp2p-autonat v0.3.2/go.mod h1:0OzOi1/cVc7UcxfOddemYD5vzEqi4fwRbnZcJGLi68U= github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= @@ -830,7 +758,6 @@ github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMz github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= -github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk= github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= github.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE= github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU= @@ -841,11 +768,9 @@ github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3 github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= -github.com/libp2p/go-libp2p-circuit v0.3.1 h1:69ENDoGnNN45BNDnBd+8SXSetDuw0eJFcGmOvvtOgBw= github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= -github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= @@ -894,7 +819,6 @@ github.com/libp2p/go-libp2p-kad-dht v0.8.3/go.mod h1:HnYYy8taJWESkqiESd1ngb9XX/X github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= -github.com/libp2p/go-libp2p-loggables v0.1.0 h1:h3w8QFfCt2UJl/0/NW4K829HX/0S4KD31PQ7m8UXXO8= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= github.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08= github.com/libp2p/go-libp2p-mplex v0.1.1/go.mod h1:KUQWpGkCzfV7UIpi8SKsAVxyBgz1c9R5EvxgnwLsb/I= @@ -902,20 +826,16 @@ github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3 github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= -github.com/libp2p/go-libp2p-mplex v0.2.4 h1:XFFXaN4jhqnIuJVjYOR3k6bnRj0mFfJOlIuDVww+4Zo= github.com/libp2p/go-libp2p-mplex v0.2.4/go.mod h1:mI7iOezdWFOisvUwaYd3IDrJ4oVmgoXK8H331ui39CE= github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= -github.com/libp2p/go-libp2p-nat v0.0.6 h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGSfvTkU= github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-net v0.0.1/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= github.com/libp2p/go-libp2p-net v0.0.2/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c= github.com/libp2p/go-libp2p-netutil v0.0.1/go.mod h1:GdusFvujWZI9Vt0X5BKqwWWmZFxecf9Gt03cKxm2f/Q= -github.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= -github.com/libp2p/go-libp2p-noise v0.1.2 h1:IH9GRihQJTx56obm+GnpdPX4KeVIlvpXrP6xnJ0wxWk= github.com/libp2p/go-libp2p-noise v0.1.2/go.mod h1:9B10b7ueo7TIxZHHcjcDCo5Hd6kfKT2m77by82SFRfE= github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo= github.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es= @@ -932,7 +852,6 @@ github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/ github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= @@ -947,7 +866,6 @@ github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFA github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= -github.com/libp2p/go-libp2p-record v0.1.3 h1:R27hoScIhQf/A8XJZ8lYpnqh9LatJ5YbHs28kCIfql0= github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys= github.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE= @@ -966,7 +884,6 @@ github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaT github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= -github.com/libp2p/go-libp2p-swarm v0.2.8 h1:cIUUvytBzNQmGSjnXFlI6UpoBGsaud82mJPIJVfkDlg= github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -974,9 +891,7 @@ github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MB github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= -github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8 h1:v4dvk7YEW8buwCdIVWnhpv0Hp/AAJKRWIxBhmLRZrsk= github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= -github.com/libp2p/go-libp2p-tls v0.1.3 h1:twKMhMu44jQO+HgQK9X8NHO5HkeJu2QbhLzLJpa8oNM= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= @@ -985,7 +900,6 @@ github.com/libp2p/go-libp2p-transport-upgrader v0.0.1/go.mod h1:NJpUAgQab/8K6K0m github.com/libp2p/go-libp2p-transport-upgrader v0.0.4/go.mod h1:RGq+tupk+oj7PzL2kn/m1w6YXxcIAYJYeI90h6BGgUc= github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= -github.com/libp2p/go-libp2p-transport-upgrader v0.3.0 h1:q3ULhsknEQ34eVDhv4YwKS8iet69ffs9+Fir6a7weN4= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8= github.com/libp2p/go-libp2p-yamux v0.1.3/go.mod h1:VGSQVrqkh6y4nm0189qqxMtvyBft44MOYYPpYKXiVt4= @@ -994,7 +908,6 @@ github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZ github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= -github.com/libp2p/go-libp2p-yamux v0.2.8 h1:0s3ELSLu2O7hWKfX1YjzudBKCP0kZ+m9e2+0veXzkn4= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= @@ -1005,7 +918,6 @@ github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTW github.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= -github.com/libp2p/go-mplex v0.1.2 h1:qOg1s+WdGLlpkrczDqmhYzyk3vCfsQ8+RxRTQjOZWwI= github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= @@ -1015,40 +927,32 @@ github.com/libp2p/go-msgio v0.0.6 h1:lQ7Uc0kS1wb1EfRxO2Eir/RJoHkHn7t6o+EiwsYIKJA github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= -github.com/libp2p/go-nat v0.0.5 h1:qxnwkco8RLKqVh1NmjQ+tJ8p8khNLFxuElYG/TwqW4Q= github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= -github.com/libp2p/go-netroute v0.1.3 h1:1ngWRx61us/EpaKkdqkMjKk/ufr/JlIFYQAxV2XX8Ig= github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.7 h1:eCAzdLejcNVBzP/iZM9vqHnQm+XyCEbSSIheIPRGNsw= github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= -github.com/libp2p/go-reuseport v0.0.2 h1:XSG94b1FJfGA01BUrT82imejHQyTxO4jEWqheyCXYvU= github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= github.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= -github.com/libp2p/go-reuseport-transport v0.0.4 h1:OZGz0RB620QDGpv300n1zaOcKGGAoGVf8h9txtt/1uM= github.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw= github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-sockaddr v0.1.0 h1:Y4s3/jNoryVRKEBrkJ576F17CPOaMIzUeCsg7dlTDj0= github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= github.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqXJyFvB0mR4A04sQ= github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw= github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= -github.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= github.com/libp2p/go-tcp-transport v0.0.1/go.mod h1:mnjg0o0O5TmXUaUIanYPUqkW4+u6mK0en8rlpA6BBTs= github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o= github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-tcp-transport v0.2.1 h1:ExZiVQV+h+qL16fzCWtd1HSzPsqWottJ8KXwWaVi8Ns= github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= @@ -1058,7 +962,6 @@ github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw github.com/libp2p/go-ws-transport v0.1.2/go.mod h1:dsh2Ld8F+XNmzpkaAijmg5Is+e9l6/1tK/6VFOdN69Y= github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= -github.com/libp2p/go-ws-transport v0.3.1 h1:ZX5rWB8nhRRJVaPO6tmkGI/Xx8XNboYX20PW5hXIscw= github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= @@ -1067,7 +970,6 @@ github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZ github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.7 h1:v40A1eSPJDIZwz2AvrV3cxpTZEGDP11QJbukmEhYyQI= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= @@ -1093,7 +995,6 @@ github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -1108,7 +1009,6 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -1130,7 +1030,6 @@ github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= @@ -1352,7 +1251,6 @@ github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmO github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ= github.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k= @@ -1368,12 +1266,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -1383,7 +1278,6 @@ github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJP github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= @@ -1405,23 +1299,19 @@ github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= @@ -1431,7 +1321,6 @@ github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFC github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= @@ -1465,7 +1354,6 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1481,7 +1369,6 @@ github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpP github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -1502,10 +1389,8 @@ github.com/terra-project/core v0.4.0-rc.4 h1:6ZK9KyUCRWw5kQmcBmTbKy6RZ8UU2ew9T3N github.com/terra-project/core v0.4.0-rc.4/go.mod h1:QoddSVukyuI5qM0rFp7xvKjTn/aoK3D177MUt1V7YXM= github.com/terra-project/go-cosmwasm v0.10.1-terra h1:3yvESyqndOoJKmmFyGKfQy7rLg2Gz4ULwwoCi4fDqAw= github.com/terra-project/go-cosmwasm v0.10.1-terra/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc= -github.com/terra-project/ledger-terra-go v0.11.1-terra h1:BnwRp8dyJMN5sROg8g6dXc5/Zoi44gd5c8Llf0Nobac= github.com/terra-project/ledger-terra-go v0.11.1-terra/go.mod h1:5fdyEuDNvsymbqag/EaaAeWAgyAebQe2VH38H+DnXnA= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= -github.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1517,10 +1402,8 @@ github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= @@ -1529,12 +1412,10 @@ github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMI github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= -github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba h1:X4n8JG2e2biEZZXdBKt9HX7DN3bYGFUqljqqy0DqgnY= github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= @@ -1549,7 +1430,6 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163 h1:TtcUeY2XZSriVWR1pXyfCBWIf/NGC2iUdNw1lofUjUU= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= @@ -1564,7 +1444,6 @@ github.com/whyrusleeping/ledger-filecoin-go v0.9.1-0.20201010031517-c3dcc1bddce4 github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= -github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:E9S12nwJwEOXe2d6gT6qxdvqMnNq+VnSsKPgm2ZZNds= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= @@ -1573,17 +1452,12 @@ github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGw github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= -github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f h1:nMhj+x/m7ZQsHBz0L3gpytp0v6ogokdbrQDnhB8Kh7s= github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= -github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= -github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 h1:oWgZJmC1DorFZDpfMfWg7xk29yEOZiXmo/wZl+utTI8= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.12.1/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= @@ -1594,7 +1468,6 @@ go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= @@ -1615,14 +1488,12 @@ go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= -go.uber.org/goleak v1.0.0 h1:qsup4IcBdlmsnGfqyLl4Ntn3C2XCCuKAE7DwHpScyUo= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1630,7 +1501,6 @@ go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1676,7 +1546,6 @@ golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200513190911-00229845015e h1:rMqLP+9XLy+LdbCXHjJHAmTfXCr93W7oruWA6Hq1Alc= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1689,7 +1558,6 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367 h1:0IiAsCRByjO2QjX7ZPkw5oU9x+n1YqRL802rjC0c3Aw= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -1698,7 +1566,6 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1760,7 +1627,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1876,7 +1742,6 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3 h1:r3P/5xOq/dK1991B65Oy6E1fRF/2d/fSYZJ/fXGVfJc= golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1958,14 +1823,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1993,7 +1855,6 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2001,20 +1862,14 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -modernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0 h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= From c29e35f4447f5751e355263596bab23c7b8e4836 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 May 2021 00:33:22 +0500 Subject: [PATCH 290/335] ci: improve caching --- .github/workflows/test.yml | 187 ++++++++++++++++++++++++++++++++----- 1 file changed, 163 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b16952e2..028c0065 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,9 @@ on: [push] jobs: test-solana: runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d + SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -20,6 +23,8 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -43,14 +48,30 @@ jobs: go get -u github.com/mattn/goveralls go get -u github.com/xlab/c-for-go + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi + cd .extern/filecoin-ffi + git checkout {{ env.FILECOIN_FFI_COMMIT }} + make + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + go get -u github.com/xlab/c-for-go + git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi + cd .extern/solana-ffi + git checkout {{ env.SOLANA_FFI_COMMIT }} + make clean + make + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi - make - cd $GITHUB_WORKSPACE/chain/solana/solana-ffi - make + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi go vet ./... - name: Setup environment for Solana tests @@ -103,6 +124,9 @@ jobs: test-filecoin: runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d + SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -120,6 +144,21 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT}}-${{ env.SOLANA_FFI_COMMIT}} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -143,14 +182,30 @@ jobs: go get -u github.com/mattn/goveralls go get -u github.com/xlab/c-for-go + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi + cd .extern/filecoin-ffi + git checkout {{ env.FILECOIN_FFI_COMMIT }} + make + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + go get -u github.com/xlab/c-for-go + git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi + cd .extern/solana-ffi + git checkout {{ env.SOLANA_FFI_COMMIT }} + make clean + make + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi - make - cd $GITHUB_WORKSPACE/chain/solana/solana-ffi - make + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi go vet ./... - name: Run linting @@ -188,6 +243,9 @@ jobs: test-zcash: runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d + SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -205,6 +263,8 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -228,14 +288,30 @@ jobs: go get -u github.com/mattn/goveralls go get -u github.com/xlab/c-for-go + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi + cd .extern/filecoin-ffi + git checkout {{ env.FILECOIN_FFI_COMMIT }} + make + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + go get -u github.com/xlab/c-for-go + git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi + cd .extern/solana-ffi + git checkout {{ env.SOLANA_FFI_COMMIT }} + make clean + make + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi - make - cd $GITHUB_WORKSPACE/chain/solana/solana-ffi - make + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi go vet ./... - name: Run linting @@ -272,6 +348,9 @@ jobs: test-terra: runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d + SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -289,6 +368,8 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -312,14 +393,30 @@ jobs: go get -u github.com/mattn/goveralls go get -u github.com/xlab/c-for-go + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi + cd .extern/filecoin-ffi + git checkout {{ env.FILECOIN_FFI_COMMIT }} + make + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + go get -u github.com/xlab/c-for-go + git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi + cd .extern/solana-ffi + git checkout {{ env.SOLANA_FFI_COMMIT }} + make clean + make + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi - make - cd $GITHUB_WORKSPACE/chain/solana/solana-ffi - make + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi go vet ./... - name: Run linting @@ -356,6 +453,9 @@ jobs: test-dogecoin: runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d + SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -373,6 +473,8 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -396,14 +498,30 @@ jobs: go get -u github.com/mattn/goveralls go get -u github.com/xlab/c-for-go + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi + cd .extern/filecoin-ffi + git checkout {{ env.FILECOIN_FFI_COMMIT }} + make + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + go get -u github.com/xlab/c-for-go + git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi + cd .extern/solana-ffi + git checkout {{ env.SOLANA_FFI_COMMIT }} + make clean + make + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi - make - cd $GITHUB_WORKSPACE/chain/solana/solana-ffi - make + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi go vet ./... - name: Run linting @@ -440,6 +558,9 @@ jobs: test-btc-bch: runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d + SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -457,6 +578,8 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -480,14 +603,30 @@ jobs: go get -u github.com/mattn/goveralls go get -u github.com/xlab/c-for-go + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi + cd .extern/filecoin-ffi + git checkout {{ env.FILECOIN_FFI_COMMIT }} + make + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + go get -u github.com/xlab/c-for-go + git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi + cd .extern/solana-ffi + git checkout {{ env.SOLANA_FFI_COMMIT }} + make clean + make + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi - make - cd $GITHUB_WORKSPACE/chain/solana/solana-ffi - make + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi go vet ./... - name: Run linting From aa7f853f34580ef4c9b39ef46f43765f3646c434 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 May 2021 00:49:41 +0500 Subject: [PATCH 291/335] ci: fix env var and caching --- .github/workflows/test.yml | 91 ++++++++++++++++++++++++++++++++------ 1 file changed, 78 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 028c0065..a4611b21 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,19 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 - name: Install dependency packages @@ -53,7 +66,7 @@ jobs: run: | git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi - git checkout {{ env.FILECOIN_FFI_COMMIT }} + git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) @@ -62,7 +75,7 @@ jobs: go get -u github.com/xlab/c-for-go git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi - git checkout {{ env.SOLANA_FFI_COMMIT }} + git checkout ${{ env.SOLANA_FFI_COMMIT }} make clean make @@ -154,7 +167,7 @@ jobs: cache-name: cache-externs with: path: .extern - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT}}-${{ env.SOLANA_FFI_COMMIT}} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- @@ -187,7 +200,7 @@ jobs: run: | git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi - git checkout {{ env.FILECOIN_FFI_COMMIT }} + git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) @@ -196,7 +209,7 @@ jobs: go get -u github.com/xlab/c-for-go git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi - git checkout {{ env.SOLANA_FFI_COMMIT }} + git checkout ${{ env.SOLANA_FFI_COMMIT }} make clean make @@ -266,6 +279,19 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 - name: Install dependency packages @@ -293,7 +319,7 @@ jobs: run: | git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi - git checkout {{ env.FILECOIN_FFI_COMMIT }} + git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) @@ -302,7 +328,7 @@ jobs: go get -u github.com/xlab/c-for-go git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi - git checkout {{ env.SOLANA_FFI_COMMIT }} + git checkout ${{ env.SOLANA_FFI_COMMIT }} make clean make @@ -371,6 +397,19 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 - name: Install dependency packages @@ -398,7 +437,7 @@ jobs: run: | git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi - git checkout {{ env.FILECOIN_FFI_COMMIT }} + git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) @@ -407,7 +446,7 @@ jobs: go get -u github.com/xlab/c-for-go git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi - git checkout {{ env.SOLANA_FFI_COMMIT }} + git checkout ${{ env.SOLANA_FFI_COMMIT }} make clean make @@ -476,6 +515,19 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 - name: Install dependency packages @@ -503,7 +555,7 @@ jobs: run: | git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi - git checkout {{ env.FILECOIN_FFI_COMMIT }} + git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) @@ -512,7 +564,7 @@ jobs: go get -u github.com/xlab/c-for-go git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi - git checkout {{ env.SOLANA_FFI_COMMIT }} + git checkout ${{ env.SOLANA_FFI_COMMIT }} make clean make @@ -581,6 +633,19 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 - name: Install dependency packages @@ -608,7 +673,7 @@ jobs: run: | git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi - git checkout {{ env.FILECOIN_FFI_COMMIT }} + git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) @@ -617,7 +682,7 @@ jobs: go get -u github.com/xlab/c-for-go git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi - git checkout {{ env.SOLANA_FFI_COMMIT }} + git checkout ${{ env.SOLANA_FFI_COMMIT }} make clean make From 2111f468b06df33587bd7e1da87d913350f514ac Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 May 2021 01:11:32 +0500 Subject: [PATCH 292/335] ci: fix go path --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4611b21..e945986a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,6 +64,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} @@ -72,7 +74,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - go get -u github.com/xlab/c-for-go + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} @@ -198,6 +201,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} @@ -206,7 +211,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - go get -u github.com/xlab/c-for-go + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} @@ -317,6 +323,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} @@ -325,7 +333,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - go get -u github.com/xlab/c-for-go + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} @@ -435,6 +444,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} @@ -443,7 +454,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - go get -u github.com/xlab/c-for-go + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} @@ -553,6 +565,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} @@ -561,7 +575,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - go get -u github.com/xlab/c-for-go + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} @@ -671,6 +686,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi cd .extern/filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} @@ -679,7 +696,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - go get -u github.com/xlab/c-for-go + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi cd .extern/solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} From ae48de48ecc515afac7cb44b4b2f2efd8bbeccf6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 May 2021 01:59:56 +0500 Subject: [PATCH 293/335] fix: appropriate program addresses as per dev-keys --- .github/workflows/test.yml | 2 +- Dockerfile | 4 ++-- chain/solana/solana_test.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e945986a..d39225a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -129,7 +129,7 @@ jobs: --owner ~/.config/solana/id.json \ --fee-payer ~/.config/solana/id.json \ --selector "BTC/toSolana" \ - --gateway "9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP" + --gateway "FDdKRjbBeFtyu5c66cZghJsTTjDTT1aD3zsgTWMTpaif" target/debug/gateway-registry update \ --owner ~/.config/solana/id.json \ --fee-payer ~/.config/solana/id.json \ diff --git a/Dockerfile b/Dockerfile index 70b68f94..aa2d2001 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir -p src/github.com/filecoin-project WORKDIR $GOPATH/src/github.com/filecoin-project RUN git clone https://github.com/filecoin-project/filecoin-ffi WORKDIR $GOPATH/src/github.com/filecoin-project/filecoin-ffi -RUN git checkout a62d00da59d1b0fb +RUN git checkout a62d00da59d1b0fb35f3a4ae854efa9441af892d RUN make RUN go install @@ -39,6 +39,6 @@ RUN mkdir -p src/github.com/renproject WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi -RUN git checkout 4bd204b6017173c1425468db8566f053abb49f0b +RUN git checkout df7838d724f5eaf262ed77ed93b35b3f1f652bd3 RUN make clean && make RUN go install ./... diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 7e5e6ec5..0c229470 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -45,7 +45,7 @@ var _ = Describe("Solana", func() { Context("When minting and burning", func() { It("should succeed", func() { // Base58 address of the Gateway program that is deployed to Solana. - program := multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP") + program := multichain.Address("FDdKRjbBeFtyu5c66cZghJsTTjDTT1aD3zsgTWMTpaif") // Construct user's keypair path (~/.config/solana/id.json). userHomeDir, err := os.UserHomeDir() @@ -108,7 +108,7 @@ var _ = Describe("Solana", func() { client := solana.NewClient(solana.DefaultClientOptions()) // Base58 address of the Gateway registry program deployed to Solana. - registryProgram := multichain.Address("3cvX9BpLMJsFTuEWSQBaTcd4TXgAmefqgNSJbufpyWyz") + registryProgram := multichain.Address("DHpzwsdvAzq61PN9ZwQWg2hzwX8gYNfKAdsNKKtdKDux") seeds := []byte("GatewayRegistryState") registryState := solana.ProgramDerivedAddress(pack.Bytes(seeds), registryProgram) @@ -130,7 +130,7 @@ var _ = Describe("Solana", func() { zero := pack.NewU256FromU8(pack.U8(0)).Bytes32() addrEncodeDecoder := solana.NewAddressEncodeDecoder() - expectedBtcGateway, _ := addrEncodeDecoder.DecodeAddress(multichain.Address("9TaQuUfNMC5rFvdtzhHPk84WaFH3SFnweZn4tw9RriDP")) + expectedBtcGateway, _ := addrEncodeDecoder.DecodeAddress(multichain.Address("FDdKRjbBeFtyu5c66cZghJsTTjDTT1aD3zsgTWMTpaif")) expectedZecGateway, _ := addrEncodeDecoder.DecodeAddress(multichain.Address("9rCXCJDsnS53QtdXvYhYCAxb6yBE16KAQx5zHWfHe9QF")) Expect(registry.Count).To(Equal(uint64(2))) From 63ce4d8bc787300e1ac8868efe2090cf733bb66d Mon Sep 17 00:00:00 2001 From: Harjas Date: Fri, 7 May 2021 20:25:06 +0530 Subject: [PATCH 294/335] add api and tests for harmony --- chain/harmony/account.go | 335 +++++++++++++++++++++++++++- chain/harmony/account_test.go | 84 ++++++- chain/harmony/address.go | 20 +- chain/harmony/address_test.go | 77 ++++++- chain/harmony/contract.go | 37 ++- chain/harmony/contract_test.go | 36 ++- chain/harmony/gas_test.go | 21 +- chain/harmony/harmony_suite_test.go | 12 + chain/harmony/rpc.go | 154 +++++++++++++ go.mod | 5 + multichain.go | 6 +- multichain_test.go | 80 ++++++- 12 files changed, 853 insertions(+), 14 deletions(-) create mode 100644 chain/harmony/harmony_suite_test.go create mode 100644 chain/harmony/rpc.go diff --git a/chain/harmony/account.go b/chain/harmony/account.go index 66d37d46..87aef0f1 100644 --- a/chain/harmony/account.go +++ b/chain/harmony/account.go @@ -1 +1,334 @@ -package harmony \ No newline at end of file +package harmony + +import ( + "context" + "encoding/json" + "fmt" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/rlp" + "github.com/harmony-one/harmony/core/types" + common2 "github.com/harmony-one/harmony/rpc/common" + "github.com/renproject/multichain/api/account" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" + "github.com/renproject/pack" + "math/big" +) + +const ( + DefaultShardID = 1 + DefaultHost = "http://127.0.0.1:9598" +) + +type TxBuilder struct { + chainID *big.Int +} + +func NewTxBuilder(chainId *big.Int) account.TxBuilder { + return &TxBuilder{ + chainID: chainId, + } +} + +func (txBuilder *TxBuilder) BuildTx(ctx context.Context, from, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) { + toAddr, err := NewEncoderDecoder().DecodeAddress(to) + if err != nil { + return nil, err + } + tx := types.NewTransaction( + nonce.Int().Uint64(), + common.BytesToAddress(toAddr), + DefaultShardID, + value.Int(), + gasLimit.Int().Uint64(), + gasPrice.Int(), + payload) + return &Tx{ + harmonyTx: *tx, + chainId: txBuilder.chainID, + sender: from, + signed: false, + }, nil +} + +type TxData struct { + Blockhash string `json:"blockHash"` + Blocknumber uint64 `json:"blockNumber"` + From string `json:"from"` + Gas uint64 `json:"gas"` + Gasprice *big.Int `json:"gasPrice"` + Hash string `json:"hash"` + Input string `json:"input"` + Nonce uint64 `json:"nonce"` + R string `json:"r"` + S string `json:"s"` + Shardid uint32 `json:"shardID"` + Timestamp uint64 `json:"timestamp"` + To string `json:"to"` + Toshardid uint32 `json:"toShardID"` + Transactionindex uint64 `json:"transactionIndex"` + V string `json:"v"` + Value *big.Int `json:"value"` +} + +type Tx struct { + harmonyTx types.Transaction + chainId *big.Int + sender address.Address + signed bool +} + +func (tx *Tx) Hash() pack.Bytes { + return pack.NewBytes(tx.harmonyTx.Hash().Bytes()) +} + +func (tx *Tx) From() address.Address { + from, err := tx.harmonyTx.SenderAddress() + if err == nil { + addr, err := NewEncoderDecoder().EncodeAddress(from.Bytes()) + if err == nil { + return addr + } + } + return tx.sender +} + +func (tx *Tx) To() address.Address { + to := tx.harmonyTx.To() + if to != nil { + addr, err := NewEncoderDecoder().EncodeAddress(to.Bytes()) + if err == nil { + return addr + } + } + return "" +} + +func (tx *Tx) Value() pack.U256 { + return pack.NewU256FromInt(tx.harmonyTx.Value()) +} + +func (tx *Tx) Nonce() pack.U256 { + return pack.NewU256FromU64(pack.NewU64(tx.harmonyTx.Nonce())) +} + +func (tx *Tx) Payload() contract.CallData { + return tx.harmonyTx.Data() +} + +func (tx *Tx) Sighashes() ([]pack.Bytes32, error) { + const digestLength = 32 + var ( + digestHash [32]byte + sighashes []pack.Bytes32 + ) + h := types.NewEIP155Signer(tx.chainId).Hash(&tx.harmonyTx).Bytes() + if len(h) != digestLength { + return nil, fmt.Errorf("hash is required to be exactly %d bytes (%d)", digestLength, len(h)) + } + copy(digestHash[:], h[:32]) + sighashes = append(sighashes, digestHash) + return sighashes, nil +} + +func (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error { + if len(signatures) != 1 { + return fmt.Errorf("expected 1 signature, got %v signatures", len(signatures)) + } + signedTx, err := tx.harmonyTx.WithSignature(types.NewEIP155Signer(tx.chainId), signatures[0].Bytes()) + if err != nil { + return err + } + tx.harmonyTx = *signedTx + tx.signed = true + return nil +} + +func (tx *Tx) Serialize() (pack.Bytes, error) { + serializedTx, err := rlp.EncodeToBytes(&tx.harmonyTx) + if err != nil { + return pack.Bytes{}, err + } + return pack.NewBytes(serializedTx), nil +} + +type ClientOptions struct { + Host string +} + +type Client struct { + opts ClientOptions +} + +func (opts ClientOptions) WithHost(host string) ClientOptions { + opts.Host = host + return opts +} + +func DefaultClientOptions() ClientOptions { + return ClientOptions{ + Host: DefaultHost, + } +} + +func NewClient(opts ClientOptions) *Client { + return &Client{opts: opts} +} + +func (c *Client) LatestBlock(ctx context.Context) (pack.U64, error) { + for { + select { + case <-ctx.Done(): + return pack.NewU64(0), ctx.Err() + default: + } + const method = "hmyv2_blockNumber" + response, err := SendData(method, []byte{}, c.opts.Host) + if err != nil { + fmt.Println(err) + return pack.NewU64(0), err + } + var latestBlock uint64 + if err := json.Unmarshal(*response.Result, &latestBlock); err != nil { + return pack.NewU64(0), fmt.Errorf("decoding result: %v", err) + } + return pack.NewU64(latestBlock), nil + } +} + +func (c *Client) AccountBalance(ctx context.Context, addr address.Address) (pack.U256, error) { + for { + select { + case <-ctx.Done(): + return pack.U256{}, ctx.Err() + default: + } + data := []byte(fmt.Sprintf("[\"%s\"]", addr)) + const method = "hmyv2_getBalance" + response, err := SendData(method, data, c.opts.Host) + if err != nil { + fmt.Println(err) + return pack.U256{}, err + } + var balance uint64 + if err := json.Unmarshal(*response.Result, &balance); err != nil { + return pack.U256{}, fmt.Errorf("decoding result: %v", err) + } + return pack.NewU256FromU64(pack.NewU64(balance)), nil + } +} + +func (c *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) { + for { + select { + case <-ctx.Done(): + return pack.U256{}, ctx.Err() + default: + } + data := []byte(fmt.Sprintf("[\"%s\", \"%s\"]", addr, "SENT")) + const method = "hmyv2_getTransactionsCount" + response, err := SendData(method, data, c.opts.Host) + if err != nil { + fmt.Println(err) + return pack.U256{}, err + } + var nonce uint64 + if err := json.Unmarshal(*response.Result, &nonce); err != nil { + return pack.U256{}, fmt.Errorf("decoding result: %v", err) + } + return pack.NewU256FromU64(pack.NewU64(nonce)), nil + } +} + +func (c *Client) Tx(ctx context.Context, hash pack.Bytes) (account.Tx, pack.U64, error) { + for { + select { + case <-ctx.Done(): + return nil, pack.NewU64(0), ctx.Err() + default: + } + data := []byte(fmt.Sprintf("[\"%s\"]", hexutil.Encode(hash))) + const method = "hmyv2_getTransactionByHash" + response, err := SendData(method, data, c.opts.Host) + if err != nil { + return nil, pack.NewU64(0), err + } + var txData TxData + if response.Result == nil { + return nil, pack.NewU64(0), fmt.Errorf("decoding result: %v", err) + } + if err := json.Unmarshal(*response.Result, &txData); err != nil { + return nil, pack.NewU64(0), fmt.Errorf("decoding result: %v", err) + } + + tx, err := buildTxFromTxData(txData) + return tx, pack.NewU64(1), err + } +} + +func (c *Client) SubmitTx(ctx context.Context, tx account.Tx) error { + for { + select { + case <-ctx.Done(): + return ctx.Err() + default: + } + txSerilized, err := tx.Serialize() + if err != nil { + return err + } + hexSignature := hexutil.Encode(txSerilized) + data := []byte(fmt.Sprintf("[\"%s\"]", hexSignature)) + const method = "hmyv2_sendRawTransaction" + tx1 := new(types.Transaction) + err = rlp.DecodeBytes(txSerilized, tx1) + _, err = SendData(method, data, c.opts.Host) + if err != nil { + return err + } + return nil + } +} + +func (c *Client) ChainId(ctx context.Context) (*big.Int, error) { + for { + select { + case <-ctx.Done(): + return big.NewInt(0), ctx.Err() + default: + } + const method = "hmyv2_getNodeMetadata" + response, err := SendData(method, []byte{}, c.opts.Host) + if err != nil { + fmt.Println(err) + return big.NewInt(0), err + } + var nodeMetadata common2.NodeMetadata + if err := json.Unmarshal(*response.Result, &nodeMetadata); err != nil { + return big.NewInt(0), fmt.Errorf("decoding result: %v", err) + } + return nodeMetadata.ChainConfig.ChainID, nil + } +} + +func buildTxFromTxData(data TxData) (account.Tx, error) { + toAddr, err := NewEncoderDecoder().DecodeAddress(address.Address(data.To)) + if err != nil { + return nil, err + } + tx := types.NewTransaction( + data.Nonce, + common.BytesToAddress(toAddr), + data.Shardid, + data.Value, + data.Gas, + data.Gasprice, + pack.Bytes(nil), + ) + return &Tx{ + harmonyTx: *tx, + sender: address.Address(data.From), + signed: true, + }, nil +} \ No newline at end of file diff --git a/chain/harmony/account_test.go b/chain/harmony/account_test.go index b86b6ac2..8fb97af2 100644 --- a/chain/harmony/account_test.go +++ b/chain/harmony/account_test.go @@ -1 +1,83 @@ -package harmony_test \ No newline at end of file +package harmony_test + +import ( + "context" + "github.com/btcsuite/btcutil/bech32" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/harmony" + "github.com/renproject/pack" + "time" +) + +var _ = Describe("Harmony", func() { + Context("when broadcasting a tx", func() { + It("should work", func() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + c := harmony.NewClient(harmony.DefaultClientOptions()) + chainId, err := c.ChainId(ctx) + Expect(err).NotTo(HaveOccurred()) + + x := "1f84c95ac16e6a50f08d44c7bde7aff8742212fda6e4321fde48bf83bef266dc" + senderKey, err := crypto.HexToECDSA(x) + Expect(err).NotTo(HaveOccurred()) + addrBytes, err := bech32.ConvertBits(crypto.PubkeyToAddress(senderKey.PublicKey).Bytes(), 8, 5, true) + Expect(err).NotTo(HaveOccurred()) + senderAddr, err := bech32.Encode(harmony.Bech32AddressHRP, addrBytes) + Expect(err).NotTo(HaveOccurred()) + + toKey, _ := crypto.GenerateKey() + toAddrBytes, err := bech32.ConvertBits(crypto.PubkeyToAddress(toKey.PublicKey).Bytes(), 8, 5, true) + Expect(err).NotTo(HaveOccurred()) + toAddr, err := bech32.Encode(harmony.Bech32AddressHRP, toAddrBytes) + Expect(err).NotTo(HaveOccurred()) + + nonce, err := c.AccountNonce(ctx, address.Address(senderAddr)) + Expect(err).NotTo(HaveOccurred()) + + gasLimit := uint64(80000000) + gas, err := harmony.Estimator{}.EstimateGasPrice(ctx) + Expect(err).NotTo(HaveOccurred()) + + amount := pack.NewU256FromU64(pack.NewU64(100000000)) + + txBuilder := harmony.NewTxBuilder(chainId) + tx, err := txBuilder.BuildTx(ctx, address.Address(senderAddr), address.Address(toAddr), amount, nonce, pack.NewU256FromU64(pack.NewU64(gasLimit)), gas, gas, pack.Bytes(nil)) + Expect(err).NotTo(HaveOccurred()) + + sigHash, err := tx.Sighashes() + Expect(err).ToNot(HaveOccurred()) + Expect(len(sigHash)).To(Equal(1)) + + sig, err := crypto.Sign(sigHash[0][:], senderKey) + Expect(err).ToNot(HaveOccurred()) + Expect(len(sig)).To(Equal(65)) + + var signature [65]byte + copy(signature[:], sig) + err = tx.Sign([]pack.Bytes65{pack.NewBytes65(signature)}, pack.Bytes(nil)) + Expect(err).ToNot(HaveOccurred()) + + err = c.SubmitTx(ctx, tx) + Expect(err).ToNot(HaveOccurred()) + + time.Sleep(time.Second) + for { + txResp, _, err := c.Tx(ctx, tx.Hash()) + if err == nil && txResp != nil { + break + } + // wait and retry querying for the transaction + time.Sleep(5 * time.Second) + } + + updatedBalance, err := c.AccountBalance(ctx, address.Address(toAddr)) + Expect(err).NotTo(HaveOccurred()) + Expect(updatedBalance).To(Equal(amount)) + + }) + }) +}) diff --git a/chain/harmony/address.go b/chain/harmony/address.go index 1fa33057..28e50e1e 100644 --- a/chain/harmony/address.go +++ b/chain/harmony/address.go @@ -5,6 +5,8 @@ import ( "github.com/renproject/multichain/api/address" ) +const Bech32AddressHRP = "one" + type EncoderDecoder struct { address.Encoder address.Decoder @@ -17,24 +19,32 @@ func NewEncoderDecoder() address.EncodeDecoder { } } -type Encoder struct {} +type Encoder struct{} func (Encoder) EncodeAddress(addr address.RawAddress) (address.Address, error) { - encodedAddr, err := bech32.ConvertBits(addr, 8, 5, true) + converted, err := bech32.ConvertBits(addr, 8, 5, true) + if err != nil { + return "", err + } + encodedAddr, err := bech32.Encode(Bech32AddressHRP, converted) if err != nil { return "", err } return address.Address(encodedAddr), nil } -type Decoder struct {} +type Decoder struct{} func (Decoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { _, decodedAddr, err := bech32.Decode(string(addr)) if err != nil { return nil, err } - return decodedAddr[:], nil + converted, err := bech32.ConvertBits(decodedAddr, 5, 8, false) + if err != nil { + return nil, err + } + return converted, nil } func NewEncoder() address.Encoder { @@ -43,4 +53,4 @@ func NewEncoder() address.Encoder { func NewDecoder() address.Decoder { return Decoder{} -} +} \ No newline at end of file diff --git a/chain/harmony/address_test.go b/chain/harmony/address_test.go index b86b6ac2..284db70d 100644 --- a/chain/harmony/address_test.go +++ b/chain/harmony/address_test.go @@ -1 +1,76 @@ -package harmony_test \ No newline at end of file +package harmony_test + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/harmony" +) + +var _ = Describe("Address", func() { + Context("when decoding a valid address", func() { + It("should work without errors", func() { + addrs := []string{ + "an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio1tt5tgs", + "A12UEL5L", + "abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw", + "11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc8247j", + "split1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", + } + encoderDecoder := harmony.NewEncoderDecoder() + for _, addr := range addrs { + _, err := encoderDecoder.DecodeAddress(address.Address(addr)) + Expect(err).ToNot(HaveOccurred()) + } + }) + }) + + Context("when decoding an invalid address", func() { + It("should work without errors", func() { + addrs := []string{ + "split1checkupstagehandshakeupstreamerranterredcaperred2y9e2w", + "s lit1checkupstagehandshakeupstreamerranterredcaperredp8hs2p", + "spl" + string(rune(127)) + "t1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", + "split1cheo2y9e2w", + "split1a2y9w", + "1checkupstagehandshakeupstreamerranterredcaperred2y9e3w", + "11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc8247j", + } + for _, addr := range addrs { + _, err := harmony.NewEncoderDecoder().DecodeAddress(address.Address(addr)) + Expect(err).To(HaveOccurred()) + } + }) + }) + + Context("when encoding a valid address", func() { + It("should work without errors", func() { + key, _ := crypto.GenerateKey() + ethAddr := crypto.PubkeyToAddress(key.PublicKey).String() + encoderDecoder := harmony.NewEncoderDecoder() + addr, err := encoderDecoder.EncodeAddress(common.HexToAddress(ethAddr).Bytes()) + Expect(err).ToNot(HaveOccurred()) + + rawAddr, err := encoderDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + for i, b := range rawAddr { + Expect(b).To(Equal(common.HexToAddress(ethAddr).Bytes()[i])) + } + }) + }) + + Context("when encoding/decoding a valid address", func() { + It("should work without errors", func() { + addr := address.Address("one1zksj3evekayy90xt4psrz8h6j2v3hla4qwz4ur") + encoderDecoder := harmony.NewEncoderDecoder() + rawAddr, err := encoderDecoder.DecodeAddress(addr) + Expect(err).ToNot(HaveOccurred()) + + conv, err := encoderDecoder.EncodeAddress(rawAddr) + Expect(err).ToNot(HaveOccurred()) + Expect(conv).To(Equal(addr)) + }) + }) +}) \ No newline at end of file diff --git a/chain/harmony/contract.go b/chain/harmony/contract.go index 66d37d46..da96c7c4 100644 --- a/chain/harmony/contract.go +++ b/chain/harmony/contract.go @@ -1 +1,36 @@ -package harmony \ No newline at end of file +package harmony + +import ( + "context" + "encoding/json" + "fmt" + "github.com/harmony-one/harmony/rpc" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/api/contract" + "github.com/renproject/pack" +) + +type Params struct { + CallArgs rpc.CallArgs + Block uint64 +} + +func (c *Client) CallContract(ctx context.Context, addr address.Address, callData contract.CallData) (pack.Bytes, error) { + const method = "hmyv2_call" + // Unmarshal required to get the block number parameter for the call + var callParams Params + err := json.Unmarshal(callData, &callParams) + if err != nil { + return nil, err + } + args, err := json.Marshal(callParams.CallArgs) + if err != nil { + return nil, err + } + data := []byte(fmt.Sprintf("[%s, %d]", string(args), callParams.Block)) + response, err := SendData(method, data, c.opts.Host) + if err != nil { + return nil, err + } + return pack.NewBytes(*response.Result), nil +} \ No newline at end of file diff --git a/chain/harmony/contract_test.go b/chain/harmony/contract_test.go index b86b6ac2..32d3850a 100644 --- a/chain/harmony/contract_test.go +++ b/chain/harmony/contract_test.go @@ -1 +1,35 @@ -package harmony_test \ No newline at end of file +package harmony_test + +import ( + "context" + "encoding/json" + "github.com/ethereum/go-ethereum/common" + "github.com/harmony-one/harmony/rpc" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/multichain/api/address" + "github.com/renproject/multichain/chain/harmony" +) + +var _ = Describe("Harmony", func() { + Context("when calling a contract", func() { + It("should work", func() { + contractAddr := address.Address("one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3") + rawAddr, err := harmony.NewEncoderDecoder().DecodeAddress(contractAddr) + bech32Addr := common.BytesToAddress(rawAddr) + callData := rpc.CallArgs{ + To: &bech32Addr, + } + params := harmony.Params{ + CallArgs: callData, + Block: 37000, + } + marshalledData, err := json.Marshal(params) + Expect(err).NotTo(HaveOccurred()) + + c := harmony.NewClient(harmony.DefaultClientOptions()) + _, err = c.CallContract(context.TODO(), contractAddr, marshalledData) + Expect(err).NotTo(HaveOccurred()) + }) + }) +}) \ No newline at end of file diff --git a/chain/harmony/gas_test.go b/chain/harmony/gas_test.go index b86b6ac2..1c1ee60e 100644 --- a/chain/harmony/gas_test.go +++ b/chain/harmony/gas_test.go @@ -1 +1,20 @@ -package harmony_test \ No newline at end of file +package harmony_test + +import ( + "context" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/renproject/multichain/chain/harmony" + "github.com/renproject/pack" +) + +var _ = Describe("Gas", func() { + Context("when estimating gas", func() { + It("should work without errors", func() { + e := harmony.Estimator{} + gas, err := e.EstimateGasPrice(context.TODO()) + Expect(err).NotTo(HaveOccurred()) + Expect(gas).To(Equal(pack.NewU256FromU64(pack.NewU64(1)))) + }) + }) +}) diff --git a/chain/harmony/harmony_suite_test.go b/chain/harmony/harmony_suite_test.go new file mode 100644 index 00000000..2578be39 --- /dev/null +++ b/chain/harmony/harmony_suite_test.go @@ -0,0 +1,12 @@ +package harmony + +import "testing" +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestHarmony(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Harmony Suite") +} \ No newline at end of file diff --git a/chain/harmony/rpc.go b/chain/harmony/rpc.go new file mode 100644 index 00000000..88333e57 --- /dev/null +++ b/chain/harmony/rpc.go @@ -0,0 +1,154 @@ +package harmony + +import ( + "bytes" + "encoding/json" + "fmt" + "net" + "net/http" + "strings" + "time" +) + +// Request defines a JSON-RPC 2.0 request object. See +// https://www.jsonrpc.org/specification for more information. A Request should +// not be explicitly created, but instead unmarshaled from JSON. +type Request struct { + Version string `json:"jsonrpc"` + ID interface{} `json:"id"` + Method string `json:"method"` + Params json.RawMessage `json:"params,omitempty"` +} + +// Response defines a JSON-RPC 2.0 response object. See +// https://www.jsonrpc.org/specification for more information. A Response is +// usually marshaled into bytes and returned in response to a Request. +type Response struct { + Version string `json:"jsonrpc"` + ID interface{} `json:"id"` + Result *json.RawMessage `json:"result,omitempty"` + Error *Error `json:"error,omitempty"` +} + +// Error defines a JSON-RPC 2.0 error object. See +// https://www.jsonrpc.org/specification for more information. +type Error struct { + Code int `json:"code"` + Message string `json:"message"` + Data *json.RawMessage `json:"data"` +} + +// SendData sends data to method via jsonrpc +func SendData(method string, data []byte, url string) (Response, error) { + request := Request{ + Version: "2.0", + ID: 1, + Method: method, + Params: data, + } + // Send request to lightnode + response, err := SendRequest(request, url) + if err != nil { + return Response{}, err + } + + var resp Response + buf := new(bytes.Buffer) + buf.ReadFrom(response.Body) + if err := json.Unmarshal(buf.Bytes(), &resp); err != nil { + return Response{}, fmt.Errorf("cannot decode %v response body = %s, err = %v", method, buf.String(), err) + } + if resp.Error != nil { + return Response{}, fmt.Errorf("got err back from %v request, err = %v", method, resp.Error) + } + return resp, nil +} + +// SendDataWithRetry is the same as SendData but will retry if sending the request failed +func SendDataWithRetry(method string, data []byte, url string) (Response, error) { + request := Request{ + Version: "2.0", + ID: 1, + Method: method, + Params: data, + } + // Send request to lightnode with retry (max 10 times) + response, err := SendRequestWithRetry(request, url, 10, 10) + if err != nil { + return Response{}, fmt.Errorf("failed to send request, err = %v", err) + } + + var resp Response + buf := new(bytes.Buffer) + buf.ReadFrom(response.Body) + if err := json.Unmarshal(buf.Bytes(), &resp); err != nil { + return Response{}, fmt.Errorf("cannot decode %v response body = %s, err = %v", method, buf.String(), err) + } + if resp.Error != nil { + return Response{}, fmt.Errorf("got err back from %v request, err = %v", method, resp.Error) + } + return resp, nil +} + +// SendRequest sends the JSON-2.0 request to the target url and returns the response and any error. +func SendRequest(request Request, url string) (*http.Response, error) { + data, err := json.Marshal(request) + if err != nil { + return nil, err + } + resp, err := SendRawPost(data, url) + if err != nil { + fmt.Printf("Sending %s to %s resulted in an error: %v\n", string(data), url, err) + return nil, err + } + return resp, nil +} + +// SendRawPost sends a raw bytes as a POST request to the URL specified +func SendRawPost(data []byte, url string) (*http.Response, error) { + if !strings.HasPrefix(url, "http") { + url = "http://" + url + } + client := newClient(10 * time.Second) + buff := bytes.NewBuffer(data) + req, err := http.NewRequest("POST", url, buff) + req.Header.Set("Content-Type", "application/json") + if err != nil { + return nil, err + } + return client.Do(req) +} + +// SendRequestWithRetry calls SendRequest but with configurable retry logic +func SendRequestWithRetry(request Request, url string, timeoutInSecs int, retries int) (response *http.Response, err error) { + failures := 0 + for failures < retries { + response, err = SendRequest(request, url) + if err != nil { + failures++ + if failures >= retries { + return nil, err + } + fmt.Printf("%s errored: %v. Retrying after %d seconds\n", url, err, timeoutInSecs) + time.Sleep(time.Duration(timeoutInSecs) * time.Second) + continue + } + break + } + return +} + +func newClient(timeout time.Duration) *http.Client { + return &http.Client{ + Transport: &http.Transport{ + DialContext: (&net.Dialer{ + Timeout: 2 * time.Second, + KeepAlive: 10 * time.Second, + }).DialContext, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 4 * time.Second, + ResponseHeaderTimeout: 3 * time.Second, + }, + Timeout: timeout, + } +} \ No newline at end of file diff --git a/go.mod b/go.mod index 368be482..aa050407 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49 github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f github.com/filecoin-project/lotus v1.1.2 + github.com/harmony-one/harmony v1.10.2 github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/multiformats/go-varint v0.0.6 @@ -37,3 +38,7 @@ replace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ff replace github.com/renproject/solana-ffi => ./chain/solana/solana-ffi replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 + +replace github.com/harmony-one/harmony => github.com/harjas27/harmony v1.10.3-0.20210424185836-ec03cfc7b52d + +replace github.com/ethereum/go-ethereum => github.com/ethereum/go-ethereum v1.9.9 diff --git a/multichain.go b/multichain.go index 0bbda1a0..89a6ec4f 100644 --- a/multichain.go +++ b/multichain.go @@ -258,7 +258,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Fantom, Filecoin, Solana, Terra: + case BinanceSmartChain, Ethereum, Fantom, Filecoin, Solana, Terra, Harmony: return ChainTypeAccountBased // These chains are handled separately because they are mock chains. These @@ -306,6 +306,8 @@ func (chain Chain) NativeAsset() Asset { return FTM case Filecoin: return FIL + case Harmony: + return ONE case Solana: return SOL case Terra: @@ -403,4 +405,4 @@ func (net Network) Marshal(buf []byte, rem int) ([]byte, int, error) { // directly, unless you are implementing unmarshalling for a container type. func (net *Network) Unmarshal(buf []byte, rem int) ([]byte, int, error) { return surge.UnmarshalString((*string)(net), buf, rem) -} +} \ No newline at end of file diff --git a/multichain_test.go b/multichain_test.go index 220e702e..58cbcbc0 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -28,9 +28,13 @@ import ( "github.com/renproject/multichain/chain/bitcoin" "github.com/renproject/multichain/chain/bitcoincash" + "github.com/btcsuite/btcutil/bech32" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" // "github.com/renproject/multichain/chain/digibyte" "github.com/renproject/multichain/chain/dogecoin" "github.com/renproject/multichain/chain/filecoin" + "github.com/renproject/multichain/chain/harmony" "github.com/renproject/multichain/chain/terra" "github.com/renproject/multichain/chain/zcash" "github.com/renproject/pack" @@ -339,6 +343,33 @@ var _ = Describe("Multichain", func() { return multichain.RawAddress(pack.Bytes(base58.Decode(addrScriptHash.EncodeAddress()))) }, }, + { + multichain.Harmony, + func() multichain.AddressEncodeDecoder { + return harmony.NewEncoderDecoder() + }, + func() multichain.Address { + key, _ := crypto.GenerateKey() + addrBytes := crypto.PubkeyToAddress(key.PublicKey) + conv, err := bech32.ConvertBits(addrBytes.Bytes(), 8, 5, true) + Expect(err).NotTo(HaveOccurred()) + addr, err := bech32.Encode(harmony.Bech32AddressHRP, conv) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addr) + }, + func() multichain.RawAddress { + key, _ := crypto.GenerateKey() + addr := crypto.PubkeyToAddress(key.PublicKey).String() + Expect(err).NotTo(HaveOccurred()) + return common.HexToAddress(addr).Bytes() + }, + func() multichain.Address { + return multichain.Address("") + }, + func() multichain.RawAddress { + return multichain.RawAddress([]byte{}) + }, + }, } for _, chain := range chainTable { @@ -582,6 +613,53 @@ var _ = Describe("Multichain", func() { }, multichain.Filecoin, }, + { + func() (id.PrivKey, *id.PubKey, multichain.Address) { + pkEnv := os.Getenv("HARMONY_PK") + if pkEnv == "" { + panic("HARMONY_PK is undefined") + } + senderKey, err := crypto.HexToECDSA(pkEnv) + Expect(err).NotTo(HaveOccurred()) + addrBytes, err := bech32.ConvertBits(crypto.PubkeyToAddress(senderKey.PublicKey).Bytes(), 8, 5, true) + Expect(err).NotTo(HaveOccurred()) + addr, err := bech32.Encode(harmony.Bech32AddressHRP, addrBytes) + Expect(err).NotTo(HaveOccurred()) + return id.PrivKey(*senderKey), (*id.PubKey)(&senderKey.PublicKey), multichain.Address(addr) + }, + func(privKey id.PrivKey) multichain.Address { + addrBytes, err := bech32.ConvertBits(crypto.PubkeyToAddress(privKey.PublicKey).Bytes(), 8, 5, true) + Expect(err).NotTo(HaveOccurred()) + addr, err := bech32.Encode(harmony.Bech32AddressHRP, addrBytes) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(addr) + }, + "http://127.0.0.1:9598", + func() multichain.Address { + toKey, _ := crypto.GenerateKey() + toAddrBytes, err := bech32.ConvertBits(crypto.PubkeyToAddress(toKey.PublicKey).Bytes(), 8, 5, true) + Expect(err).NotTo(HaveOccurred()) + toAddr, err := bech32.Encode(harmony.Bech32AddressHRP, toAddrBytes) + Expect(err).NotTo(HaveOccurred()) + return multichain.Address(toAddr) + }, + func(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) { + client := harmony.NewClient(harmony.DefaultClientOptions()) + chainId, err := client.ChainId(ctx) + Expect(err).NotTo(HaveOccurred()) + txBuilder := harmony.NewTxBuilder(chainId) + return client, txBuilder + }, + func(client multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) { + gasLimit := uint64(80000000) + gas, err := harmony.Estimator{}.EstimateGasPrice(ctx) + Expect(err).NotTo(HaveOccurred()) + + amount := pack.NewU256FromU64(pack.NewU64(100000000)) + return amount, pack.NewU256FromU64(pack.NewU64(gasLimit)), gas, gas, pack.Bytes(nil) + }, + multichain.Harmony, + }, } for _, accountChain := range accountChainTable { @@ -1209,4 +1287,4 @@ func getPubKeyScript(pubKey pack.Bytes) (pack.Bytes, error) { return nil, fmt.Errorf("invalid pubkeyscript: %v", err) } return pubKeyScript, nil -} +} \ No newline at end of file From d8cad913bfc5e6c7113090cf1c02dd10f8c7a1c3 Mon Sep 17 00:00:00 2001 From: Soumya Ghosh Dastidar Date: Sun, 9 May 2021 15:31:14 +0530 Subject: [PATCH 295/335] increased no. of default accounts in ganache Signed-off-by: Soumya Ghosh Dastidar --- infra/binance/run.sh | 1 + infra/ethereum/run.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/infra/binance/run.sh b/infra/binance/run.sh index 2114daf0..f94c23d1 100644 --- a/infra/binance/run.sh +++ b/infra/binance/run.sh @@ -4,6 +4,7 @@ ADDRESS=$2 ganache-cli \ -h 0.0.0.0 \ + -a 105 \ -k muirGlacier \ -i 420 \ -m "$MNEMONIC" \ diff --git a/infra/ethereum/run.sh b/infra/ethereum/run.sh index bb3daf40..191a0b35 100644 --- a/infra/ethereum/run.sh +++ b/infra/ethereum/run.sh @@ -4,6 +4,7 @@ ADDRESS=$2 ganache-cli \ -h 0.0.0.0 \ + -a 105 \ -k muirGlacier \ -l 14969745 \ -i 420 \ From 2b39b967a799b7f0dd916ff9435f910cf68b5cb0 Mon Sep 17 00:00:00 2001 From: Soumya Ghosh Dastidar Date: Sun, 9 May 2021 16:13:28 +0530 Subject: [PATCH 296/335] fix formatting Signed-off-by: Soumya Ghosh Dastidar --- infra/binance/run.sh | 2 +- infra/ethereum/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/binance/run.sh b/infra/binance/run.sh index f94c23d1..6355dadf 100644 --- a/infra/binance/run.sh +++ b/infra/binance/run.sh @@ -4,7 +4,7 @@ ADDRESS=$2 ganache-cli \ -h 0.0.0.0 \ - -a 105 \ + -a 105 \ -k muirGlacier \ -i 420 \ -m "$MNEMONIC" \ diff --git a/infra/ethereum/run.sh b/infra/ethereum/run.sh index 191a0b35..4b283e7b 100644 --- a/infra/ethereum/run.sh +++ b/infra/ethereum/run.sh @@ -4,7 +4,7 @@ ADDRESS=$2 ganache-cli \ -h 0.0.0.0 \ - -a 105 \ + -a 105 \ -k muirGlacier \ -l 14969745 \ -i 420 \ From a7fdfdd9ecaf2d8742f3a3062455f7dd9e997bc2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Mon, 10 May 2021 18:24:48 +0500 Subject: [PATCH 297/335] polygon localnet infra (untested) --- infra/docker-compose.yaml | 11 ++++++++++ infra/polygon/Dockerfile | 32 ++++++++++++++++++++++++++++ infra/polygon/install-rabbitmq.sh | 35 +++++++++++++++++++++++++++++++ infra/polygon/run.sh | 3 +++ 4 files changed, 81 insertions(+) create mode 100644 infra/polygon/Dockerfile create mode 100644 infra/polygon/install-rabbitmq.sh create mode 100644 infra/polygon/run.sh diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 2a90ea13..d707574a 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -131,3 +131,14 @@ services: entrypoint: - "./root/run.sh" - "${TERRA_ADDRESS}" + + ## + ## Polygon + ## + polygon: + build: + context: ./polygon + ports: + - "0.0.0.0:28545:8545" + entrypoint: + - "./root/run.sh" diff --git a/infra/polygon/Dockerfile b/infra/polygon/Dockerfile new file mode 100644 index 00000000..3b237b82 --- /dev/null +++ b/infra/polygon/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:groovy + +# UPDATE +RUN apt update -y +RUN apt install -y build-essential git jq wget + +# INSTALL GO +RUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz +RUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin:/root/go/bin + +# INSTALL RABBITMQ +COPY install-rabbitmq.sh . +RUN chmod +x install-rabbitmq.sh +RUN /bin/bash install-rabbitmq.sh + +# INSTALL NODEJS AND NPM +RUN apt-get install -y nodejs npm + +# INSTALL DEPENDENCIES +RUN npm install -g solc@0.5.11 +RUN npm install -g ganache-cli + +# INSTALL MATIC-CLI +RUN npm install -g @maticnetwork/matic-cli + +COPY run.sh /root/run.sh +RUN chmod +x /root/run.sh + +EXPOSE 8545 + +ENTRYPOINT ["./root/run.sh"] diff --git a/infra/polygon/install-rabbitmq.sh b/infra/polygon/install-rabbitmq.sh new file mode 100644 index 00000000..ee3f19e4 --- /dev/null +++ b/infra/polygon/install-rabbitmq.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +apt-get install curl gnupg debian-keyring debian-archive-keyring apt-transport-https -y + +## Team RabbitMQ's main signing key +apt-key adv --keyserver "hkps://keys.openpgp.org" --recv-keys "0x0A9AF2115F4687BD29803A206B73A36E6026DFCA" +## Cloudsmith: modern Erlang repository +curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key | apt-key add - +## Cloudsmith: RabbitMQ repository +curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key | apt-key add - + +## Add apt repositories maintained by Team RabbitMQ +tee /etc/apt/sources.list.d/rabbitmq.list < Date: Wed, 12 May 2021 00:26:22 +0500 Subject: [PATCH 298/335] bor localnet (untested) --- infra/polygon/Dockerfile | 33 ++++---------------- infra/polygon/genesis.json | 50 +++++++++++++++++++++++++++++++ infra/polygon/install-rabbitmq.sh | 35 ---------------------- infra/polygon/nodekey | 1 + infra/polygon/run.sh | 30 ++++++++++++++++++- infra/polygon/static-nodes.json | 3 ++ 6 files changed, 89 insertions(+), 63 deletions(-) create mode 100644 infra/polygon/genesis.json delete mode 100644 infra/polygon/install-rabbitmq.sh create mode 100644 infra/polygon/nodekey create mode 100644 infra/polygon/static-nodes.json diff --git a/infra/polygon/Dockerfile b/infra/polygon/Dockerfile index 3b237b82..9411ab16 100644 --- a/infra/polygon/Dockerfile +++ b/infra/polygon/Dockerfile @@ -1,32 +1,11 @@ -FROM ubuntu:groovy - -# UPDATE -RUN apt update -y -RUN apt install -y build-essential git jq wget - -# INSTALL GO -RUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz -RUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz -ENV PATH=$PATH:/usr/local/go/bin:/root/go/bin - -# INSTALL RABBITMQ -COPY install-rabbitmq.sh . -RUN chmod +x install-rabbitmq.sh -RUN /bin/bash install-rabbitmq.sh - -# INSTALL NODEJS AND NPM -RUN apt-get install -y nodejs npm - -# INSTALL DEPENDENCIES -RUN npm install -g solc@0.5.11 -RUN npm install -g ganache-cli - -# INSTALL MATIC-CLI -RUN npm install -g @maticnetwork/matic-cli +FROM maticnetwork/bor:master COPY run.sh /root/run.sh RUN chmod +x /root/run.sh -EXPOSE 8545 +COPY genesis.json /root/.bor/genesis.json +COPY nodekey /root/.bor/nodekey +COPY static-nodes.json /root/.bor/static-nodes.json -ENTRYPOINT ["./root/run.sh"] +WORKDIR / +ENTRYPOINT [ "./root/run.sh" ] diff --git a/infra/polygon/genesis.json b/infra/polygon/genesis.json new file mode 100644 index 00000000..acf7b977 --- /dev/null +++ b/infra/polygon/genesis.json @@ -0,0 +1,50 @@ +{ + "config": { + "chainId": 15001, + "homesteadBlock": 0, + "eip150Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "muirGlacierBlock": 0, + "bor": { + "period": 1, + "producerDelay": 4, + "sprint": 64, + "backupMultiplier": 1, + "validatorContract": "0x0000000000000000000000000000000000001000", + "stateReceiverContract": "0x0000000000000000000000000000000000001001" + } + }, + "nonce": "0x0", + "timestamp": "0x5ce28211", + "extraData": "", + "gasLimit": "0x989680", + "difficulty": "0x1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "0000000000000000000000000000000000001000": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106101f05760003560e01c806360c8614d1161010f578063af26aa96116100a2578063d5b844eb11610071578063d5b844eb14610666578063dcf2793a14610684578063e3b7c924146106b6578063f59cf565146106d4576101f0565b8063af26aa96146105c7578063b71d7a69146105e7578063b7ab4db514610617578063c1b3c91914610636576101f0565b806370ba5707116100de57806370ba57071461052b57806398ab2b621461055b5780639d11b80714610579578063ae756451146105a9576101f0565b806360c8614d1461049c57806365b3a1e2146104bc57806366332354146104db578063687a9bd6146104f9576101f0565b80633434735f1161018757806344d6528f1161015657806344d6528f146103ee5780634dbc959f1461041e57806355614fcc1461043c578063582a8d081461046c576101f0565b80633434735f1461035257806335ddfeea1461037057806343ee8213146103a057806344c15cb1146103be576101f0565b806323f2a73f116101c357806323f2a73f146102a45780632bc06564146102d45780632de3a180146102f25780632eddf35214610322576101f0565b8063047a6c5b146101f55780630c35b1cb146102275780631270b5741461025857806323c2a2b414610288575b600080fd5b61020f600480360361020a9190810190612944565b610706565b60405161021e93929190613283565b60405180910390f35b610241600480360361023c9190810190612944565b61075d565b60405161024f9291906130a4565b60405180910390f35b610272600480360361026d919081019061296d565b610939565b60405161027f91906130db565b60405180910390f35b6102a2600480360361029d9190810190612a4c565b610a91565b005b6102be60048036036102b9919081019061296d565b61112a565b6040516102cb91906130db565b60405180910390f35b6102dc611281565b6040516102e99190613231565b60405180910390f35b61030c600480360361030791908101906128a1565b611286565b60405161031991906130f6565b60405180910390f35b61033c60048036036103379190810190612944565b611307565b6040516103499190613231565b60405180910390f35b61035a611437565b6040516103679190613089565b60405180910390f35b61038a600480360361038591908101906128dd565b61144f565b60405161039791906130db565b60405180910390f35b6103a861151a565b6040516103b591906130f6565b60405180910390f35b6103d860048036036103d391908101906129a9565b611531565b6040516103e59190613231565b60405180910390f35b6104086004803603610403919081019061296d565b611619565b6040516104159190613216565b60405180910390f35b610426611781565b6040516104339190613231565b60405180910390f35b61045660048036036104519190810190612826565b611791565b60405161046391906130db565b60405180910390f35b6104866004803603610481919081019061284f565b6117ab565b60405161049391906130f6565b60405180910390f35b6104a4611829565b6040516104b393929190613283565b60405180910390f35b6104c461189d565b6040516104d29291906130a4565b60405180910390f35b6104e361198e565b6040516104f09190613231565b60405180910390f35b610513600480360361050e9190810190612a10565b611993565b6040516105229392919061324c565b60405180910390f35b61054560048036036105409190810190612826565b6119f7565b60405161055291906130db565b60405180910390f35b610563611a11565b60405161057091906130f6565b60405180910390f35b610593600480360361058e9190810190612944565b611a28565b6040516105a09190613231565b60405180910390f35b6105b1611b59565b6040516105be91906130f6565b60405180910390f35b6105cf611b70565b6040516105de93929190613283565b60405180910390f35b61060160048036036105fc9190810190612944565b611bd1565b60405161060e9190613231565b60405180910390f35b61061f611cd1565b60405161062d9291906130a4565b60405180910390f35b610650600480360361064b9190810190612944565b611ce5565b60405161065d9190613231565b60405180910390f35b61066e611d06565b60405161067b91906132ba565b60405180910390f35b61069e60048036036106999190810190612a10565b611d0b565b6040516106ad9392919061324c565b60405180910390f35b6106be611d6f565b6040516106cb9190613231565b60405180910390f35b6106ee60048036036106e99190810190612944565b611d81565b6040516106fd93929190613283565b60405180910390f35b60008060006002600085815260200190815260200160002060000154600260008681526020019081526020016000206001015460026000878152602001908152602001600020600201549250925092509193909250565b60608060ff83116107795761077061189d565b91509150610934565b600061078484611bd1565b9050606060016000838152602001908152602001600020805490506040519080825280602002602001820160405280156107cd5781602001602082028038833980820191505090505b509050606060016000848152602001908152602001600020805490506040519080825280602002602001820160405280156108175781602001602082028038833980820191505090505b50905060008090505b60016000858152602001908152602001600020805490508110156109295760016000858152602001908152602001600020818154811061085c57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683828151811061089a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001600085815260200190815260200160002081815481106108f257fe5b90600052602060002090600302016001015482828151811061091057fe5b6020026020010181815250508080600101915050610820565b508181945094505050505b915091565b6000606060016000858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610a0c578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190610970565b50505050905060008090505b8151811015610a84578373ffffffffffffffffffffffffffffffffffffffff16828281518110610a4457fe5b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff161415610a7757600192505050610a8b565b8080600101915050610a18565b5060009150505b92915050565b73fffffffffffffffffffffffffffffffffffffffe73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0a906131f6565b60405180910390fd5b6000610b1d611781565b90506000811415610b3157610b30611dab565b5b610b456001826120cc90919063ffffffff16565b8814610b86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7d90613176565b60405180910390fd5b868611610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf906131d6565b60405180910390fd5b6000604060018989030181610bd957fe5b0614610c1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c11906131b6565b60405180910390fd5b8660026000838152602001908152602001600020600101541115610c73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6a90613156565b60405180910390fd5b6000600260008a81526020019081526020016000206000015414610ccc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc390613196565b60405180910390fd5b604051806060016040528089815260200188815260200187815250600260008a8152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050600388908060018154018082558091505090600182039060005260206000200160009091929091909150555060008060008a815260200190815260200160002081610d669190612620565b506000600160008a815260200190815260200160002081610d879190612620565b506060610ddf610dda87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506120eb565b612119565b905060008090505b8151811015610f51576060610e0e838381518110610e0157fe5b6020026020010151612119565b90506000808c81526020019081526020016000208054809190600101610e349190612620565b506040518060600160405280610e5d83600081518110610e5057fe5b60200260200101516121f6565b8152602001610e7f83600181518110610e7257fe5b60200260200101516121f6565b8152602001610ea183600281518110610e9457fe5b6020026020010151612267565b73ffffffffffffffffffffffffffffffffffffffff168152506000808d81526020019081526020016000208381548110610ed757fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050508080600101915050610de7565b506060610fa9610fa486868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506120eb565b612119565b905060008090505b815181101561111d576060610fd8838381518110610fcb57fe5b6020026020010151612119565b9050600160008d81526020019081526020016000208054809190600101610fff9190612620565b5060405180606001604052806110288360008151811061101b57fe5b60200260200101516121f6565b815260200161104a8360018151811061103d57fe5b60200260200101516121f6565b815260200161106c8360028151811061105f57fe5b6020026020010151612267565b73ffffffffffffffffffffffffffffffffffffffff16815250600160008e815260200190815260200160002083815481106110a357fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050508080600101915050610fb1565b5050505050505050505050565b60006060600080858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156111fc578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190611160565b50505050905060008090505b8151811015611274578373ffffffffffffffffffffffffffffffffffffffff1682828151811061123457fe5b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1614156112675760019250505061127b565b8080600101915050611208565b5060009150505b92915050565b604081565b60006002600160f81b84846040516020016112a393929190612ff6565b6040516020818303038152906040526040516112bf9190613033565b602060405180830381855afa1580156112dc573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506112ff9190810190612878565b905092915050565b60006060600080848152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156113d9578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250508152602001906001019061133d565b505050509050600080905060008090505b825181101561142c5761141d83828151811061140257fe5b602002602001015160200151836120cc90919063ffffffff16565b915080806001019150506113ea565b508092505050919050565b73fffffffffffffffffffffffffffffffffffffffe81565b600080600080859050600060218087518161146657fe5b04029050600081111561147f5761147c876117ab565b91505b6000602190505b818111611509576000600182038801519050818801519550806000602081106114ab57fe5b1a60f81b9450600060f81b857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156114f0576114e98685611286565b93506114fd565b6114fa8487611286565b93505b50602181019050611486565b508782149450505050509392505050565b6040516115269061305f565b604051809103902081565b60008060009050600080905060008090505b84518167ffffffffffffffff16101561160c57606061156e868367ffffffffffffffff16604161228a565b90506000611585828961231690919063ffffffff16565b905061158f612652565b6115998a83611619565b90506115a58a8361112a565b80156115dc57508473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16115b156115fe578194506115fb8160200151876120cc90919063ffffffff16565b95505b505050604181019050611543565b5081925050509392505050565b611621612652565b6060600080858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156116f1578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190611655565b50505050905060008090505b8151811015611779578373ffffffffffffffffffffffffffffffffffffffff1682828151811061172957fe5b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff16141561176c5781818151811061175d57fe5b60200260200101519250611779565b80806001019150506116fd565b505092915050565b600061178c43611bd1565b905090565b60006117a461179e611781565b8361112a565b9050919050565b60006002600060f81b836040516020016117c6929190612fca565b6040516020818303038152906040526040516117e29190613033565b602060405180830381855afa1580156117ff573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506118229190810190612878565b9050919050565b60008060008061184a600161183c611781565b6120cc90919063ffffffff16565b905060026000828152602001908152602001600020600001546002600083815260200190815260200160002060010154600260008481526020019081526020016000206002015493509350935050909192565b606080606060016040519080825280602002602001820160405280156118d25781602001602082028038833980820191505090505b50905073bf7a416377ed8f1f745a739c8ff59094eb2fefd2816000815181106118f757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050606060016040519080825280602002602001820160405280156119635781602001602082028038833980820191505090505b5090506127108160008151811061197657fe5b60200260200101818152505081819350935050509091565b60ff81565b600160205281600052604060002081815481106119ac57fe5b9060005260206000209060030201600091509150508060000154908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b6000611a0a611a04611781565b83610939565b9050919050565b604051611a1d9061304a565b604051809103902081565b6000606060016000848152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611afb578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190611a5f565b505050509050600080905060008090505b8251811015611b4e57611b3f838281518110611b2457fe5b602002602001015160200151836120cc90919063ffffffff16565b91508080600101915050611b0c565b508092505050919050565b604051611b6590613074565b604051809103902081565b600080600080611b7e611781565b905060026000828152602001908152602001600020600001546002600083815260200190815260200160002060010154600260008481526020019081526020016000206002015493509350935050909192565b60008060038054905090505b6000811115611c9157611bee612689565b6002600060036001850381548110611c0257fe5b906000526020600020015481526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282015481525050905083816020015111158015611c5f57506000816040015114155b8015611c6f575080604001518411155b15611c8257806000015192505050611ccc565b50808060019003915050611bdd565b5060006003805490501115611cc757600360016003805490500381548110611cb557fe5b90600052602060002001549050611ccc565b600090505b919050565b606080611cdd4361075d565b915091509091565b60038181548110611cf257fe5b906000526020600020016000915090505481565b600281565b60006020528160005260406000208181548110611d2457fe5b9060005260206000209060030201600091509150508060000154908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b600060404381611d7b57fe5b04905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b606080611db661189d565b8092508193505050600080905060405180606001604052808281526020016000815260200160ff815250600260008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506003819080600181540180825580915050906001820390600052602060002001600090919290919091505550600080600083815260200190815260200160002081611e5f9190612620565b5060006001600083815260200190815260200160002081611e809190612620565b5060008090505b8351811015611fa2576000808381526020019081526020016000208054809190600101611eb49190612620565b506040518060600160405280828152602001848381518110611ed257fe5b60200260200101518152602001858381518110611eeb57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168152506000808481526020019081526020016000208281548110611f2957fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508080600101915050611e87565b5060008090505b83518110156120c657600160008381526020019081526020016000208054809190600101611fd79190612620565b506040518060600160405280828152602001848381518110611ff557fe5b6020026020010151815260200185838151811061200e57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681525060016000848152602001908152602001600020828154811061204d57fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508080600101915050611fa9565b50505050565b6000808284019050838110156120e157600080fd5b8091505092915050565b6120f36126aa565b600060208301905060405180604001604052808451815260200182815250915050919050565b606061212482612420565b61212d57600080fd5b60006121388361246e565b905060608160405190808252806020026020018201604052801561217657816020015b6121636126c4565b81526020019060019003908161215b5790505b509050600061218885602001516124df565b8560200151019050600080600090505b848110156121e9576121a983612568565b91506040518060400160405280838152602001848152508482815181106121cc57fe5b602002602001018190525081830192508080600101915050612198565b5082945050505050919050565b600080826000015111801561221057506021826000015111155b61221957600080fd5b600061222883602001516124df565b9050600081846000015103905060008083866020015101905080519150602083101561225b57826020036101000a820491505b81945050505050919050565b6000601582600001511461227a57600080fd5b612283826121f6565b9050919050565b60608183018451101561229c57600080fd5b60608215600081146122b95760405191506020820160405261230a565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156122f757805183526020830192506020810190506122da565b50868552601f19601f8301166040525050505b50809150509392505050565b6000806000806041855114612331576000935050505061241a565b602085015192506040850151915060ff6041860151169050601b8160ff16101561235c57601b810190505b601b8160ff16141580156123745750601c8160ff1614155b15612385576000935050505061241a565b6000600187838686604051600081526020016040526040516123aa9493929190613111565b6020604051602081039080840390855afa1580156123cc573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561241257600080fd5b809450505050505b92915050565b600080826000015114156124375760009050612469565b60008083602001519050805160001a915060c060ff168260ff16101561246257600092505050612469565b6001925050505b919050565b6000808260000151141561248557600090506124da565b6000809050600061249984602001516124df565b84602001510190506000846000015185602001510190505b808210156124d3576124c282612568565b8201915082806001019350506124b1565b8293505050505b919050565b600080825160001a9050608060ff168110156124ff576000915050612563565b60b860ff16811080612524575060c060ff168110158015612523575060f860ff1681105b5b15612533576001915050612563565b60c060ff168110156125535760018060b80360ff16820301915050612563565b60018060f80360ff168203019150505b919050565b6000806000835160001a9050608060ff168110156125895760019150612616565b60b860ff168110156125a6576001608060ff168203019150612615565b60c060ff168110156125d65760b78103600185019450806020036101000a85510460018201810193505050612614565b60f860ff168110156125f357600160c060ff168203019150612613565b60f78103600185019450806020036101000a855104600182018101935050505b5b5b5b8192505050919050565b81548183558181111561264d5760030281600302836000526020600020918201910161264c91906126de565b5b505050565b60405180606001604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b60405180606001604052806000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b604051806040016040528060008152602001600081525090565b61273191905b8082111561272d5760008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506003016126e4565b5090565b90565b600081359050612743816134b3565b92915050565b600081359050612758816134ca565b92915050565b60008151905061276d816134ca565b92915050565b60008083601f84011261278557600080fd5b8235905067ffffffffffffffff81111561279e57600080fd5b6020830191508360018202830111156127b657600080fd5b9250929050565b600082601f8301126127ce57600080fd5b81356127e16127dc82613302565b6132d5565b915080825260208301602083018583830111156127fd57600080fd5b61280883828461345d565b50505092915050565b600081359050612820816134e1565b92915050565b60006020828403121561283857600080fd5b600061284684828501612734565b91505092915050565b60006020828403121561286157600080fd5b600061286f84828501612749565b91505092915050565b60006020828403121561288a57600080fd5b60006128988482850161275e565b91505092915050565b600080604083850312156128b457600080fd5b60006128c285828601612749565b92505060206128d385828601612749565b9150509250929050565b6000806000606084860312156128f257600080fd5b600061290086828701612749565b935050602061291186828701612749565b925050604084013567ffffffffffffffff81111561292e57600080fd5b61293a868287016127bd565b9150509250925092565b60006020828403121561295657600080fd5b600061296484828501612811565b91505092915050565b6000806040838503121561298057600080fd5b600061298e85828601612811565b925050602061299f85828601612734565b9150509250929050565b6000806000606084860312156129be57600080fd5b60006129cc86828701612811565b93505060206129dd86828701612749565b925050604084013567ffffffffffffffff8111156129fa57600080fd5b612a06868287016127bd565b9150509250925092565b60008060408385031215612a2357600080fd5b6000612a3185828601612811565b9250506020612a4285828601612811565b9150509250929050565b600080600080600080600060a0888a031215612a6757600080fd5b6000612a758a828b01612811565b9750506020612a868a828b01612811565b9650506040612a978a828b01612811565b955050606088013567ffffffffffffffff811115612ab457600080fd5b612ac08a828b01612773565b9450945050608088013567ffffffffffffffff811115612adf57600080fd5b612aeb8a828b01612773565b925092505092959891949750929550565b6000612b088383612b2c565b60208301905092915050565b6000612b208383612f9d565b60208301905092915050565b612b35816133d2565b82525050565b612b44816133d2565b82525050565b6000612b558261334e565b612b5f8185613389565b9350612b6a8361332e565b8060005b83811015612b9b578151612b828882612afc565b9750612b8d8361336f565b925050600181019050612b6e565b5085935050505092915050565b6000612bb382613359565b612bbd818561339a565b9350612bc88361333e565b8060005b83811015612bf9578151612be08882612b14565b9750612beb8361337c565b925050600181019050612bcc565b5085935050505092915050565b612c0f816133e4565b82525050565b612c26612c21826133f0565b61349f565b82525050565b612c358161341c565b82525050565b612c4c612c478261341c565b6134a9565b82525050565b6000612c5d82613364565b612c6781856133ab565b9350612c7781856020860161346c565b80840191505092915050565b6000612c906004836133c7565b91507f766f7465000000000000000000000000000000000000000000000000000000006000830152600482019050919050565b6000612cd0602d836133b6565b91507f537461727420626c6f636b206d7573742062652067726561746572207468616e60008301527f2063757272656e74207370616e000000000000000000000000000000000000006020830152604082019050919050565b6000612d36600f836133b6565b91507f496e76616c6964207370616e20696400000000000000000000000000000000006000830152602082019050919050565b6000612d766013836133b6565b91507f5370616e20616c726561647920657869737473000000000000000000000000006000830152602082019050919050565b6000612db66045836133b6565b91507f446966666572656e6365206265747765656e20737461727420616e6420656e6460008301527f20626c6f636b206d75737420626520696e206d756c7469706c6573206f66207360208301527f7072696e740000000000000000000000000000000000000000000000000000006040830152606082019050919050565b6000612e42602a836133b6565b91507f456e6420626c6f636b206d7573742062652067726561746572207468616e207360008301527f7461727420626c6f636b000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ea8600e836133c7565b91507f6865696d64616c6c2d31353030310000000000000000000000000000000000006000830152600e82019050919050565b6000612ee86005836133c7565b91507f31353030310000000000000000000000000000000000000000000000000000006000830152600582019050919050565b6000612f286012836133b6565b91507f4e6f742053797374656d204164646573732100000000000000000000000000006000830152602082019050919050565b606082016000820151612f716000850182612f9d565b506020820151612f846020850182612f9d565b506040820151612f976040850182612b2c565b50505050565b612fa681613446565b82525050565b612fb581613446565b82525050565b612fc481613450565b82525050565b6000612fd68285612c15565b600182019150612fe68284612c3b565b6020820191508190509392505050565b60006130028286612c15565b6001820191506130128285612c3b565b6020820191506130228284612c3b565b602082019150819050949350505050565b600061303f8284612c52565b915081905092915050565b600061305582612c83565b9150819050919050565b600061306a82612e9b565b9150819050919050565b600061307f82612edb565b9150819050919050565b600060208201905061309e6000830184612b3b565b92915050565b600060408201905081810360008301526130be8185612b4a565b905081810360208301526130d28184612ba8565b90509392505050565b60006020820190506130f06000830184612c06565b92915050565b600060208201905061310b6000830184612c2c565b92915050565b60006080820190506131266000830187612c2c565b6131336020830186612fbb565b6131406040830185612c2c565b61314d6060830184612c2c565b95945050505050565b6000602082019050818103600083015261316f81612cc3565b9050919050565b6000602082019050818103600083015261318f81612d29565b9050919050565b600060208201905081810360008301526131af81612d69565b9050919050565b600060208201905081810360008301526131cf81612da9565b9050919050565b600060208201905081810360008301526131ef81612e35565b9050919050565b6000602082019050818103600083015261320f81612f1b565b9050919050565b600060608201905061322b6000830184612f5b565b92915050565b60006020820190506132466000830184612fac565b92915050565b60006060820190506132616000830186612fac565b61326e6020830185612fac565b61327b6040830184612b3b565b949350505050565b60006060820190506132986000830186612fac565b6132a56020830185612fac565b6132b26040830184612fac565b949350505050565b60006020820190506132cf6000830184612fbb565b92915050565b6000604051905081810181811067ffffffffffffffff821117156132f857600080fd5b8060405250919050565b600067ffffffffffffffff82111561331957600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006133dd82613426565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b8381101561348a57808201518184015260208101905061346f565b83811115613499576000848401525b50505050565b6000819050919050565b6000819050919050565b6134bc816133d2565b81146134c757600080fd5b50565b6134d38161341c565b81146134de57600080fd5b50565b6134ea81613446565b81146134f557600080fd5b5056fea365627a7a72315820421f0e2879cc0d2332ed8ec9bd7d2e5227bba908a312849a3318dfaf3b5bd3106c6578706572696d656e74616cf564736f6c634300050b0040" + }, + "0000000000000000000000000000000000001001": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806319494a17146100465780633434735f146100e15780635407ca671461012b575b600080fd5b6100c76004803603604081101561005c57600080fd5b81019080803590602001909291908035906020019064010000000081111561008357600080fd5b82018360208201111561009557600080fd5b803590602001918460018302840111640100000000831117156100b757600080fd5b9091929391929390505050610149565b604051808215151515815260200191505060405180910390f35b6100e961047a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610133610492565b6040518082815260200191505060405180910390f35b600073fffffffffffffffffffffffffffffffffffffffe73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610200576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4e6f742053797374656d2041646465737321000000000000000000000000000081525060200191505060405180910390fd5b606061025761025285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610498565b6104c6565b905060006102788260008151811061026b57fe5b60200260200101516105a3565b905080600160005401146102f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f537461746549647320617265206e6f742073657175656e7469616c000000000081525060200191505060405180910390fd5b600080815480929190600101919050555060006103248360018151811061031757fe5b6020026020010151610614565b905060606103458460028151811061033857fe5b6020026020010151610637565b9050610350826106c3565b1561046f576000624c4b409050606084836040516024018083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103aa57808201518184015260208101905061038f565b50505050905090810190601f1680156103d75780820380516001836020036101000a031916815260200191505b5093505050506040516020818303038152906040527f26c53bea000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008082516020840160008887f1965050505b505050509392505050565b73fffffffffffffffffffffffffffffffffffffffe81565b60005481565b6104a0610943565b600060208301905060405180604001604052808451815260200182815250915050919050565b60606104d1826106dc565b6104da57600080fd5b60006104e58361072a565b905060608160405190808252806020026020018201604052801561052357816020015b61051061095d565b8152602001906001900390816105085790505b5090506000610535856020015161079b565b8560200151019050600080600090505b848110156105965761055683610824565b915060405180604001604052808381526020018481525084828151811061057957fe5b602002602001018190525081830192508080600101915050610545565b5082945050505050919050565b60008082600001511180156105bd57506021826000015111155b6105c657600080fd5b60006105d5836020015161079b565b9050600081846000015103905060008083866020015101905080519150602083101561060857826020036101000a820491505b81945050505050919050565b6000601582600001511461062757600080fd5b610630826105a3565b9050919050565b6060600082600001511161064a57600080fd5b6000610659836020015161079b565b905060008184600001510390506060816040519080825280601f01601f19166020018201604052801561069b5781602001600182028038833980820191505090505b50905060008160200190506106b78487602001510182856108dc565b81945050505050919050565b600080823b905060008163ffffffff1611915050919050565b600080826000015114156106f35760009050610725565b60008083602001519050805160001a915060c060ff168260ff16101561071e57600092505050610725565b6001925050505b919050565b600080826000015114156107415760009050610796565b60008090506000610755846020015161079b565b84602001510190506000846000015185602001510190505b8082101561078f5761077e82610824565b82019150828060010193505061076d565b8293505050505b919050565b600080825160001a9050608060ff168110156107bb57600091505061081f565b60b860ff168110806107e0575060c060ff1681101580156107df575060f860ff1681105b5b156107ef57600191505061081f565b60c060ff1681101561080f5760018060b80360ff1682030191505061081f565b60018060f80360ff168203019150505b919050565b6000806000835160001a9050608060ff1681101561084557600191506108d2565b60b860ff16811015610862576001608060ff1682030191506108d1565b60c060ff168110156108925760b78103600185019450806020036101000a855104600182018101935050506108d0565b60f860ff168110156108af57600160c060ff1682030191506108cf565b60f78103600185019450806020036101000a855104600182018101935050505b5b5b5b8192505050919050565b60008114156108ea5761093e565b5b602060ff16811061091a5782518252602060ff1683019250602060ff1682019150602060ff16810390506108eb565b6000600182602060ff16036101000a03905080198451168184511681811785525050505b505050565b604051806040016040528060008152602001600081525090565b60405180604001604052806000815260200160008152509056fea265627a7a7231582083fbdacb76f32b4112d0f7db9a596937925824798a0026ba0232322390b5263764736f6c634300050b0032" + }, + "0000000000000000000000000000000000001010": { + "balance": "0x204fce28085b549b31600000", + "code": "0x60806040526004361061019c5760003560e01c806377d32e94116100ec578063acd06cb31161008a578063e306f77911610064578063e306f77914610a7b578063e614d0d614610aa6578063f2fde38b14610ad1578063fc0c546a14610b225761019c565b8063acd06cb31461097a578063b789543c146109cd578063cc79f97b14610a505761019c565b80639025e64c116100c65780639025e64c146107c957806395d89b4114610859578063a9059cbb146108e9578063abceeba21461094f5761019c565b806377d32e94146106315780638da5cb5b146107435780638f32d59b1461079a5761019c565b806347e7ef24116101595780637019d41a116101335780637019d41a1461053357806370a082311461058a578063715018a6146105ef578063771282f6146106065761019c565b806347e7ef2414610410578063485cc9551461046b57806360f96a8f146104dc5761019c565b806306fdde03146101a15780631499c5921461023157806318160ddd1461028257806319d27d9c146102ad5780632e1a7d4d146103b1578063313ce567146103df575b600080fd5b3480156101ad57600080fd5b506101b6610b79565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101f65780820151818401526020810190506101db565b50505050905090810190601f1680156102235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023d57600080fd5b506102806004803603602081101561025457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb6565b005b34801561028e57600080fd5b50610297610c24565b6040518082815260200191505060405180910390f35b3480156102b957600080fd5b5061036f600480360360a08110156102d057600080fd5b81019080803590602001906401000000008111156102ed57600080fd5b8201836020820111156102ff57600080fd5b8035906020019184600183028401116401000000008311171561032157600080fd5b9091929391929390803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103dd600480360360208110156103c757600080fd5b8101908080359060200190929190505050610e06565b005b3480156103eb57600080fd5b506103f4610f58565b604051808260ff1660ff16815260200191505060405180910390f35b34801561041c57600080fd5b506104696004803603604081101561043357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f61565b005b34801561047757600080fd5b506104da6004803603604081101561048e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061111d565b005b3480156104e857600080fd5b506104f16111ec565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561053f57600080fd5b50610548611212565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561059657600080fd5b506105d9600480360360208110156105ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611238565b6040518082815260200191505060405180910390f35b3480156105fb57600080fd5b50610604611259565b005b34801561061257600080fd5b5061061b611329565b6040518082815260200191505060405180910390f35b34801561063d57600080fd5b506107016004803603604081101561065457600080fd5b81019080803590602001909291908035906020019064010000000081111561067b57600080fd5b82018360208201111561068d57600080fd5b803590602001918460018302840111640100000000831117156106af57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061132f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561074f57600080fd5b506107586114b4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107a657600080fd5b506107af6114dd565b604051808215151515815260200191505060405180910390f35b3480156107d557600080fd5b506107de611534565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561081e578082015181840152602081019050610803565b50505050905090810190601f16801561084b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561086557600080fd5b5061086e61156d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108ae578082015181840152602081019050610893565b50505050905090810190601f1680156108db5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610935600480360360408110156108ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506115aa565b604051808215151515815260200191505060405180910390f35b34801561095b57600080fd5b506109646115d0565b6040518082815260200191505060405180910390f35b34801561098657600080fd5b506109b36004803603602081101561099d57600080fd5b810190808035906020019092919050505061165d565b604051808215151515815260200191505060405180910390f35b3480156109d957600080fd5b50610a3a600480360360808110156109f057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061167d565b6040518082815260200191505060405180910390f35b348015610a5c57600080fd5b50610a6561169d565b6040518082815260200191505060405180910390f35b348015610a8757600080fd5b50610a906116a3565b6040518082815260200191505060405180910390f35b348015610ab257600080fd5b50610abb6116a9565b6040518082815260200191505060405180910390f35b348015610add57600080fd5b50610b2060048036036020811015610af457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611736565b005b348015610b2e57600080fd5b50610b37611753565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60606040518060400160405280600b81526020017f4d6174696320546f6b656e000000000000000000000000000000000000000000815250905090565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f44697361626c656420666561747572650000000000000000000000000000000081525060200191505060405180910390fd5b6000601260ff16600a0a6402540be40002905090565b6000808511610c4857600080fd5b6000831480610c575750824311155b610cc9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5369676e6174757265206973206578706972656400000000000000000000000081525060200191505060405180910390fd5b6000610cd73387878761167d565b9050600015156005600083815260200190815260200160002060009054906101000a900460ff16151514610d73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f536967206465616374697661746564000000000000000000000000000000000081525060200191505060405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff021916908315150217905550610ded8189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061132f565b9150610dfa828488611779565b50509695505050505050565b60003390506000610e1682611238565b9050610e2d83600654611b3690919063ffffffff16565b600681905550600083118015610e4257508234145b610eb4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420616d6f756e740000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167febff2602b3f468259e1e99f613fed6691f3a6526effe6ef3e768ba7ae7a36c4f8584610f3087611238565b60405180848152602001838152602001828152602001935050505060405180910390a3505050565b60006012905090565b610f696114dd565b610f7257600080fd5b600081118015610faf5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b611004576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f046023913960400191505060405180910390fd5b600061100f83611238565b905060008390508073ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f1935050505015801561105c573d6000803e3d6000fd5b5061107283600654611b5690919063ffffffff16565b6006819055508373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f4e2ca0515ed1aef1395f66b5303bb5d6f1bf9d61a353fa53f73f8ac9973fa9f685856110f489611238565b60405180848152602001838152602001828152602001935050505060405180910390a350505050565b600760009054906101000a900460ff1615611183576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611ee16023913960400191505060405180910390fd5b6001600760006101000a81548160ff02191690831515021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506111e882611b75565b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b6112616114dd565b61126a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60065481565b600080600080604185511461134a57600093505050506114ae565b602085015192506040850151915060ff6041860151169050601b8160ff16101561137557601b810190505b601b8160ff161415801561138d5750601c8160ff1614155b1561139e57600093505050506114ae565b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156113fb573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156114aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4572726f7220696e2065637265636f766572000000000000000000000000000081525060200191505060405180910390fd5b5050505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b6040518060400160405280600281526020017f3a9900000000000000000000000000000000000000000000000000000000000081525081565b60606040518060400160405280600581526020017f4d41544943000000000000000000000000000000000000000000000000000000815250905090565b60008134146115bc57600090506115ca565b6115c7338484611779565b90505b92915050565b6040518060800160405280605b8152602001611f79605b91396040516020018082805190602001908083835b6020831061161f57805182526020820191506020810190506020830392506115fc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012081565b60056020528060005260406000206000915054906101000a900460ff1681565b600061169361168e86868686611c6d565b611d43565b9050949350505050565b613a9981565b60015481565b604051806080016040528060528152602001611f27605291396040516020018082805190602001908083835b602083106116f857805182526020820191506020810190506020830392506116d5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012081565b61173e6114dd565b61174757600080fd5b61175081611b75565b50565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000803073ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156117f957600080fd5b505afa15801561180d573d6000803e3d6000fd5b505050506040513d602081101561182357600080fd5b8101908080519060200190929190505050905060003073ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156118b557600080fd5b505afa1580156118c9573d6000803e3d6000fd5b505050506040513d60208110156118df57600080fd5b810190808051906020019092919050505090506118fd868686611d8d565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c48786863073ffffffffffffffffffffffffffffffffffffffff166370a082318e6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a0557600080fd5b505afa158015611a19573d6000803e3d6000fd5b505050506040513d6020811015611a2f57600080fd5b81019080805190602001909291905050503073ffffffffffffffffffffffffffffffffffffffff166370a082318e6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611abd57600080fd5b505afa158015611ad1573d6000803e3d6000fd5b505050506040513d6020811015611ae757600080fd5b8101908080519060200190929190505050604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a46001925050509392505050565b600082821115611b4557600080fd5b600082840390508091505092915050565b600080828401905083811015611b6b57600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611baf57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806040518060800160405280605b8152602001611f79605b91396040516020018082805190602001908083835b60208310611cbf5780518252602082019150602081019050602083039250611c9c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905060405181815273ffffffffffffffffffffffffffffffffffffffff8716602082015285604082015284606082015283608082015260a0812092505081915050949350505050565b60008060015490506040517f190100000000000000000000000000000000000000000000000000000000000081528160028201528360228201526042812092505081915050919050565b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611e2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f63616e27742073656e6420746f204d524332300000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e75573d6000803e3d6000fd5b508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350505056fe54686520636f6e747261637420697320616c726561647920696e697469616c697a6564496e73756666696369656e7420616d6f756e74206f7220696e76616c69642075736572454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429546f6b656e5472616e736665724f726465722861646472657373207370656e6465722c75696e7432353620746f6b656e49644f72416d6f756e742c6279746573333220646174612c75696e743235362065787069726174696f6e29a265627a7a72315820bb602c3c6bcd412ef9bc4b050494e16a2ec21725618669ec9857d8853ab3333a64736f6c634300050b0032" + }, + "bf7A416377ed8f1F745A739C8ff59094EB2FEFD2": { + "balance": "0x3635c9adc5dea00000" + } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" +} diff --git a/infra/polygon/install-rabbitmq.sh b/infra/polygon/install-rabbitmq.sh deleted file mode 100644 index ee3f19e4..00000000 --- a/infra/polygon/install-rabbitmq.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -apt-get install curl gnupg debian-keyring debian-archive-keyring apt-transport-https -y - -## Team RabbitMQ's main signing key -apt-key adv --keyserver "hkps://keys.openpgp.org" --recv-keys "0x0A9AF2115F4687BD29803A206B73A36E6026DFCA" -## Cloudsmith: modern Erlang repository -curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key | apt-key add - -## Cloudsmith: RabbitMQ repository -curl -1sLf https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-server/gpg.9F4587F226208342.key | apt-key add - - -## Add apt repositories maintained by Team RabbitMQ -tee /etc/apt/sources.list.d/rabbitmq.list < /root/logs/bor.log 2>&1 & +tail -f /root/logs/bor.log diff --git a/infra/polygon/static-nodes.json b/infra/polygon/static-nodes.json new file mode 100644 index 00000000..8bc7c7d7 --- /dev/null +++ b/infra/polygon/static-nodes.json @@ -0,0 +1,3 @@ +[ + "enode://344282ecde713de509be84a6aa0e65d2b36c9a8475373ef0b62dc3e086eacf4b58083c65eaf039f1097d80048699643a05aeea215afe97c27170346501f16fac@172.20.1.100:30303" +] From 46b02aad120ebbe79402f619ec9b85acd795dbe1 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 12 May 2021 09:32:45 +0500 Subject: [PATCH 299/335] fix: polygon localnet --- infra/polygon/Dockerfile | 4 +++- infra/polygon/json-keystore | 21 +++++++++++++++++++++ infra/polygon/password.txt | 1 + infra/polygon/run.sh | 9 ++++----- 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 infra/polygon/json-keystore create mode 100644 infra/polygon/password.txt diff --git a/infra/polygon/Dockerfile b/infra/polygon/Dockerfile index 9411ab16..e7dbb040 100644 --- a/infra/polygon/Dockerfile +++ b/infra/polygon/Dockerfile @@ -3,9 +3,11 @@ FROM maticnetwork/bor:master COPY run.sh /root/run.sh RUN chmod +x /root/run.sh +RUN mkdir -p /root/.bor/keystore COPY genesis.json /root/.bor/genesis.json COPY nodekey /root/.bor/nodekey COPY static-nodes.json /root/.bor/static-nodes.json +COPY json-keystore /root/.bor/keystore/UTC--2021-05-11T14-27-08.753Z--0xbf7A416377ed8f1F745A739C8ff59094EB2FEFD2 +COPY password.txt /root/.bor/password.txt -WORKDIR / ENTRYPOINT [ "./root/run.sh" ] diff --git a/infra/polygon/json-keystore b/infra/polygon/json-keystore new file mode 100644 index 00000000..b4cd5507 --- /dev/null +++ b/infra/polygon/json-keystore @@ -0,0 +1,21 @@ +{ + "version": 3, + "id": "6f3e9ee2-0db1-464b-8977-3d6dab963efa", + "address": "bf7a416377ed8f1f745a739c8ff59094eb2fefd2", + "crypto": { + "ciphertext": "8bce0b16e5b34d3cf5f9090e49253450e39f8c56a2e7344514e9d81b1db51c0b", + "cipherparams": { + "iv": "df9eaeaedbf9ee8c29c1416db77abaff" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "b30d9d712a504e7c96d4331b351b38ce5e121b6d4d33290345ab2def479fb408", + "n": 8192, + "r": 8, + "p": 1 + }, + "mac": "b5465c6825699d4e441454cba0e8cc508c07438077c359ab0ca516ace51f0218" + } +} diff --git a/infra/polygon/password.txt b/infra/polygon/password.txt new file mode 100644 index 00000000..50cb46d0 --- /dev/null +++ b/infra/polygon/password.txt @@ -0,0 +1 @@ +password0 diff --git a/infra/polygon/run.sh b/infra/polygon/run.sh index 89b3d293..c9b0c549 100644 --- a/infra/polygon/run.sh +++ b/infra/polygon/run.sh @@ -1,16 +1,16 @@ -#!/bin/bash +#!/bin/sh NODE_DIR=/root/.bor DATA_DIR=/root/.bor/data +ADDRESS="bf7A416377ed8f1F745A739C8ff59094EB2FEFD2" bor --datadir $DATA_DIR init $NODE_DIR/genesis.json cp $NODE_DIR/nodekey $DATA_DIR/bor/ cp $NODE_DIR/static-nodes.json $DATA_DIR/bor/ -touch /root/logs/bor.log bor --datadir $DATA_DIR \ --port 30303 \ - --bor.heimdall http://heimdall$INDEX:1317 \ + --bor.withoutheimdall \ --http --http.addr '0.0.0.0' \ --http.vhosts '*' \ --http.corsdomain '*' \ @@ -27,5 +27,4 @@ bor --datadir $DATA_DIR \ --keystore $NODE_DIR/keystore \ --password $NODE_DIR/password.txt \ --allow-insecure-unlock \ - --mine > /root/logs/bor.log 2>&1 & -tail -f /root/logs/bor.log + --mine From 7a7d93bf87794f39b63d06b9fe1a788ce3b004bf Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 12 May 2021 09:42:03 +0500 Subject: [PATCH 300/335] feat: multichain declarations for polygon --- infra/polygon/run.sh | 3 ++- multichain.go | 36 +++++++++++++++++++----------------- multichain_test.go | 4 ++++ 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/infra/polygon/run.sh b/infra/polygon/run.sh index c9b0c549..2827b558 100644 --- a/infra/polygon/run.sh +++ b/infra/polygon/run.sh @@ -8,7 +8,8 @@ bor --datadir $DATA_DIR init $NODE_DIR/genesis.json cp $NODE_DIR/nodekey $DATA_DIR/bor/ cp $NODE_DIR/static-nodes.json $DATA_DIR/bor/ -bor --datadir $DATA_DIR \ +bor --nousb \ + --datadir $DATA_DIR \ --port 30303 \ --bor.withoutheimdall \ --http --http.addr '0.0.0.0' \ diff --git a/multichain.go b/multichain.go index b2c7bd38..3c432d62 100644 --- a/multichain.go +++ b/multichain.go @@ -99,18 +99,18 @@ type Asset string // from an existing chain, you must add a human-readable string to this set of // enumerated values. Assets must be listed in alphabetical order. const ( - BCH = Asset("BCH") // Bitcoin Cash - BNB = Asset("BNB") // Binance Coin - BTC = Asset("BTC") // Bitcoin - CELO = Asset("CELO") // Celo - DGB = Asset("DGB") // DigiByte - DOGE = Asset("DOGE") // Dogecoin - ETH = Asset("ETH") // Ether - FIL = Asset("FIL") // Filecoin - FTM = Asset("FTM") // Fantom - SOL = Asset("SOL") // Solana - LUNA = Asset("LUNA") // Luna - ZEC = Asset("ZEC") // Zcash + BCH = Asset("BCH") // Bitcoin Cash + BNB = Asset("BNB") // Binance Coin + BTC = Asset("BTC") // Bitcoin + DGB = Asset("DGB") // DigiByte + DOGE = Asset("DOGE") // Dogecoin + ETH = Asset("ETH") // Ether + FIL = Asset("FIL") // Filecoin + FTM = Asset("FTM") // Fantom + LUNA = Asset("LUNA") // Luna + MATIC = Asset("MATIC") // Matic PoS (Polygon) + SOL = Asset("SOL") // Solana + ZEC = Asset("ZEC") // Zcash // These assets are defined separately because they are mock assets. These // assets should only be used for testing. @@ -130,8 +130,6 @@ func (asset Asset) OriginChain() Chain { return BinanceSmartChain case BTC: return Bitcoin - case CELO: - return Celo case DGB: return DigiByte case DOGE: @@ -144,6 +142,8 @@ func (asset Asset) OriginChain() Chain { return Fantom case LUNA: return Terra + case MATIC: + return Polygon case SOL: return Solana case ZEC: @@ -169,7 +169,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case BNB, ETH, FIL, LUNA: + case BNB, ETH, FIL, LUNA, MATIC: return ChainTypeAccountBased // These assets are handled separately because they are mock assets. These @@ -212,12 +212,12 @@ const ( BinanceSmartChain = Chain("BinanceSmartChain") Bitcoin = Chain("Bitcoin") BitcoinCash = Chain("BitcoinCash") - Celo = Chain("Celo") DigiByte = Chain("DigiByte") Dogecoin = Chain("Dogecoin") Ethereum = Chain("Ethereum") Fantom = Chain("Fantom") Filecoin = Chain("Filecoin") + Polygon = Chain("Polygon") Solana = Chain("Solana") Terra = Chain("Terra") Zcash = Chain("Zcash") @@ -254,7 +254,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Fantom, Filecoin, Solana, Terra: + case BinanceSmartChain, Ethereum, Fantom, Filecoin, Polygon, Solana, Terra: return ChainTypeAccountBased // These chains are handled separately because they are mock chains. These @@ -302,6 +302,8 @@ func (chain Chain) NativeAsset() Asset { return FTM case Filecoin: return FIL + case Polygon: + return MATIC case Solana: return SOL case Terra: diff --git a/multichain_test.go b/multichain_test.go index 220e702e..d7078996 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -91,6 +91,10 @@ var _ = Describe("Multichain", func() { multichain.Filecoin, multichain.FIL, }, + { + multichain.Polygon, + multichain.MATIC, + }, { multichain.Solana, multichain.SOL, From c4bf89d0cb4d221e9533902d42d95867a6d79d66 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 13 May 2021 16:12:16 +0500 Subject: [PATCH 301/335] add solana service to docker compose --- infra/docker-compose.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index d707574a..32dd9ddd 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -142,3 +142,12 @@ services: - "0.0.0.0:28545:8545" entrypoint: - "./root/run.sh" + + ## + ## Solana + ## + solana: + image: renbot/ren-solana:latest + ports: + - "0.0.0.0:8899:8899" + - "0.0.0.0:8900:8900" From 5dc113c6c0a06a90e61abc7267e1c32328fb07bb Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 13 May 2021 17:19:31 +0500 Subject: [PATCH 302/335] fix: use the ren-solana docker image for CI --- .github/workflows/test.yml | 32 +++----------------------------- chain/solana/solana_test.go | 13 ++++--------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d39225a8..4cccdfc9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,14 +92,11 @@ jobs: - name: Setup environment for Solana tests run: | - sh -c "$(curl -sSfL https://release.solana.com/v1.5.13/install)" + sh -c "$(curl -sSfL https://release.solana.com/v1.6.8/install)" cd $GITHUB_WORKSPACE export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - git clone https://github.com/renproject/ren-solana.git - cd ren-solana - echo ${{ secrets.GATEWAY_PROGRAM_ID }} > ~/.config/solana/gateway-program.json - echo ${{ secrets.GATEWAY_REGISTRY_PROGRAM_ID }} > ~/.config/solana/gateway-registry-program.json - ./setup.sh + echo ${{ secrets.SOLANA_KEY }} > ~/.config/solana/id.json + docker run -d -h 0.0.0.0 -p 8899:8899 -p 8900:8900 renbot/ren-solana:latest - name: Sleep until the node is up uses: jakejarvis/wait-action@master @@ -112,29 +109,6 @@ jobs: - name: Run tests for Solana run: | export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" - cd $GITHUB_WORKSPACE/ren-solana - solana airdrop --url http://0.0.0.0:8899 10 - solana program deploy --final \ - --keypair ~/.config/solana/id.json \ - --program-id ~/.config/solana/gateway-program.json \ - target/deploy/gateway.so - solana program deploy --final \ - --keypair ~/.config/solana/id.json \ - --program-id ~/.config/solana/gateway-registry-program.json \ - target/deploy/gateway_registry.so - target/debug/gateway-registry initialize \ - --owner ~/.config/solana/id.json \ - --fee-payer ~/.config/solana/id.json - target/debug/gateway-registry update \ - --owner ~/.config/solana/id.json \ - --fee-payer ~/.config/solana/id.json \ - --selector "BTC/toSolana" \ - --gateway "FDdKRjbBeFtyu5c66cZghJsTTjDTT1aD3zsgTWMTpaif" - target/debug/gateway-registry update \ - --owner ~/.config/solana/id.json \ - --fee-payer ~/.config/solana/id.json \ - --selector "ZEC/toSolana" \ - --gateway "9rCXCJDsnS53QtdXvYhYCAxb6yBE16KAQx5zHWfHe9QF" cd $GITHUB_WORKSPACE/chain/solana go test -timeout 100s diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 0c229470..cd457f4d 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -122,25 +122,20 @@ var _ = Describe("Solana", func() { Expect(err).NotTo(HaveOccurred()) // The registry (in the CI test environment) is pre-populated with gateway - // addresses for BTC/toSolana and ZEC/toSolana selectors. + // addresses for BTC/toSolana selector. btcSelectorHash := [32]byte{} copy(btcSelectorHash[:], crypto.Keccak256([]byte("BTC/toSolana"))) - zecSelectorHash := [32]byte{} - copy(zecSelectorHash[:], crypto.Keccak256([]byte("ZEC/toSolana"))) zero := pack.NewU256FromU8(pack.U8(0)).Bytes32() addrEncodeDecoder := solana.NewAddressEncodeDecoder() expectedBtcGateway, _ := addrEncodeDecoder.DecodeAddress(multichain.Address("FDdKRjbBeFtyu5c66cZghJsTTjDTT1aD3zsgTWMTpaif")) - expectedZecGateway, _ := addrEncodeDecoder.DecodeAddress(multichain.Address("9rCXCJDsnS53QtdXvYhYCAxb6yBE16KAQx5zHWfHe9QF")) - Expect(registry.Count).To(Equal(uint64(2))) + Expect(registry.Count).To(Equal(uint64(1))) Expect(registry.Selectors[0]).To(Equal(btcSelectorHash)) - Expect(registry.Selectors[1]).To(Equal(zecSelectorHash)) - Expect(registry.Selectors[2]).To(Equal(zero)) + Expect(registry.Selectors[1]).To(Equal(zero)) Expect(len(registry.Selectors)).To(Equal(32)) Expect(registry.Gateways[0][:]).To(Equal([]byte(expectedBtcGateway))) - Expect(registry.Gateways[1][:]).To(Equal([]byte(expectedZecGateway))) - Expect(registry.Gateways[2]).To(Equal(zero)) + Expect(registry.Gateways[1]).To(Equal(zero)) Expect(len(registry.Gateways)).To(Equal(32)) }) }) From aeab50a621144263ef5562c72929b8485d8a3a22 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 13 May 2021 20:40:47 +0500 Subject: [PATCH 303/335] fix: remove initialisation steps because those are done in the deploy script --- chain/solana/solana.go | 2 +- chain/solana/solana_test.go | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/chain/solana/solana.go b/chain/solana/solana.go index af35b3c3..27a74a1f 100644 --- a/chain/solana/solana.go +++ b/chain/solana/solana.go @@ -65,7 +65,7 @@ func FindProgramAddress(seeds []byte, program address.RawAddress) (address.Addre return ProgramDerivedAddress(seeds, encoded), nil } -// GetAccountInfo fetches and returns the account data. +// GetAccountData fetches and returns the account data. func (client *Client) GetAccountData(account address.Address) (pack.Bytes, error) { // Fetch account info with base64 encoding. The default base58 encoding does // not support account data that is larger than 128 bytes, hence base64. diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index cd457f4d..38bad613 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -3,7 +3,6 @@ package solana_test import ( "context" "encoding/binary" - "encoding/hex" "os" "time" @@ -52,21 +51,9 @@ var _ = Describe("Solana", func() { Expect(err).NotTo(HaveOccurred()) keypairPath := userHomeDir + "/.config/solana/id.json" - // RenVM secret and corresponding authority (20-byte Ethereum address). + // RenVM secret and the selector for this gateway. renVmSecret := "0000000000000000000000000000000000000000000000000000000000000001" - renVmAuthority := "7E5F4552091A69125d5DfCb7b8C2659029395Bdf" - renVmAuthorityBytes, err := hex.DecodeString(renVmAuthority) - Expect(err).NotTo(HaveOccurred()) - - // Initialize Gateway for the RenBTC token. selector := "BTC/toSolana" - initializeSig := cgo.GatewayInitialize(keypairPath, solana.DefaultClientRPCURL, renVmAuthorityBytes, selector) - logger.Debug("Initialize", zap.String("tx signature", string(initializeSig))) - - // Initialize a new token account. - time.Sleep(10 * time.Second) - initializeAccountSig := cgo.GatewayInitializeAccount(keypairPath, solana.DefaultClientRPCURL, selector) - logger.Debug("InitializeAccount", zap.String("tx signature", string(initializeAccountSig))) // Mint some tokens. time.Sleep(10 * time.Second) From 01d16b6d2a4e7120a443b7739d6f991d26f7cba2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Sat, 15 May 2021 11:01:20 +0500 Subject: [PATCH 304/335] feat: moonbeam declarations --- multichain.go | 10 ++++++++-- multichain_test.go | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/multichain.go b/multichain.go index 3c432d62..ff3af13b 100644 --- a/multichain.go +++ b/multichain.go @@ -107,6 +107,7 @@ const ( ETH = Asset("ETH") // Ether FIL = Asset("FIL") // Filecoin FTM = Asset("FTM") // Fantom + GLMR = Asset("GLMR") // Glimmer LUNA = Asset("LUNA") // Luna MATIC = Asset("MATIC") // Matic PoS (Polygon) SOL = Asset("SOL") // Solana @@ -138,6 +139,8 @@ func (asset Asset) OriginChain() Chain { return Ethereum case FIL: return Filecoin + case GLMR: + return Moonbeam case FTM: return Fantom case LUNA: @@ -169,7 +172,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case BNB, ETH, FIL, LUNA, MATIC: + case BNB, ETH, FIL, GLMR, LUNA, MATIC: return ChainTypeAccountBased // These assets are handled separately because they are mock assets. These @@ -217,6 +220,7 @@ const ( Ethereum = Chain("Ethereum") Fantom = Chain("Fantom") Filecoin = Chain("Filecoin") + Moonbeam = Chain("Moonbeam") Polygon = Chain("Polygon") Solana = Chain("Solana") Terra = Chain("Terra") @@ -254,7 +258,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Fantom, Filecoin, Polygon, Solana, Terra: + case BinanceSmartChain, Ethereum, Fantom, Filecoin, Moonbeam, Polygon, Solana, Terra: return ChainTypeAccountBased // These chains are handled separately because they are mock chains. These @@ -302,6 +306,8 @@ func (chain Chain) NativeAsset() Asset { return FTM case Filecoin: return FIL + case Moonbeam: + return GLMR case Polygon: return MATIC case Solana: diff --git a/multichain_test.go b/multichain_test.go index d7078996..d79b298c 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -91,6 +91,10 @@ var _ = Describe("Multichain", func() { multichain.Filecoin, multichain.FIL, }, + { + multichain.Moonbeam, + multichain.GLMR, + }, { multichain.Polygon, multichain.MATIC, From 3fde6bcc1d8c6f8eb164f22c4c59d9ed4577e523 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Sat, 15 May 2021 11:01:45 +0500 Subject: [PATCH 305/335] feat: moonbeam multichain infra setup --- infra/docker-compose.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 32dd9ddd..7df9ebce 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -151,3 +151,13 @@ services: ports: - "0.0.0.0:8899:8899" - "0.0.0.0:8900:8900" + + ## + ## Moonbeam + ## + moonbeam: + image: purestake/moonbeam:tutorial-v7 + ports: + - "0.0.0.0:9944:9944" + - "0.0.0.0:9933:9933" + command: --dev --ws-external --rpc-external From 8305a794d055b893206caef812226a1005cfe370 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 19 May 2021 11:46:14 +0500 Subject: [PATCH 306/335] latest solana-ffi --- .github/workflows/test.yml | 12 ++++++------ chain/solana/solana-ffi | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4cccdfc9..3b348deb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 + SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -116,7 +116,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 + SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -238,7 +238,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 + SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -359,7 +359,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 + SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -480,7 +480,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 + SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -601,7 +601,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: df7838d724f5eaf262ed77ed93b35b3f1f652bd3 + SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 diff --git a/chain/solana/solana-ffi b/chain/solana/solana-ffi index df7838d7..f6521b8a 160000 --- a/chain/solana/solana-ffi +++ b/chain/solana/solana-ffi @@ -1 +1 @@ -Subproject commit df7838d724f5eaf262ed77ed93b35b3f1f652bd3 +Subproject commit f6521b8a1af44f4d468bc8e7e67ba3766a5602ef From d5a70575ef9537094bdb5b6da469b00d5ffe7b28 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 19 May 2021 11:55:35 +0500 Subject: [PATCH 307/335] fix submodule caching --- .github/workflows/test.yml | 120 +++++++++++++++---------------------- 1 file changed, 48 insertions(+), 72 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b348deb..20387225 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,10 +34,6 @@ jobs: with: path: .extern key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -64,21 +60,21 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi - cd .extern/filecoin-ffi + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi - cd .extern/solana-ffi + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} + go get -u github.com/xlab/c-for-go make clean make @@ -145,10 +141,6 @@ jobs: with: path: .extern key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -175,21 +167,21 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi - cd .extern/filecoin-ffi + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi - cd .extern/solana-ffi + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} + go get -u github.com/xlab/c-for-go make clean make @@ -267,10 +259,6 @@ jobs: with: path: .extern key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -297,21 +285,21 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi - cd .extern/filecoin-ffi + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi - cd .extern/solana-ffi + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} + go get -u github.com/xlab/c-for-go make clean make @@ -388,10 +376,6 @@ jobs: with: path: .extern key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -418,21 +402,21 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi - cd .extern/filecoin-ffi + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi - cd .extern/solana-ffi + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} + go get -u github.com/xlab/c-for-go make clean make @@ -509,10 +493,6 @@ jobs: with: path: .extern key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -539,21 +519,21 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi - cd .extern/filecoin-ffi + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi - cd .extern/solana-ffi + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} + go get -u github.com/xlab/c-for-go make clean make @@ -630,10 +610,6 @@ jobs: with: path: .extern key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- # Remove apt repos that are known to break from time to time # See https://github.com/actions/virtual-environments/issues/323 @@ -660,21 +636,21 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/filecoin-project/filecoin-ffi.git .extern/filecoin-ffi - cd .extern/filecoin-ffi + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - git submodule add https://github.com/renproject/solana-ffi.git .extern/solana-ffi - cd .extern/solana-ffi + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} + go get -u github.com/xlab/c-for-go make clean make From 9c485fc8d58c3d693b82ed2a5ba94d38d1d2f75d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 19 May 2021 12:12:56 +0500 Subject: [PATCH 308/335] ci: go 1.15 --- .github/workflows/test.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20387225..1c82277e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,11 +7,9 @@ jobs: FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - - name: Set up Go 1.13 - uses: actions/setup-go@v1 + - uses: actions/setup-go@v2 with: - go-version: 1.13 - id: go + go-version: "1.15.5" - name: Check out code into the Go module directory uses: actions/checkout@v1 @@ -74,7 +72,6 @@ jobs: git clone https://github.com/renproject/solana-ffi.git cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} - go get -u github.com/xlab/c-for-go make clean make @@ -181,7 +178,6 @@ jobs: git clone https://github.com/renproject/solana-ffi.git cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} - go get -u github.com/xlab/c-for-go make clean make @@ -299,7 +295,6 @@ jobs: git clone https://github.com/renproject/solana-ffi.git cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} - go get -u github.com/xlab/c-for-go make clean make @@ -416,7 +411,6 @@ jobs: git clone https://github.com/renproject/solana-ffi.git cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} - go get -u github.com/xlab/c-for-go make clean make @@ -533,7 +527,6 @@ jobs: git clone https://github.com/renproject/solana-ffi.git cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} - go get -u github.com/xlab/c-for-go make clean make @@ -650,7 +643,6 @@ jobs: git clone https://github.com/renproject/solana-ffi.git cd solana-ffi git checkout ${{ env.SOLANA_FFI_COMMIT }} - go get -u github.com/xlab/c-for-go make clean make From 8fe608555f05e4f600a7ee1d2cece404e37ea640 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Wed, 19 May 2021 12:25:28 +0500 Subject: [PATCH 309/335] ci: fix export go path --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c82277e..2022d63b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,8 +21,6 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - name: Cache extern dependencies (FFI) id: cache-extern @@ -58,6 +56,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE mkdir .extern && cd .extern git clone https://github.com/filecoin-project/filecoin-ffi.git @@ -68,6 +68,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/.extern git clone https://github.com/renproject/solana-ffi.git cd solana-ffi @@ -127,8 +129,6 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - name: Cache extern dependencies (FFI) id: cache-extern @@ -164,6 +164,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE mkdir .extern && cd .extern git clone https://github.com/filecoin-project/filecoin-ffi.git @@ -174,6 +176,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/.extern git clone https://github.com/renproject/solana-ffi.git cd solana-ffi @@ -244,8 +248,6 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - name: Cache extern dependencies (FFI) id: cache-extern @@ -281,6 +283,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE mkdir .extern && cd .extern git clone https://github.com/filecoin-project/filecoin-ffi.git @@ -291,6 +295,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/.extern git clone https://github.com/renproject/solana-ffi.git cd solana-ffi @@ -360,8 +366,6 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - name: Cache extern dependencies (FFI) id: cache-extern @@ -397,6 +401,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE mkdir .extern && cd .extern git clone https://github.com/filecoin-project/filecoin-ffi.git @@ -407,6 +413,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/.extern git clone https://github.com/renproject/solana-ffi.git cd solana-ffi @@ -476,8 +484,6 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - name: Cache extern dependencies (FFI) id: cache-extern @@ -513,6 +519,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE mkdir .extern && cd .extern git clone https://github.com/filecoin-project/filecoin-ffi.git @@ -523,6 +531,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/.extern git clone https://github.com/renproject/solana-ffi.git cd solana-ffi @@ -592,8 +602,6 @@ jobs: with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - name: Cache extern dependencies (FFI) id: cache-extern @@ -629,6 +637,8 @@ jobs: - name: Install dependencies (Filecoin FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE mkdir .extern && cd .extern git clone https://github.com/filecoin-project/filecoin-ffi.git @@ -639,6 +649,8 @@ jobs: - name: Install dependencies (Solana FFI) if: steps.cache-extern.outputs.cache-hit != 'true' run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env cd $GITHUB_WORKSPACE/.extern git clone https://github.com/renproject/solana-ffi.git cd solana-ffi From ab0cf8643a96a0a22bc2329c07db044a12b0d9ea Mon Sep 17 00:00:00 2001 From: Harjas Date: Mon, 24 May 2021 23:08:56 +0530 Subject: [PATCH 310/335] bls and mcl as submodules --- .github/workflows/test.yml | 93 ++++++++++++++++++++++++++++++++++ .gitmodules | 6 +++ chain/harmony/contract.go | 13 ++++- chain/harmony/contract_test.go | 3 +- go.mod | 3 -- 5 files changed, 111 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b16952e2..ef3e1ea8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -524,6 +524,99 @@ jobs: -btc=true \ -bch=true \ -timeout 1500s + test-harmony: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + submodules: recursive + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + - name: Install dependency packages + run: | + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt install libgmp-dev libssl-dev make gcc g++ + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go + + - name: Run vetting + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + make + cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + make + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint $(go list ./... | grep -v filecoin-ffi) + + - name: Run multichain infrastructure + run: | + cd $GITHUB_WORKSPACE/infra + source .env + docker-compose up -d --build \ + harmony + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: '10m' + + - name: Check on docker containers + run: docker ps -a + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd ../../.. + go test \ + -one=true \ + -timeout 1500s + build: runs-on: ubuntu-latest diff --git a/.gitmodules b/.gitmodules index fba83b42..726fcc6e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,9 @@ [submodule "chain/solana/solana-ffi"] path = chain/solana/solana-ffi url = https://github.com/renproject/solana-ffi +[submodule "chain/harmony/bls"] + path = chain/harmony/bls + url = https://github.com/harmony-one/bls +[submodule "chain/harmony/mcl"] + path = chain/harmony/mcl + url = https://github.com/harmony-one/mcl diff --git a/chain/harmony/contract.go b/chain/harmony/contract.go index da96c7c4..0e7b086c 100644 --- a/chain/harmony/contract.go +++ b/chain/harmony/contract.go @@ -4,14 +4,23 @@ import ( "context" "encoding/json" "fmt" - "github.com/harmony-one/harmony/rpc" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/renproject/multichain/api/address" "github.com/renproject/multichain/api/contract" "github.com/renproject/pack" ) +type CallArgs struct { + From *common.Address `json:"from"` + To *common.Address `json:"to"` + Gas *hexutil.Uint64 `json:"gas"` + GasPrice *hexutil.Big `json:"gasPrice"` + Value *hexutil.Big `json:"value"` + Data *hexutil.Bytes `json:"data"` +} type Params struct { - CallArgs rpc.CallArgs + CallArgs CallArgs Block uint64 } diff --git a/chain/harmony/contract_test.go b/chain/harmony/contract_test.go index 32d3850a..2902492a 100644 --- a/chain/harmony/contract_test.go +++ b/chain/harmony/contract_test.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "github.com/ethereum/go-ethereum/common" - "github.com/harmony-one/harmony/rpc" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/renproject/multichain/api/address" @@ -17,7 +16,7 @@ var _ = Describe("Harmony", func() { contractAddr := address.Address("one155jp2y76nazx8uw5sa94fr0m4s5aj8e5xm6fu3") rawAddr, err := harmony.NewEncoderDecoder().DecodeAddress(contractAddr) bech32Addr := common.BytesToAddress(rawAddr) - callData := rpc.CallArgs{ + callData := harmony.CallArgs{ To: &bech32Addr, } params := harmony.Params{ diff --git a/go.mod b/go.mod index aa050407..2d0aa1a8 100644 --- a/go.mod +++ b/go.mod @@ -39,6 +39,3 @@ replace github.com/renproject/solana-ffi => ./chain/solana/solana-ffi replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 -replace github.com/harmony-one/harmony => github.com/harjas27/harmony v1.10.3-0.20210424185836-ec03cfc7b52d - -replace github.com/ethereum/go-ethereum => github.com/ethereum/go-ethereum v1.9.9 From 5ff154584141f5e19813b19e99eb4291a667ee83 Mon Sep 17 00:00:00 2001 From: Harjas Date: Tue, 25 May 2021 00:45:07 +0530 Subject: [PATCH 311/335] update test --- .github/workflows/test.yml | 53 +++++++++++++++++++++++++++++++++----- .gitmodules | 6 ----- 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a9d5bbe..94574529 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -700,8 +700,12 @@ jobs: -btc=true \ -bch=true \ -timeout 1500s + test-harmony: runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d + SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -720,6 +724,17 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} + + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 - name: Install dependency packages run: | for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done @@ -741,14 +756,36 @@ jobs: go get -u github.com/mattn/goveralls go get -u github.com/xlab/c-for-go - - name: Run vetting + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' run: | export PATH=$PATH:$(go env GOPATH)/bin source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/chain/filecoin/filecoin-ffi + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi + git checkout ${{ env.FILECOIN_FFI_COMMIT }} make - cd $GITHUB_WORKSPACE/chain/solana/solana-ffi + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi + git checkout ${{ env.SOLANA_FFI_COMMIT }} + make clean make + + - name: Run vetting + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi go vet ./... - name: Run linting @@ -768,7 +805,7 @@ jobs: - name: Sleep until the nodes are up uses: jakejarvis/wait-action@master with: - time: '10m' + time: '1m' - name: Check on docker containers run: docker ps -a @@ -779,6 +816,11 @@ jobs: run: | export PATH=$PATH:$(go env GOPATH)/bin source ./infra/.env + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make cd $GITHUB_WORKSPACE export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" @@ -786,9 +828,6 @@ jobs: export LIBRARY_PATH=$LD_LIBRARY_PATH export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH export GO111MODULE=on - cd $GITHUB_WORKSPACE/chain/harmony/bls - make - cd ../../.. go test \ -one=true \ -timeout 1500s diff --git a/.gitmodules b/.gitmodules index 726fcc6e..fba83b42 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,3 @@ [submodule "chain/solana/solana-ffi"] path = chain/solana/solana-ffi url = https://github.com/renproject/solana-ffi -[submodule "chain/harmony/bls"] - path = chain/harmony/bls - url = https://github.com/harmony-one/bls -[submodule "chain/harmony/mcl"] - path = chain/harmony/mcl - url = https://github.com/harmony-one/mcl From 82299b69e71af31fd19f1359133f2fa00ea806d7 Mon Sep 17 00:00:00 2001 From: Harjas Date: Tue, 25 May 2021 01:05:39 +0530 Subject: [PATCH 312/335] update test flag for Harmony --- multichain_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/multichain_test.go b/multichain_test.go index 8ea75561..ecd33036 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -52,6 +52,7 @@ var ( testBCH = flag.Bool("bch", false, "Pass this flag to test Bitcoincash") testDOGE = flag.Bool("doge", false, "Pass this flag to test Dogecoin") testFIL = flag.Bool("fil", false, "Pass this flag to test Filecoin") + testONE = flag.Bool("one", false, "Pass this flag to test Harmony") testLUNA = flag.Bool("luna", false, "Pass this flag to test Terra") testZEC = flag.Bool("zec", false, "Pass this flag to test Zcash") ) @@ -75,6 +76,7 @@ var _ = Describe("Multichain", func() { testFlags[multichain.BitcoinCash] = *testBCH testFlags[multichain.Dogecoin] = *testDOGE testFlags[multichain.Filecoin] = *testFIL + testFlags[multichain.Harmony] = *testONE testFlags[multichain.Terra] = *testLUNA testFlags[multichain.Zcash] = *testZEC @@ -103,6 +105,10 @@ var _ = Describe("Multichain", func() { multichain.Polygon, multichain.MATIC, }, + { + multichain.Harmony, + multichain.ONE, + }, { multichain.Solana, multichain.SOL, @@ -1295,4 +1301,4 @@ func getPubKeyScript(pubKey pack.Bytes) (pack.Bytes, error) { return nil, fmt.Errorf("invalid pubkeyscript: %v", err) } return pubKeyScript, nil -} \ No newline at end of file +} From b2c1337fec7efc600998d1bc86c4179fb8bdd83b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 08:24:22 +0400 Subject: [PATCH 313/335] feat: localnet setup --- infra/.env | 11 ++++ infra/avalanche/Dockerfile | 26 +++++++++ infra/avalanche/run.sh | 109 +++++++++++++++++++++++++++++++++++++ infra/docker-compose.yaml | 18 ++++++ 4 files changed, 164 insertions(+) create mode 100644 infra/avalanche/Dockerfile create mode 100644 infra/avalanche/run.sh diff --git a/infra/.env b/infra/.env index 38cb50c5..7d32d6e5 100644 --- a/infra/.env +++ b/infra/.env @@ -83,3 +83,14 @@ export TERRA_ADDRESS=terra10s4mg25tu6termrk8egltfyme4q7sg3hl8s38u # access to plenty of testing funds. export ZCASH_PK=cNSVbbsAcBQ6BAmMr6yH6DLWr7QTDptHwdzpy4GYxGDkNZeKnczK export ZCASH_ADDRESS=tmCTReBSJEDMWfFCkXXPMSB3EfuPg6SE9dw + +# +# Avalanche +# +export AVAX_USERNAME="Username" +export AVAX_PASSWORD="Few43!r389hfweu32" +export AVAX_PK="PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN" +export AVAX_ADDRESS="X-local18jma8ppw3nhx5r4ap8clazz0dps7rv5u00z96u" +export C_AVAX_PK="0xb8c1b5c1d81f9475fdf2e334517d29f733bdfa40682207571b12fc1142cbf329" +export C_AVAX_HEX_ADDRESS="0xa0df350d2637096571F7A701CBc1C5fdE30dF76A" +export C_AVAX_BECH32_ADDRESS="C-local18jma8ppw3nhx5r4ap8clazz0dps7rv5u00z96u" diff --git a/infra/avalanche/Dockerfile b/infra/avalanche/Dockerfile new file mode 100644 index 00000000..5b077ae0 --- /dev/null +++ b/infra/avalanche/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:groovy + +RUN apt update -y +RUN apt-get install -y wget curl build-essential + +# INSTALL GO AND RUST +RUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz +RUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin + +# Fetch avalanchego +WORKDIR /app +RUN wget https://github.com/ava-labs/avalanchego/releases/download/v1.4.5/avalanchego-linux-amd64-v1.4.5.tar.gz +RUN tar -xzf avalanchego-linux-amd64-v1.4.5.tar.gz +RUN rm avalanchego-linux-amd64-v1.4.5.tar.gz +ENV PATH=$PATH:/app/avalanchego-v1.4.5 + +# COPY run script +COPY run.sh run.sh +RUN chmod +x run.sh + +# RPC SERVER PORT +EXPOSE 9650 + +# RUN +ENTRYPOINT [ "./run.sh" ] diff --git a/infra/avalanche/run.sh b/infra/avalanche/run.sh new file mode 100644 index 00000000..9254482d --- /dev/null +++ b/infra/avalanche/run.sh @@ -0,0 +1,109 @@ +#!/bin/bash + +AVAX_USERNAME=$1 +AVAX_PASSWORD=$2 +AVAX_PK=$3 +AVAX_ADDRESS=$4 +C_AVAX_PK=$5 +C_AVAX_HEX_ADDRESS=$6 +C_AVAX_BECH32_ADDRESS=$7 + +avalanchego \ + --assertions-enabled=true \ + --tx-fee=1000000 \ + --public-ip=0.0.0.0 \ + --network-id=local \ + --xput-server-port=9652 \ + --xput-server-enabled=false \ + --signature-verification-enabled=true \ + --api-admin-enabled=true \ + --api-ipcs-enabled=true \ + --api-keystore-enabled=true \ + --api-metrics-enabled=true \ + --http-host=0.0.0.0 \ + --http-port=9650 \ + --http-tls-enabled=false \ + --db-enabled=true \ + --db-dir=/root/stash/mynewnode/db \ + --plugin-dir=/app/avalanchego-v1.4.5/plugins \ + --log-level=info \ + --log-dir=/root/stash/mynode/logs \ + --snow-avalanche-batch-size=30 \ + --snow-avalanche-num-parents=5 \ + --snow-sample-size=1 \ + --snow-quorum-size=1 \ + --snow-virtuous-commit-threshold=1 \ + --snow-rogue-commit-threshold=4 \ + --p2p-tls-enabled=true \ + --staking-enabled=false \ + --staking-port=9651 \ + --api-auth-required=false & + +# create a new user +sleep 10 +curl -X POST --data '{ + "jsonrpc":"2.0", + "id" :1, + "method" :"keystore.createUser", + "params" :{ + "username":"'"$AVAX_USERNAME"'", + "password":"'"$AVAX_PASSWORD"'" + } +}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore + +# import private key that contains AVAX into X-chain +sleep 1 +curl -X POST --data '{ + "jsonrpc":"2.0", + "id" :1, + "method" :"avm.importKey", + "params" :{ + "username":"'"$AVAX_USERNAME"'", + "password":"'"$AVAX_PASSWORD"'", + "privateKey":"'"$AVAX_PK"'" + } +}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X + +# import private key into C-chain +sleep 1 +curl -X POST --data '{ + "jsonrpc":"2.0", + "id" :1, + "method" :"avax.importKey", + "params" :{ + "username" :"'"$AVAX_USERNAME"'", + "password":"'"$AVAX_PASSWORD"'", + "privateKey":"'"$AVAX_PK"'" + } +}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/avax + +# export the AVAX to C-chain +sleep 1 +curl -X POST --data '{ + "jsonrpc":"2.0", + "id" :1, + "method" :"avm.exportAVAX", + "params" :{ + "to":"'"$C_AVAX_BECH32_ADDRESS"'", + "destinationChain": "C", + "amount": 500000000, + "username":"'"$AVAX_USERNAME"'", + "password":"'"$AVAX_PASSWORD"'" + } +}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X + +# import AVAX to the hex address +sleep 1 +curl -X POST --data '{ + "jsonrpc":"2.0", + "id" :1, + "method" :"avax.importAVAX", + "params" :{ + "to":"'"$C_AVAX_HEX_ADDRESS"'", + "sourceChain":"X", + "username":"'"$AVAX_USERNAME"'", + "password":"'"$AVAX_PASSWORD"'" + } +}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/avax + +wait %1 diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 7df9ebce..c063464d 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -161,3 +161,21 @@ services: - "0.0.0.0:9944:9944" - "0.0.0.0:9933:9933" command: --dev --ws-external --rpc-external + + # + # Avalanche + # + avalanche: + build: + context: ./avalanche + ports: + - "0.0.0.0:9650:9650" + entrypoint: + - "/root/run.sh" + - "${AVAX_USERNAME}" + - "${AVAX_PASSWORD}" + - "${AVAX_PK}" + - "${AVAX_ADDRESS}" + - "${C_AVAX_PK}" + - "${C_AVAX_HEX_ADDRESS}" + - "${C_AVAX_BECH32_ADDRESS}" From 9b6022b8e18b982ab4141ecc1641928e7f5e863d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 09:09:49 +0400 Subject: [PATCH 314/335] fix: plugin dir has changed --- infra/avalanche/run.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/infra/avalanche/run.sh b/infra/avalanche/run.sh index 9254482d..2876ac0e 100644 --- a/infra/avalanche/run.sh +++ b/infra/avalanche/run.sh @@ -13,8 +13,6 @@ avalanchego \ --tx-fee=1000000 \ --public-ip=0.0.0.0 \ --network-id=local \ - --xput-server-port=9652 \ - --xput-server-enabled=false \ --signature-verification-enabled=true \ --api-admin-enabled=true \ --api-ipcs-enabled=true \ @@ -23,18 +21,14 @@ avalanchego \ --http-host=0.0.0.0 \ --http-port=9650 \ --http-tls-enabled=false \ - --db-enabled=true \ - --db-dir=/root/stash/mynewnode/db \ - --plugin-dir=/app/avalanchego-v1.4.5/plugins \ + --plugin-dir=/app/avalanchego-v1.4.5/avalanchego-latest/plugins \ --log-level=info \ - --log-dir=/root/stash/mynode/logs \ --snow-avalanche-batch-size=30 \ --snow-avalanche-num-parents=5 \ --snow-sample-size=1 \ --snow-quorum-size=1 \ --snow-virtuous-commit-threshold=1 \ --snow-rogue-commit-threshold=4 \ - --p2p-tls-enabled=true \ --staking-enabled=false \ --staking-port=9651 \ --api-auth-required=false & @@ -47,7 +41,7 @@ curl -X POST --data '{ "method" :"keystore.createUser", "params" :{ "username":"'"$AVAX_USERNAME"'", - "password":"'"$AVAX_PASSWORD"'" + "password":"'"$AVAX_PASSWORD"'" } }' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore @@ -59,8 +53,8 @@ curl -X POST --data '{ "method" :"avm.importKey", "params" :{ "username":"'"$AVAX_USERNAME"'", - "password":"'"$AVAX_PASSWORD"'", - "privateKey":"'"$AVAX_PK"'" + "password":"'"$AVAX_PASSWORD"'", + "privateKey":"'"$AVAX_PK"'" } }' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X From 801f22fbe31aa066d8bf7ba00777b86e693135e6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 09:13:46 +0400 Subject: [PATCH 315/335] feat: add avalanche declarations --- README.md | 1 - multichain.go | 11 ++++++++--- multichain_test.go | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e867eee5..f13310de 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ Adding a `Chain`: // human-readable string to this set of enumerated values. Chains must be listed // in alphabetical order. const ( - Acala = Chain("Acala") Bitcoin = Chain("Bitcoin") BitcoinCash = Chain("BitcoinCash") Dogecoin = Chain("Dogecoin") // (This is our new chain!) diff --git a/multichain.go b/multichain.go index ff3af13b..ef2eee7e 100644 --- a/multichain.go +++ b/multichain.go @@ -99,6 +99,7 @@ type Asset string // from an existing chain, you must add a human-readable string to this set of // enumerated values. Assets must be listed in alphabetical order. const ( + AVAX = Asset("AVAX") // Avalanche BCH = Asset("BCH") // Bitcoin Cash BNB = Asset("BNB") // Binance Coin BTC = Asset("BTC") // Bitcoin @@ -125,6 +126,8 @@ const ( // the origin chain of BTC is Bitcoin. func (asset Asset) OriginChain() Chain { switch asset { + case AVAX: + return Avalanche case BCH: return BitcoinCash case BNB: @@ -172,7 +175,7 @@ func (asset Asset) ChainType() ChainType { switch asset { case BCH, BTC, DGB, DOGE, ZEC: return ChainTypeUTXOBased - case BNB, ETH, FIL, GLMR, LUNA, MATIC: + case AVAX, BNB, ETH, FIL, GLMR, LUNA, MATIC: return ChainTypeAccountBased // These assets are handled separately because they are mock assets. These @@ -211,7 +214,7 @@ type Chain string // human-readable string to this set of enumerated values. Chains must be listed // in alphabetical order. const ( - Acala = Chain("Acala") + Avalanche = Chain("Avalanche") BinanceSmartChain = Chain("BinanceSmartChain") Bitcoin = Chain("Bitcoin") BitcoinCash = Chain("BitcoinCash") @@ -258,7 +261,7 @@ func (chain Chain) ChainType() ChainType { switch chain { case Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash: return ChainTypeUTXOBased - case BinanceSmartChain, Ethereum, Fantom, Filecoin, Moonbeam, Polygon, Solana, Terra: + case Avalanche, BinanceSmartChain, Ethereum, Fantom, Filecoin, Moonbeam, Polygon, Solana, Terra: return ChainTypeAccountBased // These chains are handled separately because they are mock chains. These @@ -290,6 +293,8 @@ func (chain Chain) IsUTXOBased() bool { // root asset of Bitcoin chain is BTC. func (chain Chain) NativeAsset() Asset { switch chain { + case Avalanche: + return AVAX case BinanceSmartChain: return BNB case BitcoinCash: diff --git a/multichain_test.go b/multichain_test.go index d79b298c..cff4cb1c 100644 --- a/multichain_test.go +++ b/multichain_test.go @@ -83,6 +83,10 @@ var _ = Describe("Multichain", func() { chain multichain.Chain asset multichain.Asset }{ + { + multichain.Avalanche, + multichain.AVAX, + }, { multichain.Fantom, multichain.FTM, From 25a50398900633dfa8724c32cf4de91f8402eb29 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 09:23:10 +0400 Subject: [PATCH 316/335] fix: solana ffi commit hash in dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa2d2001..15ceec2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,6 @@ RUN mkdir -p src/github.com/renproject WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi -RUN git checkout df7838d724f5eaf262ed77ed93b35b3f1f652bd3 +RUN git checkout f6521b8a1af44f4d468bc8e7e67ba3766a5602ef RUN make clean && make RUN go install ./... From 78a38fc93e8f7df350908a5b403da65f93619302 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 09:30:15 +0400 Subject: [PATCH 317/335] fix: no need to clean --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 15ceec2d..93c83f87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,5 +40,5 @@ WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi RUN git checkout f6521b8a1af44f4d468bc8e7e67ba3766a5602ef -RUN make clean && make +RUN make RUN go install ./... From d3951801eb635e136afe10c4cb0c7bf3fdfb2de4 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 13:10:47 +0400 Subject: [PATCH 318/335] fix: add personal access token for private git repos --- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++++ Dockerfile | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2022d63b..e876dc6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,11 @@ jobs: with: submodules: recursive + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Caching modules uses: actions/cache@v1 with: @@ -124,6 +129,11 @@ jobs: with: submodules: recursive + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Caching modules uses: actions/cache@v1 with: @@ -243,6 +253,11 @@ jobs: with: submodules: recursive + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Caching modules uses: actions/cache@v1 with: @@ -361,6 +376,11 @@ jobs: with: submodules: recursive + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Caching modules uses: actions/cache@v1 with: @@ -479,6 +499,11 @@ jobs: with: submodules: recursive + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Caching modules uses: actions/cache@v1 with: @@ -597,6 +622,11 @@ jobs: with: submodules: recursive + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Caching modules uses: actions/cache@v1 with: @@ -704,6 +734,11 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/Dockerfile b/Dockerfile index 93c83f87..15ceec2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,5 +40,5 @@ WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi RUN git checkout f6521b8a1af44f4d468bc8e7e67ba3766a5602ef -RUN make +RUN make clean && make RUN go install ./... From bfd289a5dd48cdc5e09c5e02ff8494e43b8d075f Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 14:08:18 +0400 Subject: [PATCH 319/335] multiple fixes --- .github/workflows/test.yml | 2 ++ Dockerfile | 8 ++++++++ infra/avalanche/run.sh | 2 +- infra/docker-compose.yaml | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e876dc6f..411ef1a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -757,6 +757,8 @@ jobs: with: push: true tags: renbot/multichain:latest + secrets: | + "github_token=${{ secrets.PERSONAL_ACCESS_TOKEN }}" - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index 15ceec2d..1e2df641 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +#syntax=docker/dockerfile:1.2 + FROM golang # doing all updates and installs in a single step and removing the apt cache helps reduce the image size @@ -20,6 +22,12 @@ RUN apt-get update && \ ENV GO111MODULE=on ENV GOPROXY=https://proxy.golang.org +# Use GitHub personal access token to fetch dependencies. +RUN --mount=type=secret,id=github_token \ + export GITHUB_TOKEN=$(cat /run/secrets/github_token) +RUN git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" +ENV GOPRIVATE=github.com/renproject/ren-solana + RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" diff --git a/infra/avalanche/run.sh b/infra/avalanche/run.sh index 2876ac0e..925c57c3 100644 --- a/infra/avalanche/run.sh +++ b/infra/avalanche/run.sh @@ -80,7 +80,7 @@ curl -X POST --data '{ "params" :{ "to":"'"$C_AVAX_BECH32_ADDRESS"'", "destinationChain": "C", - "amount": 500000000, + "amount": 5000000000000, "username":"'"$AVAX_USERNAME"'", "password":"'"$AVAX_PASSWORD"'" } diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index c063464d..1901dcaa 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -171,7 +171,7 @@ services: ports: - "0.0.0.0:9650:9650" entrypoint: - - "/root/run.sh" + - "./run.sh" - "${AVAX_USERNAME}" - "${AVAX_PASSWORD}" - "${AVAX_PK}" From 99030085d24b4d83474a5dae753d3c8c10c56cb9 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 14:20:07 +0400 Subject: [PATCH 320/335] fix: use build args for docker build-push --- .github/workflows/test.yml | 9 ++------- Dockerfile | 6 +----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 411ef1a8..0488cbe3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -734,11 +734,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -757,8 +752,8 @@ jobs: with: push: true tags: renbot/multichain:latest - secrets: | - "github_token=${{ secrets.PERSONAL_ACCESS_TOKEN }}" + build-args: + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index 1e2df641..f43811e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -#syntax=docker/dockerfile:1.2 - FROM golang # doing all updates and installs in a single step and removing the apt cache helps reduce the image size @@ -22,9 +20,7 @@ RUN apt-get update && \ ENV GO111MODULE=on ENV GOPROXY=https://proxy.golang.org -# Use GitHub personal access token to fetch dependencies. -RUN --mount=type=secret,id=github_token \ - export GITHUB_TOKEN=$(cat /run/secrets/github_token) +ARG GITHUB_TOKEN RUN git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" ENV GOPRIVATE=github.com/renproject/ren-solana From 2924f6cb8fc95f006e391825c4fccd27b12b8ba6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 14:20:52 +0400 Subject: [PATCH 321/335] fix: syntax --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0488cbe3..e75ae2b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -753,7 +753,7 @@ jobs: push: true tags: renbot/multichain:latest build-args: - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 68ae64680f7c5e4b1285f24e2af0ecf5dd8a92bd Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 14:22:23 +0400 Subject: [PATCH 322/335] fix: syntax --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e75ae2b7..18a107ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -752,8 +752,8 @@ jobs: with: push: true tags: renbot/multichain:latest - build-args: - - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + build-args: | + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 8adf326f9c08c0c8a1120f8198e597ed14c08383 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 25 May 2021 14:40:04 +0400 Subject: [PATCH 323/335] try different syntax --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18a107ed..34206398 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -753,7 +753,7 @@ jobs: push: true tags: renbot/multichain:latest build-args: | - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + GITHUB_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 459f778ea78793d0f7e2e4639db8150dc64dc2e3 Mon Sep 17 00:00:00 2001 From: Harjas Date: Sun, 30 May 2021 17:03:58 +0530 Subject: [PATCH 324/335] add install dependencies job --- .github/workflows/test.yml | 122 +++++++++++++++++++++++++++++++++---- 1 file changed, 111 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94574529..bb59029b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,6 +39,7 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt install libgmp-dev libssl-dev make gcc g++ curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -77,6 +78,21 @@ jobs: make clean make + - name: Install dependencies (Harmony) + run: | + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin @@ -147,6 +163,7 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt install libgmp-dev libssl-dev make gcc g++ curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -185,6 +202,21 @@ jobs: make clean make + - name: Install dependencies (Harmony) + run: | + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin @@ -266,6 +298,7 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt install libgmp-dev libssl-dev make gcc g++ curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -304,6 +337,21 @@ jobs: make clean make + - name: Install dependencies (Harmony) + run: | + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin @@ -384,6 +432,7 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt install libgmp-dev libssl-dev make gcc g++ curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -422,6 +471,21 @@ jobs: make clean make + - name: Install dependencies (Harmony) + run: | + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin @@ -502,6 +566,7 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt install libgmp-dev libssl-dev make gcc g++ curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -540,6 +605,21 @@ jobs: make clean make + - name: Install dependencies (Harmony) + run: | + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin @@ -620,6 +700,7 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt install libgmp-dev libssl-dev make gcc g++ curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -658,6 +739,21 @@ jobs: make clean make + - name: Install dependencies (Harmony) + run: | + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin @@ -780,6 +876,21 @@ jobs: make clean make + - name: Install dependencies (Harmony) + run: | + cd $GITHUB_WORKSPACE/chain/harmony + git clone https://github.com/harmony-one/bls.git + git clone https://github.com/harmony-one/mcl.git + cd $GITHUB_WORKSPACE/chain/harmony/bls + make + cd $GITHUB_WORKSPACE + export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib + export LIBRARY_PATH=$LD_LIBRARY_PATH + export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH + export GO111MODULE=on + - name: Run vetting run: | export PATH=$PATH:$(go env GOPATH)/bin @@ -816,18 +927,7 @@ jobs: run: | export PATH=$PATH:$(go env GOPATH)/bin source ./infra/.env - cd $GITHUB_WORKSPACE/chain/harmony - git clone https://github.com/harmony-one/bls.git - git clone https://github.com/harmony-one/mcl.git - cd $GITHUB_WORKSPACE/chain/harmony/bls - make cd $GITHUB_WORKSPACE - export CGO_CFLAGS="-I$GITHUB_WORKSPACE/chain/harmony/bls/include -I$GITHUB_WORKSPACE/chain/harmony/mcl/include -I/usr/local/opt/openssl/include" - export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/chain/harmony/bls/lib -L/usr/local/opt/openssl/lib" - export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/chain/harmony/bls/lib:$GITHUB_WORKSPACE/chain/harmony/mcl/lib:/usr/local/opt/openssl/lib - export LIBRARY_PATH=$LD_LIBRARY_PATH - export DYLD_FALLBACK_LIBRARY_PATH=$LD_LIBRARY_PATH - export GO111MODULE=on go test \ -one=true \ -timeout 1500s From 1f2910870b6d02c4bb7195d835c6c691c7da7de2 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 08:32:18 +0000 Subject: [PATCH 325/335] feat: upgrade filecoin and solana-ffi --- chain/filecoin/client.go | 6 +- chain/filecoin/filecoin-ffi | 2 +- chain/filecoin/gas.go | 3 +- chain/solana/solana-ffi | 2 +- go.mod | 10 +- go.sum | 184 ++++++++++++++++++++++++++++++++++++ 6 files changed, 195 insertions(+), 12 deletions(-) diff --git a/chain/filecoin/client.go b/chain/filecoin/client.go index 4fb1763c..b783e465 100644 --- a/chain/filecoin/client.go +++ b/chain/filecoin/client.go @@ -8,7 +8,7 @@ import ( filaddress "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-jsonrpc" "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/api/v0api" filclient "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/chain/types" "github.com/ipfs/go-cid" @@ -66,7 +66,7 @@ func (opts ClientOptions) WithAuthToken(authToken pack.String) ClientOptions { // RPC client instance. type Client struct { opts ClientOptions - node api.FullNode + node v0api.FullNode closer jsonrpc.ClientCloser } @@ -77,7 +77,7 @@ func NewClient(opts ClientOptions) (*Client, error) { requestHeaders.Add(AuthorizationKey, opts.AuthToken) } - node, closer, err := filclient.NewFullNodeRPC(context.Background(), opts.RPCURL, requestHeaders) + node, closer, err := filclient.NewFullNodeRPCV0(context.Background(), opts.RPCURL, requestHeaders) if err != nil { return nil, err } diff --git a/chain/filecoin/filecoin-ffi b/chain/filecoin/filecoin-ffi index a62d00da..8b97bd82 160000 --- a/chain/filecoin/filecoin-ffi +++ b/chain/filecoin/filecoin-ffi @@ -1 +1 @@ -Subproject commit a62d00da59d1b0fb35f3a4ae854efa9441af892d +Subproject commit 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 diff --git a/chain/filecoin/gas.go b/chain/filecoin/gas.go index 1cdb7171..2b86c3de 100644 --- a/chain/filecoin/gas.go +++ b/chain/filecoin/gas.go @@ -7,7 +7,6 @@ import ( filaddress "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" "github.com/renproject/pack" ) @@ -51,7 +50,7 @@ func (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, p } // Estimate the gas fee cap and gas premium fields for this dummy message. - msgOut, err := gasEstimator.client.node.GasEstimateMessageGas(ctx, &msgIn, &api.DefaultMessageSendSpec, types.EmptyTSK) + msgOut, err := gasEstimator.client.node.GasEstimateMessageGas(ctx, &msgIn, nil, types.EmptyTSK) if err != nil { return pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf("estimating gas price: %v", err) } diff --git a/chain/solana/solana-ffi b/chain/solana/solana-ffi index f6521b8a..0b1a2cd8 160000 --- a/chain/solana/solana-ffi +++ b/chain/solana/solana-ffi @@ -1 +1 @@ -Subproject commit f6521b8a1af44f4d468bc8e7e67ba3766a5602ef +Subproject commit 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 diff --git a/go.mod b/go.mod index 2d1dba2a..24c72c4b 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf github.com/cosmos/cosmos-sdk v0.39.1 github.com/ethereum/go-ethereum v1.9.20 - github.com/filecoin-project/go-address v0.0.4 - github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49 - github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f - github.com/filecoin-project/lotus v1.1.2 + github.com/filecoin-project/go-address v0.0.5 + github.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec + github.com/filecoin-project/go-state-types v0.1.1-0.20210506134452-99b279731c48 + github.com/filecoin-project/lotus v1.9.0 github.com/ipfs/go-cid v0.0.7 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/multiformats/go-varint v0.0.6 @@ -24,7 +24,7 @@ require ( github.com/renproject/surge v1.2.6 github.com/tendermint/tendermint v0.33.8 github.com/terra-project/core v0.4.0-rc.4 - go.uber.org/zap v1.15.0 + go.uber.org/zap v1.16.0 golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a ) diff --git a/go.sum b/go.sum index 8b982411..086ad27b 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,7 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= contrib.go.opencensus.io/exporter/jaeger v0.1.0/go.mod h1:VYianECmuFPwU37O699Vc1GOcy+y8kOsfaxHRImmjbA= +contrib.go.opencensus.io/exporter/prometheus v0.1.0 h1:SByaIoWwNgMdPSgl5sMqM2KDE5H/ukPWBRo314xiDvg= contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -55,7 +56,12 @@ github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtix github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= +github.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -69,6 +75,7 @@ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat6 github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= +github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921/go.mod h1:/n6+1/DWPltRLWL/VKyUxg6tzsl5kHUCcraimt4vr60= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -143,6 +150,7 @@ github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wX github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= @@ -156,6 +164,8 @@ github.com/cockroachdb/redact v0.0.0-20200622112456-cd282804bbd3/go.mod h1:BVNbl github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf h1:5ZeQB3mThuz5C2MSER6T5GdtXTF9CMMk42F9BOyRsEQ= github.com/codahale/blake2 v0.0.0-20150924215134-8d10d0420cbf/go.mod h1:BO2rLUAZMrpgh6GBVKi0Gjdqw2MgCtJrtmUdDeZRKjY= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA= +github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -169,8 +179,10 @@ github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/corpix/uarand v0.1.1/go.mod h1:SFKZvkcRoLqVRFZ4u25xPmp6m9ktANfbpXZ7SJ0/FNU= github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/Vwac= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= @@ -232,12 +244,15 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etclabscore/go-jsonschema-walk v0.0.6/go.mod h1:VdfDY72AFAiUhy0ZXEaWSpveGjMT5JcDIm903NGqFwQ= +github.com/etclabscore/go-openrpc-reflect v0.0.36/go.mod h1:0404Ky3igAasAOpyj1eESjstTyneBAIk5PgJFbK4s5E= github.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= github.com/ethereum/go-ethereum v1.9.20 h1:kk/J5OIoaoz3DRrCXznz3RGi212mHHXwzXlY/ZQxcj0= github.com/ethereum/go-ethereum v1.9.20/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= @@ -253,28 +268,51 @@ github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6 github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.4 h1:gSNMv0qWwH16fGQs7ycOUrDjY6YCSsgLUl0I0KLjo8w= github.com/filecoin-project/go-address v0.0.4/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= +github.com/filecoin-project/go-address v0.0.5 h1:SSaFT/5aLfPXycUlFyemoHYhRgdyXClXCyDdNJKPlDM= +github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 h1:pIuR0dnMD0i+as8wNnjjHyQrnhP5O5bmba/lmgQeRgU= github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= +github.com/filecoin-project/go-amt-ipld/v3 v3.0.0 h1:Ou/q82QeHGOhpkedvaxxzpBYuqTxLCcj5OChkDNx4qc= +github.com/filecoin-project/go-amt-ipld/v3 v3.0.0/go.mod h1:Qa95YNAbtoVCTSVtX38aAC1ptBnJfPma1R/zZsKmx4o= github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.1 h1:S6Uuqcspqu81sWJ0He4OAfFLm1tSwPdVjtKTkl5m/xQ= github.com/filecoin-project/go-bitfield v0.2.1/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.3 h1:pedK/7maYF06Z+BYJf2OeFFqIDEh6SP6mIOlLFpYXGs= +github.com/filecoin-project/go-bitfield v0.2.3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.4 h1:uZ7MeE+XfM5lqrHJZ93OnhQKc/rveW8p9au0C68JPgk= +github.com/filecoin-project/go-bitfield v0.2.4/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= +github.com/filecoin-project/go-commp-utils v0.0.0-20201119054358-b88f7a96a434/go.mod h1:6s95K91mCyHY51RPWECZieD3SGWTqIFLf1mPOes9l5U= +github.com/filecoin-project/go-commp-utils v0.1.0 h1:PaDxoXYh1TXnnz5kA/xSObpAQwcJSUs4Szb72nuaNdk= +github.com/filecoin-project/go-commp-utils v0.1.0/go.mod h1:6s95K91mCyHY51RPWECZieD3SGWTqIFLf1mPOes9l5U= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v0.9.0 h1:nTT8j7Hu3TM0wRWrGy83/ctawG7sleJGdFWtIsUsKgY= github.com/filecoin-project/go-data-transfer v0.9.0/go.mod h1:i2CqUy7TMQGKukj9BgqIxiP8nDHDXU2VLd771KVaCaQ= +github.com/filecoin-project/go-data-transfer v1.0.1/go.mod h1:UxvfUAY9v3ub0a21BSK9u3pB2aq30Y0KMsG+w9/ysyo= +github.com/filecoin-project/go-data-transfer v1.4.3 h1:ECEw69NOfmEZ7XN1NSBvj3KTbbH2mIczQs+Z2w4bD7c= +github.com/filecoin-project/go-data-transfer v1.4.3/go.mod h1:n8kbDQXWrY1c4UgfMa9KERxNCWbOTDwdNhf2MpN9dpo= github.com/filecoin-project/go-ds-versioning v0.1.0/go.mod h1:mp16rb4i2QPmxBnmanUx8i/XANp+PFCCJWiAb+VW4/s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= +github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a h1:hyJ+pUm/4U4RdEZBlg6k8Ma4rDiuvqyGpoICXAxwsTg= +github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-markets v1.0.0 h1:np9+tlnWXh9xYG4oZfha6HZFLYOaAZoMGR3V4w6DM48= github.com/filecoin-project/go-fil-markets v1.0.0/go.mod h1:lXExJyYHwpMMddCqhEdNrc7euYJKNkp04K76NZqJLGg= +github.com/filecoin-project/go-fil-markets v1.0.5-0.20201113164554-c5eba40d5335/go.mod h1:AJySOJC00JRWEZzRG2KsfUnqEf5ITXxeX09BE9N4f9c= +github.com/filecoin-project/go-fil-markets v1.2.5 h1:bQgtXbwxKyPxSEQoUI5EaTHJ0qfzyd5NosspuADCm6Y= +github.com/filecoin-project/go-fil-markets v1.2.5/go.mod h1:7JIqNBmFvOyBzk/EiPYnweVdQnWhshixb5B9b1653Ag= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0/go.mod h1:7aWZdaQ1b16BVoQUYR+eEvrDCGJoPLxFpDynFjYfBjI= +github.com/filecoin-project/go-hamt-ipld/v3 v3.0.1 h1:zbzs46G7bOctkZ+JUX3xirrj0RaEsi+27dtlsgrTNBg= +github.com/filecoin-project/go-hamt-ipld/v3 v3.0.1/go.mod h1:gXpNmr3oQx8l3o7qkGyDjJjYSRX7hp/FGOStdqrWyDI= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49 h1:FSY245KeXFCUgyfFEu+bhrZNk8BGGJyfpSmQl2aiPU8= github.com/filecoin-project/go-jsonrpc v0.1.2-0.20201008195726-68c6a2704e49/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec h1:rGI5I7fdU4viManxmDdbk5deZO7afe6L1Wc04dAmlOM= +github.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20 h1:+/4aUeUoKr6AKfPE3mBhXA5spIV6UcKdTYDPNU2Tdmg= @@ -285,21 +323,42 @@ github.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f h1:TZDTu4MtBKSFLXWGKLy+cvC3nHfMFIrVgWLAz/+GgZQ= github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.1.1-0.20210506134452-99b279731c48 h1:Jc4OprDp3bRDxbsrXNHPwJabZJM3iDy+ri8/1e0ZnX4= +github.com/filecoin-project/go-state-types v0.1.1-0.20210506134452-99b279731c48/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe h1:dF8u+LEWeIcTcfUcCf3WFVlc81Fr2JKg8zPzIbBDKDw= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= +github.com/filecoin-project/go-statestore v0.1.1 h1:ufMFq00VqnT2CAuDpcGnwLnCX1I/c3OROw/kXVNSTZk= +github.com/filecoin-project/go-statestore v0.1.1/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8= github.com/filecoin-project/lotus v1.1.2 h1:cs74C5oNVoIIFmjovpSuJR3qXzXcqS9cpOT+oSmNRiE= github.com/filecoin-project/lotus v1.1.2/go.mod h1:jSlQv+/+WGox3TdEzBEfmXzvbot4OOsBiIh98t7AnAA= +github.com/filecoin-project/lotus v1.9.0 h1:TDKDLbmgYTL8M0mlfd9HmJVEYRlSSOQnakg4+9rfyWM= +github.com/filecoin-project/lotus v1.9.0/go.mod h1:4YC/8rizrrp2wKOYvHQEjCxZbziXi68BhrzvI+FCye0= github.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4= github.com/filecoin-project/specs-actors v0.9.12 h1:iIvk58tuMtmloFNHhAOQHG+4Gci6Lui0n7DYQGi3cJk= github.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= +github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4= +github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= github.com/filecoin-project/specs-actors/v2 v2.0.1/go.mod h1:v2NZVYinNIKA9acEMBm5wWXxqv5+frFEbekBFemYghY= github.com/filecoin-project/specs-actors/v2 v2.2.0 h1:IyCICb0NHYeD0sdSqjVGwWydn/7r7xXuxdpvGAcRCGY= github.com/filecoin-project/specs-actors/v2 v2.2.0/go.mod h1:rlv5Mx9wUhV8Qsz+vUezZNm+zL4tK08O0HreKKPB2Wc= +github.com/filecoin-project/specs-actors/v2 v2.3.2/go.mod h1:UuJQLoTx/HPvvWeqlIFmC/ywlOLHNe8SNQ3OunFbu2Y= +github.com/filecoin-project/specs-actors/v2 v2.3.5-0.20210114162132-5b58b773f4fb h1:orr/sMzrDZUPAveRE+paBdu1kScIUO5zm+HYeh+VlhA= +github.com/filecoin-project/specs-actors/v2 v2.3.5-0.20210114162132-5b58b773f4fb/go.mod h1:LljnY2Mn2homxZsmokJZCpRuhOPxfXhvcek5gWkmqAc= +github.com/filecoin-project/specs-actors/v3 v3.1.0 h1:s4qiPw8pgypqBGAy853u/zdZJ7K9cTZdM1rTiSonHrg= +github.com/filecoin-project/specs-actors/v3 v3.1.0/go.mod h1:mpynccOLlIRy0QnR008BwYBwT9fen+sPR13MA1VmMww= +github.com/filecoin-project/specs-actors/v4 v4.0.0 h1:vMALksY5G3J5rj3q9rbcyB+f4Tk1xrLqSgdB3jOok4s= +github.com/filecoin-project/specs-actors/v4 v4.0.0/go.mod h1:TkHXf/l7Wyw4ZejyXIPS2rK8bBO0rdwhTZyQQgaglng= +github.com/filecoin-project/specs-actors/v5 v5.0.0-20210512015452-4fe3889fff57 h1:N6IBsnGXfAMXd677G6EiOKewFwQ7Ulcuupi4U6wYmXE= +github.com/filecoin-project/specs-actors/v5 v5.0.0-20210512015452-4fe3889fff57/go.mod h1:283yBMMUSDB2abcjP/hhrwTkhb9h3sfM6KGrep/ZlBI= github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796 h1:dJsTPWpG2pcTeojO2pyn0c6l+x/3MZYCBgo/9d11JEk= github.com/filecoin-project/specs-storage v0.1.1-0.20200907031224-ed2e5cd13796/go.mod h1:nJRRM7Aa9XVvygr3W9k6xGF46RWzr2zxF/iGoAIfA/g= +github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506 h1:Ur/l2+6qN+lQiqjozWWc5p9UDaAMDZKTlDS98oRnlIw= +github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506/go.mod h1:nJRRM7Aa9XVvygr3W9k6xGF46RWzr2zxF/iGoAIfA/g= github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -333,11 +392,23 @@ github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.11/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -365,6 +436,7 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -393,6 +465,7 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -407,6 +480,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -438,6 +513,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= @@ -487,7 +563,10 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK github.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/iancoleman/orderedmap v0.1.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428/go.mod h1:uhpZMVGznybq1itEKXj6RYw9I71qK4kH+OGMjRC4KEo= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -500,15 +579,20 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= github.com/ipfs/go-bitswap v0.2.20/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= +github.com/ipfs/go-bitswap v0.3.2/go.mod h1:AyWWfN3moBzQX0banEtfKOfbXb3ZeoOeXnZGNPV9S6w= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= +github.com/ipfs/go-block-format v0.0.3 h1:r8t66QstRp/pd/or4dpnbVfXT5Gt7lOqRvC+/dDTpMc= +github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= github.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI= github.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So= github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= github.com/ipfs/go-blockservice v0.1.3/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834 h1:hFJoI1D2a3MqiNkSb4nKwrdkhCngUxUTFNwVwovZX2s= github.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= +github.com/ipfs/go-blockservice v0.1.4 h1:Vq+MlsH8000KbbUciRyYMEw/NNP8UAGmcqKi4uWmFGA= +github.com/ipfs/go-blockservice v0.1.4/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -553,6 +637,10 @@ github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CE github.com/ipfs/go-graphsync v0.3.0/go.mod h1:gEBvJUNelzMkaRPJTpg/jaKN4AQW/7wDWu0K92D8o10= github.com/ipfs/go-graphsync v0.3.1 h1:dJLYrck4oyJDfMVhGEKiWHxaY8oYMWko4m2Fi+4bofo= github.com/ipfs/go-graphsync v0.3.1/go.mod h1:bw4LiLM5Oq/uLdzEtih9LK8GrwSijv+XqYiWCTxHMqs= +github.com/ipfs/go-graphsync v0.4.2/go.mod h1:/VmbZTUdUMTbNkgzAiCEucIIAU3BkLE2cZrDCVUhyi0= +github.com/ipfs/go-graphsync v0.4.3/go.mod h1:mPOwDYv128gf8gxPFgXnz4fNrSYPsWyqisJ7ych+XDY= +github.com/ipfs/go-graphsync v0.6.0 h1:x6UvDUGA7wjaKNqx5Vbo7FGT8aJ5ryYA0dMQ5jN3dF0= +github.com/ipfs/go-graphsync v0.6.0/go.mod h1:e2ZxnClqBBYAtd901g9vXMJzS47labjAtOzsWtOzKNk= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= @@ -560,9 +648,12 @@ github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86 github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= github.com/ipfs/go-ipfs-blockstore v1.0.1 h1:fnuVj4XdZp4yExhd0CnUwAiMNJHiPnfInhiuwz4lW1w= github.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= +github.com/ipfs/go-ipfs-blockstore v1.0.3 h1:RDhK6fdg5YsonkpMuMpdvk/pRtOQlrIRIybuQfkvB2M= +github.com/ipfs/go-ipfs-blockstore v1.0.3/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= +github.com/ipfs/go-ipfs-cmds v0.1.0 h1:0CEde9EcxByej8+L6d1PST57J4ambRPyCTjLG5Ymou8= github.com/ipfs/go-ipfs-cmds v0.1.0/go.mod h1:TiK4e7/V31tuEb8YWDF8lN3qrnDH+BS7ZqWIeYJlAs8= github.com/ipfs/go-ipfs-config v0.0.11/go.mod h1:wveA8UT5ywN26oKStByzmz1CO6cXwLKKM6Jn/Hfw08I= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= @@ -581,6 +672,7 @@ github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjN github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6ZpusRg= github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= +github.com/ipfs/go-ipfs-http-client v0.0.5 h1:niW5M0qqa0O/VRCAzr3f5Y7i3MjTpf0lhpkisjRtHR8= github.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw= github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= @@ -598,6 +690,8 @@ github.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9 github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf h1:PRCy+w3GocY77CBEwTprp6hn7PLiEU1YToKe7B+1FVk= github.com/ipfs/go-ipld-cbor v0.0.5-0.20200428170625-a0bd04d3cbdf/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= +github.com/ipfs/go-ipld-cbor v0.0.5 h1:ovz4CHKogtG2KB/h1zUp5U0c/IzZrL435rCh5+K/5G8= +github.com/ipfs/go-ipld-cbor v0.0.5/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4= github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= github.com/ipfs/go-ipld-format v0.2.0 h1:xGlJKkArkmBvowr+GMCX0FEZtkro71K1AwiKnL37mwA= @@ -628,6 +722,7 @@ github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fG github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-metrics-prometheus v0.0.2/go.mod h1:ELLU99AQQNi+zX6GCGm2lAgnzdSH3u5UVlCdqSXnEks= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= +github.com/ipfs/go-path v0.0.7 h1:H06hKMquQ0aYtHiHryOMLpQC1qC3QwXwkahcEVD51Ho= github.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno= github.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ= github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= @@ -636,18 +731,24 @@ github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUn github.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4= github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= github.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= +github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= +github.com/ipfs/interface-go-ipfs-core v0.2.3 h1:E6uQ+1fJjkxJWlL9lAE72a5FWeyeeNL3GitLy8+jq3Y= github.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg= github.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs= github.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4/go.mod h1:xrMEcuSq+D1vEwl+YAXsg/JfA98XGpXDwnkIL4Aimqw= +github.com/ipld/go-car v0.1.1-0.20201119040415-11b6074b6d4d/go.mod h1:2Gys8L8MJ6zkh1gktTSXreY63t4UbyvNp5JaudTyxHQ= github.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f h1:XpOuNQ5GbXxUcSukbQcW9jkE7REpaFGJU2/T00fo9kA= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= +github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018 h1:RbRHv8epkmvBYA5cGfz68GUSbOgx5j/7ObLIl4Rsif0= +github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= github.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs= github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0= +github.com/ipld/go-ipld-prime-proto v0.1.0/go.mod h1:11zp8f3sHVgIqtb/c9Kr5ZGqpnCLF1IVTNOez9TopzE= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -673,6 +774,8 @@ github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8 github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= @@ -706,6 +809,7 @@ github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfo github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -716,6 +820,7 @@ github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwn github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= github.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk= github.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= github.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE= @@ -743,6 +848,8 @@ github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El github.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= github.com/libp2p/go-libp2p v0.11.0/go.mod h1:3/ogJDXsbbepEfqtZKBR/DedzxJXCeK17t2Z9RE9bEE= +github.com/libp2p/go-libp2p v0.12.0/go.mod h1:FpHZrfC1q7nA8jitvdjKBDF31hguaC676g/nT9PgQM0= +github.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052/go.mod h1:nRMRTab+kZuk0LnKZpxhOVH/ndsdr2Nr//Zltc/vwgo= github.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4= github.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE= github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= @@ -752,6 +859,7 @@ github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRk github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= github.com/libp2p/go-libp2p-autonat v0.3.2/go.mod h1:0OzOi1/cVc7UcxfOddemYD5vzEqi4fwRbnZcJGLi68U= +github.com/libp2p/go-libp2p-autonat v0.4.0/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= github.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A= github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= @@ -769,6 +877,7 @@ github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQ github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= +github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= github.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk= github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= @@ -796,6 +905,8 @@ github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-core v0.6.1 h1:XS+Goh+QegCDojUZp00CaPMfiEADCrLjNZskWE7pvqs= github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= +github.com/libp2p/go-libp2p-core v0.7.0 h1:4a0TMjrWNTZlNvcqxZmrMRDi/NQWrhwO2pkTuLSQ/IQ= +github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE= github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= @@ -816,8 +927,10 @@ github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= github.com/libp2p/go-libp2p-kad-dht v0.2.1/go.mod h1:k7ONOlup7HKzQ68dE6lSnp07cdxdkmnRa+6B4Fh9/w0= github.com/libp2p/go-libp2p-kad-dht v0.8.3/go.mod h1:HnYYy8taJWESkqiESd1ngb9XX/XGGsMA5G0Vj2HoSh4= +github.com/libp2p/go-libp2p-kad-dht v0.11.0/go.mod h1:5ojtR2acDPqh/jXf5orWy8YGb8bHQDS+qeDcoscL/PI= github.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= +github.com/libp2p/go-libp2p-kbucket v0.4.7/go.mod h1:XyVo99AfQH0foSf176k4jY1xUJ2+jUJIZCSDm7r2YKk= github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= github.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08= @@ -827,6 +940,7 @@ github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiY github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= github.com/libp2p/go-libp2p-mplex v0.2.4/go.mod h1:mI7iOezdWFOisvUwaYd3IDrJ4oVmgoXK8H331ui39CE= +github.com/libp2p/go-libp2p-mplex v0.3.0/go.mod h1:l9QWxRbbb5/hQMECEb908GbS9Sm2UAR2KFZKUJEynEs= github.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= @@ -859,9 +973,12 @@ github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uz github.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= github.com/libp2p/go-libp2p-pubsub v0.3.6 h1:9oO8W7qIWCYQYyz5z8nUsPcb3rrFehBlkbqvbSVjBxY= github.com/libp2p/go-libp2p-pubsub v0.3.6/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= +github.com/libp2p/go-libp2p-pubsub v0.4.2-0.20210212194758-6c1addf493eb h1:HExLcdXn8fgtXPciUw97O5NNhBn31dt6d9fVUD4cngo= +github.com/libp2p/go-libp2p-pubsub v0.4.2-0.20210212194758-6c1addf493eb/go.mod h1:izkeMLvz6Ht8yAISXjx60XUQZMq9ZMe5h2ih4dLIBIQ= github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU= github.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M= github.com/libp2p/go-libp2p-quic-transport v0.8.2/go.mod h1:L+e0q15ZNaYm3seHgbsXjWP8kXLEqz+elLWKk9l8DhM= +github.com/libp2p/go-libp2p-quic-transport v0.9.0/go.mod h1:xyY+IgxL0qsW7Kiutab0+NlxM0/p9yRtrGTYsuMWf70= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= @@ -885,6 +1002,8 @@ github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHv github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA= github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= +github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= +github.com/libp2p/go-libp2p-swarm v0.3.1/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -892,6 +1011,7 @@ github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MB github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= +github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk= github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A= @@ -909,6 +1029,8 @@ github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9R github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= +github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= +github.com/libp2p/go-libp2p-yamux v0.4.1/go.mod h1:FA/NjRYRVNjqOzpGuGqcruH7jAU2mYIjtKBicVOL3dc= github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= @@ -919,6 +1041,7 @@ github.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTW github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= +github.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= github.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= @@ -971,6 +1094,8 @@ github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZ github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= +github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= +github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw= @@ -984,6 +1109,10 @@ github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzR github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= github.com/marten-seemann/qpack v0.2.0/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= @@ -1109,6 +1238,8 @@ github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wS github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= github.com/multiformats/go-multistream v0.1.2 h1:knyamLYMPFPngQjGQ0lhnlys3jtVR/3xV6TREUJr+fE= github.com/multiformats/go-multistream v0.1.2/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= +github.com/multiformats/go-multistream v0.2.0 h1:6AuNmQVKUkRnddw2YiDjt5Elit40SFxMJkVnhmETXtU= +github.com/multiformats/go-multistream v0.2.0/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= @@ -1128,6 +1259,8 @@ github.com/near/borsh-go v0.3.0 h1:+DvG7eApOD3KrHIh7TwZvYzhXUF/OzMTC6aRTUEtW+8= github.com/near/borsh-go v0.3.0/go.mod h1:NeMochZp7jN/pYFuxLkrZtmLqbADmnp/y1+/dL+AsyQ= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= +github.com/ngdinhtoan/glide-cleanup v0.2.0/go.mod h1:UQzsmiDOb8YV3nOsCxK/c9zPpCZVNoHScRE3EO9pVMM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c/go.mod h1:7qN3Y0BvzRUf4LofcoJplQL10lsFDb4PYlePTVwrP28= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= @@ -1156,6 +1289,8 @@ github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/open-rpc/meta-schema v0.0.0-20201029221707-1b72ef2ea333/go.mod h1:Ag6rSXkHIckQmjFBCweJEEt1mrTPBv8b9W4aU/NQWfI= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-grpc v0.0.0-20191001143057-db30781987df/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -1248,6 +1383,7 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y= github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= +github.com/raulk/go-watchdog v1.0.1/go.mod h1:lzSbAl5sh4rtI8tYHU01BWIDzgzqaQLj6RcA1i4mlqI= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1266,6 +1402,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -1306,6 +1443,7 @@ github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81a github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= @@ -1357,11 +1495,14 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/supranational/blst v0.1.1/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= @@ -1391,6 +1532,9 @@ github.com/terra-project/go-cosmwasm v0.10.1-terra h1:3yvESyqndOoJKmmFyGKfQy7rLg github.com/terra-project/go-cosmwasm v0.10.1-terra/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc= github.com/terra-project/ledger-terra-go v0.11.1-terra/go.mod h1:5fdyEuDNvsymbqag/EaaAeWAgyAebQe2VH38H+DnXnA= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= +github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1403,6 +1547,7 @@ github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGr github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -1430,6 +1575,10 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163 h1:TtcUeY2XZSriVWR1pXyfCBWIf/NGC2iUdNw1lofUjUU= github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2 h1:7HzUKl5d/dELS9lLeT4W6YvliZx+s9k/eOOIdHKrA/w= +github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2 h1:bsUlNhdmbtlfdLVXAVfuvKQ01RnWAM09TVrJkI7NZs4= +github.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= @@ -1446,6 +1595,7 @@ github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84 github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/whyrusleeping/pubsub v0.0.0-20131020042734-02de8aa2db3d/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= +github.com/whyrusleeping/pubsub v0.0.0-20190708150250-92bcb0691325/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow= github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= github.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8= @@ -1453,11 +1603,13 @@ github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+m github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/c-for-go v0.0.0-20201002084316-c134bfab968f/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= +github.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb/go.mod h1:pbNsDSxn1ICiNn9Ct4ZGNrwzfkkwYbx/lw8VuyutFIg= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.12.1/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo= go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw= @@ -1480,12 +1632,16 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -1494,12 +1650,16 @@ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+ go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= @@ -1538,6 +1698,7 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1612,6 +1773,10 @@ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201022231255-08b38378de70 h1:Z6x4N9mAi4oF0TbHweCsH618MO6OI6UFgV0FP5n0wBY= +golang.org/x/net v0.0.0-20201022231255-08b38378de70/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1628,7 +1793,10 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1695,11 +1863,17 @@ golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200812155832-6a926be9bd1d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200926100807-9d91bd62050c h1:38q6VNPWR010vN82/SB121GujZNIfAUb4YttE2rhGuc= golang.org/x/sys v0.0.0-20200926100807-9d91bd62050c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1733,6 +1907,7 @@ golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1743,6 +1918,7 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20201112185108-eeaa07dd7696/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1812,6 +1988,8 @@ google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1 h1:SfXqXS5hkufcdZ/mHtYCh53P2b+92WQq/DZcKLgsFRs= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1827,6 +2005,7 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1863,11 +2042,16 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/golex v1.0.1/go.mod h1:QCA53QtsT1NdGkaZZkF5ezFwk4IXh4BGNafAARTC254= +modernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk= +modernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= From 91679653a8434c1439eae555bf86ed1dbece8036 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 12:38:46 +0400 Subject: [PATCH 326/335] ci: fix commits for ffi --- .github/workflows/test.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34206398..b1db9fd4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,8 +4,8 @@ jobs: test-solana: runs-on: ubuntu-latest env: - FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef + FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 + SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 steps: - uses: actions/setup-go@v2 with: @@ -115,8 +115,8 @@ jobs: test-filecoin: runs-on: ubuntu-latest env: - FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef + FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 + SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -239,8 +239,8 @@ jobs: test-zcash: runs-on: ubuntu-latest env: - FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef + FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 + SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -362,8 +362,8 @@ jobs: test-terra: runs-on: ubuntu-latest env: - FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef + FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 + SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -485,8 +485,8 @@ jobs: test-dogecoin: runs-on: ubuntu-latest env: - FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef + FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 + SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -608,8 +608,8 @@ jobs: test-btc-bch: runs-on: ubuntu-latest env: - FILECOIN_FFI_COMMIT: a62d00da59d1b0fb35f3a4ae854efa9441af892d - SOLANA_FFI_COMMIT: f6521b8a1af44f4d468bc8e7e67ba3766a5602ef + FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 + SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 From ef986f2302570e545a3164bdb6e5e5302154b03e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 12:43:11 +0400 Subject: [PATCH 327/335] fix: configure for private repos first --- .github/workflows/test.yml | 60 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1db9fd4..1659f2d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,16 +11,16 @@ jobs: with: go-version: "1.15.5" + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Check out code into the Go module directory uses: actions/checkout@v1 with: submodules: recursive - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - name: Caching modules uses: actions/cache@v1 with: @@ -124,16 +124,16 @@ jobs: go-version: 1.13 id: go + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Check out code into the Go module directory uses: actions/checkout@v1 with: submodules: recursive - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - name: Caching modules uses: actions/cache@v1 with: @@ -248,16 +248,16 @@ jobs: go-version: 1.13 id: go + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Check out code into the Go module directory uses: actions/checkout@v1 with: submodules: recursive - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - name: Caching modules uses: actions/cache@v1 with: @@ -371,16 +371,16 @@ jobs: go-version: 1.13 id: go + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Check out code into the Go module directory uses: actions/checkout@v1 with: submodules: recursive - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - name: Caching modules uses: actions/cache@v1 with: @@ -494,16 +494,16 @@ jobs: go-version: 1.13 id: go + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Check out code into the Go module directory uses: actions/checkout@v1 with: submodules: recursive - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - name: Caching modules uses: actions/cache@v1 with: @@ -617,16 +617,16 @@ jobs: go-version: 1.13 id: go + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Check out code into the Go module directory uses: actions/checkout@v1 with: submodules: recursive - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - name: Caching modules uses: actions/cache@v1 with: From 259ad2ad89f39a98db2f6655ccc5590a39090677 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 12:44:21 +0400 Subject: [PATCH 328/335] fix indentation --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1659f2d4..eb421577 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,10 +11,10 @@ jobs: with: go-version: "1.15.5" - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - name: Check out code into the Go module directory uses: actions/checkout@v1 From 6836d4a82de9e73df0be015b5e382b483173904a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 12:46:32 +0400 Subject: [PATCH 329/335] fix indentation again --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb421577..d2c4c249 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - name: Configure git for Private Modules env: TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - name: Check out code into the Go module directory uses: actions/checkout@v1 @@ -127,7 +127,7 @@ jobs: - name: Configure git for Private Modules env: TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - name: Check out code into the Go module directory uses: actions/checkout@v1 @@ -251,7 +251,7 @@ jobs: - name: Configure git for Private Modules env: TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - name: Check out code into the Go module directory uses: actions/checkout@v1 @@ -374,7 +374,7 @@ jobs: - name: Configure git for Private Modules env: TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - name: Check out code into the Go module directory uses: actions/checkout@v1 @@ -497,7 +497,7 @@ jobs: - name: Configure git for Private Modules env: TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - name: Check out code into the Go module directory uses: actions/checkout@v1 @@ -620,7 +620,7 @@ jobs: - name: Configure git for Private Modules env: TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - name: Check out code into the Go module directory uses: actions/checkout@v1 From 7248011bd0b90110ed8ffa13e2218245a24ee8e0 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 12:51:21 +0400 Subject: [PATCH 330/335] auth token while checking out --- .github/workflows/test.yml | 6 ++++++ Dockerfile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2c4c249..1cdfcdcd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} submodules: recursive - name: Caching modules @@ -132,6 +133,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} submodules: recursive - name: Caching modules @@ -256,6 +258,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} submodules: recursive - name: Caching modules @@ -379,6 +382,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} submodules: recursive - name: Caching modules @@ -502,6 +506,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} submodules: recursive - name: Caching modules @@ -625,6 +630,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v1 with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} submodules: recursive - name: Caching modules diff --git a/Dockerfile b/Dockerfile index f43811e8..596b5540 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ ENV GOPROXY=https://proxy.golang.org ARG GITHUB_TOKEN RUN git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" -ENV GOPRIVATE=github.com/renproject/ren-solana +ENV GOPRIVATE=github.com/renproject/ren-solana,github.com/renproject/solana-ffi RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" From d1f388bc3c2753a82993b1eb22fe2fbd962a7e4c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 12:53:48 +0400 Subject: [PATCH 331/335] update correct ffi commits --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 596b5540..666a26aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ ENV GOPROXY=https://proxy.golang.org ARG GITHUB_TOKEN RUN git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" -ENV GOPRIVATE=github.com/renproject/ren-solana,github.com/renproject/solana-ffi +ENV GOPRIVATE="github.com/renproject/ren-solana,github.com/renproject/solana-ffi" RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" @@ -33,7 +33,7 @@ RUN mkdir -p src/github.com/filecoin-project WORKDIR $GOPATH/src/github.com/filecoin-project RUN git clone https://github.com/filecoin-project/filecoin-ffi WORKDIR $GOPATH/src/github.com/filecoin-project/filecoin-ffi -RUN git checkout a62d00da59d1b0fb35f3a4ae854efa9441af892d +RUN git checkout 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 RUN make RUN go install @@ -43,6 +43,6 @@ RUN mkdir -p src/github.com/renproject WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi -RUN git checkout f6521b8a1af44f4d468bc8e7e67ba3766a5602ef +RUN git checkout 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 RUN make clean && make RUN go install ./... From 3ab996e6239cc9af365ef00517572880a6f53571 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 13:15:29 +0400 Subject: [PATCH 332/335] dependencies and build secret for build-push --- .github/workflows/test.yml | 14 ++++++++------ Dockerfile | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1cdfcdcd..63cd346a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -158,7 +158,7 @@ jobs: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -283,7 +283,7 @@ jobs: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -407,7 +407,7 @@ jobs: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -531,7 +531,7 @@ jobs: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -655,7 +655,7 @@ jobs: for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done sudo apt-get update sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev curl https://sh.rustup.rs -sSf | sh -s -- -y source $HOME/.cargo/env @@ -758,6 +758,8 @@ jobs: with: push: true tags: renbot/multichain:latest + secrets: | + GIT_AUTH_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} build-args: | GITHUB_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 666a26aa..9195f196 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,8 @@ RUN apt-get update && \ ocl-icd-opencl-dev \ libssl-dev \ libudev-dev \ + hwloc \ + libhwloc-dev \ gcc \ git \ bzr \ From ba2bd2d5fe228665dd5c8671157fcd9889b4fe54 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 14:08:21 +0400 Subject: [PATCH 333/335] fix ports for solana --- infra/docker-compose.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/infra/docker-compose.yaml b/infra/docker-compose.yaml index 1901dcaa..402fe7ec 100644 --- a/infra/docker-compose.yaml +++ b/infra/docker-compose.yaml @@ -149,8 +149,7 @@ services: solana: image: renbot/ren-solana:latest ports: - - "0.0.0.0:8899:8899" - - "0.0.0.0:8900:8900" + - "0.0.0.0:8899-8900:8899-8900" ## ## Moonbeam From b7b5b8dc02b94d893dcc714a2527d0a4c1f4992a Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 14:42:32 +0400 Subject: [PATCH 334/335] fix decimals --- .github/workflows/build.yml | 34 +++++++++++++++++++++++++++++ .github/workflows/test.yml | 43 ++++++------------------------------- Dockerfile | 2 +- chain/solana/solana_test.go | 4 ++-- 4 files changed, 44 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..7d204511 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Docker Build +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: renbot/multichain:latest + secrets: | + GIT_AUTH_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} + build-args: | + GITHUB_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 63cd346a..a84b2edd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 - SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 + SOLANA_FFI_COMMIT: 1d5f4405dd2fb89c96cde28db33051a6e992d607 steps: - uses: actions/setup-go@v2 with: @@ -93,7 +93,7 @@ jobs: - name: Setup environment for Solana tests run: | - sh -c "$(curl -sSfL https://release.solana.com/v1.6.8/install)" + sh -c "$(curl -sSfL https://release.solana.com/v1.7.0/install)" cd $GITHUB_WORKSPACE export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" echo ${{ secrets.SOLANA_KEY }} > ~/.config/solana/id.json @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 - SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 + SOLANA_FFI_COMMIT: 1d5f4405dd2fb89c96cde28db33051a6e992d607 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -242,7 +242,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 - SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 + SOLANA_FFI_COMMIT: 1d5f4405dd2fb89c96cde28db33051a6e992d607 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -366,7 +366,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 - SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 + SOLANA_FFI_COMMIT: 1d5f4405dd2fb89c96cde28db33051a6e992d607 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -490,7 +490,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 - SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 + SOLANA_FFI_COMMIT: 1d5f4405dd2fb89c96cde28db33051a6e992d607 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -614,7 +614,7 @@ jobs: runs-on: ubuntu-latest env: FILECOIN_FFI_COMMIT: 8b97bd8230b77bd32f4f27e4766a6d8a03b4e801 - SOLANA_FFI_COMMIT: 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 + SOLANA_FFI_COMMIT: 1d5f4405dd2fb89c96cde28db33051a6e992d607 steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 @@ -736,32 +736,3 @@ jobs: -btc=true \ -bch=true \ -timeout 1500s - - build: - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - tags: renbot/multichain:latest - secrets: | - GIT_AUTH_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} - build-args: | - GITHUB_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }} - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index 9195f196..2c3985da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,6 @@ RUN mkdir -p src/github.com/renproject WORKDIR $GOPATH/src/github.com/renproject RUN git clone https://github.com/renproject/solana-ffi WORKDIR $GOPATH/src/github.com/renproject/solana-ffi -RUN git checkout 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 +RUN git checkout 1d5f4405dd2fb89c96cde28db33051a6e992d607 RUN make clean && make RUN go install ./... diff --git a/chain/solana/solana_test.go b/chain/solana/solana_test.go index 38bad613..e769291f 100644 --- a/chain/solana/solana_test.go +++ b/chain/solana/solana_test.go @@ -57,7 +57,7 @@ var _ = Describe("Solana", func() { // Mint some tokens. time.Sleep(10 * time.Second) - mintAmount := uint64(10000000000) // 10 tokens. + mintAmount := uint64(1000000000) // 10 tokens. mintSig := cgo.GatewayMint(keypairPath, solana.DefaultClientRPCURL, renVmSecret, selector, mintAmount) logger.Debug("Mint", zap.String("tx signature", string(mintSig))) @@ -68,7 +68,7 @@ var _ = Describe("Solana", func() { recipientRawAddr, err := bitcoinAddrEncodeDecoder.DecodeAddress(recipient) Expect(err).NotTo(HaveOccurred()) burnCount := cgo.GatewayGetBurnCount(solana.DefaultClientRPCURL) - burnAmount := uint64(5000000000) // 5 tokens. + burnAmount := uint64(500000000) // 5 tokens. burnSig := cgo.GatewayBurn(keypairPath, solana.DefaultClientRPCURL, selector, burnCount, burnAmount, uint32(len(recipientRawAddr)), []byte(recipientRawAddr)) logger.Debug("Burn", zap.String("tx signature", string(burnSig))) From b7eb1022aed37fdc3a19a60f6a9091bcf9a3d28b Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Thu, 3 Jun 2021 14:43:44 +0400 Subject: [PATCH 335/335] update solana-ffi version --- chain/solana/solana-ffi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/solana/solana-ffi b/chain/solana/solana-ffi index 0b1a2cd8..1d5f4405 160000 --- a/chain/solana/solana-ffi +++ b/chain/solana/solana-ffi @@ -1 +1 @@ -Subproject commit 0b1a2cd8f5a9bff6e6e0c2392443b69617e6d943 +Subproject commit 1d5f4405dd2fb89c96cde28db33051a6e992d607