trustwallet / wallet-core

Cross-platform, cross-blockchain wallet library.
https://developer.trustwallet.com/wallet-core
Apache License 2.0
2.81k stars 1.58k forks source link

cosmos 广播交易 响应null #1316

Closed jc0803kevin closed 3 years ago

jc0803kevin commented 3 years ago

签名结果为

{
    "mode": "block",
    "tx": {
        "fee": {
            "amount": [
                {
                    "amount": "2500",
                    "denom": "uatom"
                }
            ],
            "gas": "100000"
        },
        "memo": "kevin",
        "msg": [
            {
                "type": "cosmos-sdk/MsgSend",
                "value": {
                    "amount": [
                        {
                            "amount": "100",
                            "denom": "uatom"
                        }
                    ],
                    "from_address": "cosmos168kqw3x7j807mfpevtt7pwmaandwa25z6rjs6r",
                    "to_address": "cosmos1ht8vzyx8t2yxh0jlwmk7atu0p8en6w4qnylxvx"
                }
            }
        ],
        "signatures": [
            {
                "pub_key": {
                    "type": "tendermint/PubKeySecp256k1",
                    "value": "A7djL/Y4wDXuTCHrt2edUhrEPskGNlejI4yb12A0XkQU"
                },
                "signature": "nPPAd2cWhwvUJZejomZoLBxuN35XZ24Tmp39C+iJQZJzlUM+Xt2FaPe1fWkGLvf0DgEDs8TPxGTlQ0DHxNrBgw=="
            }
        ]
    }
}

请求节点接口 响应为null.

hewigovens commented 3 years ago
  1. make sure you send to latest and synced node
  2. you should see txhash or error in raw_log like below
{
    "txhash": "283CC4D6FAAE32900043317A63A14F6DB83360B1C02D950A452EC58D45BECA93",
    "codespace": "sdk",
    "code": 4,
    "raw_log": "signature verification failed; please verify account number (200176), sequence (3) and chain-id (cosmoshub-4): unauthorized",
    "logs": null,
    "gas_wanted": "100000",
    "gas_used": "41546"
}
jc0803kevin commented 3 years ago

能发一下您,这边广播时候使用的api 么?谢谢

hewigovens commented 3 years ago

https://cosmos.network/rpc/v0.41.4

jc0803kevin commented 3 years ago

我这边安装的节点,响应还是返回为null.节点信息如下

