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

[WILL NOT BE MERGED] Kava v0.50.10 patch #84

Open
wants to merge 81 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
b0cd15a
wip: upgrade kava to sdk v0.50
boodyvo Oct 17, 2024
201b669
wip: upgrade kava to sdk v0.50
boodyvo Oct 17, 2024
0c7c61e
wip: testing cdp
boodyvo Oct 18, 2024
a621660
wip: testing cdp
boodyvo Oct 18, 2024
50aa71d
wip: internal debug
boodyvo Oct 23, 2024
f5b62d8
wip: comment parts trying to run app
boodyvo Oct 24, 2024
2269119
kava-v0.50.10-patch
boodyvo Oct 24, 2024
25d6caa
wip: updated the server and cmd to run in kava
boodyvo Oct 25, 2024
fb08046
wip: updated cmd running
boodyvo Oct 25, 2024
832c489
wip: remoe autocli to test build
boodyvo Oct 25, 2024
4436cd5
wip: added autocli to test build
boodyvo Oct 25, 2024
333bd3f
wip: added autocli to test build
boodyvo Oct 25, 2024
2d95f1f
wip: add debug print
boodyvo Oct 25, 2024
c69c04d
wip: add debug print
boodyvo Oct 25, 2024
079f8e3
wip: update init codec
boodyvo Oct 25, 2024
f7bb2cf
wip: update init codec
boodyvo Oct 25, 2024
4b6d2f4
wip: update init codec
boodyvo Oct 25, 2024
75ad2ff
wip: update init codec
boodyvo Oct 25, 2024
373e83d
wip: update tests and initialization
boodyvo Oct 28, 2024
1024e8a
wip: update tests and initialization
boodyvo Oct 28, 2024
1f4a7f8
wip: update tests and initialization
boodyvo Oct 28, 2024
8432ffc
wip: update tests and initialization
boodyvo Oct 28, 2024
cf40f6a
wip: update tests and initialization
boodyvo Oct 28, 2024
11868d1
wip: update tests and initialization
boodyvo Oct 28, 2024
15f1577
wip: update tests and initialization
boodyvo Oct 28, 2024
4bc8eda
wip: update tests and initialization
boodyvo Oct 28, 2024
2a4e155
wip: update tests and initialization
boodyvo Oct 28, 2024
6c194e8
wip: update tests and initialization
boodyvo Oct 28, 2024
67b2605
wip: update tests and initialization
boodyvo Oct 28, 2024
4bc25e1
wip: update tests and initialization
boodyvo Oct 28, 2024
89620ec
wip: update tests and initialization
boodyvo Oct 28, 2024
69345c2
wip: update tests and initialization
boodyvo Oct 28, 2024
85f6cfc
wip: update tests and initialization
boodyvo Oct 28, 2024
14df430
wip: remove extra logging
boodyvo Oct 28, 2024
1511a6a
wip: remove extra logging
boodyvo Oct 28, 2024
46b887f
wip: remove logging
boodyvo Oct 30, 2024
8f2e114
wip: update ante handler
boodyvo Oct 30, 2024
6a2ba62
wip: update ante handler
boodyvo Oct 31, 2024
499be6a
wip: update ante handler
boodyvo Oct 31, 2024
1ac1b4b
wip: update ante handler
boodyvo Oct 31, 2024
502c6dd
wip: update ante handler
boodyvo Oct 31, 2024
63d9779
wip: update message signer
boodyvo Oct 31, 2024
59969b9
wip: update message signer
boodyvo Oct 31, 2024
9e57cd0
wip: update message signer
boodyvo Oct 31, 2024
55cd499
wip: update message signer
boodyvo Oct 31, 2024
9ee867b
wip: update message signer
boodyvo Oct 31, 2024
9391f34
wip: update message signer
boodyvo Oct 31, 2024
cdf7a45
wip: update message signer
boodyvo Oct 31, 2024
10fd039
wip: update message signer
boodyvo Oct 31, 2024
ec7c54a
wip: update message signer
boodyvo Oct 31, 2024
b7c073c
wip: update message signer
boodyvo Nov 1, 2024
20b8c1d
wip: update message signer
boodyvo Nov 1, 2024
bc73f5d
wip: update message signer
boodyvo Nov 1, 2024
089b759
wip: update message signer
boodyvo Nov 1, 2024
c9235ea
wip: update message signer
boodyvo Nov 1, 2024
9d5e2d3
wip: update message signer
boodyvo Nov 1, 2024
9c8b42a
wip: update message signer
boodyvo Nov 1, 2024
884c77e
wip: update message signer
boodyvo Nov 1, 2024
8661160
wip: update message signer
boodyvo Nov 1, 2024
16c3e6b
wip: update message signer
boodyvo Nov 1, 2024
ca5f805
wip: update message signer
boodyvo Nov 1, 2024
3e698f0
wip: update message signer
boodyvo Nov 1, 2024
1bf06ae
wip: update message signer
boodyvo Nov 1, 2024
90d593b
wip: update message signer
boodyvo Nov 1, 2024
84fa563
wip: update message signer
boodyvo Nov 1, 2024
0a8c606
wip: update signing
boodyvo Nov 4, 2024
8a2ef3e
wip: update signing
boodyvo Nov 4, 2024
42abf87
wip: update e2e test for debugging
boodyvo Nov 4, 2024
8eda2c9
wip: update e2e test for debugging
boodyvo Nov 4, 2024
7c83cdc
wip: update e2e test for debugging
boodyvo Nov 4, 2024
65dd3df
wip: update e2e test for debugging
boodyvo Nov 4, 2024
bb02c25
wip: update e2e test for debugging
boodyvo Nov 4, 2024
17663a0
wip: update e2e test for debugging
boodyvo Nov 4, 2024
8128d9e
wip: update e2e test for debugging
boodyvo Nov 4, 2024
46860cc
wip: update e2e test for debugging
boodyvo Nov 5, 2024
2b40405
wip: add cdp signers
boodyvo Nov 5, 2024
88c6096
wip: add debug for handler
boodyvo Nov 6, 2024
d910f31
wip: add debug for handler
boodyvo Nov 7, 2024
d8ee91e
wip: removed one debug log
boodyvo Nov 7, 2024
986ef50
wip: removed one debug log
boodyvo Nov 12, 2024
b04d78f
wip: add logging to debug traces
boodyvo Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
package ante

