Skip to content

Commit

Permalink
Ledger integration (#931)
Browse files Browse the repository at this point in the history
Merges the keybase and Ledger code from go-crypto (which is no more) into the SDK
Adds support for Ledger into gaiacli
Cherry-picks updated error handling from #1158
  • Loading branch information
cwgoes authored and Adrian Brink committed Jul 2, 2018
1 parent 04a3cb6 commit 69a9081
Show file tree
Hide file tree
Showing 143 changed files with 2,698 additions and 423 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BREAKING CHANGES
* Removed MsgChangePubKey from auth
* Removed setPubKey from account mapper
* Removed GetMemo from Tx (it is still on StdTx)
* Keybase and Ledger support from go-crypto merged into the SDK in the `crypto` folder
* Gov module REST endpoints changed to be more RESTful
* [cli] rearranged commands under subcommands
* [stake] remove Tick and add EndBlocker
Expand Down Expand Up @@ -46,6 +47,9 @@ FEATURES
* [types] Switches internal representation of Int/Uint/Rat to use pointers
* [gaiad] unsafe_reset_all now resets addrbook.json
* [democoin] add x/oracle, x/assoc
* [gaiacli] Ledger support added
- You can now use a Ledger with `gaiacli --ledger` for all key-related commands
- Ledger keys can be named and tracked locally in the key DB
* [gaiacli] added an --async flag to the cli to deliver transactions without waiting for a tendermint response

FIXES
Expand Down
132 changes: 90 additions & 42 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
name = "github.com/mattn/go-isatty"
version = "~0.0.3"

[[constraint]]
name = "github.com/pkg/errors"
version = "~0.8.0"

[[constraint]]
name = "github.com/spf13/cobra"
version = "~0.0.1"
Expand All @@ -49,32 +45,36 @@
version = "~1.0.0"

[[constraint]]
name = "github.com/stretchr/testify"
version = "~1.2.1"

[[constraint]]
name = "github.com/tendermint/abci"
version = "=0.12.0"
name = "github.com/pkg/errors"
version = "=0.8.0"

[[constraint]]
name = "github.com/tendermint/go-crypto"
version = "=0.6.2"
name = "github.com/stretchr/testify"
version = "=1.2.1"

[[constraint]]
name = "github.com/tendermint/go-amino"
version = "=0.9.9"
version = "=0.10.1"

[[constraint]]
name = "github.com/tendermint/iavl"
version = "=0.8.0-rc0"
revision = "481b89cbbe6a641f7f6cb5db92b30b20f5a2e001"

[[constraint]]
name = "github.com/tendermint/tendermint"
revision = "696e8c6f9e950eec15f150f314d2dd9ddf6bc601"
revision = "8412b75b1070ac023405e8228e017ed36531fe1b"

[[override]]
[[constraint]]
name = "github.com/tendermint/tmlibs"
revision = "0c98d10b4ffbd87978d79c160e835b3d3df241ec"
version = "=0.9.0"

[[constraint]]
name = "github.com/bartekn/go-bip39"
branch = "master"

[[constraint]]
name = "github.com/zondax/ledger-goclient"
revision = "065cbf938a16f20335c40cfe180f9cd4955c6a5a"

# this got updated and broke, so locked to an old working commit ...
[[override]]
Expand Down
5 changes: 2 additions & 3 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/pkg/errors"

abci "github.com/tendermint/abci/types"
abci "github.com/tendermint/tendermint/abci/types"
cmn "github.com/tendermint/tmlibs/common"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/tmlibs/log"
Expand Down Expand Up @@ -85,7 +85,6 @@ func NewBaseApp(name string, cdc *wire.Codec, logger log.Logger, db dbm.DB) *Bas
txDecoder: defaultTxDecoder(cdc),
}
// Register the undefined & root codespaces, which should not be used by any modules
app.codespacer.RegisterOrPanic(sdk.CodespaceUndefined)
app.codespacer.RegisterOrPanic(sdk.CodespaceRoot)
return app
}
Expand Down Expand Up @@ -135,7 +134,7 @@ func defaultTxDecoder(cdc *wire.Codec) sdk.TxDecoder {
// are registered by MakeTxCodec
err := cdc.UnmarshalBinary(txBytes, &tx)
if err != nil {
return nil, sdk.ErrTxDecode("").Trace(err.Error())
return nil, sdk.ErrTxDecode("").TraceSDK(err.Error())
}
return tx, nil
}
Expand Down
Loading

0 comments on commit 69a9081

Please sign in to comment.