Enable secp256r1 (#8786)
* enable secp256r1 in antehandlers * Add sig verification benchamrk to find a sigverify fee * adjust the gas fee * enable secp256r1 in antehandlers * Add sig verification benchamrk to find a sigverify fee * adjust the gas fee * Update the secp256r1 fee factor * Update changelog * regenerate docs
This commit is contained in:
Vendored
+11
@@ -4,8 +4,10 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// KeyTestPubAddr generates a new secp256k1 keypair.
|
||||
@@ -16,6 +18,15 @@ func KeyTestPubAddr() (cryptotypes.PrivKey, cryptotypes.PubKey, sdk.AccAddress)
|
||||
return key, pub, addr
|
||||
}
|
||||
|
||||
// KeyTestPubAddr generates a new secp256r1 keypair.
|
||||
func KeyTestPubAddrSecp256R1(require *require.Assertions) (cryptotypes.PrivKey, cryptotypes.PubKey, sdk.AccAddress) {
|
||||
key, err := secp256r1.GenPrivKey()
|
||||
require.NoError(err)
|
||||
pub := key.PubKey()
|
||||
addr := sdk.AccAddress(pub.Address())
|
||||
return key, pub, addr
|
||||
}
|
||||
|
||||
// NewTestFeeAmount is a test fee amount.
|
||||
func NewTestFeeAmount() sdk.Coins {
|
||||
return sdk.NewCoins(sdk.NewInt64Coin("atom", 150))
|
||||
|
||||
Reference in New Issue
Block a user