From a680fcc5261fd872237328c5b3a129f5248f57c7 Mon Sep 17 00:00:00 2001 From: Cirrus Gai Date: Thu, 9 Nov 2023 16:33:55 +0800 Subject: [PATCH] chore: Rename jury to covenant (#99) --- btcstaking/staking.go | 38 +- btcstaking/staking_test.go | 26 +- cmd/babylond/cmd/flags.go | 10 +- cmd/babylond/cmd/genesis.go | 6 +- cmd/babylond/cmd/testnet.go | 2 +- proto/babylon/btcstaking/v1/btcstaking.proto | 38 +- proto/babylon/btcstaking/v1/events.proto | 6 +- proto/babylon/btcstaking/v1/params.proto | 4 +- proto/babylon/btcstaking/v1/tx.proto | 34 +- test/e2e/btc_staking_e2e_test.go | 56 +-- .../configurer/chain/commands_btcstaking.go | 14 +- testutil/datagen/btcstaking.go | 24 +- x/btcstaking/client/cli/tx.go | 28 +- x/btcstaking/keeper/btc_delegators.go | 28 +- x/btcstaking/keeper/grpc_query.go | 2 +- x/btcstaking/keeper/grpc_query_test.go | 36 +- x/btcstaking/keeper/incentive_test.go | 6 +- x/btcstaking/keeper/msg_server.go | 88 ++-- x/btcstaking/keeper/msg_server_test.go | 106 ++--- .../keeper/voting_power_table_test.go | 6 +- x/btcstaking/types/btc_slashing_tx.go | 25 +- x/btcstaking/types/btc_slashing_tx_test.go | 10 +- x/btcstaking/types/btcstaking.go | 20 +- x/btcstaking/types/btcstaking.pb.go | 234 +++++----- x/btcstaking/types/btcstaking_test.go | 18 +- x/btcstaking/types/codec.go | 8 +- x/btcstaking/types/errors.go | 6 +- x/btcstaking/types/events.pb.go | 4 +- x/btcstaking/types/genesis_test.go | 4 +- x/btcstaking/types/msg.go | 20 +- x/btcstaking/types/params.go | 4 +- x/btcstaking/types/params.pb.go | 62 +-- x/btcstaking/types/tx.pb.go | 408 +++++++++--------- x/btcstaking/types/types.go | 4 +- 34 files changed, 693 insertions(+), 692 deletions(-) diff --git a/btcstaking/staking.go b/btcstaking/staking.go index 3b147824d..a658415e2 100644 --- a/btcstaking/staking.go +++ b/btcstaking/staking.go @@ -109,7 +109,7 @@ func makeScriptNum(v []byte, requireMinimal bool, scriptNumLen int) (int64, erro type StakingScriptData struct { StakerKey *btcec.PublicKey ValidatorKey *btcec.PublicKey - JuryKey *btcec.PublicKey + CovenantKey *btcec.PublicKey StakingTime uint16 } @@ -126,17 +126,17 @@ type StakingOutputInfo struct { func NewStakingScriptData( stakerKey, validatorKey, - juryKey *btcec.PublicKey, + covenantKey *btcec.PublicKey, stakingTime uint16) (*StakingScriptData, error) { - if stakerKey == nil || validatorKey == nil || juryKey == nil { - return nil, fmt.Errorf("staker, validator and jury keys cannot be nil") + if stakerKey == nil || validatorKey == nil || covenantKey == nil { + return nil, fmt.Errorf("staker, validator and covenant keys cannot be nil") } return &StakingScriptData{ StakerKey: stakerKey, ValidatorKey: validatorKey, - JuryKey: juryKey, + CovenantKey: covenantKey, StakingTime: stakingTime, }, nil } @@ -145,7 +145,7 @@ func NewStakingScriptData( // OP_CHECKSIG // OP_NOTIF // -// OP_CHECKSIG OP_CHECKSIGADD OP_CHECKSIGADD 3 OP_NUMEQUAL +// OP_CHECKSIG OP_CHECKSIGADD OP_CHECKSIGADD 3 OP_NUMEQUAL // // OP_ELSE // @@ -161,7 +161,7 @@ func (sd *StakingScriptData) BuildStakingScript() ([]byte, error) { builder.AddOp(txscript.OP_CHECKSIG) builder.AddData(schnorr.SerializePubKey(sd.ValidatorKey)) builder.AddOp(txscript.OP_CHECKSIGADD) - builder.AddData(schnorr.SerializePubKey(sd.JuryKey)) + builder.AddData(schnorr.SerializePubKey(sd.CovenantKey)) builder.AddOp(txscript.OP_CHECKSIGADD) builder.AddInt64(expectedMultiSigSigners) builder.AddOp(txscript.OP_NUMEQUAL) @@ -181,7 +181,7 @@ func ParseStakingTransactionScript(script []byte) (*StakingScriptData, error) { // OP_CHECKSIG // OP_NOTIF // - // OP_CHECKSIG OP_CHECKSIGADD OP_CHECKSIGADD 3 OP_NUMEQUAL + // OP_CHECKSIG OP_CHECKSIGADD OP_CHECKSIGADD 3 OP_NUMEQUAL // // OP_ELSE // @@ -284,8 +284,8 @@ func ParseStakingTransactionScript(script []byte) (*StakingScriptData, error) { return nil, err } - // Jury public key - juryPk, err := schnorr.ParsePubKey(template[7].extractedData) + // Covenant public key + covenantPk, err := schnorr.ParsePubKey(template[7].extractedData) if err != nil { return nil, err @@ -305,7 +305,7 @@ func ParseStakingTransactionScript(script []byte) (*StakingScriptData, error) { scriptData, err := NewStakingScriptData( stakerPk1, validatorPk, - juryPk, + covenantPk, uint16(template[12].extractedInt), ) @@ -376,12 +376,12 @@ func BuildUnspendableTaprootPkScript(rawScript []byte, net *chaincfg.Params) ([] func BuildStakingOutput( stakerKey, validatorKey, - juryKey *btcec.PublicKey, + covenantKey *btcec.PublicKey, stTime uint16, stAmount btcutil.Amount, net *chaincfg.Params) (*wire.TxOut, []byte, error) { - sd, err := NewStakingScriptData(stakerKey, validatorKey, juryKey, stTime) + sd, err := NewStakingScriptData(stakerKey, validatorKey, covenantKey, stTime) if err != nil { return nil, nil, err @@ -705,39 +705,39 @@ func CheckTransactions( return nil, fmt.Errorf("slashing transaction min fee must be larger than 0") } - //1. Check slashing tx + // 1. Check slashing tx if err := IsSlashingTx(slashingTx, slashingAddress); err != nil { return nil, err } - //2. Check staking script. + // 2. Check staking script. scriptData, err := ParseStakingTransactionScript(script) if err != nil { return nil, err } - //3. Check that staking transaction has output committing to the provided script + // 3. Check that staking transaction has output committing to the provided script stakingOutputIdx, err := GetIdxOutputCommitingToScript(fundingTransaction, script, net) if err != nil { return nil, err } - //4. Check that slashing transaction input is pointing to staking transaction + // 4. Check that slashing transaction input is pointing to staking transaction stakingTxHash := fundingTransaction.TxHash() if !slashingTx.TxIn[0].PreviousOutPoint.Hash.IsEqual(&stakingTxHash) { return nil, fmt.Errorf("slashing transaction must spend staking output") } - //5. Check that index of the fund output matches index of the input in slashing transaction + // 5. Check that index of the fund output matches index of the input in slashing transaction if slashingTx.TxIn[0].PreviousOutPoint.Index != uint32(stakingOutputIdx) { return nil, fmt.Errorf("slashing transaction input must spend staking output") } stakingOutput := fundingTransaction.TxOut[stakingOutputIdx] - //6. Check fees + // 6. Check fees if slashingTx.TxOut[0].Value <= 0 || stakingOutput.Value <= 0 { return nil, fmt.Errorf("values of slashing and staking transaction must be larger than 0") } diff --git a/btcstaking/staking_test.go b/btcstaking/staking_test.go index 2ffb05e25..c66537d84 100644 --- a/btcstaking/staking_test.go +++ b/btcstaking/staking_test.go @@ -22,14 +22,14 @@ import ( func genValidStakingScriptData(t *testing.T, r *rand.Rand) *btcstaking.StakingScriptData { stakerPrivKeyBytes := datagen.GenRandomByteArray(r, 32) validatorPrivKeyBytes := datagen.GenRandomByteArray(r, 32) - juryPrivKeyBytes := datagen.GenRandomByteArray(r, 32) + covenantPrivKeyBytes := datagen.GenRandomByteArray(r, 32) stakingTime := uint16(r.Intn(math.MaxUint16)) _, stakerPublicKey := btcec.PrivKeyFromBytes(stakerPrivKeyBytes) _, validatorPublicKey := btcec.PrivKeyFromBytes(validatorPrivKeyBytes) - _, juryPublicKey := btcec.PrivKeyFromBytes(juryPrivKeyBytes) + _, covenantPublicKey := btcec.PrivKeyFromBytes(covenantPrivKeyBytes) - sd, _ := btcstaking.NewStakingScriptData(stakerPublicKey, validatorPublicKey, juryPublicKey, stakingTime) + sd, _ := btcstaking.NewStakingScriptData(stakerPublicKey, validatorPublicKey, covenantPublicKey, stakingTime) return sd } @@ -49,7 +49,7 @@ func FuzzGeneratingParsingValidStakingScript(f *testing.F) { require.Equal(t, parsedScript.StakingTime, sd.StakingTime) require.Equal(t, schnorr.SerializePubKey(sd.StakerKey), schnorr.SerializePubKey(parsedScript.StakerKey)) require.Equal(t, schnorr.SerializePubKey(sd.ValidatorKey), schnorr.SerializePubKey(parsedScript.ValidatorKey)) - require.Equal(t, schnorr.SerializePubKey(sd.JuryKey), schnorr.SerializePubKey(parsedScript.JuryKey)) + require.Equal(t, schnorr.SerializePubKey(sd.CovenantKey), schnorr.SerializePubKey(parsedScript.CovenantKey)) }) } @@ -76,7 +76,7 @@ func FuzzGeneratingValidStakingSlashingTx(f *testing.F) { stakingOutput, _, err := btcstaking.BuildStakingOutput( sd.StakerKey, sd.ValidatorKey, - sd.JuryKey, + sd.CovenantKey, sd.StakingTime, btcutil.Amount(r.Intn(5000)+minStakingValue), &chaincfg.MainNetParams, @@ -196,7 +196,7 @@ func TestStakingScriptExecutionSingleStaker(t *testing.T) { validatorPrivKey, err := btcec.NewPrivateKey() require.NoError(t, err) - juryPrivKey, err := btcec.NewPrivateKey() + covenantPrivKey, err := btcec.NewPrivateKey() require.NoError(t, err) txid, err := chainhash.NewHash(datagen.GenRandomByteArray(r, 32)) @@ -210,7 +210,7 @@ func TestStakingScriptExecutionSingleStaker(t *testing.T) { stakingOutput, stakingScript, err := btcstaking.BuildStakingOutput( stakerPrivKey.PubKey(), validatorPrivKey.PubKey(), - juryPrivKey.PubKey(), + covenantPrivKey.PubKey(), stakingTimeBlocks, stakingValue, &chaincfg.MainNetParams, @@ -272,7 +272,7 @@ func TestStakingScriptExecutionMulitSig(t *testing.T) { validatorPrivKey, err := btcec.NewPrivateKey() require.NoError(t, err) - juryPrivKey, err := btcec.NewPrivateKey() + covenantPrivKey, err := btcec.NewPrivateKey() require.NoError(t, err) txid, err := chainhash.NewHash(datagen.GenRandomByteArray(r, 32)) @@ -286,7 +286,7 @@ func TestStakingScriptExecutionMulitSig(t *testing.T) { stakingOutput, stakingScript, err := btcstaking.BuildStakingOutput( stakerPrivKey.PubKey(), validatorPrivKey.PubKey(), - juryPrivKey.PubKey(), + covenantPrivKey.PubKey(), stakingTimeBlocks, stakingValue, &chaincfg.MainNetParams, @@ -322,17 +322,17 @@ func TestStakingScriptExecutionMulitSig(t *testing.T) { require.NoError(t, err) - witnessJury, err := btcstaking.BuildWitnessToSpendStakingOutput( + witnessCovenant, err := btcstaking.BuildWitnessToSpendStakingOutput( spendStakeTx, stakingOutput, stakingScript, - juryPrivKey, + covenantPrivKey, ) require.NoError(t, err) // To Construct valid witness, for multisig case we need: - // - jury signature - witnessJury[0] + // - covenant signature - witnessCovenant[0] // - validator signature - witnessValidator[0] // - staker signature - witnessStaker[0] // - empty signature - which is just an empty byte array which signals we are going to use multisig. @@ -340,7 +340,7 @@ func TestStakingScriptExecutionMulitSig(t *testing.T) { // - whole script - witnessStaker[1] (any other wittness[1] will work as well) // - control block - witnessStaker[2] (any other wittness[2] will work as well) spendStakeTx.TxIn[0].Witness = [][]byte{ - witnessJury[0], witnessValidator[0], witnessStaker[0], []byte{}, witnessStaker[1], witnessStaker[2], + witnessCovenant[0], witnessValidator[0], witnessStaker[0], []byte{}, witnessStaker[1], witnessStaker[2], } prevOutputFetcher := txscript.NewCannedPrevOutputFetcher( diff --git a/cmd/babylond/cmd/flags.go b/cmd/babylond/cmd/flags.go index b282f1582..8e63aa2cb 100644 --- a/cmd/babylond/cmd/flags.go +++ b/cmd/babylond/cmd/flags.go @@ -28,7 +28,7 @@ const ( flagBlocksPerYear = "blocks-per-year" flagGenesisTime = "genesis-time" flagBlockGasLimit = "block-gas-limit" - flagJuryPk = "jury-pk" + flagCovenantPk = "covenant-pk" flagSlashingAddress = "slashing-address" flagMinSlashingFee = "min-slashing-fee-sat" flagSlashingRate = "slashing-rate" @@ -52,7 +52,7 @@ type GenesisCLIArgs struct { BlocksPerYear uint64 GenesisTime time.Time BlockGasLimit int64 - JuryPK string + CovenantPK string SlashingAddress string MinSlashingTransactionFeeSat int64 SlashingRate sdk.Dec @@ -75,7 +75,7 @@ func addGenesisFlags(cmd *cobra.Command) { cmd.Flags().String(flagBaseBtcHeaderHex, "0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a45068653ffff7f2002000000", "Hex of the base Bitcoin header.") cmd.Flags().Uint64(flagBaseBtcHeaderHeight, 0, "Height of the base Bitcoin header.") // btcstaking args - cmd.Flags().String(flagJuryPk, btcstypes.DefaultParams().JuryPk.MarshalHex(), "Bitcoin staking jury public key") + cmd.Flags().String(flagCovenantPk, btcstypes.DefaultParams().CovenantPk.MarshalHex(), "Bitcoin staking covenant public key") cmd.Flags().String(flagSlashingAddress, btcstypes.DefaultParams().SlashingAddress, "Bitcoin staking slashing address") cmd.Flags().Int64(flagMinSlashingFee, 1000, "Bitcoin staking minimum slashing fee") cmd.Flags().String(flagMinCommissionRate, "0", "Bitcoin staking validator minimum commission rate") @@ -103,7 +103,7 @@ func parseGenesisFlags(cmd *cobra.Command) *GenesisCLIArgs { epochInterval, _ := cmd.Flags().GetUint64(flagEpochInterval) baseBtcHeaderHex, _ := cmd.Flags().GetString(flagBaseBtcHeaderHex) baseBtcHeaderHeight, _ := cmd.Flags().GetUint64(flagBaseBtcHeaderHeight) - juryPk, _ := cmd.Flags().GetString(flagJuryPk) + covenantPk, _ := cmd.Flags().GetString(flagCovenantPk) slashingAddress, _ := cmd.Flags().GetString(flagSlashingAddress) minSlashingFee, _ := cmd.Flags().GetInt64(flagMinSlashingFee) minCommissionRate, _ := cmd.Flags().GetString(flagMinCommissionRate) @@ -132,7 +132,7 @@ func parseGenesisFlags(cmd *cobra.Command) *GenesisCLIArgs { EpochInterval: epochInterval, BaseBtcHeaderHeight: baseBtcHeaderHeight, BaseBtcHeaderHex: baseBtcHeaderHex, - JuryPK: juryPk, + CovenantPK: covenantPk, SlashingAddress: slashingAddress, MinSlashingTransactionFeeSat: minSlashingFee, MinCommissionRate: sdk.MustNewDecFromStr(minCommissionRate), diff --git a/cmd/babylond/cmd/genesis.go b/cmd/babylond/cmd/genesis.go index 6a6e43047..b1a0b08df 100644 --- a/cmd/babylond/cmd/genesis.go +++ b/cmd/babylond/cmd/genesis.go @@ -68,7 +68,7 @@ Example: genesisParams = TestnetGenesisParams(genesisCliArgs.MaxActiveValidators, genesisCliArgs.BtcConfirmationDepth, genesisCliArgs.BtcFinalizationTimeout, genesisCliArgs.CheckpointTag, genesisCliArgs.EpochInterval, genesisCliArgs.BaseBtcHeaderHex, - genesisCliArgs.BaseBtcHeaderHeight, genesisCliArgs.JuryPK, + genesisCliArgs.BaseBtcHeaderHeight, genesisCliArgs.CovenantPK, genesisCliArgs.SlashingAddress, genesisCliArgs.MinSlashingTransactionFeeSat, genesisCliArgs.MinCommissionRate, genesisCliArgs.SlashingRate, genesisCliArgs.MinPubRand, genesisCliArgs.InflationRateChange, @@ -230,7 +230,7 @@ type GenesisParams struct { func TestnetGenesisParams(maxActiveValidators uint32, btcConfirmationDepth uint64, btcFinalizationTimeout uint64, checkpointTag string, epochInterval uint64, baseBtcHeaderHex string, - baseBtcHeaderHeight uint64, juryPk string, slashingAddress string, minSlashingFee int64, + baseBtcHeaderHeight uint64, covenantPk string, slashingAddress string, minSlashingFee int64, minCommissionRate sdk.Dec, slashingRate sdk.Dec, minPubRand uint64, inflationRateChange float64, inflationMin float64, inflationMax float64, goalBonded float64, blocksPerYear uint64, genesisTime time.Time, blockGasLimit int64) GenesisParams { @@ -305,7 +305,7 @@ func TestnetGenesisParams(maxActiveValidators uint32, btcConfirmationDepth uint6 genParams.BtclightclientBaseBtcHeader = *baseBtcHeaderInfo genParams.BtcstakingParams = btcstakingtypes.DefaultParams() - genParams.BtcstakingParams.JuryPk, err = bbn.NewBIP340PubKeyFromHex(juryPk) + genParams.BtcstakingParams.CovenantPk, err = bbn.NewBIP340PubKeyFromHex(covenantPk) if err != nil { panic(err) } diff --git a/cmd/babylond/cmd/testnet.go b/cmd/babylond/cmd/testnet.go index 4c72beaca..b172c13c1 100644 --- a/cmd/babylond/cmd/testnet.go +++ b/cmd/babylond/cmd/testnet.go @@ -98,7 +98,7 @@ Example: genesisParams := TestnetGenesisParams(genesisCliArgs.MaxActiveValidators, genesisCliArgs.BtcConfirmationDepth, genesisCliArgs.BtcFinalizationTimeout, genesisCliArgs.CheckpointTag, genesisCliArgs.EpochInterval, genesisCliArgs.BaseBtcHeaderHex, genesisCliArgs.BaseBtcHeaderHeight, - genesisCliArgs.JuryPK, genesisCliArgs.SlashingAddress, genesisCliArgs.MinSlashingTransactionFeeSat, + genesisCliArgs.CovenantPK, genesisCliArgs.SlashingAddress, genesisCliArgs.MinSlashingTransactionFeeSat, genesisCliArgs.MinCommissionRate, genesisCliArgs.SlashingRate, genesisCliArgs.MinPubRand, genesisCliArgs.InflationRateChange, genesisCliArgs.InflationMin, genesisCliArgs.InflationMax, genesisCliArgs.GoalBonded, genesisCliArgs.BlocksPerYear, diff --git a/proto/babylon/btcstaking/v1/btcstaking.proto b/proto/babylon/btcstaking/v1/btcstaking.proto index 8836cc5ef..3bb7e7103 100644 --- a/proto/babylon/btcstaking/v1/btcstaking.proto +++ b/proto/babylon/btcstaking/v1/btcstaking.proto @@ -80,16 +80,16 @@ message BTCDelegation { BabylonBTCTaprootTx staking_tx = 8; // slashing_tx is the slashing tx // It is partially signed by SK corresponding to btc_pk, but not signed by - // validator or jury yet. + // validator or covenant yet. bytes slashing_tx = 9 [ (gogoproto.customtype) = "BTCSlashingTx" ]; // delegator_sig is the signature on the slashing tx // by the delegator (i.e., SK corresponding to btc_pk). // It will be a part of the witness for the staking tx output. bytes delegator_sig = 10 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; - // jury_sig is the signature signature on the slashing tx - // by the jury (i.e., SK corresponding to jury_pk in params) + // covenant_sig is the signature signature on the slashing tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) // It will be a part of the witness for the staking tx output. - bytes jury_sig = 11 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; + bytes covenant_sig = 11 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; // if this object is present it menans that staker requested undelegation, and whole // delegation is being undelegated. @@ -106,23 +106,23 @@ message BTCUndelegation { BabylonBTCTaprootTx unbonding_tx = 1; // slashing_tx is the slashing tx for unbodning transactions // It is partially signed by SK corresponding to btc_pk, but not signed by - // validator or jury yet. + // validator or covenant yet. bytes slashing_tx = 2 [ (gogoproto.customtype) = "BTCSlashingTx" ]; // delegator_slashing_sig is the signature on the slashing tx // by the delegator (i.e., SK corresponding to btc_pk). // It will be a part of the witness for the unbodning tx output. bytes delegator_slashing_sig = 3 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; - // jury_slashing_sig is the signature on the slashing tx - // by the jury (i.e., SK corresponding to jury_pk in params) + // covenant_slashing_sig is the signature on the slashing tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) // It must be provided after processing undelagate message by Babylon - bytes jury_slashing_sig = 4 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; - // jury_unbonding_sig is the signature on the unbonding tx - // by the jury (i.e., SK corresponding to jury_pk in params) + bytes covenant_slashing_sig = 4 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; + // covenant_unbonding_sig is the signature on the unbonding tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) // It must be provided after processing undelagate message by Babylon and after // validator sig will be provided by validator - bytes jury_unbonding_sig = 5 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; + bytes covenant_unbonding_sig = 5 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; // validator_unbonding_sig is the signature on the unbonding tx - // by the validator (i.e., SK corresponding to jury_pk in params) + // by the validator (i.e., SK corresponding to covenant_pk in params) // It must be provided after processing undelagate message by Babylon bytes validator_unbonding_sig = 6 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; } @@ -141,10 +141,10 @@ message BTCUndelegationInfo { // It will be nil if validator didn't sign it yet bytes validator_unbonding_sig = 2 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; - // jury_unbonding_sig is the signature on the unbonding tx - // by the jury (i.e., SK corresponding to jury_pk in params) - // it will be nil if jury didn't sign it yet - bytes jury_unbonding_sig = 3 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; + // covenant_unbonding_sig is the signature on the unbonding tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) + // it will be nil if covenant didn't sign it yet + bytes covenant_unbonding_sig = 3 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; } // BTCDelegatorDelegations is a collection of BTC delegations from the same delegator. @@ -173,17 +173,17 @@ message BabylonBTCTaprootTx { // 2. PENDING _> ACTIVE -> UNBONDING -> UNBONDED - this is the path when staker requests undelegation through // MsgBTCUndelegate message. enum BTCDelegationStatus { - // PENDING defines a delegation that is waiting for a jury signature to become active. + // PENDING defines a delegation that is waiting for a covenant signature to become active. PENDING = 0; // ACTIVE defines a delegation that has voting power ACTIVE = 1; // UNBONDING defines a delegation that is being unbonded i.e it received an unbonding tx - // from staker, but not yet received signatures from validator and jury. + // from staker, but not yet received signatures from validator and covenant. // Delegation in this state already lost its voting power. UNBONDING = 2; // UNBONDED defines a delegation no longer has voting power: // - either reaching the end of staking transaction timelock - // - or receiving unbonding tx and then receiving signatures from validator and jury for this + // - or receiving unbonding tx and then receiving signatures from validator and covenant for this // unbonding tx. UNBONDED = 3; // ANY is any of the above status diff --git a/proto/babylon/btcstaking/v1/events.proto b/proto/babylon/btcstaking/v1/events.proto index eb636aacc..ef1117d46 100644 --- a/proto/babylon/btcstaking/v1/events.proto +++ b/proto/babylon/btcstaking/v1/events.proto @@ -11,10 +11,10 @@ message EventNewBTCValidator { BTCValidator btc_val = 1; } // EventNewBTCDelegation is the event emitted when a BTC delegation is created // NOTE: the BTC delegation is not active thus does not have voting power yet -// only after it receives a jury signature it becomes activated and has voting power +// only after it receives a covenant signature it becomes activated and has voting power message EventNewBTCDelegation { BTCDelegation btc_del = 1; } -// EventActivateBTCDelegation is the event emitted when jury activates a BTC delegation +// EventActivateBTCDelegation is the event emitted when covenant activates a BTC delegation // such that the BTC delegation starts to have voting power in its timelock period message EventActivateBTCDelegation { BTCDelegation btc_del = 1; } @@ -52,4 +52,4 @@ message EventUnbondedBTCDelegation { string unbonding_tx_hash = 4; // from_state is the last state the BTC delegation was at BTCDelegationStatus from_state = 5; -} \ No newline at end of file +} diff --git a/proto/babylon/btcstaking/v1/params.proto b/proto/babylon/btcstaking/v1/params.proto index 970b91d1c..b2a97f4fb 100644 --- a/proto/babylon/btcstaking/v1/params.proto +++ b/proto/babylon/btcstaking/v1/params.proto @@ -10,9 +10,9 @@ option go_package = "github.com/babylonchain/babylon/x/btcstaking/types"; message Params { option (gogoproto.goproto_stringer) = false; - // jury_pk is the public key of jury + // covenant_pk is the public key of covenant // the PK follows encoding in BIP-340 spec on Bitcoin - bytes jury_pk = 1 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340PubKey" ]; + bytes covenant_pk = 1 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340PubKey" ]; // slashing address is the address that the slashed BTC goes to // the address is in string on Bitcoin string slashing_address = 2; diff --git a/proto/babylon/btcstaking/v1/tx.proto b/proto/babylon/btcstaking/v1/tx.proto index 727194485..035dbadb7 100644 --- a/proto/babylon/btcstaking/v1/tx.proto +++ b/proto/babylon/btcstaking/v1/tx.proto @@ -21,12 +21,12 @@ service Msg { rpc CreateBTCDelegation(MsgCreateBTCDelegation) returns (MsgCreateBTCDelegationResponse); // BtcUndelegate undelegates funds from exsitng btc delegation rpc BTCUndelegate(MsgBTCUndelegate) returns (MsgBTCUndelegateResponse); - // AddJurySig handles a signature from jury for slashing tx of staking tx for delegation - rpc AddJurySig(MsgAddJurySig) returns (MsgAddJurySigResponse); - // AddJuryUnbondingSigs handles two signatures from jury for: + // AddCovenantSig handles a signature from covenant for slashing tx of staking tx for delegation + rpc AddCovenantSig(MsgAddCovenantSig) returns (MsgAddCovenantSigResponse); + // AddCovenantUnbondingSigs handles two signatures from covenant for: // - unbonding tx submitted to babylon by staker // - slashing tx corresponding to unbodning tx submitted to babylon by staker - rpc AddJuryUnbondingSigs(MsgAddJuryUnbondingSigs) returns (MsgAddJuryUnbondingSigsResponse); + rpc AddCovenantUnbondingSigs(MsgAddCovenantUnbondingSigs) returns (MsgAddCovenantUnbondingSigsResponse); // AddValidatorUnbondingSig handles a signature from validator for unbonding tx submitted to babylon by staker rpc AddValidatorUnbondingSig(MsgAddValidatorUnbondingSig) returns (MsgAddValidatorUnbondingSigResponse); // UpdateParams updates the btcstaking module parameters. @@ -71,7 +71,7 @@ message MsgCreateBTCDelegation { bytes slashing_tx = 6 [ (gogoproto.customtype) = "BTCSlashingTx" ]; // delegator_sig is the signature on the slashing tx by the delegator (i.e., SK corresponding to btc_pk). // It will be a part of the witness for the staking tx output. - // The staking tx output further needs signatures from jury and validator in + // The staking tx output further needs signatures from covenant and validator in // order to be spendable. bytes delegator_sig = 7 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; } @@ -95,8 +95,8 @@ message MsgBTCUndelegate { // MsgBtcUndelegateResponse is the response for MsgBtcUndelegate message MsgBTCUndelegateResponse {} -// MsgAddJurySig is the message for handling a signature from jury -message MsgAddJurySig { +// MsgAddCovenantSig is the message for handling a signature from covenant +message MsgAddCovenantSig { string signer = 1; // val_pk is the Bitcoin secp256k1 PK of the BTC validator // the PK follows encoding in BIP-340 spec @@ -107,12 +107,12 @@ message MsgAddJurySig { // staking_tx_hash is the hash of the staking tx. // (val_pk, del_pk, staking_tx_hash) uniquely identifies a BTC delegation string staking_tx_hash = 4; - // sig is the signature of the jury + // sig is the signature of the covenant // the signature follows encoding in BIP-340 spec bytes sig = 5 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; } -// MsgAddJurySigResponse is the response for MsgAddJurySig -message MsgAddJurySigResponse {} +// MsgAddCovenantSigResponse is the response for MsgAddCovenantSig +message MsgAddCovenantSigResponse {} // MsgUpdateParams defines a message for updating btcstaking module parameters. message MsgUpdateParams { @@ -133,8 +133,8 @@ message MsgUpdateParams { // MsgUpdateParamsResponse is the response to the MsgUpdateParams message. message MsgUpdateParamsResponse {} -// MsgAddJuryUnbondingSigs is the message for handling a signature from jury -message MsgAddJuryUnbondingSigs { +// MsgAddCovenantUnbondingSigs is the message for handling a signature from covenant +message MsgAddCovenantUnbondingSigs { string signer = 1; // val_pk is the Bitcoin secp256k1 PK of the BTC validator // the PK follows encoding in BIP-340 spec @@ -145,16 +145,16 @@ message MsgAddJuryUnbondingSigs { // staking_tx_hash is the hash of the staking tx. // (val_pk, del_pk, staking_tx_hash) uniquely identifies a BTC delegation string staking_tx_hash = 4; - // unbonding_tx_sig is the signature of the jury on the unbonding tx submitted to babylon + // unbonding_tx_sig is the signature of the covenant on the unbonding tx submitted to babylon // the signature follows encoding in BIP-340 spec bytes unbonding_tx_sig = 5 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; - // slashing_unbonding_tx_sig is the signature of the jury on slashing tx corresponding to unbodning tx submitted to babylon + // slashing_unbonding_tx_sig is the signature of the covenant on slashing tx corresponding to unbodning tx submitted to babylon // the signature follows encoding in BIP-340 spec bytes slashing_unbonding_tx_sig = 6 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; } -// MsgAddJurySigResponse is the response for MsgAddJurySig -message MsgAddJuryUnbondingSigsResponse {} +// MsgAddCovenantSigResponse is the response for MsgAddCovenantSig +message MsgAddCovenantUnbondingSigsResponse {} // MsgAddValidatorUnbondingSig is the message for unbodning tx submitted to babylon by staker message MsgAddValidatorUnbondingSig { @@ -172,5 +172,5 @@ message MsgAddValidatorUnbondingSig { // the signature follows encoding in BIP-340 spec bytes unbonding_tx_sig = 5 [ (gogoproto.customtype) = "github.com/babylonchain/babylon/types.BIP340Signature" ]; } -// MsgAddJurySigResponse is the response for MsgAddJurySig +// MsgAddCovenantSigResponse is the response for MsgAddCovenantSig message MsgAddValidatorUnbondingSigResponse {} diff --git a/test/e2e/btc_staking_e2e_test.go b/test/e2e/btc_staking_e2e_test.go index 41f027c6e..f65962ccc 100644 --- a/test/e2e/btc_staking_e2e_test.go +++ b/test/e2e/btc_staking_e2e_test.go @@ -34,8 +34,8 @@ var ( btcVal *bstypes.BTCValidator // BTC delegation delBTCSK, delBTCPK, _ = datagen.GenRandomBTCKeyPair(r) - // jury - jurySK, _ = btcec.PrivKeyFromBytes( + // covenant + covenantSK, _ = btcec.PrivKeyFromBytes( []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, ) @@ -109,7 +109,7 @@ func (s *BTCStakingTestSuite) Test1CreateBTCValidatorAndDelegation() { net, delBTCSK, btcVal.BtcPk.MustToBTCPK(), - params.JuryPk.MustToBTCPK(), + params.CovenantPk.MustToBTCPK(), stakingTimeBlocks, stakingValue, params.SlashingAddress, @@ -148,7 +148,7 @@ func (s *BTCStakingTestSuite) Test1CreateBTCValidatorAndDelegation() { pendingDels := pendingDelSet[0] s.Len(pendingDels.Dels, 1) s.Equal(delBTCPK.SerializeCompressed()[1:], pendingDels.Dels[0].BtcPk.MustToBTCPK().SerializeCompressed()[1:]) - s.Nil(pendingDels.Dels[0].JurySig) + s.Nil(pendingDels.Dels[0].CovenantSig) // check delegation delegation := nonValidatorNode.QueryBtcDelegation(stakingTx.MustGetTxHashStr()) @@ -157,9 +157,9 @@ func (s *BTCStakingTestSuite) Test1CreateBTCValidatorAndDelegation() { s.Equal(expectedScript, delegation.StakingScript) } -// Test2SubmitJurySignature is an end-to-end test for user -// story 2: jury approves the BTC delegation -func (s *BTCStakingTestSuite) Test2SubmitJurySignature() { +// Test2SubmitCovenantSignature is an end-to-end test for user +// story 2: covenant approves the BTC delegation +func (s *BTCStakingTestSuite) Test2SubmitCovenantSignature() { chainA := s.configurer.GetChainConfig(0) chainA.WaitUntilHeight(1) nonValidatorNode, err := chainA.GetNodeAtIndex(2) @@ -171,7 +171,7 @@ func (s *BTCStakingTestSuite) Test2SubmitJurySignature() { pendingDels := pendingDelsSet[0] s.Len(pendingDels.Dels, 1) pendingDel := pendingDels.Dels[0] - s.Nil(pendingDel.JurySig) + s.Nil(pendingDel.CovenantSig) slashingTx := pendingDel.SlashingTx stakingTx := pendingDel.StakingTx @@ -180,27 +180,27 @@ func (s *BTCStakingTestSuite) Test2SubmitJurySignature() { stakingTxHash := stakingTx.MustGetTxHashStr() /* - generate and insert new jury signature, in order to activate the BTC delegation + generate and insert new covenant signature, in order to activate the BTC delegation */ - jurySig, err := slashingTx.Sign( + covenantSig, err := slashingTx.Sign( stakingMsgTx, stakingTx.Script, - jurySK, + covenantSK, net, ) s.NoError(err) - nonValidatorNode.AddJurySig(btcVal.BtcPk, bbn.NewBIP340PubKeyFromBTCPK(delBTCPK), stakingTxHash, jurySig) + nonValidatorNode.AddCovenantSig(btcVal.BtcPk, bbn.NewBIP340PubKeyFromBTCPK(delBTCPK), stakingTxHash, covenantSig) // wait for a block so that above txs take effect nonValidatorNode.WaitForNextBlock() - // ensure the BTC delegation has jury sig now + // ensure the BTC delegation has covenant sig now activeDelsSet := nonValidatorNode.QueryBTCValidatorDelegations(btcVal.BtcPk.MarshalHex()) s.Len(activeDelsSet, 1) activeDels := activeDelsSet[0] s.Len(activeDels.Dels, 1) activeDel := activeDels.Dels[0] - s.NotNil(activeDel.JurySig) + s.NotNil(activeDel.CovenantSig) // wait for a block so that above txs take effect and the voting power table // is updated in the next block's BeginBlock @@ -379,9 +379,9 @@ func (s *BTCStakingTestSuite) Test5SubmitStakerUnbonding() { activeDels := activeDelsSet[0] s.Len(activeDels.Dels, 1) activeDel := activeDels.Dels[0] - s.NotNil(activeDel.JurySig) + s.NotNil(activeDel.CovenantSig) - // params for juryPk and slashing address + // params for covenantPk and slashing address params := nonValidatorNode.QueryBTCStakingParams() stakingTx := activeDel.StakingTx @@ -402,7 +402,7 @@ func (s *BTCStakingTestSuite) Test5SubmitStakerUnbonding() { net, delBTCSK, btcVal.BtcPk.MustToBTCPK(), - params.JuryPk.MustToBTCPK(), + params.CovenantPk.MustToBTCPK(), wire.NewOutPoint(stakingTxChainHash, uint32(stakingOutputIdx)), initialization.BabylonBtcFinalizationPeriod+1, stakingValue-fee, @@ -433,7 +433,7 @@ func (s *BTCStakingTestSuite) Test5SubmitStakerUnbonding() { s.NotNil(delegation.BtcUndelegation) } -// Test6SubmitStakerUnbonding is an end-to-end test for jury and validator submitting signatures +// Test6SubmitStakerUnbonding is an end-to-end test for covenant and validator submitting signatures // for unbonding transaction func (s *BTCStakingTestSuite) Test6SubmitUnbondingSignatures() { chainA := s.configurer.GetChainConfig(0) @@ -451,8 +451,8 @@ func (s *BTCStakingTestSuite) Test6SubmitUnbondingSignatures() { s.NotNil(delegation.BtcUndelegation) s.Nil(delegation.BtcUndelegation.ValidatorUnbondingSig) - s.Nil(delegation.BtcUndelegation.JuryUnbondingSig) - s.Nil(delegation.BtcUndelegation.JurySlashingSig) + s.Nil(delegation.BtcUndelegation.CovenantUnbondingSig) + s.Nil(delegation.BtcUndelegation.CovenantSlashingSig) // First sent validator signature stakingTxMsg, err := delegation.StakingTx.ToMsgTx() @@ -486,25 +486,25 @@ func (s *BTCStakingTestSuite) Test6SubmitUnbondingSignatures() { delegationWithValSig.GetStatus(btcTip.Height, initialization.BabylonBtcFinalizationPeriod), ) - // Next send jury signatures - juryUnbondingSig, err := delegation.BtcUndelegation.UnbondingTx.Sign( + // Next send covenant signatures + covenantUnbondingSig, err := delegation.BtcUndelegation.UnbondingTx.Sign( stakingTxMsg, delegation.StakingTx.Script, - jurySK, + covenantSK, net, ) s.NoError(err) unbondingTxMsg, err := delegation.BtcUndelegation.UnbondingTx.ToMsgTx() s.NoError(err) - jurySlashingSig, err := delegation.BtcUndelegation.SlashingTx.Sign( + covenantSlashingSig, err := delegation.BtcUndelegation.SlashingTx.Sign( unbondingTxMsg, delegation.BtcUndelegation.UnbondingTx.Script, - jurySK, + covenantSK, net, ) s.NoError(err) - nonValidatorNode.AddJuryUnbondingSigs(btcVal.BtcPk, bbn.NewBIP340PubKeyFromBTCPK(delBTCPK), stakingTxHash, juryUnbondingSig, jurySlashingSig) + nonValidatorNode.AddCovenantUnbondingSigs(btcVal.BtcPk, bbn.NewBIP340PubKeyFromBTCPK(delBTCPK), stakingTxHash, covenantUnbondingSig, covenantSlashingSig) nonValidatorNode.WaitForNextBlock() // Check all signatures are properly registered @@ -513,8 +513,8 @@ func (s *BTCStakingTestSuite) Test6SubmitUnbondingSignatures() { delegationWithSigs := allDelegationsWithSigs[0].Dels[0] s.NotNil(delegationWithSigs.BtcUndelegation) s.NotNil(delegationWithSigs.BtcUndelegation.ValidatorUnbondingSig) - s.NotNil(delegationWithSigs.BtcUndelegation.JuryUnbondingSig) - s.NotNil(delegationWithSigs.BtcUndelegation.JurySlashingSig) + s.NotNil(delegationWithSigs.BtcUndelegation.CovenantUnbondingSig) + s.NotNil(delegationWithSigs.BtcUndelegation.CovenantSlashingSig) btcTip, err = nonValidatorNode.QueryTip() s.NoError(err) s.Equal( diff --git a/test/e2e/configurer/chain/commands_btcstaking.go b/test/e2e/configurer/chain/commands_btcstaking.go index 282309e3a..33d1de0b6 100644 --- a/test/e2e/configurer/chain/commands_btcstaking.go +++ b/test/e2e/configurer/chain/commands_btcstaking.go @@ -60,17 +60,17 @@ func (n *NodeConfig) CreateBTCDelegation(babylonPK *secp256k1.PubKey, pop *bstyp n.LogActionF("successfully created BTC delegation") } -func (n *NodeConfig) AddJurySig(valPK *bbn.BIP340PubKey, delPK *bbn.BIP340PubKey, stakingTxHash string, sig *bbn.BIP340Signature) { - n.LogActionF("adding jury signature") +func (n *NodeConfig) AddCovenantSig(valPK *bbn.BIP340PubKey, delPK *bbn.BIP340PubKey, stakingTxHash string, sig *bbn.BIP340Signature) { + n.LogActionF("adding covenant signature") valPKHex := valPK.MarshalHex() delPKHex := delPK.MarshalHex() sigHex := sig.ToHexStr() - cmd := []string{"babylond", "tx", "btcstaking", "add-jury-sig", valPKHex, delPKHex, stakingTxHash, sigHex, "--from=val"} + cmd := []string{"babylond", "tx", "btcstaking", "add-covenant-sig", valPKHex, delPKHex, stakingTxHash, sigHex, "--from=val"} _, _, err := n.containerManager.ExecTxCmd(n.t, n.chainId, n.Name, cmd) require.NoError(n.t, err) - n.LogActionF("successfully added jury sig") + n.LogActionF("successfully added covenant sig") } func (n *NodeConfig) CommitPubRandList(valBTCPK *bbn.BIP340PubKey, startHeight uint64, pubRandList []bbn.SchnorrPubRand, sig *bbn.BIP340Signature) { @@ -150,7 +150,7 @@ func (n *NodeConfig) AddValidatorUnbondingSig(valPK *bbn.BIP340PubKey, delPK *bb n.LogActionF("successfully added validator unbonding sig") } -func (n *NodeConfig) AddJuryUnbondingSigs( +func (n *NodeConfig) AddCovenantUnbondingSigs( valPK *bbn.BIP340PubKey, delPK *bbn.BIP340PubKey, stakingTxHash string, @@ -163,8 +163,8 @@ func (n *NodeConfig) AddJuryUnbondingSigs( unbondingTxSigHex := unbondingTxSig.ToHexStr() slashUnbondingTxSigHex := slashUnbondingTxSig.ToHexStr() - cmd := []string{"babylond", "tx", "btcstaking", "add-jury-unbonding-sigs", valPKHex, delPKHex, stakingTxHash, unbondingTxSigHex, slashUnbondingTxSigHex, "--from=val"} + cmd := []string{"babylond", "tx", "btcstaking", "add-covenant-unbonding-sigs", valPKHex, delPKHex, stakingTxHash, unbondingTxSigHex, slashUnbondingTxSigHex, "--from=val"} _, _, err := n.containerManager.ExecTxCmd(n.t, n.chainId, n.Name, cmd) require.NoError(n.t, err) - n.LogActionF("successfully added jury unbonding sigs") + n.LogActionF("successfully added covenant unbonding sigs") } diff --git a/testutil/datagen/btcstaking.go b/testutil/datagen/btcstaking.go index ed3d97382..fafe8f32a 100644 --- a/testutil/datagen/btcstaking.go +++ b/testutil/datagen/btcstaking.go @@ -63,11 +63,11 @@ func GenRandomBTCValidatorWithBTCBabylonSKs(r *rand.Rand, btcSK *btcec.PrivateKe }, nil } -func GenRandomBTCDelegation(r *rand.Rand, valBTCPK *bbn.BIP340PubKey, delSK *btcec.PrivateKey, jurySK *btcec.PrivateKey, slashingAddr string, startHeight uint64, endHeight uint64, totalSat uint64) (*bstypes.BTCDelegation, error) { +func GenRandomBTCDelegation(r *rand.Rand, valBTCPK *bbn.BIP340PubKey, delSK *btcec.PrivateKey, covenantSK *btcec.PrivateKey, slashingAddr string, startHeight uint64, endHeight uint64, totalSat uint64) (*bstypes.BTCDelegation, error) { net := &chaincfg.SimNetParams delPK := delSK.PubKey() delBTCPK := bbn.NewBIP340PubKeyFromBTCPK(delPK) - juryBTCPK := jurySK.PubKey() + covenantBTCPK := covenantSK.PubKey() valPK, err := valBTCPK.ToBTCPK() if err != nil { return nil, err @@ -88,17 +88,17 @@ func GenRandomBTCDelegation(r *rand.Rand, valBTCPK *bbn.BIP340PubKey, delSK *btc return nil, err } // staking/slashing tx - stakingTx, slashingTx, err := GenBTCStakingSlashingTx(r, net, delSK, valPK, juryBTCPK, uint16(endHeight-startHeight), int64(totalSat), slashingAddr) + stakingTx, slashingTx, err := GenBTCStakingSlashingTx(r, net, delSK, valPK, covenantBTCPK, uint16(endHeight-startHeight), int64(totalSat), slashingAddr) if err != nil { return nil, err } - // jury sig and delegator sig + // covenant sig and delegator sig stakingMsgTx, err := stakingTx.ToMsgTx() if err != nil { return nil, err } - jurySig, err := slashingTx.Sign(stakingMsgTx, stakingTx.Script, jurySK, net) + covenantSig, err := slashingTx.Sign(stakingMsgTx, stakingTx.Script, covenantSK, net) if err != nil { return nil, err } @@ -116,7 +116,7 @@ func GenRandomBTCDelegation(r *rand.Rand, valBTCPK *bbn.BIP340PubKey, delSK *btc EndHeight: endHeight, TotalSat: totalSat, DelegatorSig: delegatorSig, - JurySig: jurySig, + CovenantSig: covenantSig, StakingTx: stakingTx, SlashingTx: slashingTx, }, nil @@ -128,7 +128,7 @@ func GenBTCStakingSlashingTxWithOutPoint( outPoint *wire.OutPoint, stakerSK *btcec.PrivateKey, validatorPK *btcec.PublicKey, - juryPK *btcec.PublicKey, + covenantPK *btcec.PublicKey, stakingTimeBlocks uint16, stakingValue int64, slashingAddress string, @@ -137,7 +137,7 @@ func GenBTCStakingSlashingTxWithOutPoint( stakingOutput, stakingScript, err := btcstaking.BuildStakingOutput( stakerSK.PubKey(), validatorPK, - juryPK, + covenantPK, stakingTimeBlocks, btcutil.Amount(stakingValue), btcNet, @@ -198,7 +198,7 @@ func GenBTCStakingSlashingTx( btcNet *chaincfg.Params, stakerSK *btcec.PrivateKey, validatorPK *btcec.PublicKey, - juryPK *btcec.PublicKey, + covenantPK *btcec.PublicKey, stakingTimeBlocks uint16, stakingValue int64, slashingAddress string, @@ -206,7 +206,7 @@ func GenBTCStakingSlashingTx( // an arbitrary input spend := makeSpendableOutWithRandOutPoint(r, btcutil.Amount(stakingValue+1000)) outPoint := &spend.prevOut - return GenBTCStakingSlashingTxWithOutPoint(r, btcNet, outPoint, stakerSK, validatorPK, juryPK, stakingTimeBlocks, stakingValue, slashingAddress, true) + return GenBTCStakingSlashingTxWithOutPoint(r, btcNet, outPoint, stakerSK, validatorPK, covenantPK, stakingTimeBlocks, stakingValue, slashingAddress, true) } func GenBTCUnbondingSlashingTx( @@ -214,11 +214,11 @@ func GenBTCUnbondingSlashingTx( btcNet *chaincfg.Params, stakerSK *btcec.PrivateKey, validatorPK *btcec.PublicKey, - juryPK *btcec.PublicKey, + covenantPK *btcec.PublicKey, stakingTransactionOutpoint *wire.OutPoint, stakingTimeBlocks uint16, stakingValue int64, slashingAddress string, ) (*bstypes.BabylonBTCTaprootTx, *bstypes.BTCSlashingTx, error) { - return GenBTCStakingSlashingTxWithOutPoint(r, btcNet, stakingTransactionOutpoint, stakerSK, validatorPK, juryPK, stakingTimeBlocks, stakingValue, slashingAddress, false) + return GenBTCStakingSlashingTxWithOutPoint(r, btcNet, stakingTransactionOutpoint, stakerSK, validatorPK, covenantPK, stakingTimeBlocks, stakingValue, slashingAddress, false) } diff --git a/x/btcstaking/client/cli/tx.go b/x/btcstaking/client/cli/tx.go index 59dfe3772..09464e8bf 100644 --- a/x/btcstaking/client/cli/tx.go +++ b/x/btcstaking/client/cli/tx.go @@ -39,9 +39,9 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand( NewCreateBTCValidatorCmd(), NewCreateBTCDelegationCmd(), - NewAddJurySigCmd(), + NewAddCovenantSigCmd(), NewCreateBTCUndelegationCmd(), - NewAddJuryUnbondingSigsCmd(), + NewAddCovenantUnbondingSigsCmd(), NewAddValidatorUnbondingSigCmd(), ) @@ -205,13 +205,13 @@ func NewCreateBTCDelegationCmd() *cobra.Command { return cmd } -func NewAddJurySigCmd() *cobra.Command { +func NewAddCovenantSigCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "add-jury-sig [val_pk] [del_pk] [staking_tx_hash] [sig]", + Use: "add-covenant-sig [val_pk] [del_pk] [staking_tx_hash] [sig]", Args: cobra.ExactArgs(4), - Short: "Add a jury signature", + Short: "Add a covenant signature", Long: strings.TrimSpace( - `Add a jury signature.`, // TODO: example + `Add a covenant signature.`, // TODO: example ), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) @@ -234,13 +234,13 @@ func NewAddJurySigCmd() *cobra.Command { // get staking tx hash stakingTxHash := args[2] - // get jury sigature + // get covenant sigature sig, err := bbn.NewBIP340SignatureFromHex(args[3]) if err != nil { return err } - msg := types.MsgAddJurySig{ + msg := types.MsgAddCovenantSig{ Signer: clientCtx.FromAddress.String(), ValPk: valPK, DelPk: delPK, @@ -305,11 +305,11 @@ func NewCreateBTCUndelegationCmd() *cobra.Command { return cmd } -func NewAddJuryUnbondingSigsCmd() *cobra.Command { +func NewAddCovenantUnbondingSigsCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "add-jury-unbonding-sigs [val_pk] [del_pk] [staking_tx_hash] [unbonding_tx_sg] [slashing_unbonding_tx_sig]", + Use: "add-covenant-unbonding-sigs [val_pk] [del_pk] [staking_tx_hash] [unbonding_tx_sg] [slashing_unbonding_tx_sig]", Args: cobra.ExactArgs(5), - Short: "Add jury signatures for unbonding tx and slash unbonding tx", + Short: "Add covenant signatures for unbonding tx and slash unbonding tx", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -331,19 +331,19 @@ func NewAddJuryUnbondingSigsCmd() *cobra.Command { // get staking tx hash stakingTxHash := args[2] - // get jury sigature for unbonding tx + // get covenant sigature for unbonding tx unbondingSig, err := bbn.NewBIP340SignatureFromHex(args[3]) if err != nil { return err } - // get jury sigature for slash unbonding tx + // get covenant sigature for slash unbonding tx slashUnbondingSig, err := bbn.NewBIP340SignatureFromHex(args[4]) if err != nil { return err } - msg := types.MsgAddJuryUnbondingSigs{ + msg := types.MsgAddCovenantUnbondingSigs{ Signer: clientCtx.FromAddress.String(), ValPk: valPK, DelPk: delPK, diff --git a/x/btcstaking/keeper/btc_delegators.go b/x/btcstaking/keeper/btc_delegators.go index 7065b54b3..bb5eab287 100644 --- a/x/btcstaking/keeper/btc_delegators.go +++ b/x/btcstaking/keeper/btc_delegators.go @@ -70,18 +70,18 @@ func (k Keeper) updateBTCDelegation( return nil } -// AddJurySigToBTCDelegation adds a given jury sig to a BTC delegation +// AddCovenantSigToBTCDelegation adds a given covenant sig to a BTC delegation // with the given (val PK, del PK, staking tx hash) tuple -func (k Keeper) AddJurySigToBTCDelegation(ctx sdk.Context, valBTCPK *bbn.BIP340PubKey, delBTCPK *bbn.BIP340PubKey, stakingTxHash string, jurySig *bbn.BIP340Signature) error { - addJurySig := func(btcDel *types.BTCDelegation) error { - if btcDel.JurySig != nil { - return fmt.Errorf("the BTC delegation with staking tx hash %s already has a jury signature", stakingTxHash) +func (k Keeper) AddCovenantSigToBTCDelegation(ctx sdk.Context, valBTCPK *bbn.BIP340PubKey, delBTCPK *bbn.BIP340PubKey, stakingTxHash string, covenantSig *bbn.BIP340Signature) error { + addCovenantSig := func(btcDel *types.BTCDelegation) error { + if btcDel.CovenantSig != nil { + return fmt.Errorf("the BTC delegation with staking tx hash %s already has a covenant signature", stakingTxHash) } - btcDel.JurySig = jurySig + btcDel.CovenantSig = covenantSig return nil } - return k.updateBTCDelegation(ctx, valBTCPK, delBTCPK, stakingTxHash, addJurySig) + return k.updateBTCDelegation(ctx, valBTCPK, delBTCPK, stakingTxHash, addCovenantSig) } func (k Keeper) AddUndelegationToBTCDelegation( @@ -125,7 +125,7 @@ func (k Keeper) AddValidatorSigToUndelegation( return k.updateBTCDelegation(ctx, valBTCPK, delBTCPK, stakingTxHash, addValidatorSig) } -func (k Keeper) AddJurySigsToUndelegation( +func (k Keeper) AddCovenantSigsToUndelegation( ctx sdk.Context, valBTCPK *bbn.BIP340PubKey, delBTCPK *bbn.BIP340PubKey, @@ -133,21 +133,21 @@ func (k Keeper) AddJurySigsToUndelegation( unbondingTxSig *bbn.BIP340Signature, slashUnbondingTxSig *bbn.BIP340Signature, ) error { - addJurySigs := func(btcDel *types.BTCDelegation) error { + addCovenantSigs := func(btcDel *types.BTCDelegation) error { if btcDel.BtcUndelegation == nil { return fmt.Errorf("the BTC delegation with staking tx hash %s did not receive undelegation request yet", stakingTxHash) } - if btcDel.BtcUndelegation.JuryUnbondingSig != nil || btcDel.BtcUndelegation.JurySlashingSig != nil { - return fmt.Errorf("the BTC undelegation for staking tx hash %s already has valid jury signatures", stakingTxHash) + if btcDel.BtcUndelegation.CovenantUnbondingSig != nil || btcDel.BtcUndelegation.CovenantSlashingSig != nil { + return fmt.Errorf("the BTC undelegation for staking tx hash %s already has valid covenant signatures", stakingTxHash) } - btcDel.BtcUndelegation.JuryUnbondingSig = unbondingTxSig - btcDel.BtcUndelegation.JurySlashingSig = slashUnbondingTxSig + btcDel.BtcUndelegation.CovenantUnbondingSig = unbondingTxSig + btcDel.BtcUndelegation.CovenantSlashingSig = slashUnbondingTxSig return nil } - return k.updateBTCDelegation(ctx, valBTCPK, delBTCPK, stakingTxHash, addJurySigs) + return k.updateBTCDelegation(ctx, valBTCPK, delBTCPK, stakingTxHash, addCovenantSigs) } // hasBTCDelegatorDelegations checks if the given BTC delegator has any BTC delegations under a given BTC validator diff --git a/x/btcstaking/keeper/grpc_query.go b/x/btcstaking/keeper/grpc_query.go index d19324e23..262cda22a 100644 --- a/x/btcstaking/keeper/grpc_query.go +++ b/x/btcstaking/keeper/grpc_query.go @@ -284,7 +284,7 @@ func (k Keeper) BTCDelegation(ctx context.Context, req *types.QueryBTCDelegation undelegationInfo = &types.BTCUndelegationInfo{ UnbondingTx: btcDel.BtcUndelegation.UnbondingTx, ValidatorUnbondingSig: btcDel.BtcUndelegation.ValidatorUnbondingSig, - JuryUnbondingSig: btcDel.BtcUndelegation.JuryUnbondingSig, + CovenantUnbondingSig: btcDel.BtcUndelegation.CovenantUnbondingSig, } } diff --git a/x/btcstaking/keeper/grpc_query_test.go b/x/btcstaking/keeper/grpc_query_test.go index 26e5843df..442fd6c30 100644 --- a/x/btcstaking/keeper/grpc_query_test.go +++ b/x/btcstaking/keeper/grpc_query_test.go @@ -171,8 +171,8 @@ func FuzzPendingBTCDelegations(f *testing.F) { btccKeeper.EXPECT().GetParams(gomock.Any()).Return(btcctypes.DefaultParams()).AnyTimes() keeper, ctx := testkeeper.BTCStakingKeeper(t, btclcKeeper, btccKeeper) - // jury and slashing addr - jurySK, _, err := datagen.GenRandomBTCKeyPair(r) + // covenant and slashing addr + covenantSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, &chaincfg.SimNetParams) require.NoError(t, err) @@ -196,11 +196,11 @@ func FuzzPendingBTCDelegations(f *testing.F) { for j := uint64(0); j < numBTCDels; j++ { delSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - btcDel, err := datagen.GenRandomBTCDelegation(r, btcVal.BtcPk, delSK, jurySK, slashingAddr.String(), startHeight, endHeight, 10000) + btcDel, err := datagen.GenRandomBTCDelegation(r, btcVal.BtcPk, delSK, covenantSK, slashingAddr.String(), startHeight, endHeight, 10000) require.NoError(t, err) if datagen.RandomInt(r, 2) == 1 { - // remove jury sig in random BTC delegations to make them inactive - btcDel.JurySig = nil + // remove covenant sig in random BTC delegations to make them inactive + btcDel.CovenantSig = nil pendingBtcDelsMap[btcDel.BtcPk.MarshalHex()] = btcDel } err = keeper.AddBTCDelegation(ctx, btcDel) @@ -259,8 +259,8 @@ func FuzzUnbondingBTCDelegations(f *testing.F) { btccKeeper.EXPECT().GetParams(gomock.Any()).Return(btcctypes.DefaultParams()).AnyTimes() keeper, ctx := testkeeper.BTCStakingKeeper(t, btclcKeeper, btccKeeper) - // jury and slashing addr - jurySK, _, err := datagen.GenRandomBTCKeyPair(r) + // covenant and slashing addr + covenantSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, &chaincfg.SimNetParams) require.NoError(t, err) @@ -284,20 +284,20 @@ func FuzzUnbondingBTCDelegations(f *testing.F) { for j := uint64(0); j < numBTCDels; j++ { delSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - btcDel, err := datagen.GenRandomBTCDelegation(r, btcVal.BtcPk, delSK, jurySK, slashingAddr.String(), startHeight, endHeight, 10000) + btcDel, err := datagen.GenRandomBTCDelegation(r, btcVal.BtcPk, delSK, covenantSK, slashingAddr.String(), startHeight, endHeight, 10000) require.NoError(t, err) if datagen.RandomInt(r, 2) == 1 { - // add unbonding object in random BTC delegations to make them ready to receive jury sig + // add unbonding object in random BTC delegations to make them ready to receive covenant sig btcDel.BtcUndelegation = &types.BTCUndelegation{ // doesn't matter what we put here - ValidatorUnbondingSig: btcDel.JurySig, + ValidatorUnbondingSig: btcDel.CovenantSig, } if datagen.RandomInt(r, 2) == 1 { // these BTC delegations are unbonded - btcDel.BtcUndelegation.JuryUnbondingSig = btcDel.JurySig - btcDel.BtcUndelegation.JurySlashingSig = btcDel.JurySig + btcDel.BtcUndelegation.CovenantUnbondingSig = btcDel.CovenantSig + btcDel.BtcUndelegation.CovenantSlashingSig = btcDel.CovenantSig } else { // these BTC delegations are unbonding unbondingBtcDelsMap[btcDel.BtcPk.MarshalHex()] = btcDel @@ -420,8 +420,8 @@ func FuzzActiveBTCValidatorsAtHeight(f *testing.F) { // Setup keeper and context keeper, ctx := testkeeper.BTCStakingKeeper(t, nil, nil) - // jury and slashing addr - jurySK, _, err := datagen.GenRandomBTCKeyPair(r) + // covenant and slashing addr + covenantSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, &chaincfg.SimNetParams) require.NoError(t, err) @@ -449,7 +449,7 @@ func FuzzActiveBTCValidatorsAtHeight(f *testing.F) { for j := uint64(0); j < numBTCDels; j++ { delSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - btcDel, err := datagen.GenRandomBTCDelegation(r, valBTCPK, delSK, jurySK, slashingAddr.String(), 1, 1000, 10000) // timelock period: 1-1000 + btcDel, err := datagen.GenRandomBTCDelegation(r, valBTCPK, delSK, covenantSK, slashingAddr.String(), 1, 1000, 10000) // timelock period: 1-1000 require.NoError(t, err) err = keeper.AddBTCDelegation(ctx, btcDel) require.NoError(t, err) @@ -518,8 +518,8 @@ func FuzzBTCValidatorDelegations(f *testing.F) { btccKeeper.EXPECT().GetParams(gomock.Any()).Return(btcctypes.DefaultParams()).AnyTimes() keeper, ctx := testkeeper.BTCStakingKeeper(t, btclcKeeper, btccKeeper) - // jury and slashing addr - jurySK, _, err := datagen.GenRandomBTCKeyPair(r) + // covenant and slashing addr + covenantSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, &chaincfg.SimNetParams) require.NoError(t, err) @@ -537,7 +537,7 @@ func FuzzBTCValidatorDelegations(f *testing.F) { for j := uint64(0); j < numBTCDels; j++ { delSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - btcDel, err := datagen.GenRandomBTCDelegation(r, btcVal.BtcPk, delSK, jurySK, slashingAddr.String(), startHeight, endHeight, 10000) + btcDel, err := datagen.GenRandomBTCDelegation(r, btcVal.BtcPk, delSK, covenantSK, slashingAddr.String(), startHeight, endHeight, 10000) require.NoError(t, err) expectedBtcDelsMap[btcDel.BtcPk.MarshalHex()] = btcDel err = keeper.AddBTCDelegation(ctx, btcDel) diff --git a/x/btcstaking/keeper/incentive_test.go b/x/btcstaking/keeper/incentive_test.go index 914bb1886..5e312c6c3 100644 --- a/x/btcstaking/keeper/incentive_test.go +++ b/x/btcstaking/keeper/incentive_test.go @@ -28,8 +28,8 @@ func FuzzRecordRewardDistCache(f *testing.F) { btccKeeper.EXPECT().GetParams(gomock.Any()).Return(btcctypes.DefaultParams()).AnyTimes() keeper, ctx := keepertest.BTCStakingKeeper(t, btclcKeeper, btccKeeper) - // jury and slashing addr - jurySK, _, err := datagen.GenRandomBTCKeyPair(r) + // covenant and slashing addr + covenantSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, &chaincfg.SimNetParams) require.NoError(t, err) @@ -56,7 +56,7 @@ func FuzzRecordRewardDistCache(f *testing.F) { for j := uint64(0); j < numBTCDels; j++ { delSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - btcDel, err := datagen.GenRandomBTCDelegation(r, valBTCPK, delSK, jurySK, slashingAddr.String(), 1, 1000, stakingValue) // timelock period: 1-1000 + btcDel, err := datagen.GenRandomBTCDelegation(r, valBTCPK, delSK, covenantSK, slashingAddr.String(), 1, 1000, stakingValue) // timelock period: 1-1000 require.NoError(t, err) err = keeper.AddBTCDelegation(ctx, btcDel) require.NoError(t, err) diff --git a/x/btcstaking/keeper/msg_server.go b/x/btcstaking/keeper/msg_server.go index e8709c9c0..9e12603ca 100644 --- a/x/btcstaking/keeper/msg_server.go +++ b/x/btcstaking/keeper/msg_server.go @@ -125,7 +125,7 @@ func (ms msgServer) CreateBTCDelegation(goCtx context.Context, req *types.MsgCre } delBTCPK := bbn.NewBIP340PubKeyFromBTCPK(stakingOutputInfo.StakingScriptData.StakerKey) valBTCPK := bbn.NewBIP340PubKeyFromBTCPK(stakingOutputInfo.StakingScriptData.ValidatorKey) - juryPK := bbn.NewBIP340PubKeyFromBTCPK(stakingOutputInfo.StakingScriptData.JuryKey) + covenantPK := bbn.NewBIP340PubKeyFromBTCPK(stakingOutputInfo.StakingScriptData.CovenantKey) // verify proof of possession if err := req.Pop.Verify(req.BabylonPk, delBTCPK, ms.btcNet); err != nil { @@ -154,10 +154,10 @@ func (ms msgServer) CreateBTCDelegation(goCtx context.Context, req *types.MsgCre } } - // ensure staking tx is using correct jury PK - paramJuryPK := params.JuryPk - if !juryPK.Equals(paramJuryPK) { - return nil, types.ErrInvalidJuryPK.Wrapf("expected: %s; actual: %s", hex.EncodeToString(*paramJuryPK), hex.EncodeToString(*juryPK)) + // ensure staking tx is using correct covenant PK + paramCovenantPK := params.CovenantPk + if !covenantPK.Equals(paramCovenantPK) { + return nil, types.ErrInvalidCovenantPK.Wrapf("expected: %s; actual: %s", hex.EncodeToString(*paramCovenantPK), hex.EncodeToString(*covenantPK)) } // get startheight and endheight of the timelock @@ -219,7 +219,7 @@ func (ms msgServer) CreateBTCDelegation(goCtx context.Context, req *types.MsgCre // all good, construct BTCDelegation and insert BTC delegation // NOTE: the BTC delegation does not have voting power yet. It will // have voting power only when 1) its corresponding staking tx is k-deep, - // and 2) it receives a jury signature + // and 2) it receives a covenant signature newBTCDel := &types.BTCDelegation{ BabylonPk: req.BabylonPk, BtcPk: delBTCPK, @@ -231,7 +231,7 @@ func (ms msgServer) CreateBTCDelegation(goCtx context.Context, req *types.MsgCre StakingTx: req.StakingTx, SlashingTx: req.SlashingTx, DelegatorSig: req.DelegatorSig, - JurySig: nil, // NOTE: jury signature will be submitted in a separate msg by jury + CovenantSig: nil, // NOTE: covenant signature will be submitted in a separate msg by covenant BtcUndelegation: nil, } if err := ms.AddBTCDelegation(ctx, newBTCDel); err != nil { @@ -305,13 +305,13 @@ func (ms msgServer) BTCUndelegate(goCtx context.Context, req *types.MsgBTCUndele return nil, types.ErrInvalidUnbodningTx.Wrapf("unbonding time must be larger than finalization time") } - // 5. Check Jury Key from script is consistent with params + // 5. Check Covenant Key from script is consistent with params publicKeyInfos := types.KeyDataFromScript(unbondingOutputInfo.StakingScriptData) - if !publicKeyInfos.JuryKey.Equals(params.JuryPk) { - return nil, types.ErrInvalidJuryPK.Wrapf( + if !publicKeyInfos.CovenantKey.Equals(params.CovenantPk) { + return nil, types.ErrInvalidCovenantPK.Wrapf( "expected: %s; actual: %s", - hex.EncodeToString(*params.JuryPk), - hex.EncodeToString(*publicKeyInfos.JuryKey), + hex.EncodeToString(*params.CovenantPk), + hex.EncodeToString(*publicKeyInfos.CovenantKey), ) } @@ -348,7 +348,7 @@ func (ms msgServer) BTCUndelegate(goCtx context.Context, req *types.MsgBTCUndele // Given that unbonding tx must not be replacable and we do not allow sending it second time, it places // burden on staker to choose right fee. // Unbonding tx should not be replaceable at babylon level (and by extension on btc level), as this would - // allow staker to spam the network with unbonding txs, which would force jury and validator to send signatures. + // allow staker to spam the network with unbonding txs, which would force covenant and validator to send signatures. return nil, types.ErrInvalidUnbodningTx.Wrapf("unbonding tx fee must be larger that 0") } @@ -356,12 +356,12 @@ func (ms msgServer) BTCUndelegate(goCtx context.Context, req *types.MsgBTCUndele UnbondingTx: req.UnbondingTx, SlashingTx: req.SlashingTx, DelegatorSlashingSig: req.DelegatorSlashingSig, - // following objects needs to be filled by jury and validator + // following objects needs to be filled by covenant and validator // Jurry needs to provide two sigs: // - one for unbonding tx // - one for slashing tx of unbonding tx - JurySlashingSig: nil, - JuryUnbondingSig: nil, + CovenantSlashingSig: nil, + CovenantUnbondingSig: nil, ValidatorUnbondingSig: nil, } @@ -388,8 +388,8 @@ func (ms msgServer) BTCUndelegate(goCtx context.Context, req *types.MsgBTCUndele return &types.MsgBTCUndelegateResponse{}, nil } -// AddJurySig adds a signature from jury to a BTC delegation -func (ms msgServer) AddJurySig(goCtx context.Context, req *types.MsgAddJurySig) (*types.MsgAddJurySigResponse, error) { +// AddCovenantSig adds a signature from covenant to a BTC delegation +func (ms msgServer) AddCovenantSig(goCtx context.Context, req *types.MsgAddCovenantSig) (*types.MsgAddCovenantSigResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // ensure BTC delegation exists @@ -397,8 +397,8 @@ func (ms msgServer) AddJurySig(goCtx context.Context, req *types.MsgAddJurySig) if err != nil { return nil, err } - if btcDel.HasJurySig() { - return nil, types.ErrDuplicatedJurySig + if btcDel.HasCovenantSig() { + return nil, types.ErrDuplicatedCovenantSig } stakingOutputInfo, err := btcDel.StakingTx.GetBabylonOutputInfo(ms.btcNet) @@ -407,26 +407,26 @@ func (ms msgServer) AddJurySig(goCtx context.Context, req *types.MsgAddJurySig) panic(fmt.Errorf("failed to get staking output info from a verified staking tx")) } - juryPK, err := ms.GetParams(ctx).JuryPk.ToBTCPK() + covenantPK, err := ms.GetParams(ctx).CovenantPk.ToBTCPK() if err != nil { - // failing to cast a verified jury PK a programming error - panic(fmt.Errorf("failed to cast a verified jury public key")) + // failing to cast a verified covenant PK a programming error + panic(fmt.Errorf("failed to cast a verified covenant public key")) } - // verify signature w.r.t. jury PK and signature + // verify signature w.r.t. covenant PK and signature err = btcDel.SlashingTx.VerifySignature( stakingOutputInfo.StakingPkScript, int64(stakingOutputInfo.StakingAmount), btcDel.StakingTx.Script, - juryPK, + covenantPK, req.Sig, ) if err != nil { - return nil, types.ErrInvalidJurySig.Wrap(err.Error()) + return nil, types.ErrInvalidCovenantSig.Wrap(err.Error()) } // all good, add signature to BTC delegation and set it back to KVStore - if err := ms.AddJurySigToBTCDelegation(ctx, req.ValPk, req.DelPk, req.StakingTxHash, req.Sig); err != nil { + if err := ms.AddCovenantSigToBTCDelegation(ctx, req.ValPk, req.DelPk, req.StakingTxHash, req.Sig); err != nil { panic("failed to set BTC delegation that has passed verification") } @@ -435,12 +435,12 @@ func (ms msgServer) AddJurySig(goCtx context.Context, req *types.MsgAddJurySig) panic(fmt.Errorf("failed to emit EventActivateBTCDelegation: %w", err)) } - return &types.MsgAddJurySigResponse{}, nil + return &types.MsgAddCovenantSigResponse{}, nil } -func (ms msgServer) AddJuryUnbondingSigs( +func (ms msgServer) AddCovenantUnbondingSigs( goCtx context.Context, - req *types.MsgAddJuryUnbondingSigs) (*types.MsgAddJuryUnbondingSigsResponse, error) { + req *types.MsgAddCovenantUnbondingSigs) (*types.MsgAddCovenantUnbondingSigsResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) wValue := ms.btccKeeper.GetParams(ctx).CheckpointFinalizationTimeout @@ -458,18 +458,18 @@ func (ms msgServer) AddJuryUnbondingSigs( return nil, types.ErrInvalidDelegationState.Wrapf("Expected status: %s, actual: %s", types.BTCDelegationStatus_UNBONDING.String(), status.String()) } - // 3. Check that we did not recevie jury signature yet - if btcDel.BtcUndelegation.HasJurySigs() { - return nil, types.ErrDuplicatedJurySig.Wrap("Jury signature for undelegation already received") + // 3. Check that we did not recevie covenant signature yet + if btcDel.BtcUndelegation.HasCovenantSigs() { + return nil, types.ErrDuplicatedCovenantSig.Wrap("Covenant signature for undelegation already received") } // 4. Check that we already received validator signature if !btcDel.BtcUndelegation.HasValidatorSig() { - // Jury should provide signature only after validator to avoid validator and staker + // Covenant should provide signature only after validator to avoid validator and staker // collusion i.e sending unbonding tx to btc without leaving validator signature on babylon chain. // TODO: Maybe it is worth accepting signatures and just emmiting some kind of warning event ? as if this msg // processing fails, it will still be included on babylon chain, so anybody could still retrieve - // all jury signatures included in msg. And with warning we will at least have some kind of + // all covenant signatures included in msg. And with warning we will at least have some kind of // indication that something is wrong. return nil, types.ErrUnbondingUnexpectedValidatorSig } @@ -481,10 +481,10 @@ func (ms msgServer) AddJuryUnbondingSigs( panic(fmt.Errorf("failed to get staking output info from a verified staking tx")) } - juryPK, err := ms.GetParams(ctx).JuryPk.ToBTCPK() + covenantPK, err := ms.GetParams(ctx).CovenantPk.ToBTCPK() if err != nil { - // failing to cast a verified jury PK is a programming error - panic(fmt.Errorf("failed to cast a verified jury public key")) + // failing to cast a verified covenant PK is a programming error + panic(fmt.Errorf("failed to cast a verified covenant public key")) } // UnbondingTx has exactly one input and one output so we may re-use the same @@ -493,11 +493,11 @@ func (ms msgServer) AddJuryUnbondingSigs( stakingOutputInfo.StakingPkScript, int64(stakingOutputInfo.StakingAmount), btcDel.StakingTx.Script, - juryPK, + covenantPK, req.UnbondingTxSig, ) if err != nil { - return nil, types.ErrInvalidJurySig.Wrap(err.Error()) + return nil, types.ErrInvalidCovenantSig.Wrap(err.Error()) } // 5. Verify signature of slashing tx against unbonding tx output @@ -511,7 +511,7 @@ func (ms msgServer) AddJuryUnbondingSigs( unbondingOutputInfo.StakingPkScript, int64(unbondingOutputInfo.StakingAmount), btcDel.BtcUndelegation.UnbondingTx.Script, - juryPK, + covenantPK, req.SlashingUnbondingTxSig, ) if err != nil { @@ -519,7 +519,7 @@ func (ms msgServer) AddJuryUnbondingSigs( } // all good, add signature to BTC delegation and set it back to KVStore - if err := ms.AddJurySigsToUndelegation( + if err := ms.AddCovenantSigsToUndelegation( ctx, req.ValPk, req.DelPk, @@ -603,9 +603,9 @@ func (ms msgServer) AddValidatorUnbondingSig( panic("failed to set BTC delegation that has passed verification") } - // if the BTC undelegation has jury sigs, then after above operations the + // if the BTC undelegation has covenant sigs, then after above operations the // BTC delegation will become unbonded - if btcDel.BtcUndelegation.HasJurySigs() { + if btcDel.BtcUndelegation.HasCovenantSigs() { event := &types.EventUnbondedBTCDelegation{ BtcPk: btcDel.BtcPk, ValBtcPk: btcDel.ValBtcPk, diff --git a/x/btcstaking/keeper/msg_server_test.go b/x/btcstaking/keeper/msg_server_test.go index 22a29a839..58f5b7f19 100644 --- a/x/btcstaking/keeper/msg_server_test.go +++ b/x/btcstaking/keeper/msg_server_test.go @@ -84,26 +84,26 @@ func FuzzMsgCreateBTCValidator(f *testing.F) { }) } -func getJuryInfo(t *testing.T, +func getCovenantInfo(t *testing.T, r *rand.Rand, goCtx context.Context, ms types.MsgServer, net *chaincfg.Params, bsKeeper *keeper.Keeper, sdkCtx sdk.Context) (*btcec.PrivateKey, *btcec.PublicKey, btcutil.Address) { - jurySK, juryPK, err := datagen.GenRandomBTCKeyPair(r) + covenantSK, covenantPK, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, net) require.NoError(t, err) err = bsKeeper.SetParams(sdkCtx, types.Params{ - JuryPk: bbn.NewBIP340PubKeyFromBTCPK(juryPK), + CovenantPk: bbn.NewBIP340PubKeyFromBTCPK(covenantPK), SlashingAddress: slashingAddr.String(), MinSlashingTxFeeSat: 10, MinCommissionRate: sdk.MustNewDecFromStr("0.01"), SlashingRate: sdk.MustNewDecFromStr("0.1"), }) require.NoError(t, err) - return jurySK, juryPK, slashingAddr + return covenantSK, covenantPK, slashingAddr } @@ -139,7 +139,7 @@ func createDelegation( btclcKeeper *types.MockBTCLightClientKeeper, net *chaincfg.Params, validatorPK *btcec.PublicKey, - juryPK *btcec.PublicKey, + covenantPK *btcec.PublicKey, slashingAddr string, stakingTime uint16, ) (string, *btcec.PrivateKey, *btcec.PublicKey, *types.MsgCreateBTCDelegation) { @@ -152,7 +152,7 @@ func createDelegation( net, delSK, validatorPK, - juryPK, + covenantPK, stakingTimeBlocks, stakingValue, slashingAddr, @@ -207,7 +207,7 @@ func createDelegation( return stakingTxHash, delSK, delPK, msgCreateBTCDel } -func createJurySig( +func createCovenantSig( t *testing.T, r *rand.Rand, goCtx context.Context, @@ -215,37 +215,37 @@ func createJurySig( bsKeeper *keeper.Keeper, sdkCtx sdk.Context, net *chaincfg.Params, - jurySK *btcec.PrivateKey, + covenantSK *btcec.PrivateKey, msgCreateBTCDel *types.MsgCreateBTCDelegation, delegation *types.BTCDelegation, ) { stakingMsgTx, err := msgCreateBTCDel.StakingTx.ToMsgTx() require.NoError(t, err) stakingTxHash := msgCreateBTCDel.StakingTx.MustGetTxHashStr() - jurySig, err := msgCreateBTCDel.SlashingTx.Sign( + covenantSig, err := msgCreateBTCDel.SlashingTx.Sign( stakingMsgTx, msgCreateBTCDel.StakingTx.Script, - jurySK, + covenantSK, net, ) require.NoError(t, err) - msgAddJurySig := &types.MsgAddJurySig{ + msgAddCovenantSig := &types.MsgAddCovenantSig{ Signer: msgCreateBTCDel.Signer, ValPk: delegation.ValBtcPk, DelPk: delegation.BtcPk, StakingTxHash: stakingTxHash, - Sig: jurySig, + Sig: covenantSig, } - _, err = ms.AddJurySig(goCtx, msgAddJurySig) + _, err = ms.AddCovenantSig(goCtx, msgAddCovenantSig) require.NoError(t, err) /* - ensure jury sig is added successfully + ensure covenant sig is added successfully */ - actualDelWithJurySig, err := bsKeeper.GetBTCDelegation(sdkCtx, delegation.ValBtcPk, delegation.BtcPk, stakingTxHash) + actualDelWithCovenantSig, err := bsKeeper.GetBTCDelegation(sdkCtx, delegation.ValBtcPk, delegation.BtcPk, stakingTxHash) require.NoError(t, err) - require.Equal(t, actualDelWithJurySig.JurySig.MustMarshal(), jurySig.MustMarshal()) - require.True(t, actualDelWithJurySig.HasJurySig()) + require.Equal(t, actualDelWithCovenantSig.CovenantSig.MustMarshal(), covenantSig.MustMarshal()) + require.True(t, actualDelWithCovenantSig.HasCovenantSig()) } func getDelegationAndCheckValues( @@ -268,8 +268,8 @@ func getDelegationAndCheckValues( // ensure the BTC delegation in DB is correctly formatted err = actualDel.ValidateBasic() require.NoError(t, err) - // delegation is not activated by jury yet - require.False(t, actualDel.HasJurySig()) + // delegation is not activated by covenant yet + require.False(t, actualDel.HasCovenantSig()) return actualDel } @@ -284,7 +284,7 @@ func createUndelegation( stakingTxHash string, delSK *btcec.PrivateKey, validatorPK *btcec.PublicKey, - juryPK *btcec.PublicKey, + covenantPK *btcec.PublicKey, slashingAddr string, ) *types.MsgBTCUndelegate { stkTxHash, err := chainhash.NewHashFromStr(stakingTxHash) @@ -297,7 +297,7 @@ func createUndelegation( net, delSK, validatorPK, - juryPK, + covenantPK, wire.NewOutPoint(stkTxHash, stkOutputIdx), uint16(defaultParams.CheckpointFinalizationTimeout)+1, int64(actualDel.TotalSat)-1000, @@ -329,7 +329,7 @@ func createUndelegation( return msg } -func FuzzCreateBTCDelegationAndAddJurySig(f *testing.F) { +func FuzzCreateBTCDelegationAndAddCovenantSig(f *testing.F) { datagen.AddRandomSeedsToFuzzer(f, 10) f.Fuzz(func(t *testing.T, seed int64) { @@ -345,8 +345,8 @@ func FuzzCreateBTCDelegationAndAddJurySig(f *testing.F) { ms := keeper.NewMsgServerImpl(*bsKeeper) goCtx := sdk.WrapSDKContext(ctx) - // set jury PK to params - jurySK, juryPK, slashingAddr := getJuryInfo(t, r, goCtx, ms, net, bsKeeper, ctx) + // set covenant PK to params + covenantSK, covenantPK, slashingAddr := getCovenantInfo(t, r, goCtx, ms, net, bsKeeper, ctx) /* generate and insert new BTC validator @@ -365,7 +365,7 @@ func FuzzCreateBTCDelegationAndAddJurySig(f *testing.F) { btclcKeeper, net, validatorPK, - juryPK, + covenantPK, slashingAddr.String(), 1000, ) @@ -377,9 +377,9 @@ func FuzzCreateBTCDelegationAndAddJurySig(f *testing.F) { actualDel := getDelegationAndCheckValues(t, r, ms, bsKeeper, ctx, msgCreateBTCDel, validatorPK, delPK, stakingTxHash) /* - generate and insert new jury signature + generate and insert new covenant signature */ - createJurySig(t, r, goCtx, ms, bsKeeper, ctx, net, jurySK, msgCreateBTCDel, actualDel) + createCovenantSig(t, r, goCtx, ms, bsKeeper, ctx, net, covenantSK, msgCreateBTCDel, actualDel) }) } @@ -397,13 +397,13 @@ func TestDoNotAllowDelegationWithoutValidator(t *testing.T) { ms := keeper.NewMsgServerImpl(*bsKeeper) goCtx := sdk.WrapSDKContext(ctx) - // set jury PK to params - _, juryPK, err := datagen.GenRandomBTCKeyPair(r) + // set covenant PK to params + _, covenantPK, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, net) require.NoError(t, err) err = bsKeeper.SetParams(ctx, types.Params{ - JuryPk: bbn.NewBIP340PubKeyFromBTCPK(juryPK), + CovenantPk: bbn.NewBIP340PubKeyFromBTCPK(covenantPK), SlashingAddress: slashingAddr.String(), MinSlashingTxFeeSat: 10, MinCommissionRate: sdk.MustNewDecFromStr("0.01"), @@ -423,7 +423,7 @@ func TestDoNotAllowDelegationWithoutValidator(t *testing.T) { require.NoError(t, err) stakingTimeBlocks := uint16(5) stakingValue := int64(2 * 10e8) - stakingTx, slashingTx, err := datagen.GenBTCStakingSlashingTx(r, net, delSK, validatorPK, juryPK, stakingTimeBlocks, stakingValue, slashingAddr.String()) + stakingTx, slashingTx, err := datagen.GenBTCStakingSlashingTx(r, net, delSK, validatorPK, covenantPK, stakingTimeBlocks, stakingValue, slashingAddr.String()) require.NoError(t, err) // get msgTx stakingMsgTx, err := stakingTx.ToMsgTx() @@ -483,7 +483,7 @@ func FuzzCreateBTCDelegationAndUndelegation(f *testing.F) { ms := keeper.NewMsgServerImpl(*bsKeeper) goCtx := sdk.WrapSDKContext(ctx) - jurySK, juryPK, slashingAddr := getJuryInfo(t, r, goCtx, ms, net, bsKeeper, ctx) + covenantSK, covenantPK, slashingAddr := getCovenantInfo(t, r, goCtx, ms, net, bsKeeper, ctx) _, validatorPK, _ := createValidator(t, r, goCtx, ms) stakingTxHash, delSK, delPK, msgCreateBTCDel := createDelegation( t, @@ -494,12 +494,12 @@ func FuzzCreateBTCDelegationAndUndelegation(f *testing.F) { btclcKeeper, net, validatorPK, - juryPK, + covenantPK, slashingAddr.String(), 1000, ) actualDel := getDelegationAndCheckValues(t, r, ms, bsKeeper, ctx, msgCreateBTCDel, validatorPK, delPK, stakingTxHash) - createJurySig(t, r, goCtx, ms, bsKeeper, ctx, net, jurySK, msgCreateBTCDel, actualDel) + createCovenantSig(t, r, goCtx, ms, bsKeeper, ctx, net, covenantSK, msgCreateBTCDel, actualDel) undelegateMsg := createUndelegation( t, @@ -512,7 +512,7 @@ func FuzzCreateBTCDelegationAndUndelegation(f *testing.F) { stakingTxHash, delSK, validatorPK, - juryPK, + covenantPK, slashingAddr.String(), ) @@ -523,13 +523,13 @@ func FuzzCreateBTCDelegationAndUndelegation(f *testing.F) { require.Equal(t, actualDelegationWithUnbonding.BtcUndelegation.UnbondingTx, undelegateMsg.UnbondingTx) require.Equal(t, actualDelegationWithUnbonding.BtcUndelegation.SlashingTx, undelegateMsg.SlashingTx) require.Equal(t, actualDelegationWithUnbonding.BtcUndelegation.DelegatorSlashingSig, undelegateMsg.DelegatorSlashingSig) - require.Nil(t, actualDelegationWithUnbonding.BtcUndelegation.JurySlashingSig) - require.Nil(t, actualDelegationWithUnbonding.BtcUndelegation.JuryUnbondingSig) + require.Nil(t, actualDelegationWithUnbonding.BtcUndelegation.CovenantSlashingSig) + require.Nil(t, actualDelegationWithUnbonding.BtcUndelegation.CovenantUnbondingSig) require.Nil(t, actualDelegationWithUnbonding.BtcUndelegation.ValidatorUnbondingSig) }) } -func FuzzAddJuryAndValidatorSignaturesToUnbondind(f *testing.F) { +func FuzzAddCovenantAndValidatorSignaturesToUnbondind(f *testing.F) { datagen.AddRandomSeedsToFuzzer(f, 10) f.Fuzz(func(t *testing.T, seed int64) { @@ -545,7 +545,7 @@ func FuzzAddJuryAndValidatorSignaturesToUnbondind(f *testing.F) { ms := keeper.NewMsgServerImpl(*bsKeeper) goCtx := sdk.WrapSDKContext(ctx) - jurySK, juryPK, slashingAddr := getJuryInfo(t, r, goCtx, ms, net, bsKeeper, ctx) + covenantSK, covenantPK, slashingAddr := getCovenantInfo(t, r, goCtx, ms, net, bsKeeper, ctx) valSk, validatorPK, _ := createValidator(t, r, goCtx, ms) stakingTxHash, delSK, delPK, msgCreateBTCDel := createDelegation( t, @@ -556,12 +556,12 @@ func FuzzAddJuryAndValidatorSignaturesToUnbondind(f *testing.F) { btclcKeeper, net, validatorPK, - juryPK, + covenantPK, slashingAddr.String(), 1000, ) actualDel := getDelegationAndCheckValues(t, r, ms, bsKeeper, ctx, msgCreateBTCDel, validatorPK, delPK, stakingTxHash) - createJurySig(t, r, goCtx, ms, bsKeeper, ctx, net, jurySK, msgCreateBTCDel, actualDel) + createCovenantSig(t, r, goCtx, ms, bsKeeper, ctx, net, covenantSK, msgCreateBTCDel, actualDel) undelegateMsg := createUndelegation( t, @@ -574,7 +574,7 @@ func FuzzAddJuryAndValidatorSignaturesToUnbondind(f *testing.F) { stakingTxHash, delSK, validatorPK, - juryPK, + covenantPK, slashingAddr.String(), ) @@ -608,12 +608,12 @@ func FuzzAddJuryAndValidatorSignaturesToUnbondind(f *testing.F) { require.NotNil(t, delWithValSig.BtcUndelegation) require.NotNil(t, delWithValSig.BtcUndelegation.ValidatorUnbondingSig) - // Check sending jury signatures + // Check sending covenant signatures // unbonding tx spends staking tx - unbondingTxSignatureJury, err := undelegateMsg.UnbondingTx.Sign( + unbondingTxSignatureCovenant, err := undelegateMsg.UnbondingTx.Sign( stakingTxMsg, del.StakingTx.Script, - jurySK, + covenantSK, net, ) require.NoError(t, err) @@ -622,33 +622,33 @@ func FuzzAddJuryAndValidatorSignaturesToUnbondind(f *testing.F) { require.NoError(t, err) // slash unbodning tx spends unbonding tx - slashUnbondingTxSignatureJury, err := undelegateMsg.SlashingTx.Sign( + slashUnbondingTxSignatureCovenant, err := undelegateMsg.SlashingTx.Sign( unbondingTxMsg, undelegateMsg.UnbondingTx.Script, - jurySK, + covenantSK, net, ) require.NoError(t, err) - jurySigsMsg := types.MsgAddJuryUnbondingSigs{ + covenantSigsMsg := types.MsgAddCovenantUnbondingSigs{ Signer: datagen.GenRandomAccount().Address, ValPk: del.ValBtcPk, DelPk: del.BtcPk, StakingTxHash: stakingTxHash, - UnbondingTxSig: unbondingTxSignatureJury, - SlashingUnbondingTxSig: slashUnbondingTxSignatureJury, + UnbondingTxSig: unbondingTxSignatureCovenant, + SlashingUnbondingTxSig: slashUnbondingTxSignatureCovenant, } btclcKeeper.EXPECT().GetTipInfo(gomock.Any()).Return(&btclctypes.BTCHeaderInfo{Height: actualDel.StartHeight + 1}) - _, err = ms.AddJuryUnbondingSigs(goCtx, &jurySigsMsg) + _, err = ms.AddCovenantUnbondingSigs(goCtx, &covenantSigsMsg) require.NoError(t, err) delWithUnbondingSigs, err := bsKeeper.GetBTCDelegation(ctx, actualDel.ValBtcPk, actualDel.BtcPk, stakingTxHash) require.NoError(t, err) require.NotNil(t, delWithUnbondingSigs.BtcUndelegation) require.NotNil(t, delWithUnbondingSigs.BtcUndelegation.ValidatorUnbondingSig) - require.NotNil(t, delWithUnbondingSigs.BtcUndelegation.JurySlashingSig) - require.NotNil(t, delWithUnbondingSigs.BtcUndelegation.JuryUnbondingSig) + require.NotNil(t, delWithUnbondingSigs.BtcUndelegation.CovenantSlashingSig) + require.NotNil(t, delWithUnbondingSigs.BtcUndelegation.CovenantUnbondingSig) }) } diff --git a/x/btcstaking/keeper/voting_power_table_test.go b/x/btcstaking/keeper/voting_power_table_test.go index 09ba168ca..e1ced92b8 100644 --- a/x/btcstaking/keeper/voting_power_table_test.go +++ b/x/btcstaking/keeper/voting_power_table_test.go @@ -28,8 +28,8 @@ func FuzzVotingPowerTable(f *testing.F) { btccKeeper.EXPECT().GetParams(gomock.Any()).Return(btcctypes.DefaultParams()).AnyTimes() keeper, ctx := keepertest.BTCStakingKeeper(t, btclcKeeper, btccKeeper) - // jury and slashing addr - jurySK, _, err := datagen.GenRandomBTCKeyPair(r) + // covenant and slashing addr + covenantSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) slashingAddr, err := datagen.GenRandomBTCAddress(r, &chaincfg.SimNetParams) require.NoError(t, err) @@ -53,7 +53,7 @@ func FuzzVotingPowerTable(f *testing.F) { for j := uint64(0); j < numBTCDels; j++ { delSK, _, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - btcDel, err := datagen.GenRandomBTCDelegation(r, valBTCPK, delSK, jurySK, slashingAddr.String(), 1, 1000, stakingValue) // timelock period: 1-1000 + btcDel, err := datagen.GenRandomBTCDelegation(r, valBTCPK, delSK, covenantSK, slashingAddr.String(), 1, 1000, stakingValue) // timelock period: 1-1000 require.NoError(t, err) err = keeper.AddBTCDelegation(ctx, btcDel) require.NoError(t, err) diff --git a/x/btcstaking/types/btc_slashing_tx.go b/x/btcstaking/types/btc_slashing_tx.go index 8b6434e75..3a636f830 100644 --- a/x/btcstaking/types/btc_slashing_tx.go +++ b/x/btcstaking/types/btc_slashing_tx.go @@ -5,12 +5,13 @@ import ( "encoding/hex" "fmt" - "github.com/babylonchain/babylon/btcstaking" - bbn "github.com/babylonchain/babylon/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/wire" + + "github.com/babylonchain/babylon/btcstaking" + bbn "github.com/babylonchain/babylon/types" ) type BTCSlashingTx []byte @@ -100,7 +101,7 @@ func (tx *BTCSlashingTx) Validate(net *chaincfg.Params, slashingAddress string) return btcstaking.IsSlashingTx(msgTx, decodedAddr) } -// Sign generates a signature on the slashing tx signed by staker, validator or jury +// Sign generates a signature on the slashing tx signed by staker, validator or covenant func (tx *BTCSlashingTx) Sign(stakingMsgTx *wire.MsgTx, stakingScript []byte, sk *btcec.PrivateKey, net *chaincfg.Params) (*bbn.BIP340Signature, error) { msgTx, err := tx.ToMsgTx() if err != nil { @@ -120,7 +121,7 @@ func (tx *BTCSlashingTx) Sign(stakingMsgTx *wire.MsgTx, stakingScript []byte, sk return &sig, nil } -// VerifySignature verifies a signature on the slashing tx signed by staker, validator or jury +// VerifySignature verifies a signature on the slashing tx signed by staker, validator or covenant func (tx *BTCSlashingTx) VerifySignature(stakingPkScript []byte, stakingAmount int64, stakingScript []byte, pk *btcec.PublicKey, sig *bbn.BIP340Signature) error { msgTx, err := tx.ToMsgTx() if err != nil { @@ -140,8 +141,8 @@ func (tx *BTCSlashingTx) VerifySignature(stakingPkScript []byte, stakingAmount i // - the staking tx // - validator signature // - delegator signature -// - jury signature -func (tx *BTCSlashingTx) ToMsgTxWithWitness(stakingTx *BabylonBTCTaprootTx, valSig, delSig, jurySig *bbn.BIP340Signature) (*wire.MsgTx, error) { +// - covenant signature +func (tx *BTCSlashingTx) ToMsgTxWithWitness(stakingTx *BabylonBTCTaprootTx, valSig, delSig, covenantSig *bbn.BIP340Signature) (*wire.MsgTx, error) { // get staking script stakingScript := stakingTx.Script @@ -154,9 +155,9 @@ func (tx *BTCSlashingTx) ToMsgTxWithWitness(stakingTx *BabylonBTCTaprootTx, valS if err != nil { return nil, fmt.Errorf("failed to convert BTC delegator signature to Schnorr signature format: %w", err) } - jurySchnorrSig, err := jurySig.ToBTCSig() + covenantSchnorrSig, err := covenantSig.ToBTCSig() if err != nil { - return nil, fmt.Errorf("failed to convert jury signature to Schnorr signature format: %w", err) + return nil, fmt.Errorf("failed to convert covenant signature to Schnorr signature format: %w", err) } // build witness from each signature @@ -168,13 +169,13 @@ func (tx *BTCSlashingTx) ToMsgTxWithWitness(stakingTx *BabylonBTCTaprootTx, valS if err != nil { return nil, fmt.Errorf("failed to build witness for BTC delegator: %w", err) } - juryWitness, err := btcstaking.NewWitnessFromStakingScriptAndSignature(stakingScript, jurySchnorrSig) + covenantWitness, err := btcstaking.NewWitnessFromStakingScriptAndSignature(stakingScript, covenantSchnorrSig) if err != nil { - return nil, fmt.Errorf("failed to build witness for jury: %w", err) + return nil, fmt.Errorf("failed to build witness for covenant: %w", err) } // To Construct valid witness, for multisig case we need: - // - jury signature - witnessJury[0] + // - covenant signature - witnessCovenant[0] // - validator signature - witnessValidator[0] // - staker signature - witnessStaker[0] // - empty signature - which is just an empty byte array which signals we are going to use multisig. @@ -186,7 +187,7 @@ func (tx *BTCSlashingTx) ToMsgTxWithWitness(stakingTx *BabylonBTCTaprootTx, valS return nil, fmt.Errorf("failed to convert slashing tx to Bitcoin format: %w", err) } slashingMsgTx.TxIn[0].Witness = [][]byte{ - juryWitness[0], valWitness[0], delWitness[0], []byte{}, delWitness[1], delWitness[2], + covenantWitness[0], valWitness[0], delWitness[0], []byte{}, delWitness[1], delWitness[2], } return slashingMsgTx, nil diff --git a/x/btcstaking/types/btc_slashing_tx_test.go b/x/btcstaking/types/btc_slashing_tx_test.go index 195598480..16ce9ee4f 100644 --- a/x/btcstaking/types/btc_slashing_tx_test.go +++ b/x/btcstaking/types/btc_slashing_tx_test.go @@ -29,11 +29,11 @@ func FuzzSlashingTxWithWitness(f *testing.F) { require.NoError(t, err) delSK, delPK, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - jurySK, juryPK, err := datagen.GenRandomBTCKeyPair(r) + covenantSK, covenantPK, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) // generate staking/slashing tx - stakingTx, slashingTx, err := datagen.GenBTCStakingSlashingTx(r, net, delSK, valPK, juryPK, stakingTimeBlocks, stakingValue, slashingAddr.String()) + stakingTx, slashingTx, err := datagen.GenBTCStakingSlashingTx(r, net, delSK, valPK, covenantPK, stakingTimeBlocks, stakingValue, slashingAddr.String()) require.NoError(t, err) stakingOutInfo, err := stakingTx.GetBabylonOutputInfo(net) require.NoError(t, err) @@ -46,7 +46,7 @@ func FuzzSlashingTxWithWitness(f *testing.F) { require.NoError(t, err) delSig, err := slashingTx.Sign(stakingMsgTx, stakingTx.Script, delSK, net) require.NoError(t, err) - jurySig, err := slashingTx.Sign(stakingMsgTx, stakingTx.Script, jurySK, net) + covenantSig, err := slashingTx.Sign(stakingMsgTx, stakingTx.Script, covenantSK, net) require.NoError(t, err) // verify signatures first @@ -54,11 +54,11 @@ func FuzzSlashingTxWithWitness(f *testing.F) { require.NoError(t, err) err = slashingTx.VerifySignature(stakingPkScript, stakingValue, stakingTx.Script, delPK, delSig) require.NoError(t, err) - err = slashingTx.VerifySignature(stakingPkScript, stakingValue, stakingTx.Script, juryPK, jurySig) + err = slashingTx.VerifySignature(stakingPkScript, stakingValue, stakingTx.Script, covenantPK, covenantSig) require.NoError(t, err) // build slashing tx with witness - slashingMsgTxWithWitness, err := slashingTx.ToMsgTxWithWitness(stakingTx, valSig, delSig, jurySig) + slashingMsgTxWithWitness, err := slashingTx.ToMsgTxWithWitness(stakingTx, valSig, delSig, covenantSig) require.NoError(t, err) // verify slashing tx with witness diff --git a/x/btcstaking/types/btcstaking.go b/x/btcstaking/types/btcstaking.go index 7bfe774b6..d57811b2c 100644 --- a/x/btcstaking/types/btcstaking.go +++ b/x/btcstaking/types/btcstaking.go @@ -90,13 +90,13 @@ func (d *BTCDelegation) ValidateBasic() error { return nil } -// HasJurySig returns whether a BTC delegation has a jury signature -func (d *BTCDelegation) HasJurySig() bool { - return d.JurySig != nil +// HasCovenantSig returns whether a BTC delegation has a covenant signature +func (d *BTCDelegation) HasCovenantSig() bool { + return d.CovenantSig != nil } -func (ud *BTCUndelegation) HasJurySigs() bool { - return ud.JurySlashingSig != nil && ud.JuryUnbondingSig != nil +func (ud *BTCUndelegation) HasCovenantSigs() bool { + return ud.CovenantSlashingSig != nil && ud.CovenantUnbondingSig != nil } func (ud *BTCUndelegation) HasValidatorSig() bool { @@ -104,7 +104,7 @@ func (ud *BTCUndelegation) HasValidatorSig() bool { } func (ud *BTCUndelegation) HasAllSignatures() bool { - return ud.HasJurySigs() && ud.HasValidatorSig() + return ud.HasCovenantSigs() && ud.HasValidatorSig() } // GetStatus returns the status of the BTC Delegation based on a BTC height and a w value @@ -112,8 +112,8 @@ func (ud *BTCUndelegation) HasAllSignatures() bool { // we can only have expired delegations. If we accept optimistic submissions, // we could also have delegations that are in the waiting, so we need an extra status. // This is covered by expired for now as it is the default value. -// Active: the BTC height is in the range of d's [startHeight, endHeight-w] and the delegation has a jury sig -// Pending: the BTC height is in the range of d's [startHeight, endHeight-w] and the delegation does not have a jury sig +// Active: the BTC height is in the range of d's [startHeight, endHeight-w] and the delegation has a covenant sig +// Pending: the BTC height is in the range of d's [startHeight, endHeight-w] and the delegation does not have a covenant sig // Expired: Delegation timelock func (d *BTCDelegation) GetStatus(btcHeight uint64, w uint64) BTCDelegationStatus { if d.BtcUndelegation != nil { @@ -123,7 +123,7 @@ func (d *BTCDelegation) GetStatus(btcHeight uint64, w uint64) BTCDelegationStatu // If we received an undelegation but is still does not have all required signature, // delegation receives UNBONING status. // Voting power from this delegation is removed from the total voting power and now we - // are waiting for signatures from validator and jury for delegation to become expired. + // are waiting for signatures from validator and covenant for delegation to become expired. // For now we do not have any unbonding time on Babylon chain, only time lock on BTC chain // we may consider adding unbonding time on Babylon chain later to avoid situation where // we can lose to much voting power in to short time. @@ -131,7 +131,7 @@ func (d *BTCDelegation) GetStatus(btcHeight uint64, w uint64) BTCDelegationStatu } if d.StartHeight <= btcHeight && btcHeight+w <= d.EndHeight { - if d.HasJurySig() { + if d.HasCovenantSig() { return BTCDelegationStatus_ACTIVE } else { return BTCDelegationStatus_PENDING diff --git a/x/btcstaking/types/btcstaking.pb.go b/x/btcstaking/types/btcstaking.pb.go index 75331b101..c460f28b7 100644 --- a/x/btcstaking/types/btcstaking.pb.go +++ b/x/btcstaking/types/btcstaking.pb.go @@ -37,17 +37,17 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type BTCDelegationStatus int32 const ( - // PENDING defines a delegation that is waiting for a jury signature to become active. + // PENDING defines a delegation that is waiting for a covenant signature to become active. BTCDelegationStatus_PENDING BTCDelegationStatus = 0 // ACTIVE defines a delegation that has voting power BTCDelegationStatus_ACTIVE BTCDelegationStatus = 1 // UNBONDING defines a delegation that is being unbonded i.e it received an unbonding tx - // from staker, but not yet received signatures from validator and jury. + // from staker, but not yet received signatures from validator and covenant. // Delegation in this state already lost its voting power. BTCDelegationStatus_UNBONDING BTCDelegationStatus = 2 // UNBONDED defines a delegation no longer has voting power: // - either reaching the end of staking transaction timelock - // - or receiving unbonding tx and then receiving signatures from validator and jury for this + // - or receiving unbonding tx and then receiving signatures from validator and covenant for this // unbonding tx. BTCDelegationStatus_UNBONDED BTCDelegationStatus = 3 // ANY is any of the above status @@ -275,16 +275,16 @@ type BTCDelegation struct { StakingTx *BabylonBTCTaprootTx `protobuf:"bytes,8,opt,name=staking_tx,json=stakingTx,proto3" json:"staking_tx,omitempty"` // slashing_tx is the slashing tx // It is partially signed by SK corresponding to btc_pk, but not signed by - // validator or jury yet. + // validator or covenant yet. SlashingTx *BTCSlashingTx `protobuf:"bytes,9,opt,name=slashing_tx,json=slashingTx,proto3,customtype=BTCSlashingTx" json:"slashing_tx,omitempty"` // delegator_sig is the signature on the slashing tx // by the delegator (i.e., SK corresponding to btc_pk). // It will be a part of the witness for the staking tx output. DelegatorSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,10,opt,name=delegator_sig,json=delegatorSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"delegator_sig,omitempty"` - // jury_sig is the signature signature on the slashing tx - // by the jury (i.e., SK corresponding to jury_pk in params) + // covenant_sig is the signature signature on the slashing tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) // It will be a part of the witness for the staking tx output. - JurySig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,11,opt,name=jury_sig,json=jurySig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"jury_sig,omitempty"` + CovenantSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,11,opt,name=covenant_sig,json=covenantSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"covenant_sig,omitempty"` // if this object is present it menans that staker requested undelegation, and whole // delegation is being undelegated. // TODO: Consider whether it would be better to store it in separate store, and not @@ -382,23 +382,23 @@ type BTCUndelegation struct { UnbondingTx *BabylonBTCTaprootTx `protobuf:"bytes,1,opt,name=unbonding_tx,json=unbondingTx,proto3" json:"unbonding_tx,omitempty"` // slashing_tx is the slashing tx for unbodning transactions // It is partially signed by SK corresponding to btc_pk, but not signed by - // validator or jury yet. + // validator or covenant yet. SlashingTx *BTCSlashingTx `protobuf:"bytes,2,opt,name=slashing_tx,json=slashingTx,proto3,customtype=BTCSlashingTx" json:"slashing_tx,omitempty"` // delegator_slashing_sig is the signature on the slashing tx // by the delegator (i.e., SK corresponding to btc_pk). // It will be a part of the witness for the unbodning tx output. DelegatorSlashingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,3,opt,name=delegator_slashing_sig,json=delegatorSlashingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"delegator_slashing_sig,omitempty"` - // jury_slashing_sig is the signature on the slashing tx - // by the jury (i.e., SK corresponding to jury_pk in params) + // covenant_slashing_sig is the signature on the slashing tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) // It must be provided after processing undelagate message by Babylon - JurySlashingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,4,opt,name=jury_slashing_sig,json=jurySlashingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"jury_slashing_sig,omitempty"` - // jury_unbonding_sig is the signature on the unbonding tx - // by the jury (i.e., SK corresponding to jury_pk in params) + CovenantSlashingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,4,opt,name=covenant_slashing_sig,json=covenantSlashingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"covenant_slashing_sig,omitempty"` + // covenant_unbonding_sig is the signature on the unbonding tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) // It must be provided after processing undelagate message by Babylon and after // validator sig will be provided by validator - JuryUnbondingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,5,opt,name=jury_unbonding_sig,json=juryUnbondingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"jury_unbonding_sig,omitempty"` + CovenantUnbondingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,5,opt,name=covenant_unbonding_sig,json=covenantUnbondingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"covenant_unbonding_sig,omitempty"` // validator_unbonding_sig is the signature on the unbonding tx - // by the validator (i.e., SK corresponding to jury_pk in params) + // by the validator (i.e., SK corresponding to covenant_pk in params) // It must be provided after processing undelagate message by Babylon ValidatorUnbondingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,6,opt,name=validator_unbonding_sig,json=validatorUnbondingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"validator_unbonding_sig,omitempty"` } @@ -454,10 +454,10 @@ type BTCUndelegationInfo struct { // It must be provided after processing undelagate message by Babylon // It will be nil if validator didn't sign it yet ValidatorUnbondingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,2,opt,name=validator_unbonding_sig,json=validatorUnbondingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"validator_unbonding_sig,omitempty"` - // jury_unbonding_sig is the signature on the unbonding tx - // by the jury (i.e., SK corresponding to jury_pk in params) - // it will be nil if jury didn't sign it yet - JuryUnbondingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,3,opt,name=jury_unbonding_sig,json=juryUnbondingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"jury_unbonding_sig,omitempty"` + // covenant_unbonding_sig is the signature on the unbonding tx + // by the covenant (i.e., SK corresponding to covenant_pk in params) + // it will be nil if covenant didn't sign it yet + CovenantUnbondingSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,3,opt,name=covenant_unbonding_sig,json=covenantUnbondingSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"covenant_unbonding_sig,omitempty"` } func (m *BTCUndelegationInfo) Reset() { *m = BTCUndelegationInfo{} } @@ -663,72 +663,72 @@ func init() { } var fileDescriptor_3851ae95ccfaf7db = []byte{ - // 1030 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0x25, 0x59, 0xb6, 0x46, 0x4a, 0x2d, 0x6f, 0x1c, 0x47, 0x75, 0x50, 0xc9, 0x51, 0x03, - 0x43, 0x08, 0x1a, 0xa9, 0x76, 0x7e, 0x90, 0x16, 0x68, 0x81, 0xc8, 0x32, 0x1a, 0x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, 0x0c, 0x5d, 0x29, 0x54, - 0x80, 0xc5, 0xd0, 0xdc, 0x69, 0x15, 0xd3, 0x68, 0x01, 0xd2, 0xcf, 0xf6, 0xbe, 0x2d, 0x66, 0x9a, - 0x2f, 0x5e, 0x9f, 0x94, 0x95, 0x37, 0x27, 0x65, 0xe5, 0xaf, 0x93, 0xb2, 0xf2, 0xcb, 0x69, 0x79, - 0xee, 0xcd, 0x69, 0x79, 0xee, 0xcf, 0xd3, 0xf2, 0xdc, 0x77, 0xff, 0xf8, 0x19, 0x1c, 0x27, 0xaf, - 0xc7, 0x42, 0x29, 0x23, 0x2b, 0xae, 0xc7, 0x0f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x0e, - 0x34, 0x40, 0xfb, 0x0b, 0x00, 0x00, + // 1033 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdb, 0x6e, 0xdb, 0x46, + 0x13, 0x36, 0x25, 0x59, 0xb6, 0x46, 0xf4, 0x1f, 0x65, 0x7d, 0x88, 0x7e, 0x07, 0x95, 0x1c, 0x35, + 0x30, 0x84, 0xa0, 0x91, 0x6a, 0xe7, 0x80, 0xb4, 0x40, 0x0b, 0x44, 0x96, 0xd1, 0x08, 0x8d, 0x1d, + 0x95, 0xa2, 0xd3, 0x03, 0x8a, 0x0a, 0x4b, 0x72, 0x2d, 0x11, 0x92, 0xb9, 0x2c, 0x77, 0xa5, 0xca, + 0xf7, 0x7d, 0x80, 0xbe, 0x41, 0x5f, 0xa2, 0x0f, 0x91, 0xcb, 0xa0, 0x57, 0x81, 0x2f, 0x8c, 0xc2, + 0x7e, 0x91, 0x82, 0xcb, 0xe5, 0xc1, 0x8e, 0xed, 0xd6, 0x95, 0x73, 0x25, 0xcd, 0xce, 0xcc, 0x37, + 0x33, 0xdf, 0x37, 0xe0, 0x2e, 0xac, 0x1b, 0xd8, 0x38, 0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7f, 0x3c, + 0x04, 0x59, 0xb2, 0x49, 0x4c, 0x2d, 0x81, 0x85, 0xbe, 0x04, 0x90, 0x43, 0x75, 0xdd, 0x41, 0x31, + 0x2d, 0xfa, 0x2b, 0x87, 0xfd, 0x05, 0x8c, 0xd5, 0x22, 0xc6, 0x6a, 0xed, 0x91, 0xf1, 0x35, 0x39, + 0xd4, 0x72, 0x32, 0xa5, 0x3d, 0x40, 0x3b, 0x90, 0x35, 0xb8, 0xe9, 0xe7, 0x66, 0xd6, 0x94, 0xaa, + 0xda, 0x78, 0x7a, 0x74, 0x5c, 0xde, 0x4c, 0x74, 0x25, 0x23, 0xcd, 0x3e, 0xb6, 0x9d, 0xd0, 0x90, + 0x8d, 0x35, 0x5a, 0xed, 0x47, 0x8f, 0x3f, 0x95, 0x90, 0xb3, 0x06, 0x37, 0xdb, 0x03, 0xf4, 0x39, + 0xa4, 0x5d, 0xea, 0x16, 0x67, 0x45, 0x1f, 0xd5, 0xda, 0x85, 0x1b, 0x50, 0x6b, 0x7b, 0x94, 0xee, + 0xbf, 0xda, 0x6f, 0x53, 0xc6, 0x88, 0x98, 0x42, 0xf3, 0x93, 0xd0, 0x63, 0x58, 0x61, 0x43, 0xcc, + 0xfa, 0xc4, 0xea, 0x86, 0x23, 0xf5, 0x89, 0xdd, 0xeb, 0xf3, 0x62, 0x76, 0x4d, 0xa9, 0x66, 0xb4, + 0x25, 0xe9, 0x6d, 0x04, 0xce, 0x17, 0xc2, 0x87, 0x3e, 0x01, 0x14, 0x65, 0x71, 0x33, 0xcc, 0x98, + 0x13, 0x19, 0x85, 0x30, 0x83, 0x9b, 0x41, 0x74, 0xe5, 0xd7, 0x14, 0x2c, 0x25, 0x05, 0xfe, 0xd6, + 0xe6, 0xfd, 0x1d, 0xc2, 0x71, 0x82, 0x07, 0xe5, 0x26, 0x78, 0x58, 0x81, 0xac, 0xec, 0x24, 0x25, + 0x3a, 0x91, 0x16, 0xba, 0x07, 0xea, 0x98, 0x72, 0xdb,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f9, 0xfc, 0xe8, 0xef, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x3a, 0x84, 0xbc, 0x0b, 0x1b, 0x0c, 0x00, 0x00, } func (m *BTCValidator) Marshal() (dAtA []byte, err error) { @@ -911,11 +911,11 @@ func (m *BTCDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x62 } - if m.JurySig != nil { + if m.CovenantSig != nil { { - size := m.JurySig.Size() + size := m.CovenantSig.Size() i -= size - if _, err := m.JurySig.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.CovenantSig.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintBtcstaking(dAtA, i, uint64(size)) @@ -1057,11 +1057,11 @@ func (m *BTCUndelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if m.JuryUnbondingSig != nil { + if m.CovenantUnbondingSig != nil { { - size := m.JuryUnbondingSig.Size() + size := m.CovenantUnbondingSig.Size() i -= size - if _, err := m.JuryUnbondingSig.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.CovenantUnbondingSig.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintBtcstaking(dAtA, i, uint64(size)) @@ -1069,11 +1069,11 @@ func (m *BTCUndelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if m.JurySlashingSig != nil { + if m.CovenantSlashingSig != nil { { - size := m.JurySlashingSig.Size() + size := m.CovenantSlashingSig.Size() i -= size - if _, err := m.JurySlashingSig.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.CovenantSlashingSig.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintBtcstaking(dAtA, i, uint64(size)) @@ -1140,11 +1140,11 @@ func (m *BTCUndelegationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.JuryUnbondingSig != nil { + if m.CovenantUnbondingSig != nil { { - size := m.JuryUnbondingSig.Size() + size := m.CovenantUnbondingSig.Size() i -= size - if _, err := m.JuryUnbondingSig.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.CovenantUnbondingSig.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintBtcstaking(dAtA, i, uint64(size)) @@ -1399,8 +1399,8 @@ func (m *BTCDelegation) Size() (n int) { l = m.DelegatorSig.Size() n += 1 + l + sovBtcstaking(uint64(l)) } - if m.JurySig != nil { - l = m.JurySig.Size() + if m.CovenantSig != nil { + l = m.CovenantSig.Size() n += 1 + l + sovBtcstaking(uint64(l)) } if m.BtcUndelegation != nil { @@ -1428,12 +1428,12 @@ func (m *BTCUndelegation) Size() (n int) { l = m.DelegatorSlashingSig.Size() n += 1 + l + sovBtcstaking(uint64(l)) } - if m.JurySlashingSig != nil { - l = m.JurySlashingSig.Size() + if m.CovenantSlashingSig != nil { + l = m.CovenantSlashingSig.Size() n += 1 + l + sovBtcstaking(uint64(l)) } - if m.JuryUnbondingSig != nil { - l = m.JuryUnbondingSig.Size() + if m.CovenantUnbondingSig != nil { + l = m.CovenantUnbondingSig.Size() n += 1 + l + sovBtcstaking(uint64(l)) } if m.ValidatorUnbondingSig != nil { @@ -1457,8 +1457,8 @@ func (m *BTCUndelegationInfo) Size() (n int) { l = m.ValidatorUnbondingSig.Size() n += 1 + l + sovBtcstaking(uint64(l)) } - if m.JuryUnbondingSig != nil { - l = m.JuryUnbondingSig.Size() + if m.CovenantUnbondingSig != nil { + l = m.CovenantUnbondingSig.Size() n += 1 + l + sovBtcstaking(uint64(l)) } return n @@ -2281,7 +2281,7 @@ func (m *BTCDelegation) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JurySig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CovenantSig", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -2309,8 +2309,8 @@ func (m *BTCDelegation) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_babylonchain_babylon_types.BIP340Signature - m.JurySig = &v - if err := m.JurySig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.CovenantSig = &v + if err := m.CovenantSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2508,7 +2508,7 @@ func (m *BTCUndelegation) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JurySlashingSig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CovenantSlashingSig", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -2536,14 +2536,14 @@ func (m *BTCUndelegation) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_babylonchain_babylon_types.BIP340Signature - m.JurySlashingSig = &v - if err := m.JurySlashingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.CovenantSlashingSig = &v + if err := m.CovenantSlashingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JuryUnbondingSig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CovenantUnbondingSig", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -2571,8 +2571,8 @@ func (m *BTCUndelegation) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_babylonchain_babylon_types.BIP340Signature - m.JuryUnbondingSig = &v - if err := m.JuryUnbondingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.CovenantUnbondingSig = &v + if err := m.CovenantUnbondingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2734,7 +2734,7 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JuryUnbondingSig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CovenantUnbondingSig", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -2762,8 +2762,8 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_babylonchain_babylon_types.BIP340Signature - m.JuryUnbondingSig = &v - if err := m.JuryUnbondingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.CovenantUnbondingSig = &v + if err := m.CovenantUnbondingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/btcstaking/types/btcstaking_test.go b/x/btcstaking/types/btcstaking_test.go index b6d57eef1..273afaa0b 100644 --- a/x/btcstaking/types/btcstaking_test.go +++ b/x/btcstaking/types/btcstaking_test.go @@ -22,14 +22,14 @@ func FuzzStakingTx(f *testing.F) { require.NoError(t, err) _, validatorPK, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - _, juryPK, err := datagen.GenRandomBTCKeyPair(r) + _, covenantPK, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) stakingTimeBlocks := uint16(5) stakingValue := int64(2 * 10e8) slashingAddr, err := datagen.GenRandomBTCAddress(r, &chaincfg.SimNetParams) require.NoError(t, err) - stakingTx, _, err := datagen.GenBTCStakingSlashingTx(r, net, stakerSK, validatorPK, juryPK, stakingTimeBlocks, stakingValue, slashingAddr.String()) + stakingTx, _, err := datagen.GenBTCStakingSlashingTx(r, net, stakerSK, validatorPK, covenantPK, stakingTimeBlocks, stakingValue, slashingAddr.String()) require.NoError(t, err) err = stakingTx.ValidateBasic() @@ -41,7 +41,7 @@ func FuzzStakingTx(f *testing.F) { // NOTE: given that PK derived from SK has 2 possibilities on a curve, we can only compare x value but not y value require.Equal(t, stakingOutputInfo.StakingScriptData.StakerKey.SerializeCompressed()[1:], stakerPK.SerializeCompressed()[1:]) require.Equal(t, stakingOutputInfo.StakingScriptData.ValidatorKey.SerializeCompressed()[1:], validatorPK.SerializeCompressed()[1:]) - require.Equal(t, stakingOutputInfo.StakingScriptData.JuryKey.SerializeCompressed()[1:], juryPK.SerializeCompressed()[1:]) + require.Equal(t, stakingOutputInfo.StakingScriptData.CovenantKey.SerializeCompressed()[1:], covenantPK.SerializeCompressed()[1:]) require.Equal(t, stakingOutputInfo.StakingScriptData.StakingTime, stakingTimeBlocks) require.Equal(t, int64(stakingOutputInfo.StakingAmount), stakingValue) }) @@ -57,11 +57,11 @@ func FuzzBTCDelegation(f *testing.F) { // randomise voting power btcDel.TotalSat = datagen.RandomInt(r, 100000) - // randomise jury sig - hasJurySig := datagen.RandomInt(r, 2) == 0 - if hasJurySig { - jurySig := bbn.BIP340Signature([]byte{1, 2, 3}) - btcDel.JurySig = &jurySig + // randomise covenant sig + hasCovenantSig := datagen.RandomInt(r, 2) == 0 + if hasCovenantSig { + covenantSig := bbn.BIP340Signature([]byte{1, 2, 3}) + btcDel.CovenantSig = &covenantSig } // randomise start height and end height @@ -73,7 +73,7 @@ func FuzzBTCDelegation(f *testing.F) { w := datagen.RandomInt(r, 50) // test expected voting power - hasVotingPower := hasJurySig && btcDel.StartHeight <= btcHeight && btcHeight+w <= btcDel.EndHeight + hasVotingPower := hasCovenantSig && btcDel.StartHeight <= btcHeight && btcHeight+w <= btcDel.EndHeight actualVotingPower := btcDel.VotingPower(btcHeight, w) if hasVotingPower { require.Equal(t, btcDel.TotalSat, actualVotingPower) diff --git a/x/btcstaking/types/codec.go b/x/btcstaking/types/codec.go index 9c77cb321..fe6704e44 100644 --- a/x/btcstaking/types/codec.go +++ b/x/btcstaking/types/codec.go @@ -10,10 +10,10 @@ import ( func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgCreateBTCValidator{}, "btcstaking/MsgCreateBTCValidator", nil) cdc.RegisterConcrete(&MsgCreateBTCDelegation{}, "btcstaking/MsgCreateBTCDelegation", nil) - cdc.RegisterConcrete(&MsgAddJurySig{}, "btcstaking/MsgAddJurySig", nil) + cdc.RegisterConcrete(&MsgAddCovenantSig{}, "btcstaking/MsgAddCovenantSig", nil) cdc.RegisterConcrete(&MsgUpdateParams{}, "btcstaking/MsgUpdateParams", nil) cdc.RegisterConcrete(&MsgBTCUndelegate{}, "btcstaking/MsgBtcUndelegate", nil) - cdc.RegisterConcrete(&MsgAddJuryUnbondingSigs{}, "btcstaking/MsgAddJuryUnbondingSigs", nil) + cdc.RegisterConcrete(&MsgAddCovenantUnbondingSigs{}, "btcstaking/MsgAddCovenantUnbondingSigs", nil) cdc.RegisterConcrete(&MsgAddValidatorUnbondingSig{}, "btcstaking/MsgAddValidatorUnbondingSig", nil) } @@ -23,10 +23,10 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { (*sdk.Msg)(nil), &MsgCreateBTCValidator{}, &MsgCreateBTCDelegation{}, - &MsgAddJurySig{}, + &MsgAddCovenantSig{}, &MsgUpdateParams{}, &MsgBTCUndelegate{}, - &MsgAddJuryUnbondingSigs{}, + &MsgAddCovenantUnbondingSigs{}, &MsgAddValidatorUnbondingSig{}, ) diff --git a/x/btcstaking/types/errors.go b/x/btcstaking/types/errors.go index 0a937c18f..ed5640e49 100644 --- a/x/btcstaking/types/errors.go +++ b/x/btcstaking/types/errors.go @@ -14,11 +14,11 @@ var ( ErrBTCStakingNotActivated = errorsmod.Register(ModuleName, 1105, "the BTC staking protocol is not activated yet") ErrBTCHeightNotFound = errorsmod.Register(ModuleName, 1106, "the BTC height is not found") ErrReusedStakingTx = errorsmod.Register(ModuleName, 1107, "the BTC staking tx is already used") - ErrInvalidJuryPK = errorsmod.Register(ModuleName, 1108, "the BTC staking tx specifies a wrong jury PK") + ErrInvalidCovenantPK = errorsmod.Register(ModuleName, 1108, "the BTC staking tx specifies a wrong covenant PK") ErrInvalidStakingTx = errorsmod.Register(ModuleName, 1109, "the BTC staking tx is not valid") ErrInvalidSlashingTx = errorsmod.Register(ModuleName, 1110, "the BTC slashing tx is not valid") - ErrDuplicatedJurySig = errorsmod.Register(ModuleName, 1111, "the BTC delegation has already received jury signature") - ErrInvalidJurySig = errorsmod.Register(ModuleName, 1112, "the jury signature is not valid") + ErrDuplicatedCovenantSig = errorsmod.Register(ModuleName, 1111, "the BTC delegation has already received covenant signature") + ErrInvalidCovenantSig = errorsmod.Register(ModuleName, 1112, "the covenant signature is not valid") ErrCommissionLTMinRate = errorsmod.Register(ModuleName, 1113, "commission cannot be less than min rate") ErrInvalidDelegationState = errorsmod.Register(ModuleName, 1114, "Unexpected delegation state") ErrInvalidUnbodningTx = errorsmod.Register(ModuleName, 1115, "the BTC unbonding tx is not valid") diff --git a/x/btcstaking/types/events.pb.go b/x/btcstaking/types/events.pb.go index e36063cae..02edf82bb 100644 --- a/x/btcstaking/types/events.pb.go +++ b/x/btcstaking/types/events.pb.go @@ -71,7 +71,7 @@ func (m *EventNewBTCValidator) GetBtcVal() *BTCValidator { // EventNewBTCDelegation is the event emitted when a BTC delegation is created // NOTE: the BTC delegation is not active thus does not have voting power yet -// only after it receives a jury signature it becomes activated and has voting power +// only after it receives a covenant signature it becomes activated and has voting power type EventNewBTCDelegation struct { BtcDel *BTCDelegation `protobuf:"bytes,1,opt,name=btc_del,json=btcDel,proto3" json:"btc_del,omitempty"` } @@ -116,7 +116,7 @@ func (m *EventNewBTCDelegation) GetBtcDel() *BTCDelegation { return nil } -// EventActivateBTCDelegation is the event emitted when jury activates a BTC delegation +// EventActivateBTCDelegation is the event emitted when covenant activates a BTC delegation // such that the BTC delegation starts to have voting power in its timelock period type EventActivateBTCDelegation struct { BtcDel *BTCDelegation `protobuf:"bytes,1,opt,name=btc_del,json=btcDel,proto3" json:"btc_del,omitempty"` diff --git a/x/btcstaking/types/genesis_test.go b/x/btcstaking/types/genesis_test.go index ee9d39639..f271c0f7a 100644 --- a/x/btcstaking/types/genesis_test.go +++ b/x/btcstaking/types/genesis_test.go @@ -24,7 +24,7 @@ func TestGenesisState_Validate(t *testing.T) { desc: "valid genesis state", genState: &types.GenesisState{ Params: types.Params{ - JuryPk: types.DefaultParams().JuryPk, + CovenantPk: types.DefaultParams().CovenantPk, SlashingAddress: types.DefaultParams().SlashingAddress, MinSlashingTxFeeSat: 500, MinCommissionRate: sdkmath.LegacyMustNewDecFromStr("0.5"), @@ -37,7 +37,7 @@ func TestGenesisState_Validate(t *testing.T) { desc: "invalid slashing rate in genesis", genState: &types.GenesisState{ Params: types.Params{ - JuryPk: types.DefaultParams().JuryPk, + CovenantPk: types.DefaultParams().CovenantPk, SlashingAddress: types.DefaultParams().SlashingAddress, MinSlashingTxFeeSat: 500, MinCommissionRate: sdkmath.LegacyMustNewDecFromStr("0.5"), diff --git a/x/btcstaking/types/msg.go b/x/btcstaking/types/msg.go index eb3625384..5d8cd5962 100644 --- a/x/btcstaking/types/msg.go +++ b/x/btcstaking/types/msg.go @@ -14,9 +14,9 @@ var ( _ sdk.Msg = &MsgUpdateParams{} _ sdk.Msg = &MsgCreateBTCValidator{} _ sdk.Msg = &MsgCreateBTCDelegation{} - _ sdk.Msg = &MsgAddJurySig{} + _ sdk.Msg = &MsgAddCovenantSig{} _ sdk.Msg = &MsgBTCUndelegate{} - _ sdk.Msg = &MsgAddJuryUnbondingSigs{} + _ sdk.Msg = &MsgAddCovenantUnbondingSigs{} _ sdk.Msg = &MsgAddValidatorUnbondingSig{} ) @@ -118,7 +118,7 @@ func (m *MsgCreateBTCDelegation) ValidateBasic() error { return nil } -func (m *MsgAddJurySig) GetSigners() []sdk.AccAddress { +func (m *MsgAddCovenantSig) GetSigners() []sdk.AccAddress { signer, err := sdk.AccAddressFromBech32(m.Signer) if err != nil { panic(err) @@ -126,7 +126,7 @@ func (m *MsgAddJurySig) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{signer} } -func (m *MsgAddJurySig) ValidateBasic() error { +func (m *MsgAddCovenantSig) ValidateBasic() error { if m.ValPk == nil { return fmt.Errorf("empty BTC validator public key") } @@ -134,7 +134,7 @@ func (m *MsgAddJurySig) ValidateBasic() error { return fmt.Errorf("empty BTC delegation public key") } if m.Sig == nil { - return fmt.Errorf("empty jury signature") + return fmt.Errorf("empty covenant signature") } if len(m.StakingTxHash) != chainhash.MaxHashStringSize { return fmt.Errorf("staking tx hash is not %d", chainhash.MaxHashStringSize) @@ -183,7 +183,7 @@ func (m *MsgBTCUndelegate) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{signer} } -func (m *MsgAddJuryUnbondingSigs) GetSigners() []sdk.AccAddress { +func (m *MsgAddCovenantUnbondingSigs) GetSigners() []sdk.AccAddress { signer, err := sdk.AccAddressFromBech32(m.Signer) if err != nil { panic(err) @@ -191,7 +191,7 @@ func (m *MsgAddJuryUnbondingSigs) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{signer} } -func (m *MsgAddJuryUnbondingSigs) ValidateBasic() error { +func (m *MsgAddCovenantUnbondingSigs) ValidateBasic() error { if m.ValPk == nil { return fmt.Errorf("empty BTC validator public key") } @@ -199,10 +199,10 @@ func (m *MsgAddJuryUnbondingSigs) ValidateBasic() error { return fmt.Errorf("empty BTC delegation public key") } if m.UnbondingTxSig == nil { - return fmt.Errorf("empty jury signature") + return fmt.Errorf("empty covenant signature") } if m.SlashingUnbondingTxSig == nil { - return fmt.Errorf("empty jury signature") + return fmt.Errorf("empty covenant signature") } if len(m.StakingTxHash) != chainhash.MaxHashStringSize { return fmt.Errorf("staking tx hash is not %d", chainhash.MaxHashStringSize) @@ -226,7 +226,7 @@ func (m *MsgAddValidatorUnbondingSig) ValidateBasic() error { return fmt.Errorf("empty BTC delegation public key") } if m.UnbondingTxSig == nil { - return fmt.Errorf("empty jury signature") + return fmt.Errorf("empty covenant signature") } if len(m.StakingTxHash) != chainhash.MaxHashStringSize { return fmt.Errorf("staking tx hash is not %d", chainhash.MaxHashStringSize) diff --git a/x/btcstaking/types/params.go b/x/btcstaking/types/params.go index 6fd3c392b..290b456a1 100644 --- a/x/btcstaking/types/params.go +++ b/x/btcstaking/types/params.go @@ -15,7 +15,7 @@ import ( var _ paramtypes.ParamSet = (*Params)(nil) -func defaultJuryPk() *bbn.BIP340PubKey { +func defaultCovenantPk() *bbn.BIP340PubKey { // 32 bytes skBytes := []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} _, defaultPK := btcec.PrivKeyFromBytes(skBytes) @@ -40,7 +40,7 @@ func ParamKeyTable() paramtypes.KeyTable { // DefaultParams returns a default set of parameters func DefaultParams() Params { return Params{ - JuryPk: defaultJuryPk(), + CovenantPk: defaultCovenantPk(), SlashingAddress: defaultSlashingAddress(), MinSlashingTxFeeSat: 1000, MinCommissionRate: math.LegacyZeroDec(), diff --git a/x/btcstaking/types/params.pb.go b/x/btcstaking/types/params.pb.go index b6f007013..fea9b1be5 100644 --- a/x/btcstaking/types/params.pb.go +++ b/x/btcstaking/types/params.pb.go @@ -28,9 +28,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the module. type Params struct { - // jury_pk is the public key of jury + // covenant_pk is the public key of covenant // the PK follows encoding in BIP-340 spec on Bitcoin - JuryPk *github_com_babylonchain_babylon_types.BIP340PubKey `protobuf:"bytes,1,opt,name=jury_pk,json=juryPk,proto3,customtype=github.com/babylonchain/babylon/types.BIP340PubKey" json:"jury_pk,omitempty"` + CovenantPk *github_com_babylonchain_babylon_types.BIP340PubKey `protobuf:"bytes,1,opt,name=covenant_pk,json=covenantPk,proto3,customtype=github.com/babylonchain/babylon/types.BIP340PubKey" json:"covenant_pk,omitempty"` // slashing address is the address that the slashed BTC goes to // the address is in string on Bitcoin SlashingAddress string `protobuf:"bytes,2,opt,name=slashing_address,json=slashingAddress,proto3" json:"slashing_address,omitempty"` @@ -100,32 +100,32 @@ func init() { } var fileDescriptor_8d1392776a3e15b9 = []byte{ - // 389 bytes of a gzipped FileDescriptorProto + // 393 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x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, 0x97, 0x78, 0x6e, 0x66, 0x5e, 0x3c, 0x5c, 0x79, 0x49, 0x45, 0x7c, 0x5a, 0x6a, - 0x6a, 0x7c, 0x71, 0x62, 0x89, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x73, 0x90, 0x70, 0x6e, 0x66, 0x5e, - 0x30, 0x54, 0x36, 0xa4, 0xc2, 0x2d, 0x35, 0x35, 0x38, 0xb1, 0x44, 0x28, 0x8e, 0x0b, 0x24, 0x1c, - 0x9f, 0x9c, 0x9f, 0x9b, 0x9b, 0x59, 0x5c, 0x9c, 0x99, 0x9f, 0x17, 0x5f, 0x94, 0x58, 0x92, 0x2a, - 0xc1, 0x02, 0xb2, 0xc3, 0x49, 0xef, 0xc4, 0x3d, 0x79, 0x86, 0x5b, 0xf7, 0xe4, 0xd5, 0x90, 0x7c, - 0x00, 0xf1, 0x3a, 0x94, 0xd2, 0x2d, 0x4e, 0xc9, 0x86, 0x3a, 0xdf, 0x25, 0x35, 0x39, 0x48, 0x30, - 0x37, 0x33, 0xcf, 0x19, 0x6e, 0x52, 0x50, 0x62, 0x49, 0xaa, 0x50, 0x22, 0x17, 0x2f, 0xdc, 0x45, - 0x60, 0x93, 0x59, 0xc1, 0x26, 0xdb, 0x90, 0x66, 0xf2, 0xa5, 0x2d, 0xba, 0x5c, 0xd0, 0x30, 0x07, - 0xd9, 0xc3, 0x03, 0x33, 0x12, 0x64, 0x85, 0x15, 0xcb, 0x8c, 0x05, 0xf2, 0x0c, 0x4e, 0x3e, 0x27, - 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, - 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x45, 0x30, 0xfc, 0x2b, 0x90, 0x53, 0x09, - 0xd8, 0xce, 0x24, 0x36, 0x70, 0xd4, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x85, 0xbe, - 0x67, 0x48, 0x02, 0x00, 0x00, + 0x10, 0x0e, 0x44, 0x4a, 0xa9, 0x9b, 0x99, 0x8b, 0x2d, 0x00, 0x6c, 0xb0, 0x50, 0x38, 0x17, 0x77, + 0x72, 0x7e, 0x59, 0x6a, 0x5e, 0x62, 0x5e, 0x49, 0x7c, 0x41, 0xb6, 0x04, 0xa3, 0x02, 0xa3, 0x06, + 0x8f, 0x93, 0xd9, 0xad, 0x7b, 0xf2, 0x46, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, + 0xb9, 0xfa, 0x50, 0x6b, 0x93, 0x33, 0x12, 0x33, 0xf3, 0x60, 0x1c, 0xfd, 0x92, 0xca, 0x82, 0xd4, + 0x62, 0x3d, 0x27, 0xcf, 0x00, 0x63, 0x13, 0x83, 0x80, 0xd2, 0x24, 0xef, 0xd4, 0xca, 0x20, 0x2e, + 0x98, 0x51, 0x01, 0xd9, 0x42, 0x9a, 0x5c, 0x02, 0xc5, 0x39, 0x89, 0xc5, 0x19, 0x99, 0x79, 0xe9, + 0xf1, 0x89, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0xfc, + 0x30, 0x71, 0x47, 0x88, 0xb0, 0x90, 0x09, 0x97, 0x78, 0x6e, 0x66, 0x5e, 0x3c, 0x5c, 0x79, 0x49, + 0x45, 0x7c, 0x5a, 0x6a, 0x6a, 0x7c, 0x71, 0x62, 0x89, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x73, 0x90, + 0x70, 0x6e, 0x66, 0x5e, 0x30, 0x54, 0x36, 0xa4, 0xc2, 0x2d, 0x35, 0x35, 0x38, 0xb1, 0x44, 0x28, + 0x8e, 0x0b, 0x24, 0x1c, 0x9f, 0x9c, 0x9f, 0x9b, 0x9b, 0x59, 0x5c, 0x9c, 0x99, 0x9f, 0x17, 0x5f, + 0x94, 0x58, 0x92, 0x2a, 0xc1, 0x02, 0xb2, 0xc3, 0x49, 0xef, 0xc4, 0x3d, 0x79, 0x86, 0x5b, 0xf7, + 0xe4, 0xd5, 0x90, 0x7c, 0x01, 0x09, 0x02, 0x28, 0xa5, 0x5b, 0x9c, 0x92, 0x0d, 0xf5, 0x82, 0x4b, + 0x6a, 0x72, 0x90, 0x60, 0x6e, 0x66, 0x9e, 0x33, 0xdc, 0xa4, 0xa0, 0xc4, 0x92, 0x54, 0xa1, 0x44, + 0x2e, 0x5e, 0xb8, 0x8b, 0xc0, 0x26, 0xb3, 0x82, 0x4d, 0xb6, 0x21, 0xcd, 0xe4, 0x4b, 0x5b, 0x74, + 0xb9, 0xa0, 0x61, 0x0f, 0xb2, 0x87, 0x07, 0x66, 0x24, 0xc8, 0x0a, 0x2b, 0x96, 0x19, 0x0b, 0xe4, + 0x19, 0x9c, 0x7c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, + 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x8a, 0x60, 0x1c, + 0x54, 0x20, 0xa7, 0x16, 0xb0, 0x9d, 0x49, 0x6c, 0xe0, 0x28, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x67, 0xdc, 0x2d, 0x7f, 0x50, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -180,11 +180,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.JuryPk != nil { + if m.CovenantPk != nil { { - size := m.JuryPk.Size() + size := m.CovenantPk.Size() i -= size - if _, err := m.JuryPk.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.CovenantPk.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -212,8 +212,8 @@ func (m *Params) Size() (n int) { } var l int _ = l - if m.JuryPk != nil { - l = m.JuryPk.Size() + if m.CovenantPk != nil { + l = m.CovenantPk.Size() n += 1 + l + sovParams(uint64(l)) } l = len(m.SlashingAddress) @@ -267,7 +267,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JuryPk", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CovenantPk", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -295,8 +295,8 @@ func (m *Params) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_babylonchain_babylon_types.BIP340PubKey - m.JuryPk = &v - if err := m.JuryPk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.CovenantPk = &v + if err := m.CovenantPk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/btcstaking/types/tx.pb.go b/x/btcstaking/types/tx.pb.go index 7a2e0b177..f5c12dc93 100644 --- a/x/btcstaking/types/tx.pb.go +++ b/x/btcstaking/types/tx.pb.go @@ -165,7 +165,7 @@ type MsgCreateBTCDelegation struct { SlashingTx *BTCSlashingTx `protobuf:"bytes,6,opt,name=slashing_tx,json=slashingTx,proto3,customtype=BTCSlashingTx" json:"slashing_tx,omitempty"` // delegator_sig is the signature on the slashing tx by the delegator (i.e., SK corresponding to btc_pk). // It will be a part of the witness for the staking tx output. - // The staking tx output further needs signatures from jury and validator in + // The staking tx output further needs signatures from covenant and validator in // order to be spendable. DelegatorSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,7,opt,name=delegator_sig,json=delegatorSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"delegator_sig,omitempty"` } @@ -372,8 +372,8 @@ func (m *MsgBTCUndelegateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgBTCUndelegateResponse proto.InternalMessageInfo -// MsgAddJurySig is the message for handling a signature from jury -type MsgAddJurySig struct { +// MsgAddCovenantSig is the message for handling a signature from covenant +type MsgAddCovenantSig struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // val_pk is the Bitcoin secp256k1 PK of the BTC validator // the PK follows encoding in BIP-340 spec @@ -384,23 +384,23 @@ type MsgAddJurySig struct { // staking_tx_hash is the hash of the staking tx. // (val_pk, del_pk, staking_tx_hash) uniquely identifies a BTC delegation StakingTxHash string `protobuf:"bytes,4,opt,name=staking_tx_hash,json=stakingTxHash,proto3" json:"staking_tx_hash,omitempty"` - // sig is the signature of the jury + // sig is the signature of the covenant // the signature follows encoding in BIP-340 spec Sig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,5,opt,name=sig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"sig,omitempty"` } -func (m *MsgAddJurySig) Reset() { *m = MsgAddJurySig{} } -func (m *MsgAddJurySig) String() string { return proto.CompactTextString(m) } -func (*MsgAddJurySig) ProtoMessage() {} -func (*MsgAddJurySig) Descriptor() ([]byte, []int) { +func (m *MsgAddCovenantSig) Reset() { *m = MsgAddCovenantSig{} } +func (m *MsgAddCovenantSig) String() string { return proto.CompactTextString(m) } +func (*MsgAddCovenantSig) ProtoMessage() {} +func (*MsgAddCovenantSig) Descriptor() ([]byte, []int) { return fileDescriptor_4baddb53e97f38f2, []int{6} } -func (m *MsgAddJurySig) XXX_Unmarshal(b []byte) error { +func (m *MsgAddCovenantSig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAddJurySig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAddCovenantSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAddJurySig.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAddCovenantSig.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -410,48 +410,48 @@ func (m *MsgAddJurySig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *MsgAddJurySig) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddJurySig.Merge(m, src) +func (m *MsgAddCovenantSig) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddCovenantSig.Merge(m, src) } -func (m *MsgAddJurySig) XXX_Size() int { +func (m *MsgAddCovenantSig) XXX_Size() int { return m.Size() } -func (m *MsgAddJurySig) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddJurySig.DiscardUnknown(m) +func (m *MsgAddCovenantSig) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddCovenantSig.DiscardUnknown(m) } -var xxx_messageInfo_MsgAddJurySig proto.InternalMessageInfo +var xxx_messageInfo_MsgAddCovenantSig proto.InternalMessageInfo -func (m *MsgAddJurySig) GetSigner() string { +func (m *MsgAddCovenantSig) GetSigner() string { if m != nil { return m.Signer } return "" } -func (m *MsgAddJurySig) GetStakingTxHash() string { +func (m *MsgAddCovenantSig) GetStakingTxHash() string { if m != nil { return m.StakingTxHash } return "" } -// MsgAddJurySigResponse is the response for MsgAddJurySig -type MsgAddJurySigResponse struct { +// MsgAddCovenantSigResponse is the response for MsgAddCovenantSig +type MsgAddCovenantSigResponse struct { } -func (m *MsgAddJurySigResponse) Reset() { *m = MsgAddJurySigResponse{} } -func (m *MsgAddJurySigResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAddJurySigResponse) ProtoMessage() {} -func (*MsgAddJurySigResponse) Descriptor() ([]byte, []int) { +func (m *MsgAddCovenantSigResponse) Reset() { *m = MsgAddCovenantSigResponse{} } +func (m *MsgAddCovenantSigResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddCovenantSigResponse) ProtoMessage() {} +func (*MsgAddCovenantSigResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4baddb53e97f38f2, []int{7} } -func (m *MsgAddJurySigResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAddCovenantSigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAddJurySigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAddCovenantSigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAddJurySigResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAddCovenantSigResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -461,17 +461,17 @@ func (m *MsgAddJurySigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *MsgAddJurySigResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddJurySigResponse.Merge(m, src) +func (m *MsgAddCovenantSigResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddCovenantSigResponse.Merge(m, src) } -func (m *MsgAddJurySigResponse) XXX_Size() int { +func (m *MsgAddCovenantSigResponse) XXX_Size() int { return m.Size() } -func (m *MsgAddJurySigResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddJurySigResponse.DiscardUnknown(m) +func (m *MsgAddCovenantSigResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddCovenantSigResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgAddJurySigResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAddCovenantSigResponse proto.InternalMessageInfo // MsgUpdateParams defines a message for updating btcstaking module parameters. type MsgUpdateParams struct { @@ -570,8 +570,8 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// MsgAddJuryUnbondingSigs is the message for handling a signature from jury -type MsgAddJuryUnbondingSigs struct { +// MsgAddCovenantUnbondingSigs is the message for handling a signature from covenant +type MsgAddCovenantUnbondingSigs struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // val_pk is the Bitcoin secp256k1 PK of the BTC validator // the PK follows encoding in BIP-340 spec @@ -582,26 +582,26 @@ type MsgAddJuryUnbondingSigs struct { // staking_tx_hash is the hash of the staking tx. // (val_pk, del_pk, staking_tx_hash) uniquely identifies a BTC delegation StakingTxHash string `protobuf:"bytes,4,opt,name=staking_tx_hash,json=stakingTxHash,proto3" json:"staking_tx_hash,omitempty"` - // unbonding_tx_sig is the signature of the jury on the unbonding tx submitted to babylon + // unbonding_tx_sig is the signature of the covenant on the unbonding tx submitted to babylon // the signature follows encoding in BIP-340 spec UnbondingTxSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,5,opt,name=unbonding_tx_sig,json=unbondingTxSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"unbonding_tx_sig,omitempty"` - // slashing_unbonding_tx_sig is the signature of the jury on slashing tx corresponding to unbodning tx submitted to babylon + // slashing_unbonding_tx_sig is the signature of the covenant on slashing tx corresponding to unbodning tx submitted to babylon // the signature follows encoding in BIP-340 spec SlashingUnbondingTxSig *github_com_babylonchain_babylon_types.BIP340Signature `protobuf:"bytes,6,opt,name=slashing_unbonding_tx_sig,json=slashingUnbondingTxSig,proto3,customtype=github.com/babylonchain/babylon/types.BIP340Signature" json:"slashing_unbonding_tx_sig,omitempty"` } -func (m *MsgAddJuryUnbondingSigs) Reset() { *m = MsgAddJuryUnbondingSigs{} } -func (m *MsgAddJuryUnbondingSigs) String() string { return proto.CompactTextString(m) } -func (*MsgAddJuryUnbondingSigs) ProtoMessage() {} -func (*MsgAddJuryUnbondingSigs) Descriptor() ([]byte, []int) { +func (m *MsgAddCovenantUnbondingSigs) Reset() { *m = MsgAddCovenantUnbondingSigs{} } +func (m *MsgAddCovenantUnbondingSigs) String() string { return proto.CompactTextString(m) } +func (*MsgAddCovenantUnbondingSigs) ProtoMessage() {} +func (*MsgAddCovenantUnbondingSigs) Descriptor() ([]byte, []int) { return fileDescriptor_4baddb53e97f38f2, []int{10} } -func (m *MsgAddJuryUnbondingSigs) XXX_Unmarshal(b []byte) error { +func (m *MsgAddCovenantUnbondingSigs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAddJuryUnbondingSigs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAddCovenantUnbondingSigs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAddJuryUnbondingSigs.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAddCovenantUnbondingSigs.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -611,48 +611,48 @@ func (m *MsgAddJuryUnbondingSigs) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *MsgAddJuryUnbondingSigs) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddJuryUnbondingSigs.Merge(m, src) +func (m *MsgAddCovenantUnbondingSigs) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddCovenantUnbondingSigs.Merge(m, src) } -func (m *MsgAddJuryUnbondingSigs) XXX_Size() int { +func (m *MsgAddCovenantUnbondingSigs) XXX_Size() int { return m.Size() } -func (m *MsgAddJuryUnbondingSigs) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddJuryUnbondingSigs.DiscardUnknown(m) +func (m *MsgAddCovenantUnbondingSigs) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddCovenantUnbondingSigs.DiscardUnknown(m) } -var xxx_messageInfo_MsgAddJuryUnbondingSigs proto.InternalMessageInfo +var xxx_messageInfo_MsgAddCovenantUnbondingSigs proto.InternalMessageInfo -func (m *MsgAddJuryUnbondingSigs) GetSigner() string { +func (m *MsgAddCovenantUnbondingSigs) GetSigner() string { if m != nil { return m.Signer } return "" } -func (m *MsgAddJuryUnbondingSigs) GetStakingTxHash() string { +func (m *MsgAddCovenantUnbondingSigs) GetStakingTxHash() string { if m != nil { return m.StakingTxHash } return "" } -// MsgAddJurySigResponse is the response for MsgAddJurySig -type MsgAddJuryUnbondingSigsResponse struct { +// MsgAddCovenantSigResponse is the response for MsgAddCovenantSig +type MsgAddCovenantUnbondingSigsResponse struct { } -func (m *MsgAddJuryUnbondingSigsResponse) Reset() { *m = MsgAddJuryUnbondingSigsResponse{} } -func (m *MsgAddJuryUnbondingSigsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAddJuryUnbondingSigsResponse) ProtoMessage() {} -func (*MsgAddJuryUnbondingSigsResponse) Descriptor() ([]byte, []int) { +func (m *MsgAddCovenantUnbondingSigsResponse) Reset() { *m = MsgAddCovenantUnbondingSigsResponse{} } +func (m *MsgAddCovenantUnbondingSigsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddCovenantUnbondingSigsResponse) ProtoMessage() {} +func (*MsgAddCovenantUnbondingSigsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4baddb53e97f38f2, []int{11} } -func (m *MsgAddJuryUnbondingSigsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAddCovenantUnbondingSigsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAddJuryUnbondingSigsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAddCovenantUnbondingSigsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAddJuryUnbondingSigsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAddCovenantUnbondingSigsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -662,17 +662,17 @@ func (m *MsgAddJuryUnbondingSigsResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *MsgAddJuryUnbondingSigsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddJuryUnbondingSigsResponse.Merge(m, src) +func (m *MsgAddCovenantUnbondingSigsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddCovenantUnbondingSigsResponse.Merge(m, src) } -func (m *MsgAddJuryUnbondingSigsResponse) XXX_Size() int { +func (m *MsgAddCovenantUnbondingSigsResponse) XXX_Size() int { return m.Size() } -func (m *MsgAddJuryUnbondingSigsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddJuryUnbondingSigsResponse.DiscardUnknown(m) +func (m *MsgAddCovenantUnbondingSigsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddCovenantUnbondingSigsResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgAddJuryUnbondingSigsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAddCovenantUnbondingSigsResponse proto.InternalMessageInfo // MsgAddValidatorUnbondingSig is the message for unbodning tx submitted to babylon by staker type MsgAddValidatorUnbondingSig struct { @@ -738,7 +738,7 @@ func (m *MsgAddValidatorUnbondingSig) GetStakingTxHash() string { return "" } -// MsgAddJurySigResponse is the response for MsgAddJurySig +// MsgAddCovenantSigResponse is the response for MsgAddCovenantSig type MsgAddValidatorUnbondingSigResponse struct { } @@ -782,12 +782,12 @@ func init() { proto.RegisterType((*MsgCreateBTCDelegationResponse)(nil), "babylon.btcstaking.v1.MsgCreateBTCDelegationResponse") proto.RegisterType((*MsgBTCUndelegate)(nil), "babylon.btcstaking.v1.MsgBTCUndelegate") proto.RegisterType((*MsgBTCUndelegateResponse)(nil), "babylon.btcstaking.v1.MsgBTCUndelegateResponse") - proto.RegisterType((*MsgAddJurySig)(nil), "babylon.btcstaking.v1.MsgAddJurySig") - proto.RegisterType((*MsgAddJurySigResponse)(nil), "babylon.btcstaking.v1.MsgAddJurySigResponse") + proto.RegisterType((*MsgAddCovenantSig)(nil), "babylon.btcstaking.v1.MsgAddCovenantSig") + proto.RegisterType((*MsgAddCovenantSigResponse)(nil), "babylon.btcstaking.v1.MsgAddCovenantSigResponse") proto.RegisterType((*MsgUpdateParams)(nil), "babylon.btcstaking.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "babylon.btcstaking.v1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgAddJuryUnbondingSigs)(nil), "babylon.btcstaking.v1.MsgAddJuryUnbondingSigs") - proto.RegisterType((*MsgAddJuryUnbondingSigsResponse)(nil), "babylon.btcstaking.v1.MsgAddJuryUnbondingSigsResponse") + proto.RegisterType((*MsgAddCovenantUnbondingSigs)(nil), "babylon.btcstaking.v1.MsgAddCovenantUnbondingSigs") + proto.RegisterType((*MsgAddCovenantUnbondingSigsResponse)(nil), "babylon.btcstaking.v1.MsgAddCovenantUnbondingSigsResponse") proto.RegisterType((*MsgAddValidatorUnbondingSig)(nil), "babylon.btcstaking.v1.MsgAddValidatorUnbondingSig") proto.RegisterType((*MsgAddValidatorUnbondingSigResponse)(nil), "babylon.btcstaking.v1.MsgAddValidatorUnbondingSigResponse") } @@ -795,77 +795,77 @@ func init() { func init() { proto.RegisterFile("babylon/btcstaking/v1/tx.proto", fileDescriptor_4baddb53e97f38f2) } var fileDescriptor_4baddb53e97f38f2 = []byte{ - // 1110 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0xe3, 0xc4, - 0x1b, 0x6e, 0x92, 0x36, 0x3f, 0xf5, 0x6d, 0xbb, 0xbb, 0x3f, 0xd3, 0x6d, 0xd3, 0xa0, 0x4d, 0x4a, - 0x76, 0x29, 0x65, 0xd5, 0xda, 0x34, 0xbb, 0xad, 0xa0, 0x48, 0x48, 0xeb, 0x16, 0x89, 0xb2, 0x44, - 0x04, 0x27, 0x45, 0x88, 0x03, 0x61, 0x6c, 0x4f, 0x1d, 0x2b, 0x89, 0xc7, 0xf2, 0x4c, 0xaa, 0x44, - 0x48, 0x1c, 0x38, 0x72, 0xe2, 0xc4, 0x05, 0x89, 0xcf, 0xc0, 0x61, 0x4f, 0x1c, 0x38, 0xef, 0x71, - 0xd5, 0x13, 0xea, 0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d, 0x10, - 0xbb, 0xf1, 0x1e, 0xa4, 0xa7, 0x47, 0xa8, 0xe2, 0xd6, 0x4d, 0x50, 0x61, 0x85, 0x6f, 0x61, 0x39, - 0xf1, 0x24, 0x15, 0x5f, 0xc9, 0x32, 0x86, 0x2f, 0xee, 0x4d, 0x86, 0x0f, 0xeb, 0x7f, 0x9f, 0x81, - 0x42, 0xea, 0x96, 0xae, 0x5e, 0x4b, 0x9a, 0x98, 0x53, 0xdc, 0x9f, 0x3c, 0x27, 0x6c, 0xe6, 0x04, - 0x16, 0xc7, 0xae, 0xc2, 0x8d, 0x74, 0xae, 0x38, 0xae, 0x28, 0xde, 0x0c, 0x17, 0xd4, 0x91, 0x3f, - 0x79, 0x7e, 0x51, 0xca, 0xbc, 0xb8, 0x28, 0x65, 0x5e, 0x5e, 0x94, 0x32, 0x3f, 0x5c, 0x96, 0x66, - 0x5e, 0x5c, 0x96, 0x66, 0x7e, 0xbf, 0x2c, 0xcd, 0x7c, 0xf9, 0xca, 0x93, 0x64, 0x10, 0xff, 0x40, - 0xf4, 0x76, 0xb5, 0x9a, 0xf7, 0x3e, 0x10, 0x1f, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0x92, 0x66, - 0xef, 0x13, 0x88, 0x0f, 0x00, 0x00, + // 1107 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x3f, 0x6f, 0xdb, 0xc6, + 0x1b, 0xb6, 0x24, 0x5b, 0x3f, 0xf8, 0xf5, 0x9f, 0x24, 0xfc, 0x39, 0x8e, 0xac, 0x20, 0x92, 0xa1, + 0xb4, 0xae, 0x1b, 0xc4, 0x64, 0xac, 0xc4, 0x46, 0xeb, 0x02, 0x05, 0x42, 0xb9, 0x40, 0x8d, 0x54, + 0xa8, 0x4a, 0xc9, 0x45, 0xd1, 0xa1, 0xc2, 0x89, 0x3c, 0x53, 0x84, 0x24, 0x1e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0, 0x41, 0x72, 0x03, 0xd6, 0xc6, + 0xef, 0xf4, 0xf7, 0x92, 0x79, 0xc6, 0x80, 0x79, 0x69, 0x4a, 0x60, 0x90, 0xaa, 0x0b, 0xeb, 0x13, + 0x37, 0xe0, 0x6e, 0x32, 0xc5, 0x38, 0x32, 0xff, 0x68, 0x5a, 0x64, 0x90, 0xed, 0xfb, 0x14, 0xe4, + 0x12, 0x8f, 0xd7, 0xf2, 0x54, 0x74, 0x63, 0x31, 0xf9, 0xa3, 0xd9, 0x63, 0x26, 0x8b, 0x89, 0xdf, + 0xeb, 0xd7, 0x17, 0x13, 0x1b, 0xf3, 0x96, 0x62, 0xae, 0xed, 0x78, 0xe1, 0x0c, 0x56, 0xc7, 0xee, + 0xca, 0x9d, 0x64, 0xae, 0x28, 0x2e, 0x2f, 0x4e, 0x87, 0xf3, 0xf3, 0xc8, 0x9f, 0xbd, 0xb8, 0x2c, + 0xa4, 0x5e, 0x5e, 0x16, 0x52, 0xaf, 0x2f, 0x0b, 0xa9, 0x1f, 0xae, 0x0a, 0x0b, 0x2f, 0xaf, 0x0a, + 0x0b, 0x7f, 0x5c, 0x15, 0x16, 0xbe, 0x7e, 0xeb, 0x11, 0x33, 0x88, 0x7e, 0x49, 0xba, 0xdb, 0xbd, + 0x95, 0x75, 0xbf, 0x24, 0x1f, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xda, 0x28, 0xdf, 0xb1, + 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -886,12 +886,12 @@ type MsgClient interface { CreateBTCDelegation(ctx context.Context, in *MsgCreateBTCDelegation, opts ...grpc.CallOption) (*MsgCreateBTCDelegationResponse, error) // BtcUndelegate undelegates funds from exsitng btc delegation BTCUndelegate(ctx context.Context, in *MsgBTCUndelegate, opts ...grpc.CallOption) (*MsgBTCUndelegateResponse, error) - // AddJurySig handles a signature from jury for slashing tx of staking tx for delegation - AddJurySig(ctx context.Context, in *MsgAddJurySig, opts ...grpc.CallOption) (*MsgAddJurySigResponse, error) - // AddJuryUnbondingSigs handles two signatures from jury for: + // AddCovenantSig handles a signature from covenant for slashing tx of staking tx for delegation + AddCovenantSig(ctx context.Context, in *MsgAddCovenantSig, opts ...grpc.CallOption) (*MsgAddCovenantSigResponse, error) + // AddCovenantUnbondingSigs handles two signatures from covenant for: // - unbonding tx submitted to babylon by staker // - slashing tx corresponding to unbodning tx submitted to babylon by staker - AddJuryUnbondingSigs(ctx context.Context, in *MsgAddJuryUnbondingSigs, opts ...grpc.CallOption) (*MsgAddJuryUnbondingSigsResponse, error) + AddCovenantUnbondingSigs(ctx context.Context, in *MsgAddCovenantUnbondingSigs, opts ...grpc.CallOption) (*MsgAddCovenantUnbondingSigsResponse, error) // AddValidatorUnbondingSig handles a signature from validator for unbonding tx submitted to babylon by staker AddValidatorUnbondingSig(ctx context.Context, in *MsgAddValidatorUnbondingSig, opts ...grpc.CallOption) (*MsgAddValidatorUnbondingSigResponse, error) // UpdateParams updates the btcstaking module parameters. @@ -933,18 +933,18 @@ func (c *msgClient) BTCUndelegate(ctx context.Context, in *MsgBTCUndelegate, opt return out, nil } -func (c *msgClient) AddJurySig(ctx context.Context, in *MsgAddJurySig, opts ...grpc.CallOption) (*MsgAddJurySigResponse, error) { - out := new(MsgAddJurySigResponse) - err := c.cc.Invoke(ctx, "/babylon.btcstaking.v1.Msg/AddJurySig", in, out, opts...) +func (c *msgClient) AddCovenantSig(ctx context.Context, in *MsgAddCovenantSig, opts ...grpc.CallOption) (*MsgAddCovenantSigResponse, error) { + out := new(MsgAddCovenantSigResponse) + err := c.cc.Invoke(ctx, "/babylon.btcstaking.v1.Msg/AddCovenantSig", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) AddJuryUnbondingSigs(ctx context.Context, in *MsgAddJuryUnbondingSigs, opts ...grpc.CallOption) (*MsgAddJuryUnbondingSigsResponse, error) { - out := new(MsgAddJuryUnbondingSigsResponse) - err := c.cc.Invoke(ctx, "/babylon.btcstaking.v1.Msg/AddJuryUnbondingSigs", in, out, opts...) +func (c *msgClient) AddCovenantUnbondingSigs(ctx context.Context, in *MsgAddCovenantUnbondingSigs, opts ...grpc.CallOption) (*MsgAddCovenantUnbondingSigsResponse, error) { + out := new(MsgAddCovenantUnbondingSigsResponse) + err := c.cc.Invoke(ctx, "/babylon.btcstaking.v1.Msg/AddCovenantUnbondingSigs", in, out, opts...) if err != nil { return nil, err } @@ -977,12 +977,12 @@ type MsgServer interface { CreateBTCDelegation(context.Context, *MsgCreateBTCDelegation) (*MsgCreateBTCDelegationResponse, error) // BtcUndelegate undelegates funds from exsitng btc delegation BTCUndelegate(context.Context, *MsgBTCUndelegate) (*MsgBTCUndelegateResponse, error) - // AddJurySig handles a signature from jury for slashing tx of staking tx for delegation - AddJurySig(context.Context, *MsgAddJurySig) (*MsgAddJurySigResponse, error) - // AddJuryUnbondingSigs handles two signatures from jury for: + // AddCovenantSig handles a signature from covenant for slashing tx of staking tx for delegation + AddCovenantSig(context.Context, *MsgAddCovenantSig) (*MsgAddCovenantSigResponse, error) + // AddCovenantUnbondingSigs handles two signatures from covenant for: // - unbonding tx submitted to babylon by staker // - slashing tx corresponding to unbodning tx submitted to babylon by staker - AddJuryUnbondingSigs(context.Context, *MsgAddJuryUnbondingSigs) (*MsgAddJuryUnbondingSigsResponse, error) + AddCovenantUnbondingSigs(context.Context, *MsgAddCovenantUnbondingSigs) (*MsgAddCovenantUnbondingSigsResponse, error) // AddValidatorUnbondingSig handles a signature from validator for unbonding tx submitted to babylon by staker AddValidatorUnbondingSig(context.Context, *MsgAddValidatorUnbondingSig) (*MsgAddValidatorUnbondingSigResponse, error) // UpdateParams updates the btcstaking module parameters. @@ -1002,11 +1002,11 @@ func (*UnimplementedMsgServer) CreateBTCDelegation(ctx context.Context, req *Msg func (*UnimplementedMsgServer) BTCUndelegate(ctx context.Context, req *MsgBTCUndelegate) (*MsgBTCUndelegateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BTCUndelegate not implemented") } -func (*UnimplementedMsgServer) AddJurySig(ctx context.Context, req *MsgAddJurySig) (*MsgAddJurySigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddJurySig not implemented") +func (*UnimplementedMsgServer) AddCovenantSig(ctx context.Context, req *MsgAddCovenantSig) (*MsgAddCovenantSigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddCovenantSig not implemented") } -func (*UnimplementedMsgServer) AddJuryUnbondingSigs(ctx context.Context, req *MsgAddJuryUnbondingSigs) (*MsgAddJuryUnbondingSigsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddJuryUnbondingSigs not implemented") +func (*UnimplementedMsgServer) AddCovenantUnbondingSigs(ctx context.Context, req *MsgAddCovenantUnbondingSigs) (*MsgAddCovenantUnbondingSigsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddCovenantUnbondingSigs not implemented") } func (*UnimplementedMsgServer) AddValidatorUnbondingSig(ctx context.Context, req *MsgAddValidatorUnbondingSig) (*MsgAddValidatorUnbondingSigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddValidatorUnbondingSig not implemented") @@ -1073,38 +1073,38 @@ func _Msg_BTCUndelegate_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_AddJurySig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAddJurySig) +func _Msg_AddCovenantSig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddCovenantSig) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AddJurySig(ctx, in) + return srv.(MsgServer).AddCovenantSig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/babylon.btcstaking.v1.Msg/AddJurySig", + FullMethod: "/babylon.btcstaking.v1.Msg/AddCovenantSig", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddJurySig(ctx, req.(*MsgAddJurySig)) + return srv.(MsgServer).AddCovenantSig(ctx, req.(*MsgAddCovenantSig)) } return interceptor(ctx, in, info, handler) } -func _Msg_AddJuryUnbondingSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAddJuryUnbondingSigs) +func _Msg_AddCovenantUnbondingSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddCovenantUnbondingSigs) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AddJuryUnbondingSigs(ctx, in) + return srv.(MsgServer).AddCovenantUnbondingSigs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/babylon.btcstaking.v1.Msg/AddJuryUnbondingSigs", + FullMethod: "/babylon.btcstaking.v1.Msg/AddCovenantUnbondingSigs", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddJuryUnbondingSigs(ctx, req.(*MsgAddJuryUnbondingSigs)) + return srv.(MsgServer).AddCovenantUnbondingSigs(ctx, req.(*MsgAddCovenantUnbondingSigs)) } return interceptor(ctx, in, info, handler) } @@ -1162,12 +1162,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_BTCUndelegate_Handler, }, { - MethodName: "AddJurySig", - Handler: _Msg_AddJurySig_Handler, + MethodName: "AddCovenantSig", + Handler: _Msg_AddCovenantSig_Handler, }, { - MethodName: "AddJuryUnbondingSigs", - Handler: _Msg_AddJuryUnbondingSigs_Handler, + MethodName: "AddCovenantUnbondingSigs", + Handler: _Msg_AddCovenantUnbondingSigs_Handler, }, { MethodName: "AddValidatorUnbondingSig", @@ -1509,7 +1509,7 @@ func (m *MsgBTCUndelegateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgAddJurySig) Marshal() (dAtA []byte, err error) { +func (m *MsgAddCovenantSig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1519,12 +1519,12 @@ func (m *MsgAddJurySig) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAddJurySig) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAddCovenantSig) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAddJurySig) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAddCovenantSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1582,7 +1582,7 @@ func (m *MsgAddJurySig) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgAddJurySigResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgAddCovenantSigResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1592,12 +1592,12 @@ func (m *MsgAddJurySigResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAddJurySigResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAddCovenantSigResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAddJurySigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAddCovenantSigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1668,7 +1668,7 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgAddJuryUnbondingSigs) Marshal() (dAtA []byte, err error) { +func (m *MsgAddCovenantUnbondingSigs) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1678,12 +1678,12 @@ func (m *MsgAddJuryUnbondingSigs) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAddJuryUnbondingSigs) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAddCovenantUnbondingSigs) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAddJuryUnbondingSigs) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAddCovenantUnbondingSigs) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1753,7 +1753,7 @@ func (m *MsgAddJuryUnbondingSigs) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgAddJuryUnbondingSigsResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgAddCovenantUnbondingSigsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1763,12 +1763,12 @@ func (m *MsgAddJuryUnbondingSigsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAddJuryUnbondingSigsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAddCovenantUnbondingSigsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAddJuryUnbondingSigsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAddCovenantUnbondingSigsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2005,7 +2005,7 @@ func (m *MsgBTCUndelegateResponse) Size() (n int) { return n } -func (m *MsgAddJurySig) Size() (n int) { +func (m *MsgAddCovenantSig) Size() (n int) { if m == nil { return 0 } @@ -2034,7 +2034,7 @@ func (m *MsgAddJurySig) Size() (n int) { return n } -func (m *MsgAddJurySigResponse) Size() (n int) { +func (m *MsgAddCovenantSigResponse) Size() (n int) { if m == nil { return 0 } @@ -2067,7 +2067,7 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgAddJuryUnbondingSigs) Size() (n int) { +func (m *MsgAddCovenantUnbondingSigs) Size() (n int) { if m == nil { return 0 } @@ -2100,7 +2100,7 @@ func (m *MsgAddJuryUnbondingSigs) Size() (n int) { return n } -func (m *MsgAddJuryUnbondingSigsResponse) Size() (n int) { +func (m *MsgAddCovenantUnbondingSigsResponse) Size() (n int) { if m == nil { return 0 } @@ -3048,7 +3048,7 @@ func (m *MsgBTCUndelegateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddJurySig) Unmarshal(dAtA []byte) error { +func (m *MsgAddCovenantSig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3071,10 +3071,10 @@ func (m *MsgAddJurySig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddJurySig: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddCovenantSig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddJurySig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddCovenantSig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3267,7 +3267,7 @@ func (m *MsgAddJurySig) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddJurySigResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAddCovenantSigResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3290,10 +3290,10 @@ func (m *MsgAddJurySigResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddJurySigResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddCovenantSigResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddJurySigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddCovenantSigResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3482,7 +3482,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddJuryUnbondingSigs) Unmarshal(dAtA []byte) error { +func (m *MsgAddCovenantUnbondingSigs) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3505,10 +3505,10 @@ func (m *MsgAddJuryUnbondingSigs) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddJuryUnbondingSigs: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddCovenantUnbondingSigs: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddJuryUnbondingSigs: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddCovenantUnbondingSigs: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3736,7 +3736,7 @@ func (m *MsgAddJuryUnbondingSigs) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAddJuryUnbondingSigsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAddCovenantUnbondingSigsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3759,10 +3759,10 @@ func (m *MsgAddJuryUnbondingSigsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAddJuryUnbondingSigsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAddCovenantUnbondingSigsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddJuryUnbondingSigsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAddCovenantUnbondingSigsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/btcstaking/types/types.go b/x/btcstaking/types/types.go index ac33196e6..b8cb5f3b1 100644 --- a/x/btcstaking/types/types.go +++ b/x/btcstaking/types/types.go @@ -8,13 +8,13 @@ import ( type PublicKeyInfo struct { StakerKey *bbn.BIP340PubKey ValidatorKey *bbn.BIP340PubKey - JuryKey *bbn.BIP340PubKey + CovenantKey *bbn.BIP340PubKey } func KeyDataFromScript(scriptData *btcstaking.StakingScriptData) *PublicKeyInfo { return &PublicKeyInfo{ StakerKey: bbn.NewBIP340PubKeyFromBTCPK(scriptData.StakerKey), ValidatorKey: bbn.NewBIP340PubKeyFromBTCPK(scriptData.ValidatorKey), - JuryKey: bbn.NewBIP340PubKeyFromBTCPK(scriptData.JuryKey), + CovenantKey: bbn.NewBIP340PubKeyFromBTCPK(scriptData.CovenantKey), } }