import (
storetypes "cosmossdk.io/store/types"
"fmt"
"runtime/debug"

tmlog "github.com/cometbft/cometbft/libs/log"
tmlog "cosmossdk.io/log"

errorsmod "cosmossdk.io/errors"
"github.com/cosmos/cosmos-sdk/crypto/types/multisig"
Expand Down Expand Up @@ -114,7 +115,7 @@ var _ authante.SignatureVerificationGasConsumer = DefaultSigVerificationGasConsu
// for signature verification based upon the public key type. The cost is fetched from the given params and is matched
// by the concrete type.
func DefaultSigVerificationGasConsumer(
meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params,
meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params,
) error {
pubkey := sig.PubKey
switch pubkey := pubkey.(type) {
Expand All @@ -137,7 +138,7 @@ func DefaultSigVerificationGasConsumer(

// ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature
func ConsumeMultisignatureVerificationGas(
meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey,
meter storetypes.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey,
params authtypes.Params, accSeq uint64,
) error {
size := sig.BitArray.Count()
Expand Down
2 changes: 1 addition & 1 deletion app/ante/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

func (suite AnteTestSuite) TestAnteHandler() {
var acc authtypes.AccountI
var acc sdk.AccountI
addr, privKey := tests.NewAddrKey()
to := tests.GenerateAddress()

Expand Down
20 changes: 14 additions & 6 deletions app/ante/eip712.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
package ante

import (
txsigning "cosmossdk.io/x/tx/signing"
"fmt"
"github.com/cosmos/cosmos-sdk/codec"

errorsmod "cosmossdk.io/errors"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand All @@ -27,7 +29,7 @@ import (
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"

ethcrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
Expand All @@ -39,9 +41,12 @@ import (
evmtypes "github.com/evmos/ethermint/x/evm/types"
)

var ethCodec codec.ProtoCodecMarshaler

func init() {
registry := codectypes.NewInterfaceRegistry()
ethermint.RegisterInterfaces(registry)
ethCodec = codec.NewProtoCodec(registry)
}

// Deprecated: NewLegacyCosmosAnteHandlerEip712 creates an AnteHandler to process legacy EIP-712
Expand Down Expand Up @@ -76,14 +81,14 @@ func NewLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler {
// CONTRACT: Tx must implement SigVerifiableTx interface
type LegacyEip712SigVerificationDecorator struct {
ak evmtypes.AccountKeeper
signModeHandler authsigning.SignModeHandler
signModeHandler *txsigning.HandlerMap
evmKeeper EVMKeeper
}

// Deprecated: NewLegacyEip712SigVerificationDecorator creates a new LegacyEip712SigVerificationDecorator
func NewLegacyEip712SigVerificationDecorator(
ak evmtypes.AccountKeeper,
signModeHandler authsigning.SignModeHandler,
signModeHandler *txsigning.HandlerMap,
ek EVMKeeper,
) LegacyEip712SigVerificationDecorator {
return LegacyEip712SigVerificationDecorator{
Expand Down Expand Up @@ -122,7 +127,10 @@ func (svd LegacyEip712SigVerificationDecorator) AnteHandle(ctx sdk.Context,
return ctx, err
}

signerAddrs := sigTx.GetSigners()
signerAddrs, err := sigTx.GetSigners()
if err != nil {
return ctx, err
}

// EIP712 allows just one signature
if len(sigs) != 1 {
Expand Down Expand Up @@ -196,7 +204,7 @@ func VerifySignature(
pubKey cryptotypes.PubKey,
signerData authsigning.SignerData,
sigData signing.SignatureData,
_ authsigning.SignModeHandler,
_ *txsigning.HandlerMap,
tx authsigning.Tx,
params evmtypes.Params,
) error {
Expand Down Expand Up @@ -229,7 +237,7 @@ func VerifySignature(
Gas: tx.GetGas(),
},
msgs, tx.GetMemo(),
tx.GetTip(),
// tx.TipTx interface was removed, added types.TxWithTimeoutHeight, they have been deprecated and should not be used since v0.46.0
)

signerChainID, err := ethermint.ParseChainID(signerData.ChainID)
Expand Down
Loading
Loading