diff --git a/PENDING.md b/PENDING.md index e028a624f..76f443a66 100644 --- a/PENDING.md +++ b/PENDING.md @@ -80,8 +80,9 @@ IMPROVEMENTS - #2821 Codespaces are now strings - #2779 Introduce `ValidateBasic` to the `Tx` interface and call it in the ante handler. - - #2825 More staking and distribution invariants - + - #2825 More staking and distribution invariants + - #2912 Print commit ID in hex when commit is synced. + * Tendermint - #2796 Update to go-amino 0.14.1 diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index c3479a59b..157ec8f06 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -805,7 +805,7 @@ func (app *BaseApp) Commit() (res abci.ResponseCommit) { commitID := app.cms.Commit() // TODO: this is missing a module identifier and dumps byte array app.Logger.Debug("Commit synced", - "commit", commitID, + "commit", fmt.Sprintf("%X", commitID), ) // Reset the Check state to the latest committed diff --git a/client/lcd/root.go b/client/lcd/root.go index ffe5d061f..986e53006 100644 --- a/client/lcd/root.go +++ b/client/lcd/root.go @@ -127,18 +127,21 @@ func (rs *RestServer) Start(listenAddr string, sslHosts string, if err != nil { return } - go rpcserver.StartHTTPAndTLSServer( + + rs.log.Info("Starting Gaia Lite REST service...") + rs.log.Info(rs.fingerprint) + + err := rpcserver.StartHTTPAndTLSServer( rs.listener, rs.Mux, certFile, keyFile, rs.log, ) - rs.log.Info(rs.fingerprint) - rs.log.Info("REST server started") + if err != nil { + return err + } } - // logger.Info("REST server started") - return nil } diff --git a/x/ibc/client/cli/relay.go b/x/ibc/client/cli/relay.go index 4ada207b8..1ce92aa4e 100644 --- a/x/ibc/client/cli/relay.go +++ b/x/ibc/client/cli/relay.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/client/keys" - codec "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" authtxb "github.com/cosmos/cosmos-sdk/x/auth/client/txbuilder" @@ -103,6 +103,7 @@ func (c relayCommander) loop(fromChainID, fromChainNode, toChainID, toChainNode } ingressKey := ibc.IngressSequenceKey(fromChainID) + lengthKey := ibc.EgressLengthKey(toChainID) OUTER: for { @@ -120,11 +121,10 @@ OUTER: panic(err) } - lengthKey := ibc.EgressLengthKey(toChainID) egressLengthbz, err := query(fromChainNode, lengthKey, c.ibcStore) if err != nil { c.logger.Error("error querying outgoing packet list length", "err", err) - continue OUTER //TODO replace with continue (I think it should just to the correct place where OUTER is now) + continue OUTER // TODO replace with continue (I think it should just to the correct place where OUTER is now) } var egressLength uint64 @@ -147,7 +147,7 @@ OUTER: continue OUTER // TODO replace to break, will break first loop then send back to the beginning (aka OUTER) } - err = c.broadcastTx(seq, toChainNode, c.refine(egressbz, i, passphrase)) + err = c.broadcastTx(toChainNode, c.refine(egressbz, i, seq, passphrase)) seq++ @@ -166,13 +166,13 @@ func query(node string, key []byte, storeName string) (res []byte, err error) { } // nolint: unparam -func (c relayCommander) broadcastTx(seq uint64, node string, tx []byte) error { +func (c relayCommander) broadcastTx(node string, tx []byte) error { _, err := context.NewCLIContext().WithNodeURI(node).BroadcastTx(tx) return err } func (c relayCommander) getSequence(node string) uint64 { - res, err := query(node, c.address, c.accStore) + res, err := query(node, auth.AddressStoreKey(c.address), c.accStore) if err != nil { panic(err) } @@ -189,7 +189,7 @@ func (c relayCommander) getSequence(node string) uint64 { return 0 } -func (c relayCommander) refine(bz []byte, sequence uint64, passphrase string) []byte { +func (c relayCommander) refine(bz []byte, ibcSeq, accSeq uint64, passphrase string) []byte { var packet ibc.IBCPacket if err := c.cdc.UnmarshalBinaryLengthPrefixed(bz, &packet); err != nil { panic(err) @@ -198,10 +198,10 @@ func (c relayCommander) refine(bz []byte, sequence uint64, passphrase string) [] msg := ibc.IBCReceiveMsg{ IBCPacket: packet, Relayer: c.address, - Sequence: sequence, + Sequence: ibcSeq, } - txBldr := authtxb.NewTxBuilderFromCLI().WithSequence(sequence).WithCodec(c.cdc) + txBldr := authtxb.NewTxBuilderFromCLI().WithSequence(accSeq).WithCodec(c.cdc) cliCtx := context.NewCLIContext() name, err := cliCtx.GetFromName()