Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Introduce sig block height for the new replay protection #265

Merged
merged 13 commits into from
Jul 14, 2021
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,23 @@
* (build) [\#195](https://github.com/line/lfb-sdk/pull/195) Build properly when using libsecp256k1
* (perf) [\#198](https://github.com/line/lfb-sdk/pull/198) Caching paramset
* (global) [\#200](https://github.com/line/lfb-sdk/pull/200) Add a env prefix
* (store) [\#202](https://github.com/line/lfb-sdk/pull/202) param store doesn't use gas kv
* (store) [\#202](https://github.com/line/lfb-sdk/pull/202) Param store doesn't use gas kv
* (store) [\#203](https://github.com/line/lfb-sdk/pull/203) Remove transient store that is not used now
* (perf) [\#204](https://github.com/line/lfb-sdk/pull/204) Apply rw mutex to cachekv
* (perf) [\#208](https://github.com/line/lfb-sdk/pull/208) Use easyjson instead of amino when marshal abci logs
* (perf) [\#209](https://github.com/line/lfb-sdk/pull/209) Apply async reactor ostracon
* (proto) [\#212](https://github.com/line/lfb-sdk/pull/212) Reformat proto files and restore proto docs
* (perf) [\#216](https://github.com/line/lfb-sdk/pull/216) Memoize bech32 encoding and decoding
* (perf) [\#218](https://github.com/line/lfb-sdk/pull/218) Rootmulti store parallel commit
* (perf) [\#219](https://github.com/line/lfb-sdk/pull/219) Fix bech32 cache to get bech32 from proper cache
* (bump-up) [\#221](https://github.com/line/lfb-sdk/pull/221) Bump up iavl for parallel processing of batches
* (perf) [\#224](https://github.com/line/lfb-sdk/pull/224) Updated log time to have milliseconds
* (bump-up) [\#228](https://github.com/line/lfb-sdk/pull/228) Bump up ostracon to optimize checking the txs size
* (global) [\#230](https://github.com/line/lfb-sdk/pull/230) Modify module name to lfb-sdk
* (bump-up) [\#246](https://github.com/line/lfb-sdk/pull/246) Bump up ostracon to not flush wal when receive consensus msgs
* (wasm) [\#250](https://github.com/line/lfb-sdk/pull/250) Migrate linkwasmd to the latest commit
* (wasm) [\#254](https://github.com/line/lfb-sdk/pull/254) Specify wasm event types
* (x) [\#255](https://github.com/line/lfb-sdk/pull/255) Remove legacy from modules

### Bug Fixes
* (test) [\#92](https://github.com/line/lfb-sdk/pull/92) Fix SendToModuleAccountTest
Expand All @@ -40,12 +56,27 @@
* (config) [\#138](https://github.com/line/lfb-sdk/pull/138) Fix getting coin type at running cmd
* (race) [\#159](https://github.com/line/lfb-sdk/pull/159) Fix test-race failure
* (test) [\#193](https://github.com/line/lfb-sdk/pull/193) Allow to add new validator in test network

### Breaking Changes
* (global) [\#90](https://github.com/line/lfb-sdk/pull/90) Revise module path to `github.com/line/lfb-sdk`
* (rpc) [\#97](https://github.com/line/lfb-sdk/pull/97) Send response with 404 status when quering non-exist account
* (proto) [\#106](https://github.com/line/lfb-sdk/pull/106) Rename package of proto files
* (api) [\#130](https://github.com/line/lfb-sdk/pull/130) Rename rest apis
* (auth) [\#265](https://github.com/line/lfb-sdk/pull/265) Introduce sig block height for the new replay protection

### Build, CI
* (ci) [\#234](https://github.com/line/lfb-sdk/pull/234) Fix branch name in ci script
* (docker) [\#264](https://github.com/line/lfb-sdk/pull/264) Remove docker publish

### Document Updates
* (docs) [\#205](https://github.com/line/lfb-sdk/pull/205) Renewal docs for open source
* (docs) [\#207](https://github.com/line/lfb-sdk/pull/207) Fix license
* (docs) [\#211](https://github.com/line/lfb-sdk/pull/211) Remove codeowners
* (docs) [\#248](https://github.com/line/lfb-sdk/pull/248) Add PR procedure, apply main branch
* (docs) [\#256](https://github.com/line/lfb-sdk/pull/256) Modify copyright and contributing
* (docs) [\#259](https://github.com/line/lfb-sdk/pull/259) Modify copyright, verified from legal team
* (docs) [\#260](https://github.com/line/lfb-sdk/pull/260) Remove gov, ibc and readme of wasm module
* (docs) [\#262](https://github.com/line/lfb-sdk/pull/262) Fix link urls, remove invalid reference

## [cosmos-sdk v0.42.1] - 2021-03-15
Initial lfb-sdk is based on the cosmos-sdk v0.42.1
Expand Down
4 changes: 4 additions & 0 deletions baseapp/accountwgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func (tx AccountLockTestTx) ValidateBasic() error {
return nil
}

func (tx AccountLockTestTx) GetSigBlockHeight() uint64 {
return 0
}

func newTestPrivKeys(num int) []*secp256k1.PrivKey {
privs := make([]*secp256k1.PrivKey, 0, num)
for i := 0; i < num; i++ {
Expand Down
5 changes: 3 additions & 2 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,9 @@ func (tx *txTest) setFailOnHandler(fail bool) {
}

// Implements Tx
func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs }
func (tx txTest) ValidateBasic() error { return nil }
func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs }
func (tx txTest) ValidateBasic() error { return nil }
func (tx txTest) GetSigBlockHeight() uint64 { return 0 }

const (
routeMsgCounter = "msgCounter"
Expand Down
1 change: 0 additions & 1 deletion baseapp/msg_service_router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func TestMsgService(t *testing.T) {
// Second round: all signer infos are set, so each signer can sign.
signerData := authsigning.SignerData{
ChainID: "test",
AccountNumber: 0,
Sequence: 0,
}
sigV2, err = tx.SignWithPrivKey(
Expand Down
4 changes: 2 additions & 2 deletions client/account_retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
type Account interface {
GetAddress() sdk.AccAddress
GetPubKey() cryptotypes.PubKey // can return nil.
GetAccountNumber() uint64
GetSequence() uint64
}

Expand All @@ -18,7 +17,8 @@ type Account interface {
// for signing.
type AccountRetriever interface {
GetAccount(clientCtx Context, addr sdk.AccAddress) (Account, error)
GetLatestHeight(clientCtx Context) (uint64, error)
GetAccountWithHeight(clientCtx Context, addr sdk.AccAddress) (Account, int64, error)
EnsureExists(clientCtx Context, addr sdk.AccAddress) error
GetAccountNumberSequence(clientCtx Context, addr sdk.AccAddress) (accNum uint64, accSeq uint64, err error)
GetAccountSequence(clientCtx Context, addr sdk.AccAddress) (accSeq uint64, err error)
}
4 changes: 2 additions & 2 deletions client/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
FlagGasAdjustment = "gas-adjustment"
FlagFrom = "from"
FlagName = "name"
FlagAccountNumber = "account-number"
FlagSigBlockHeight = "sig-block-height"
FlagSequence = "sequence"
FlagMemo = "memo"
FlagFees = "fees"
Expand Down Expand Up @@ -96,7 +96,7 @@ func AddQueryFlagsToCmd(cmd *cobra.Command) {
func AddTxFlagsToCmd(cmd *cobra.Command) {
cmd.Flags().String(FlagKeyringDir, "", "The client Keyring directory; if omitted, the default 'home' directory will be used")
cmd.Flags().String(FlagFrom, "", "Name or address of private key with which to sign")
cmd.Flags().Uint64P(FlagAccountNumber, "a", 0, "The account number of the signing account (offline mode only)")
cmd.Flags().Uint64P(FlagSigBlockHeight, "n", 0, "The block height to be included in the tx body to protect from replaying")
cmd.Flags().Uint64P(FlagSequence, "s", 0, "The sequence number of the signing account (offline mode only)")
cmd.Flags().String(FlagMemo, "", "Memo to send along with transaction")
cmd.Flags().String(FlagFees, "", "Fees to pay along with transaction; eg: 10uatom")
Expand Down
18 changes: 8 additions & 10 deletions client/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ var (
// TestAccount represents a client Account that can be used in unit tests
type TestAccount struct {
Address sdk.AccAddress
Num uint64
Seq uint64
}

Expand All @@ -29,11 +28,6 @@ func (t TestAccount) GetPubKey() cryptotypes.PubKey {
return nil
}

// GetAccountNumber implements client Account.GetAccountNumber
func (t TestAccount) GetAccountNumber() uint64 {
return t.Num
}

// GetSequence implements client Account.GetSequence
func (t TestAccount) GetSequence() uint64 {
return t.Seq
Expand All @@ -54,6 +48,10 @@ func (t TestAccountRetriever) GetAccount(_ Context, addr sdk.AccAddress) (Accoun
return acc, nil
}

func (t TestAccountRetriever) GetLatestHeight(_ Context) (uint64, error) {
return 0, nil
}

// GetAccountWithHeight implements AccountRetriever.GetAccountWithHeight
func (t TestAccountRetriever) GetAccountWithHeight(clientCtx Context, addr sdk.AccAddress) (Account, int64, error) {
acc, err := t.GetAccount(clientCtx, addr)
Expand All @@ -73,11 +71,11 @@ func (t TestAccountRetriever) EnsureExists(_ Context, addr sdk.AccAddress) error
return nil
}

// GetAccountNumberSequence implements AccountRetriever.GetAccountNumberSequence
func (t TestAccountRetriever) GetAccountNumberSequence(_ Context, addr sdk.AccAddress) (accNum uint64, accSeq uint64, err error) {
// GetAccountSequence implements AccountRetriever.GetAccountSequence
func (t TestAccountRetriever) GetAccountSequence(_ Context, addr sdk.AccAddress) (accSeq uint64, err error) {
acc, ok := t.Accounts[addr.String()]
if !ok {
return 0, 0, fmt.Errorf("account %s not found", addr)
return 0, fmt.Errorf("account %s not found", addr)
}
return acc.Num, acc.Seq, nil
return acc.Seq, nil
}
14 changes: 7 additions & 7 deletions client/tx/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Factory struct {
keybase keyring.Keyring
txConfig client.TxConfig
accountRetriever client.AccountRetriever
accountNumber uint64
sigBlockHeight uint64
sequence uint64
gas uint64
timeoutHeight uint64
Expand All @@ -41,7 +41,7 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory {
signMode = signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON
}

accNum, _ := flagSet.GetUint64(flags.FlagAccountNumber)
sigBlockHeight, _ := flagSet.GetUint64(flags.FlagSigBlockHeight)
accSeq, _ := flagSet.GetUint64(flags.FlagSequence)
gasAdj, _ := flagSet.GetFloat64(flags.FlagGasAdjustment)
memo, _ := flagSet.GetString(flags.FlagMemo)
Expand All @@ -57,7 +57,7 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory {
chainID: clientCtx.ChainID,
gas: gasSetting.Gas,
simulateAndExecute: gasSetting.Simulate,
accountNumber: accNum,
sigBlockHeight: sigBlockHeight,
sequence: accSeq,
timeoutHeight: timeoutHeight,
gasAdjustment: gasAdj,
Expand All @@ -74,7 +74,7 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory {
return f
}

func (f Factory) AccountNumber() uint64 { return f.accountNumber }
func (f Factory) SigBlockHeight() uint64 { return f.sigBlockHeight }
func (f Factory) Sequence() uint64 { return f.sequence }
func (f Factory) Gas() uint64 { return f.gas }
func (f Factory) GasAdjustment() float64 { return f.gasAdjustment }
Expand Down Expand Up @@ -154,9 +154,9 @@ func (f Factory) WithMemo(memo string) Factory {
return f
}

// WithAccountNumber returns a copy of the Factory with an updated account number.
func (f Factory) WithAccountNumber(accnum uint64) Factory {
f.accountNumber = accnum
// WithSigBlockHeight returns a copy of the Factory with an updated sig block height.
func (f Factory) WithSigBlockHeight(sigBlockHeight uint64) Factory {
f.sigBlockHeight = sigBlockHeight
return f
}

Expand Down
1 change: 1 addition & 0 deletions client/tx/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func CopyTx(tx signing.Tx, builder client.TxBuilder, ignoreSignatureError bool)
builder.SetMemo(tx.GetMemo())
builder.SetFeeAmount(tx.GetFee())
builder.SetGasLimit(tx.GetGas())
builder.SetSigBlockHeight(tx.GetSigBlockHeight())
builder.SetTimeoutHeight(tx.GetTimeoutHeight())

return nil
Expand Down
2 changes: 2 additions & 0 deletions client/tx/legacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
const (
memo = "waboom"
gas = uint64(10000)
sbh = 1
timeoutHeight = 5
)

Expand All @@ -44,6 +45,7 @@ func buildTestTx(t *testing.T, builder client.TxBuilder) {
builder.SetMemo(memo)
builder.SetGasLimit(gas)
builder.SetFeeAmount(fee)
builder.SetSigBlockHeight(sbh)
err := builder.SetMsgs(msg)
require.NoError(t, err)
err = builder.SetSignatures(sig)
Expand Down
44 changes: 25 additions & 19 deletions client/tx/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func WriteGeneratedTxResponse(
}

txf := Factory{fees: br.Fees, gasPrices: br.GasPrices}.
WithAccountNumber(br.AccountNumber).
WithSigBlockHeight(br.SigBlockHeight).
WithSequence(br.Sequence).
WithGas(gasSetting.Gas).
WithGasAdjustment(gasAdj).
Expand Down Expand Up @@ -240,6 +240,7 @@ func BuildUnsignedTx(txf Factory, msgs ...sdk.Msg) (client.TxBuilder, error) {
tx.SetMemo(txf.memo)
tx.SetFeeAmount(fees)
tx.SetGasLimit(txf.gas)
tx.SetSigBlockHeight(txf.sigBlockHeight)
tx.SetTimeoutHeight(txf.TimeoutHeight())

return tx, nil
Expand Down Expand Up @@ -302,26 +303,32 @@ func CalculateGas(
return simRes, uint64(txf.GasAdjustment() * float64(simRes.GasInfo.GasUsed)), nil
}

// PrepareFactory ensures the account defined by ctx.GetFromAddress() exists and
// if the account number and/or the account sequence number are zero (not set),
// they will be queried for and set on the provided Factory. A new Factory with
// the updated fields will be returned.
// PrepareFactory set sig block height and account sequence to the tx factory.
// It doesn't require that the account should exist.
// If the account does not exist, then it use the zero sequence number.
func PrepareFactory(clientCtx client.Context, txf Factory) (Factory, error) {
from := clientCtx.GetFromAddress()

if err := txf.accountRetriever.EnsureExists(clientCtx, from); err != nil {
return txf, err
sigBlockHeight := txf.sigBlockHeight

if !clientCtx.Offline {
if sigBlockHeight == 0 {
height, err := txf.accountRetriever.GetLatestHeight(clientCtx)
if err != nil {
return txf, err
}
sigBlockHeight = height
}
}

initNum, initSeq := txf.accountNumber, txf.sequence
if initNum == 0 || initSeq == 0 {
num, seq, err := txf.accountRetriever.GetAccountNumberSequence(clientCtx, from)
if err != nil {
return txf, err
}
txf = txf.WithSigBlockHeight(sigBlockHeight)

if initNum == 0 {
txf = txf.WithAccountNumber(num)
initSeq := txf.sequence
if initSeq == 0 && !clientCtx.Offline {
seq, err := txf.accountRetriever.GetAccountSequence(clientCtx, from)
if err != nil {
if sdkError, _ := err.(*sdkerrors.Error); sdkError != sdkerrors.ErrKeyNotFound {
return txf, err
}
}

if initSeq == 0 {
Expand Down Expand Up @@ -402,9 +409,8 @@ func Sign(txf Factory, name string, txBuilder client.TxBuilder, overwriteSig boo
}
pubKey := key.GetPubKey()
signerData := authsigning.SignerData{
ChainID: txf.chainID,
AccountNumber: txf.accountNumber,
Sequence: txf.sequence,
ChainID: txf.chainID,
Sequence: txf.sequence,
}

// For SIGN_MODE_DIRECT, calling SetSignatures calls setSignerInfos on
Expand Down
6 changes: 3 additions & 3 deletions client/tx/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestBuildSimTx(t *testing.T) {

txf := tx.Factory{}.
WithTxConfig(txCfg).
WithAccountNumber(50).
WithSigBlockHeight(1).
WithSequence(23).
WithFees("50stake").
WithMemo("memo").
Expand All @@ -106,7 +106,7 @@ func TestBuildSimTx(t *testing.T) {
func TestBuildUnsignedTx(t *testing.T) {
txf := tx.Factory{}.
WithTxConfig(NewTestTxConfig()).
WithAccountNumber(50).
WithSigBlockHeight(1).
WithSequence(23).
WithFees("50stake").
WithMemo("memo").
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestSign(t *testing.T) {

txfNoKeybase := tx.Factory{}.
WithTxConfig(NewTestTxConfig()).
WithAccountNumber(50).
WithSigBlockHeight(1).
WithSequence(23).
WithFees("50stake").
WithMemo("memo").
Expand Down
1 change: 1 addition & 0 deletions client/tx_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type (
SetMsgs(msgs ...sdk.Msg) error
SetSignatures(signatures ...signingtypes.SignatureV2) error
SetMemo(memo string)
SetSigBlockHeight(sbh uint64)
SetFeeAmount(amount sdk.Coins)
SetGasLimit(limit uint64)
SetTimeoutHeight(height uint64)
Expand Down
2 changes: 1 addition & 1 deletion codec/amino_codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestAminoCodecUnpackAnyFails(t *testing.T) {

func TestAminoCodecFullDecodeAndEncode(t *testing.T) {
// This tx comes from https://github.com/cosmos/cosmos-sdk/issues/8117.
txSigned := `{"type":"lfb-sdk/StdTx","value":{"msg":[{"type":"lfb-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"link120yvjfy7m2gnu9mvusrs40cxxhpt8nr3qhn8re","validator_address":"linkvaloper120yvjfy7m2gnu9mvusrs40cxxhpt8nr3jr36d2","pubkey":{"type":"ostracon/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"ostracon/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}`
txSigned := `{"type":"lfb-sdk/StdTx","value":{"msg":[{"type":"lfb-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"link120yvjfy7m2gnu9mvusrs40cxxhpt8nr3qhn8re","validator_address":"linkvaloper120yvjfy7m2gnu9mvusrs40cxxhpt8nr3jr36d2","pubkey":{"type":"ostracon/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"ostracon/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"sig_block_height":"0","memo":"","timeout_height":"0"}}`
_, legacyCdc := simapp.MakeCodecs()

var tx legacytx.StdTx
Expand Down
9 changes: 4 additions & 5 deletions crypto/ledger/ledger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,16 @@ func TestPublicKeyHDPath(t *testing.T) {
}
}

func getFakeTx(accountNumber uint32) []byte {
func getFakeTx() []byte {
tmp := fmt.Sprintf(
`{"account_number":"%d","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"5000"},"memo":"memo","msgs":[[""]],"sequence":"6"}`,
accountNumber)
`{"chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"5000"},"memo":"memo","msgs":[[""]],"sequence":"6"}`)

return []byte(tmp)
}

func TestSignaturesHD(t *testing.T) {
for account := uint32(0); account < 100; account += 30 {
msg := getFakeTx(account)
msg := getFakeTx()

path := *hd.NewFundraiserParams(account, sdk.CoinType, account/5)
t.Logf("Checking signature at %v --- PLEASE REVIEW AND ACCEPT IN THE DEVICE\n", path)
Expand All @@ -224,7 +223,7 @@ func TestSignaturesHD(t *testing.T) {
}

func TestRealDeviceSecp256k1(t *testing.T) {
msg := getFakeTx(50)
msg := getFakeTx()
path := *hd.NewFundraiserParams(0, sdk.CoinType, 0)
priv, err := NewPrivKeySecp256k1Unsafe(path)
require.NoError(t, err)
Expand Down
Loading