{
    "node_info": {
        "protocol_version": {
            "p2p": "8",
            "block": "11",
            "app": "0"
        },
        "id": "5606a4f2194815e7660091308470a705ca3253bd",
        "listen_addr": "tcp://0.0.0.0:26656",
        "network": "cosmoshub-4",
        "version": "v0.34.7",
        "channels": "40202122233038606100",
        "moniker": "chooseanicehandle",
        "other": {
            "tx_index": "on",
            "rpc_address": "tcp://0.0.0.0:26657"
        }
    },
    "application_version": {
        "name": "gaia",
        "server_name": "gaiad",
        "version": "heads/v4.0.4-b876ea4366a055e40c252ea5d441e2bea5fb3fa0",
        "commit": "b876ea4366a055e40c252ea5d441e2bea5fb3fa0",
        "build_tags": "netgo,ledger",
        "go": "go version go1.16 linux/amd64",
        "build_deps": [
            "github.com/99designs/keyring@v1.1.6",
            "github.com/ChainSafe/go-schnorrkel@v0.0.0-20200405005733-88cbf1b4c40d",
            "github.com/Workiva/go-datastructures@v1.0.52",
            "github.com/aristanetworks/goarista@v0.0.0-20170210015632-ea17b1a17847",
            "github.com/armon/go-metrics@v0.3.6",
            "github.com/beorn7/perks@v1.0.1",
            "github.com/bgentry/speakeasy@v0.1.0",
            "github.com/btcsuite/btcd@v0.21.0-beta",
            "github.com/btcsuite/btcutil@v1.0.2",
            "github.com/cespare/xxhash/v2@v2.1.1",
            "github.com/confio/ics23/go@v0.6.3",
            "github.com/cosmos/cosmos-sdk@v0.41.3",
            "github.com/cosmos/go-bip39@v1.0.0",
            "github.com/cosmos/iavl@v0.15.3",
            "github.com/cosmos/ledger-cosmos-go@v0.11.1",
            "github.com/cosmos/ledger-go@v0.9.2",
            "github.com/davecgh/go-spew@v1.1.1",
            "github.com/dvsekhvalnov/jose2go@v0.0.0-20200901110807-248326c1351b",
            "github.com/enigmampc/btcutil@v1.0.3-0.20200723161021-e2fb6adb2a25",
            "github.com/ethereum/go-ethereum@v1.9.25",
            "github.com/felixge/httpsnoop@v1.0.1",
            "github.com/fsnotify/fsnotify@v1.4.9",
            "github.com/go-kit/kit@v0.10.0",
            "github.com/go-logfmt/logfmt@v0.5.0",
            "github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2",
            "github.com/gogo/gateway@v1.1.0",
            "github.com/gogo/protobuf@v1.3.3 => github.com/regen-network/protobuf@v1.3.3-alpha.regen.1",
            "github.com/golang/protobuf@v1.4.3",
            "github.com/golang/snappy@v0.0.3-0.20201103224600-674baa8c7fc3",
            "github.com/google/btree@v1.0.0",
            "github.com/gorilla/handlers@v1.5.1",
            "github.com/gorilla/mux@v1.8.0",
            "github.com/gorilla/websocket@v1.4.2",
            "github.com/grpc-ecosystem/go-grpc-middleware@v1.2.2",
            "github.com/grpc-ecosystem/grpc-gateway@v1.16.0",
            "github.com/gsterjov/go-libsecret@v0.0.0-20161001094733-a6f4afe4910c",
            "github.com/gtank/merlin@v0.1.1",
            "github.com/gtank/ristretto255@v0.1.2",
            "github.com/hashicorp/go-immutable-radix@v1.0.0",
            "github.com/hashicorp/golang-lru@v0.5.4",
            "github.com/hashicorp/hcl@v1.0.0",
            "github.com/libp2p/go-buffer-pool@v0.0.2",
            "github.com/magiconair/properties@v1.8.4",
            "github.com/mattn/go-isatty@v0.0.12",
            "github.com/matttproud/golang_protobuf_extensions@v1.0.1",
            "github.com/mimoo/StrobeGo@v0.0.0-20181016162300-f8f6d4d2b643",
            "github.com/minio/highwayhash@v1.0.1",
            "github.com/mitchellh/go-homedir@v1.1.0",
            "github.com/mitchellh/mapstructure@v1.1.2",
            "github.com/mtibben/percent@v0.2.1",
            "github.com/pelletier/go-toml@v1.8.0",
            "github.com/pkg/errors@v0.9.1",
            "github.com/pmezard/go-difflib@v1.0.0",
            "github.com/prometheus/client_golang@v1.8.0",
            "github.com/prometheus/client_model@v0.2.0",
            "github.com/prometheus/common@v0.15.0",
            "github.com/prometheus/procfs@v0.2.0",
            "github.com/rakyll/statik@v0.1.7",
            "github.com/rcrowley/go-metrics@v0.0.0-20200313005456-10cdbea86bc0",
            "github.com/regen-network/cosmos-proto@v0.3.1",
            "github.com/rs/cors@v1.7.0",
            "github.com/rs/zerolog@v1.20.0",
            "github.com/spf13/afero@v1.3.4",
            "github.com/spf13/cast@v1.3.1",
            "github.com/spf13/cobra@v1.1.3",
            "github.com/spf13/jwalterweatherman@v1.1.0",
            "github.com/spf13/pflag@v1.0.5",
            "github.com/spf13/viper@v1.7.1",
            "github.com/stretchr/testify@v1.7.0",
            "github.com/subosito/gotenv@v1.2.0",
            "github.com/syndtr/goleveldb@v1.0.1-0.20200815110645-5c35d600f0ca",
            "github.com/tendermint/btcd@v0.1.1",
            "github.com/tendermint/crypto@v0.0.0-20191022145703-50d29ede1e15",
            "github.com/tendermint/go-amino@v0.16.0",
            "github.com/tendermint/tendermint@v0.34.7",
            "github.com/tendermint/tm-db@v0.6.4",
            "github.com/zondax/hid@v0.9.0",
            "golang.org/x/crypto@v0.0.0-20201221181555-eec23a3978ad",
            "golang.org/x/net@v0.0.0-20201021035429-f5854403a974",
            "golang.org/x/sys@v0.0.0-20201015000850-e3ed0017c211",
            "golang.org/x/term@v0.0.0-20201117132131-f5c789dd3221",
            "golang.org/x/text@v0.3.3",
            "google.golang.org/genproto@v0.0.0-20210114201628-6edceaf6022f",
            "google.golang.org/grpc@v1.35.0 => google.golang.org/grpc@v1.33.2",
            "google.golang.org/protobuf@v1.25.0",
            "gopkg.in/ini.v1@v1.51.0",
            "gopkg.in/yaml.v2@v2.4.0",
            "gopkg.in/yaml.v3@v3.0.0-20200313102051-9f266ea9e77c"
        ]
    }
}