From 4f14b3a619177ff50e51e967dd7912467690aa18 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:50:00 -0800 Subject: [PATCH 01/13] wip --- mapper/pchain/tx_builder.go | 195 +++++++++++++++++++++++-- mapper/pchain/tx_parser.go | 64 +++++--- mapper/pchain/types.go | 40 +++-- service/backend/pchain/construction.go | 4 + 4 files changed, 249 insertions(+), 54 deletions(-) diff --git a/mapper/pchain/tx_builder.go b/mapper/pchain/tx_builder.go index 452ccf86..28ed5907 100644 --- a/mapper/pchain/tx_builder.go +++ b/mapper/pchain/tx_builder.go @@ -7,8 +7,10 @@ import ( "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils" + "github.com/ava-labs/avalanchego/utils/formatting" "github.com/ava-labs/avalanchego/utils/formatting/address" "github.com/ava-labs/avalanchego/vms/components/avax" + "github.com/ava-labs/avalanchego/vms/platformvm/signer" "github.com/ava-labs/avalanchego/vms/platformvm/txs" "github.com/ava-labs/avalanchego/vms/secp256k1fx" "github.com/coinbase/rosetta-sdk-go/parser" @@ -37,9 +39,15 @@ func BuildTx( return buildImportTx(matches, payloadMetadata, codec, avaxAssetID) case OpExportAvax: return buildExportTx(matches, payloadMetadata, codec, avaxAssetID) + case OpAddPermissionlessValidator: + return buildAddPermissionlessValidatorTx(matches, payloadMetadata, codec, avaxAssetID) + case OpAddPermissionlessDelegator: + return buildAddPermissionlessDelegatorTx(matches, payloadMetadata, codec, avaxAssetID) case OpAddValidator: + // TODO: Remove Post-Durango activation return buildAddValidatorTx(matches, payloadMetadata, codec, avaxAssetID) case OpAddDelegator: + // TODO: Remove Post-Durango activation return buildAddDelegatorTx(matches, payloadMetadata, codec, avaxAssetID) default: return nil, nil, fmt.Errorf("invalid tx type: %s", opType) @@ -118,6 +126,7 @@ func buildExportTx( } // [buildAddValidatorTx] returns a duly initialized tx if it does not err +// TODO: Remove Post-Durango activation func buildAddValidatorTx( matches []*parser.Match, metadata Metadata, @@ -136,7 +145,7 @@ func buildAddValidatorTx( } rewardsOwner, err := buildOutputOwner( - metadata.RewardAddresses, + metadata.ValidationRewardsOwners, metadata.Locktime, metadata.Threshold, ) @@ -154,11 +163,6 @@ func buildAddValidatorTx( return nil, nil, fmt.Errorf("parse outputs failed: %w", err) } - memo, err := mapper.DecodeToBytes(metadata.Memo) - if err != nil { - return nil, nil, fmt.Errorf("parse memo failed: %w", err) - } - weight, err := sumOutputAmounts(stakeOutputs) if err != nil { return nil, nil, err @@ -170,15 +174,14 @@ func buildAddValidatorTx( BlockchainID: blockchainID, Outs: outs, Ins: ins, - Memo: memo, }}, - StakeOuts: stakeOutputs, Validator: txs.Validator{ NodeID: nodeID, Start: metadata.Start, End: metadata.End, Wght: weight, }, + StakeOuts: stakeOutputs, RewardsOwner: rewardsOwner, DelegationShares: metadata.Shares, }} @@ -186,7 +189,111 @@ func buildAddValidatorTx( return tx, signers, tx.Sign(codec, nil) } +// [buildAddPermissionlessValidatorTx] returns a duly initialized tx if it does not err +func buildAddPermissionlessValidatorTx( + matches []*parser.Match, + metadata Metadata, + codec codec.Manager, + avaxAssetID ids.ID, +) (*txs.Tx, []*types.AccountIdentifier, error) { + if metadata.StakingMetadata == nil { + return nil, nil, errInvalidMetadata + } + + blockchainID := metadata.BlockchainID + + nodeID, err := ids.NodeIDFromString(metadata.NodeID) + if err != nil { + return nil, nil, err + } + + subnetBytes, err := formatting.Decode(formatting.HexNC, metadata.Subnet) + if err != nil { + return nil, nil, err + } + if len(subnetBytes) != ids.IDLen { + return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) + } + + publicKeyBytes, err := formatting.Decode(formatting.HexNC, metadata.BLSPublicKey) + if err != nil { + return nil, nil, err + } + popBytes, err := formatting.Decode(formatting.HexNC, metadata.BLSProofOfPossession) + if err != nil { + return nil, nil, err + } + pop := &signer.ProofOfPossession{} + copy(pop.PublicKey[:], publicKeyBytes) + copy(pop.ProofOfPossession[:], popBytes) + if err = pop.Verify(); err != nil { + return nil, nil, err + } + + validationRewardsOwner, err := buildOutputOwner( + metadata.ValidationRewardsOwners, + metadata.Locktime, + metadata.Threshold, + ) + if err != nil { + return nil, nil, err + } + + var delegationRewardsOwner *secp256k1fx.OutputOwners + if len(metadata.DelegationRewardsOwners) == 0 { + delegationRewardsOwner = validationRewardsOwner + } else { + delegationRewardsOwner, err = buildOutputOwner( + metadata.DelegationRewardsOwners, + metadata.Locktime, + metadata.Threshold, + ) + if err != nil { + return nil, nil, err + } + } + + ins, _, signers, err := buildInputs(matches[0].Operations, avaxAssetID) + if err != nil { + return nil, nil, fmt.Errorf("parse inputs failed: %w", err) + } + + outs, stakeOutputs, _, err := buildOutputs(matches[1].Operations, codec, avaxAssetID) + if err != nil { + return nil, nil, fmt.Errorf("parse outputs failed: %w", err) + } + + weight, err := sumOutputAmounts(stakeOutputs) + if err != nil { + return nil, nil, err + } + + tx := &txs.Tx{Unsigned: &txs.AddPermissionlessValidatorTx{ + BaseTx: txs.BaseTx{BaseTx: avax.BaseTx{ + NetworkID: metadata.NetworkID, + BlockchainID: blockchainID, + Outs: outs, + Ins: ins, + }}, + Validator: txs.Validator{ + NodeID: nodeID, + Start: metadata.Start, + End: metadata.End, + Wght: weight, + }, + Subnet: ids.ID(subnetBytes), + Signer: pop, + StakeOuts: stakeOutputs, + ValidatorRewardsOwner: validationRewardsOwner, + DelegatorRewardsOwner: delegationRewardsOwner, + DelegationShares: metadata.Shares, + }} + + return tx, signers, tx.Sign(codec, nil) +} + // [buildAddDelegatorTx] returns a duly initialized tx if it does not err +// TODO: Remove Post-Durango activation func buildAddDelegatorTx( matches []*parser.Match, metadata Metadata, @@ -203,7 +310,7 @@ func buildAddDelegatorTx( if err != nil { return nil, nil, err } - rewardsOwner, err := buildOutputOwner(metadata.RewardAddresses, metadata.Locktime, metadata.Threshold) + rewardsOwner, err := buildOutputOwner(metadata.ValidationRewardsOwners, metadata.Locktime, metadata.Threshold) if err != nil { return nil, nil, err } @@ -218,9 +325,61 @@ func buildAddDelegatorTx( return nil, nil, fmt.Errorf("parse outputs failed: %w", err) } - memo, err := mapper.DecodeToBytes(metadata.Memo) + weight, err := sumOutputAmounts(stakeOutputs) + if err != nil { + return nil, nil, err + } + + tx := &txs.Tx{Unsigned: &txs.AddDelegatorTx{ + BaseTx: txs.BaseTx{BaseTx: avax.BaseTx{ + NetworkID: metadata.NetworkID, + BlockchainID: blockchainID, + Outs: outs, + Ins: ins, + }}, + Validator: txs.Validator{ + NodeID: nodeID, + Start: metadata.Start, + End: metadata.End, + Wght: weight, + }, + StakeOuts: stakeOutputs, + DelegationRewardsOwner: rewardsOwner, + }} + + return tx, signers, tx.Sign(codec, nil) +} + +// [buildAddPermissionlessDelegatorTx] returns a duly initialized tx if it does not err +func buildAddPermissionlessDelegatorTx( + matches []*parser.Match, + metadata Metadata, + codec codec.Manager, + avaxAssetID ids.ID, +) (*txs.Tx, []*types.AccountIdentifier, error) { + if metadata.StakingMetadata == nil { + return nil, nil, errInvalidMetadata + } + + blockchainID := metadata.BlockchainID + + nodeID, err := ids.NodeIDFromString(metadata.NodeID) if err != nil { - return nil, nil, fmt.Errorf("parse memo failed: %w", err) + return nil, nil, err + } + rewardsOwner, err := buildOutputOwner(metadata.ValidationRewardsOwners, metadata.Locktime, metadata.Threshold) + if err != nil { + return nil, nil, err + } + + ins, _, signers, err := buildInputs(matches[0].Operations, avaxAssetID) + if err != nil { + return nil, nil, fmt.Errorf("parse inputs failed: %w", err) + } + + outs, stakeOutputs, _, err := buildOutputs(matches[1].Operations, codec, avaxAssetID) + if err != nil { + return nil, nil, fmt.Errorf("parse outputs failed: %w", err) } weight, err := sumOutputAmounts(stakeOutputs) @@ -228,21 +387,29 @@ func buildAddDelegatorTx( return nil, nil, err } - tx := &txs.Tx{Unsigned: &txs.AddDelegatorTx{ + subnetBytes, err := formatting.Decode(formatting.HexNC, metadata.Subnet) + if err != nil { + return nil, nil, err + } + if len(subnetBytes) != ids.IDLen { + return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) + } + + tx := &txs.Tx{Unsigned: &txs.AddPermissionlessDelegatorTx{ BaseTx: txs.BaseTx{BaseTx: avax.BaseTx{ NetworkID: metadata.NetworkID, BlockchainID: blockchainID, Outs: outs, Ins: ins, - Memo: memo, }}, - StakeOuts: stakeOutputs, Validator: txs.Validator{ NodeID: nodeID, Start: metadata.Start, End: metadata.End, Wght: weight, }, + Subnet: ids.ID(subnetBytes), + StakeOuts: stakeOutputs, DelegationRewardsOwner: rewardsOwner, }} diff --git a/mapper/pchain/tx_parser.go b/mapper/pchain/tx_parser.go index bbf9bc03..751dddd7 100644 --- a/mapper/pchain/tx_parser.go +++ b/mapper/pchain/tx_parser.go @@ -120,47 +120,55 @@ func (t *TxParser) Parse(signedTx *txs.Tx) (*types.Transaction, error) { err error ) + // TODO: Move to using [txs.Visitor] from AvalancheGo + // Ref: https://github.com/ava-labs/avalanchego/blob/master/vms/platformvm/txs/visitor.go txID := signedTx.ID() switch unsignedTx := signedTx.Unsigned.(type) { - case *txs.ExportTx: - txType = OpExportAvax - ops, err = t.parseExportTx(txID, unsignedTx) - case *txs.ImportTx: - txType = OpImportAvax - ops, err = t.parseImportTx(txID, unsignedTx) case *txs.AddValidatorTx: txType = OpAddValidator ops, err = t.parseAddValidatorTx(txID, unsignedTx) + case *txs.AddSubnetValidatorTx: + txType = OpAddSubnetValidator + ops, err = t.parseAddSubnetValidatorTx(txID, unsignedTx) case *txs.AddDelegatorTx: txType = OpAddDelegator ops, err = t.parseAddDelegatorTx(txID, unsignedTx) - case *txs.RewardValidatorTx: - txType = OpRewardValidator - ops, err = t.parseRewardValidatorTx(unsignedTx) - case *txs.CreateSubnetTx: - txType = OpCreateSubnet - ops, err = t.parseCreateSubnetTx(txID, unsignedTx) case *txs.CreateChainTx: txType = OpCreateChain ops, err = t.parseCreateChainTx(txID, unsignedTx) - case *txs.AddSubnetValidatorTx: - txType = OpAddSubnetValidator - ops, err = t.parseAddSubnetValidatorTx(txID, unsignedTx) - case *txs.AddPermissionlessValidatorTx: - txType = OpAddPermissionlessValidator - ops, err = t.parseAddPermissionlessValidatorTx(txID, unsignedTx) - case *txs.AddPermissionlessDelegatorTx: - txType = OpAddPermissionlessDelegator - ops, err = t.parseAddPermissionlessDelegatorTx(txID, unsignedTx) + case *txs.CreateSubnetTx: + txType = OpCreateSubnet + ops, err = t.parseCreateSubnetTx(txID, unsignedTx) + case *txs.ImportTx: + txType = OpImportAvax + ops, err = t.parseImportTx(txID, unsignedTx) + case *txs.ExportTx: + txType = OpExportAvax + ops, err = t.parseExportTx(txID, unsignedTx) + case *txs.AdvanceTimeTx: + txType = OpAdvanceTime + // no op tx + case *txs.RewardValidatorTx: + txType = OpRewardValidator + ops, err = t.parseRewardValidatorTx(unsignedTx) case *txs.RemoveSubnetValidatorTx: txType = OpRemoveSubnetValidator ops, err = t.parseRemoveSubnetValidatorTx(txID, unsignedTx) case *txs.TransformSubnetTx: txType = OpTransformSubnetValidator ops, err = t.parseTransformSubnetTx(txID, unsignedTx) - case *txs.AdvanceTimeTx: - txType = OpAdvanceTime - // no op tx + case *txs.AddPermissionlessValidatorTx: + txType = OpAddPermissionlessValidator + ops, err = t.parseAddPermissionlessValidatorTx(txID, unsignedTx) + case *txs.AddPermissionlessDelegatorTx: + txType = OpAddPermissionlessDelegator + ops, err = t.parseAddPermissionlessDelegatorTx(txID, unsignedTx) + case *txs.TransferSubnetOwnershipTx: + txType = OpTransferSubnetOwnership + ops, err = t.parseTransferSubnetOwnershipTx(txID, unsignedTx) + case *txs.BaseTx: + txType = OpBase + ops, err = t.parseBaseTx(txID, unsignedTx) default: log.Printf("unknown type %T", unsignedTx) } @@ -360,6 +368,14 @@ func addMetadataToStakeOuts(ops *txOps, validator *txs.Validator) { } } +func (t *TxParser) parseBaseTx(txID ids.ID, tx *txs.BaseTx) (*txOps, error) { + return t.baseTxToCombinedOperations(txID, tx, OpBase) +} + +func (t *TxParser) parseTransferSubnetOwnershipTx(txID ids.ID, tx *txs.TransferSubnetOwnershipTx) (*txOps, error) { + return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpTransferSubnetOwnership) +} + func (t *TxParser) parseCreateSubnetTx(txID ids.ID, tx *txs.CreateSubnetTx) (*txOps, error) { return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpCreateSubnet) } diff --git a/mapper/pchain/types.go b/mapper/pchain/types.go index 30517e50..2ca4a21e 100644 --- a/mapper/pchain/types.go +++ b/mapper/pchain/types.go @@ -18,6 +18,8 @@ const ( OpRemoveSubnetValidator = "REMOVE_SUBNET_VALIDATOR" OpTransformSubnetValidator = "TRANSFORM_SUBNET_VALIDATOR" OpAdvanceTime = "ADVANCE_TIME" + OpBase = "BASE" + OpTransferSubnetOwnership = "TRANSFER_SUBNET_OWNERSHIP" OpTypeImport = "IMPORT" OpTypeExport = "EXPORT" @@ -80,14 +82,17 @@ type ImportExportOptions struct { // StakingOptions contain response fields returned by /construction/preprocess for P-chain AddValidator/AddDelegator transactions type StakingOptions struct { - NodeID string `json:"node_id"` - Start uint64 `json:"start"` - End uint64 `json:"end"` - Shares uint32 `json:"shares"` - Memo string `json:"memo"` - Locktime uint64 `json:"locktime"` - Threshold uint32 `json:"threshold"` - RewardAddresses []string `json:"reward_addresses"` + NodeID string `json:"node_id"` + BLSPublicKey string `json:"bls_public_key"` + BLSProofOfPossession string `json:"bls_proof_of_possession"` + ValidationRewardsOwners []string `json:"reward_addresses"` + DelegationRewardsOwners []string `json:"delegator_reward_addresses"` + Start uint64 `json:"start"` // TODO: Remove post-Durango + End uint64 `json:"end"` + Subnet string `json:"subnet"` + Shares uint32 `json:"shares"` + Locktime uint64 `json:"locktime"` + Threshold uint32 `json:"threshold"` } // Metadata contains metadata values returned by /construction/metadata for P-chain transactions @@ -112,12 +117,15 @@ type ExportMetadata struct { // StakingMetadata contain response fields returned by /construction/metadata for P-chain AddValidator/AddDelegator transactions type StakingMetadata struct { - NodeID string `json:"node_id"` - RewardAddresses []string `json:"reward_addresses"` - Start uint64 `json:"start"` - End uint64 `json:"end"` - Shares uint32 `json:"shares"` - Locktime uint64 `json:"locktime"` - Threshold uint32 `json:"threshold"` - Memo string `json:"memo"` + NodeID string `json:"node_id"` + BLSPublicKey string `json:"bls_public_key"` + BLSProofOfPossession string `json:"bls_proof_of_possession"` + ValidationRewardsOwners []string `json:"reward_addresses"` + DelegationRewardsOwners []string `json:"delegator_reward_addresses"` + Start uint64 `json:"start"` // TODO: Remove Post-Durango Activation + End uint64 `json:"end"` + Subnet string `json:"subnet"` + Shares uint32 `json:"shares"` + Locktime uint64 `json:"locktime"` + Threshold uint32 `json:"threshold"` } diff --git a/service/backend/pchain/construction.go b/service/backend/pchain/construction.go index c22aa9a8..65bfd7fa 100644 --- a/service/backend/pchain/construction.go +++ b/service/backend/pchain/construction.go @@ -266,10 +266,14 @@ func getTxInputs( switch utx := unsignedTx.(type) { case *txs.AddValidatorTx: return utx.Ins, nil + case *txs.AddPermissionlessValidatorTx: + return utx.Ins, nil case *txs.AddSubnetValidatorTx: return utx.Ins, nil case *txs.AddDelegatorTx: return utx.Ins, nil + case *txs.AddPermissionlessDelegatorTx: + return utx.Ins, nil case *txs.CreateChainTx: return utx.Ins, nil case *txs.CreateSubnetTx: From 39bd30d82cae15014f8c393bfe1de9419f03a2c5 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:15:39 -0800 Subject: [PATCH 02/13] nits --- mapper/pchain/types.go | 2 +- service/backend/pchain/construction.go | 28 ++++++++++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/mapper/pchain/types.go b/mapper/pchain/types.go index 2ca4a21e..8945d66d 100644 --- a/mapper/pchain/types.go +++ b/mapper/pchain/types.go @@ -87,7 +87,7 @@ type StakingOptions struct { BLSProofOfPossession string `json:"bls_proof_of_possession"` ValidationRewardsOwners []string `json:"reward_addresses"` DelegationRewardsOwners []string `json:"delegator_reward_addresses"` - Start uint64 `json:"start"` // TODO: Remove post-Durango + Start uint64 `json:"start"` // TODO: Remove Post-Durango Activation End uint64 `json:"end"` Subnet string `json:"subnet"` Shares uint32 `json:"shares"` diff --git a/service/backend/pchain/construction.go b/service/backend/pchain/construction.go index 65bfd7fa..32f8efbe 100644 --- a/service/backend/pchain/construction.go +++ b/service/backend/pchain/construction.go @@ -155,21 +155,23 @@ func buildStakingMetadata(options map[string]interface{}) (*pmapper.Metadata, *t if err := mapper.UnmarshalJSONMap(options, &preprocessOptions); err != nil { return nil, nil, err } - - stakingMetadata := &pmapper.StakingMetadata{ - NodeID: preprocessOptions.NodeID, - Start: preprocessOptions.Start, - End: preprocessOptions.End, - Memo: preprocessOptions.Memo, - Locktime: preprocessOptions.Locktime, - Threshold: preprocessOptions.Threshold, - RewardAddresses: preprocessOptions.RewardAddresses, - Shares: preprocessOptions.Shares, - } - zeroAvax := mapper.AtomicAvaxAmount(big.NewInt(0)) - return &pmapper.Metadata{StakingMetadata: stakingMetadata}, zeroAvax, nil + return &pmapper.Metadata{ + StakingMetadata: &pmapper.StakingMetadata{ + NodeID: preprocessOptions.NodeID, + BLSPublicKey: preprocessOptions.BLSPublicKey, + BLSProofOfPossession: preprocessOptions.BLSProofOfPossession, + ValidationRewardsOwners: preprocessOptions.ValidationRewardsOwners, + DelegationRewardsOwners: preprocessOptions.DelegationRewardsOwners, + Start: preprocessOptions.Start, + End: preprocessOptions.End, + Subnet: preprocessOptions.Subnet, + Shares: preprocessOptions.Shares, + Locktime: preprocessOptions.Locktime, + Threshold: preprocessOptions.Threshold, + }, + }, zeroAvax, nil } func (b *Backend) getBaseTxFee(ctx context.Context) (*types.Amount, error) { From b83aa068e1a538d82c6b436aad2b2584ec2776be Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:19:35 -0800 Subject: [PATCH 03/13] nit --- mapper/pchain/tx_builder.go | 118 ++++++++++++++++++------------------ 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/mapper/pchain/tx_builder.go b/mapper/pchain/tx_builder.go index 28ed5907..50bc78b6 100644 --- a/mapper/pchain/tx_builder.go +++ b/mapper/pchain/tx_builder.go @@ -125,8 +125,8 @@ func buildExportTx( return tx, signers, tx.Sign(codec, nil) } -// [buildAddValidatorTx] returns a duly initialized tx if it does not err // TODO: Remove Post-Durango activation +// [buildAddValidatorTx] returns a duly initialized tx if it does not err func buildAddValidatorTx( matches []*parser.Match, metadata Metadata, @@ -189,6 +189,64 @@ func buildAddValidatorTx( return tx, signers, tx.Sign(codec, nil) } +// TODO: Remove Post-Durango activation +// [buildAddDelegatorTx] returns a duly initialized tx if it does not err +func buildAddDelegatorTx( + matches []*parser.Match, + metadata Metadata, + codec codec.Manager, + avaxAssetID ids.ID, +) (*txs.Tx, []*types.AccountIdentifier, error) { + if metadata.StakingMetadata == nil { + return nil, nil, errInvalidMetadata + } + + blockchainID := metadata.BlockchainID + + nodeID, err := ids.NodeIDFromString(metadata.NodeID) + if err != nil { + return nil, nil, err + } + rewardsOwner, err := buildOutputOwner(metadata.ValidationRewardsOwners, metadata.Locktime, metadata.Threshold) + if err != nil { + return nil, nil, err + } + + ins, _, signers, err := buildInputs(matches[0].Operations, avaxAssetID) + if err != nil { + return nil, nil, fmt.Errorf("parse inputs failed: %w", err) + } + + outs, stakeOutputs, _, err := buildOutputs(matches[1].Operations, codec, avaxAssetID) + if err != nil { + return nil, nil, fmt.Errorf("parse outputs failed: %w", err) + } + + weight, err := sumOutputAmounts(stakeOutputs) + if err != nil { + return nil, nil, err + } + + tx := &txs.Tx{Unsigned: &txs.AddDelegatorTx{ + BaseTx: txs.BaseTx{BaseTx: avax.BaseTx{ + NetworkID: metadata.NetworkID, + BlockchainID: blockchainID, + Outs: outs, + Ins: ins, + }}, + Validator: txs.Validator{ + NodeID: nodeID, + Start: metadata.Start, + End: metadata.End, + Wght: weight, + }, + StakeOuts: stakeOutputs, + DelegationRewardsOwner: rewardsOwner, + }} + + return tx, signers, tx.Sign(codec, nil) +} + // [buildAddPermissionlessValidatorTx] returns a duly initialized tx if it does not err func buildAddPermissionlessValidatorTx( matches []*parser.Match, @@ -292,64 +350,6 @@ func buildAddPermissionlessValidatorTx( return tx, signers, tx.Sign(codec, nil) } -// [buildAddDelegatorTx] returns a duly initialized tx if it does not err -// TODO: Remove Post-Durango activation -func buildAddDelegatorTx( - matches []*parser.Match, - metadata Metadata, - codec codec.Manager, - avaxAssetID ids.ID, -) (*txs.Tx, []*types.AccountIdentifier, error) { - if metadata.StakingMetadata == nil { - return nil, nil, errInvalidMetadata - } - - blockchainID := metadata.BlockchainID - - nodeID, err := ids.NodeIDFromString(metadata.NodeID) - if err != nil { - return nil, nil, err - } - rewardsOwner, err := buildOutputOwner(metadata.ValidationRewardsOwners, metadata.Locktime, metadata.Threshold) - if err != nil { - return nil, nil, err - } - - ins, _, signers, err := buildInputs(matches[0].Operations, avaxAssetID) - if err != nil { - return nil, nil, fmt.Errorf("parse inputs failed: %w", err) - } - - outs, stakeOutputs, _, err := buildOutputs(matches[1].Operations, codec, avaxAssetID) - if err != nil { - return nil, nil, fmt.Errorf("parse outputs failed: %w", err) - } - - weight, err := sumOutputAmounts(stakeOutputs) - if err != nil { - return nil, nil, err - } - - tx := &txs.Tx{Unsigned: &txs.AddDelegatorTx{ - BaseTx: txs.BaseTx{BaseTx: avax.BaseTx{ - NetworkID: metadata.NetworkID, - BlockchainID: blockchainID, - Outs: outs, - Ins: ins, - }}, - Validator: txs.Validator{ - NodeID: nodeID, - Start: metadata.Start, - End: metadata.End, - Wght: weight, - }, - StakeOuts: stakeOutputs, - DelegationRewardsOwner: rewardsOwner, - }} - - return tx, signers, tx.Sign(codec, nil) -} - // [buildAddPermissionlessDelegatorTx] returns a duly initialized tx if it does not err func buildAddPermissionlessDelegatorTx( matches []*parser.Match, From 4bf43573834820a548d98a852aff943cc98fffbd Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:28:53 -0800 Subject: [PATCH 04/13] nits --- mapper/pchain/tx_dependency.go | 68 ++++++++++++++++---------- service/backend/pchain/construction.go | 20 ++++++-- 2 files changed, 58 insertions(+), 30 deletions(-) diff --git a/mapper/pchain/tx_dependency.go b/mapper/pchain/tx_dependency.go index 3d130c7c..be7e23f4 100644 --- a/mapper/pchain/tx_dependency.go +++ b/mapper/pchain/tx_dependency.go @@ -2,6 +2,7 @@ package pchain import ( "fmt" + "log" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils" @@ -20,35 +21,40 @@ type BlockTxDependencies map[ids.ID]*SingleTxDependency // as this information is not part of the transaction objects on chain. func GetTxDependenciesIDs(tx txs.UnsignedTx) ([]ids.ID, error) { // collect tx inputs + // TODO: Move to using [txs.Visitor] from AvalancheGo + // Ref: https://github.com/ava-labs/avalanchego/blob/master/vms/platformvm/txs/visitor.go var ins []*avax.TransferableInput switch unsignedTx := tx.(type) { - case *txs.ExportTx: - ins = unsignedTx.Ins - case *txs.ImportTx: - ins = unsignedTx.Ins case *txs.AddValidatorTx: ins = unsignedTx.Ins - case *txs.AddPermissionlessValidatorTx: + case *txs.AddSubnetValidatorTx: ins = unsignedTx.Ins case *txs.AddDelegatorTx: ins = unsignedTx.Ins - case *txs.AddPermissionlessDelegatorTx: + case *txs.CreateChainTx: ins = unsignedTx.Ins case *txs.CreateSubnetTx: ins = unsignedTx.Ins - case *txs.CreateChainTx: + case *txs.ImportTx: ins = unsignedTx.Ins - case *txs.AddSubnetValidatorTx: + case *txs.ExportTx: + ins = unsignedTx.Ins + case *txs.AdvanceTimeTx: + return []ids.ID{}, nil + case *txs.RewardValidatorTx: + return []ids.ID{unsignedTx.TxID}, nil + case *txs.RemoveSubnetValidatorTx: ins = unsignedTx.Ins case *txs.TransformSubnetTx: ins = unsignedTx.Ins - case *txs.RemoveSubnetValidatorTx: + case *txs.AddPermissionlessValidatorTx: + ins = unsignedTx.Ins + case *txs.AddPermissionlessDelegatorTx: + ins = unsignedTx.Ins + case *txs.TransferSubnetOwnershipTx: + ins = unsignedTx.Ins + case *txs.BaseTx: ins = unsignedTx.Ins - - case *txs.RewardValidatorTx: - return []ids.ID{unsignedTx.TxID}, nil - case *txs.AdvanceTimeTx: - return []ids.ID{}, nil default: return nil, fmt.Errorf("unknown tx type %T", unsignedTx) } @@ -125,36 +131,46 @@ func (d *SingleTxDependency) GetUtxos() map[avax.UTXOID]*avax.UTXO { if d.Tx != nil { // Generate UTXOs from outputs + // TODO: Move to using [txs.Visitor] from AvalancheGo + // Ref: https://github.com/ava-labs/avalanchego/blob/master/vms/platformvm/txs/visitor.go outsToAdd := make([]*avax.TransferableOutput, 0) switch unsignedTx := d.Tx.Unsigned.(type) { - case *txs.ExportTx: - outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) - case *txs.ImportTx: - outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) case *txs.AddValidatorTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) outsToAdd = append(outsToAdd, unsignedTx.Stake()...) - case *txs.AddPermissionlessValidatorTx: + case *txs.AddSubnetValidatorTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) - outsToAdd = append(outsToAdd, unsignedTx.Stake()...) case *txs.AddDelegatorTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) outsToAdd = append(outsToAdd, unsignedTx.Stake()...) - case *txs.AddPermissionlessDelegatorTx: + case *txs.CreateChainTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) - outsToAdd = append(outsToAdd, unsignedTx.Stake()...) case *txs.CreateSubnetTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) - case *txs.AddSubnetValidatorTx: + case *txs.ImportTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) - case *txs.TransformSubnetTx: + case *txs.ExportTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.AdvanceTimeTx: + // No outputs to add + case *txs.RewardValidatorTx: + // No outputs to add case *txs.RemoveSubnetValidatorTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) - case *txs.CreateChainTx: + case *txs.TransformSubnetTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.AddPermissionlessValidatorTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + outsToAdd = append(outsToAdd, unsignedTx.Stake()...) + case *txs.AddPermissionlessDelegatorTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + outsToAdd = append(outsToAdd, unsignedTx.Stake()...) + case *txs.TransferSubnetOwnershipTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.BaseTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) default: - // no utxos extracted from unsupported transaction types + log.Printf("unknown type %T", unsignedTx) } // add collected utxos diff --git a/service/backend/pchain/construction.go b/service/backend/pchain/construction.go index 32f8efbe..cfffc91e 100644 --- a/service/backend/pchain/construction.go +++ b/service/backend/pchain/construction.go @@ -265,17 +265,15 @@ func (*Backend) CombineTx(tx common.AvaxTx, signatures []*types.Signature) (comm func getTxInputs( unsignedTx txs.UnsignedTx, ) ([]*avax.TransferableInput, error) { + // TODO: Move to using [txs.Visitor] from AvalancheGo + // Ref: https://github.com/ava-labs/avalanchego/blob/master/vms/platformvm/txs/visitor.go switch utx := unsignedTx.(type) { case *txs.AddValidatorTx: return utx.Ins, nil - case *txs.AddPermissionlessValidatorTx: - return utx.Ins, nil case *txs.AddSubnetValidatorTx: return utx.Ins, nil case *txs.AddDelegatorTx: return utx.Ins, nil - case *txs.AddPermissionlessDelegatorTx: - return utx.Ins, nil case *txs.CreateChainTx: return utx.Ins, nil case *txs.CreateSubnetTx: @@ -284,6 +282,20 @@ func getTxInputs( return utx.ImportedInputs, nil case *txs.ExportTx: return utx.Ins, nil + case *txs.AdvanceTimeTx: + return nil, nil + case *txs.RewardValidatorTx: + return nil, nil + case *txs.TransformSubnetTx: + return utx.Ins, nil + case *txs.AddPermissionlessValidatorTx: + return utx.Ins, nil + case *txs.AddPermissionlessDelegatorTx: + return utx.Ins, nil + case *txs.TransferSubnetOwnershipTx: + return utx.Ins, nil + case *txs.BaseTx: + return utx.Ins, nil default: return nil, errUnknownTxType } From 0f8a19070aae2e858c8ccc30e3b75999782bc478 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:34:28 -0800 Subject: [PATCH 05/13] pass tests --- service/backend/pchain/construction_test.go | 46 ++++++++++++--------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/service/backend/pchain/construction_test.go b/service/backend/pchain/construction_test.go index 5f8de61c..52491e17 100644 --- a/service/backend/pchain/construction_test.go +++ b/service/backend/pchain/construction_test.go @@ -600,16 +600,19 @@ func TestAddValidatorTxConstruction(t *testing.T) { } payloadsMetadata := map[string]interface{}{ - "network_id": float64(avalancheNetworkID), - "blockchain_id": pChainID.String(), - "node_id": nodeID, - "start": float64(startTime), - "end": float64(endTime), - "shares": float64(shares), - "locktime": 0.0, - "threshold": 1.0, - "memo": "", - "reward_addresses": []interface{}{stakeRewardAccount.Address}, + "network_id": float64(avalancheNetworkID), + "blockchain_id": pChainID.String(), + "node_id": nodeID, + "start": float64(startTime), + "end": float64(endTime), + "shares": float64(shares), + "locktime": 0.0, + "subnet": "", + "threshold": 1.0, + "reward_addresses": []interface{}{stakeRewardAccount.Address}, + "delegator_reward_addresses": nil, + "bls_proof_of_possession": "", + "bls_public_key": "", } signers := []*types.AccountIdentifier{pAccountIdentifier} @@ -831,16 +834,19 @@ func TestAddDelegatorTxConstruction(t *testing.T) { } payloadsMetadata := map[string]interface{}{ - "network_id": float64(avalancheNetworkID), - "blockchain_id": pChainID.String(), - "node_id": nodeID, - "start": float64(startTime), - "end": float64(endTime), - "shares": 0.0, - "locktime": 0.0, - "threshold": 1.0, - "memo": "", - "reward_addresses": []interface{}{stakeRewardAccount.Address}, + "network_id": float64(avalancheNetworkID), + "blockchain_id": pChainID.String(), + "node_id": nodeID, + "start": float64(startTime), + "end": float64(endTime), + "shares": 0.0, + "locktime": 0.0, + "threshold": 1.0, + "reward_addresses": []interface{}{stakeRewardAccount.Address}, + "bls_proof_of_possession": "", + "bls_public_key": "", + "delegator_reward_addresses": nil, + "subnet": "", } signers := []*types.AccountIdentifier{pAccountIdentifier} From ccdda37c88f2cefdcff5f3158fb98cb49eec4bed Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 9 Feb 2024 18:33:35 -0800 Subject: [PATCH 06/13] nits --- mapper/pchain/tx_builder.go | 9 ++++----- mapper/transaction_test.go | 3 +-- service/backend/cchainatomictx/construction_test.go | 5 ++--- service/backend/pchain/construction_test.go | 10 ++++------ 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/mapper/pchain/tx_builder.go b/mapper/pchain/tx_builder.go index 50bc78b6..33b67891 100644 --- a/mapper/pchain/tx_builder.go +++ b/mapper/pchain/tx_builder.go @@ -7,7 +7,6 @@ import ( "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils" - "github.com/ava-labs/avalanchego/utils/formatting" "github.com/ava-labs/avalanchego/utils/formatting/address" "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/platformvm/signer" @@ -265,7 +264,7 @@ func buildAddPermissionlessValidatorTx( return nil, nil, err } - subnetBytes, err := formatting.Decode(formatting.HexNC, metadata.Subnet) + subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) if err != nil { return nil, nil, err } @@ -273,11 +272,11 @@ func buildAddPermissionlessValidatorTx( return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) } - publicKeyBytes, err := formatting.Decode(formatting.HexNC, metadata.BLSPublicKey) + publicKeyBytes, err := mapper.DecodeToBytes(metadata.BLSPublicKey) if err != nil { return nil, nil, err } - popBytes, err := formatting.Decode(formatting.HexNC, metadata.BLSProofOfPossession) + popBytes, err := mapper.DecodeToBytes(metadata.BLSProofOfPossession) if err != nil { return nil, nil, err } @@ -387,7 +386,7 @@ func buildAddPermissionlessDelegatorTx( return nil, nil, err } - subnetBytes, err := formatting.Decode(formatting.HexNC, metadata.Subnet) + subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) if err != nil { return nil, nil, err } diff --git a/mapper/transaction_test.go b/mapper/transaction_test.go index 168522b8..d0dd9cf6 100644 --- a/mapper/transaction_test.go +++ b/mapper/transaction_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/utils/formatting" "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/coreth/plugin/evm" "github.com/coinbase/rosetta-sdk-go/types" @@ -253,7 +252,7 @@ func TestCrossChainImportedInputs(t *testing.T) { rawIdx = 0 avaxAssetID = "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK" hexTx = "0x000000000000000000057fc93d85c6d62c5b2ac0b519c87010ea5294012d1e407030d6acd0021cac10d5000000000000000000000000000000000000000000000000000000000000000000000001d4e3812503247f042cc9bbb3395ceca49e28687726489b0ea2d4dd259fadb8b6000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000500000000772651c00000000100000000000000013158e80abd5a1e1aa716003c9db096792c37962100000000772209123d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa000000010000000900000001309767786d3c3548f34373c858f2bab210c6bd6c837d069e314930273d32acc361e86a05bc5bd251e4cb5809bbca7680361ed3263ff5ba2aa467294bfa000aef00cfb71da5" - decodeTx, _ = formatting.Decode(formatting.Hex, hexTx) + decodeTx, _ = DecodeToBytes(hexTx) tx = &evm.Tx{} networkIdentifier = &types.NetworkIdentifier{ diff --git a/service/backend/cchainatomictx/construction_test.go b/service/backend/cchainatomictx/construction_test.go index 322b4c09..321000e6 100644 --- a/service/backend/cchainatomictx/construction_test.go +++ b/service/backend/cchainatomictx/construction_test.go @@ -9,7 +9,6 @@ import ( "testing" "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/utils/formatting" "github.com/coinbase/rosetta-sdk-go/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -259,7 +258,7 @@ func TestExportTxConstruction(t *testing.T) { t.Run("submit endpoint", func(t *testing.T) { require := require.New(t) - signedTxBytes, err := formatting.Decode(formatting.Hex, signedExportTx) + signedTxBytes, err := mapper.DecodeToBytes(signedExportTx) require.NoError(err) txID, err := ids.FromString(signedExportTxHash) require.NoError(err) @@ -476,7 +475,7 @@ func TestImportTxConstruction(t *testing.T) { t.Run("submit endpoint", func(t *testing.T) { require := require.New(t) - signedTxBytes, err := formatting.Decode(formatting.Hex, signedImportTx) + signedTxBytes, err := mapper.DecodeToBytes(signedImportTx) require.NoError(err) txID, err := ids.FromString(signedImportTxHash) require.NoError(err) diff --git a/service/backend/pchain/construction_test.go b/service/backend/pchain/construction_test.go index 52491e17..9d48c58c 100644 --- a/service/backend/pchain/construction_test.go +++ b/service/backend/pchain/construction_test.go @@ -10,7 +10,6 @@ import ( "github.com/ava-labs/avalanchego/api/info" "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/utils/formatting" "github.com/coinbase/rosetta-sdk-go/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -310,7 +309,7 @@ func TestExportTxConstruction(t *testing.T) { t.Run("submit endpoint", func(t *testing.T) { require := require.New(t) - signedTxBytes, err := formatting.Decode(formatting.Hex, signedExportTx) + signedTxBytes, err := mapper.DecodeToBytes(signedExportTx) require.NoError(err) txID, err := ids.FromString(signedExportTxHash) require.NoError(err) @@ -523,9 +522,8 @@ func TestImportTxConstruction(t *testing.T) { t.Run("submit endpoint", func(t *testing.T) { require := require.New(t) - signedTxBytes, err := formatting.Decode(formatting.Hex, signedImportTx) + signedTxBytes, err := mapper.DecodeToBytes(signedImportTx) require.NoError(err) - txID, err := ids.FromString(signedImportTxHash) require.NoError(err) @@ -761,7 +759,7 @@ func TestAddValidatorTxConstruction(t *testing.T) { t.Run("submit endpoint", func(t *testing.T) { require := require.New(t) - signedTxBytes, err := formatting.Decode(formatting.Hex, signedTx) + signedTxBytes, err := mapper.DecodeToBytes(signedTx) require.NoError(err) txID, err := ids.FromString(signedTxHash) require.NoError(err) @@ -995,7 +993,7 @@ func TestAddDelegatorTxConstruction(t *testing.T) { t.Run("submit endpoint", func(t *testing.T) { require := require.New(t) - signedTxBytes, err := formatting.Decode(formatting.Hex, signedTx) + signedTxBytes, err := mapper.DecodeToBytes(signedTx) require.NoError(err) txID, err := ids.FromString(signedTxHash) require.NoError(err) From 9691118b35801e02771467e297bff17bf2f27fb1 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:44:30 -0500 Subject: [PATCH 07/13] tests --- mapper/pchain/test_data.go | 155 ++++++++++++++++++++++++++++ mapper/pchain/tx_builder.go | 8 +- mapper/pchain/tx_dependency_test.go | 113 ++++++++++++++++++++ mapper/pchain/tx_parser.go | 4 +- mapper/pchain/tx_parser_test.go | 87 ++++++++++++++++ mapper/pchain/types.go | 4 +- 6 files changed, 363 insertions(+), 8 deletions(-) diff --git a/mapper/pchain/test_data.go b/mapper/pchain/test_data.go index b2dfcdda..f453883f 100644 --- a/mapper/pchain/test_data.go +++ b/mapper/pchain/test_data.go @@ -2,9 +2,11 @@ package pchain import ( "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/utils/constants" "github.com/ava-labs/avalanchego/utils/formatting/address" "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/platformvm/block" + "github.com/ava-labs/avalanchego/vms/platformvm/signer" "github.com/ava-labs/avalanchego/vms/platformvm/stakeable" "github.com/ava-labs/avalanchego/vms/platformvm/txs" "github.com/ava-labs/avalanchego/vms/secp256k1fx" @@ -150,6 +152,7 @@ func buildExport() (*txs.Tx, *txs.ExportTx, map[string]*types.AccountIdentifier) return signedTx, exportTx, inputTxAccounts } +// TODO: Remove Post-Durango func buildAddDelegator() (*txs.Tx, *txs.AddDelegatorTx, map[string]*types.AccountIdentifier) { avaxAssetID, _ := ids.FromString("U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK") txID, _ := ids.FromString("2JQGX1MBdszAaeV6eApCZm7CBpc917qWiyQ2cygFRJ6WteDkre") @@ -219,6 +222,7 @@ func buildAddDelegator() (*txs.Tx, *txs.AddDelegatorTx, map[string]*types.Accoun return signedTx, addDelegator, inputTxAccounts } +// TODO: Remove Post-Durango func buildValidatorTx() (*txs.Tx, *txs.AddValidatorTx, map[string]*types.AccountIdentifier) { avaxAssetID, _ := ids.FromString("U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK") @@ -293,3 +297,154 @@ func buildValidatorTx() (*txs.Tx, *txs.AddValidatorTx, map[string]*types.Account return signedTx, addValidator, inputTxAccounts } + +func buildAddPermissionlessDelegator() (*txs.Tx, *txs.AddPermissionlessDelegatorTx, map[string]*types.AccountIdentifier) { + avaxAssetID, _ := ids.FromString("U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK") + txID, _ := ids.FromString("2JQGX1MBdszAaeV6eApCZm7CBpc917qWiyQ2cygFRJ6WteDkre") + outAddr, _ := address.ParseToID("P-fuji1gdkq8g208e3j4epyjmx65jglsw7vauh86l47ac") + validatorID, _ := ids.NodeIDFromString("NodeID-BFa1padLXBj7VHa2JYvYGzcTBPQGjPhUy") + stakeAddr, _ := address.ParseToID("P-fuji1l022sue7g2kzvrcuxughl30xkss2cj0az3e5r2") + rewardAddr, _ := address.ParseToID("P-fuji1l022sue7g2kzvrcuxughl30xkss2cj0az3e5r2") + addPermissionlessDelegator := &txs.AddPermissionlessDelegatorTx{ + BaseTx: txs.BaseTx{ + BaseTx: avax.BaseTx{ + NetworkID: uint32(5), + BlockchainID: [32]byte{}, + Outs: []*avax.TransferableOutput{{ + Asset: avax.Asset{ID: avaxAssetID}, + FxID: [32]byte{}, + Out: &secp256k1fx.TransferOutput{ + Amt: 996649063, + OutputOwners: secp256k1fx.OutputOwners{ + Locktime: 9, + Threshold: 1, + Addrs: []ids.ShortID{outAddr}, + }, + }, + }}, + Ins: []*avax.TransferableInput{{ + UTXOID: avax.UTXOID{TxID: txID, OutputIndex: 0, Symbol: false}, + Asset: avax.Asset{ID: avaxAssetID}, + FxID: [32]byte{}, + In: &secp256k1fx.TransferInput{ + Amt: 1996649063, + Input: secp256k1fx.Input{SigIndices: []uint32{}}, + }, + }}, + Memo: []byte{}, + }, + }, + Validator: txs.Validator{ + NodeID: validatorID, + Start: 1656058022, + End: 1657872569, + Wght: 1000000000, + }, + Subnet: constants.PrimaryNetworkID, + StakeOuts: []*avax.TransferableOutput{{ + Asset: avax.Asset{ID: avaxAssetID}, + FxID: [32]byte{}, + Out: &secp256k1fx.TransferOutput{ + Amt: 1000000000, + OutputOwners: secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{stakeAddr}, + }, + }, + }}, + DelegationRewardsOwner: &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{rewardAddr}, + }, + } + + signedTx, _ := txs.NewSigned(addPermissionlessDelegator, block.Codec, nil) + + inputTxAccounts := map[string]*types.AccountIdentifier{} + inputTxAccounts[addPermissionlessDelegator.Ins[0].String()] = &types.AccountIdentifier{Address: stakeAddr.String()} + + return signedTx, addPermissionlessDelegator, inputTxAccounts +} + +func buildAddPermissionlessValidator() (*txs.Tx, *txs.AddPermissionlessValidatorTx, map[string]*types.AccountIdentifier) { + avaxAssetID, _ := ids.FromString("U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK") + txID, _ := ids.FromString("88tfp1Pkw9vyKrRtVNiMrghFBrre6Q6CzqPW1t7StDNX9PJEo") + stakeAddr, _ := address.ParseToID("P-fuji1ljdzyey6vu3hgn3cwg4j5lpy0svd6arlxpj6je") + rewardAddr, _ := address.ParseToID("P-fuji1ljdzyey6vu3hgn3cwg4j5lpy0svd6arlxpj6je") + validatorID, _ := ids.NodeIDFromString("NodeID-CCecHmRK3ANe92VyvASxkNav26W4vAVpX") + addPermissionlessValidator := &txs.AddPermissionlessValidatorTx{ + BaseTx: txs.BaseTx{ + BaseTx: avax.BaseTx{ + NetworkID: uint32(5), + BlockchainID: [32]byte{}, + Outs: nil, + Ins: []*avax.TransferableInput{ // two inputs, the second locktimed + { + UTXOID: avax.UTXOID{TxID: txID, OutputIndex: 0}, + Asset: avax.Asset{ID: avaxAssetID}, + FxID: [32]byte{}, + In: &secp256k1fx.TransferInput{ + Amt: 2000000000, + Input: secp256k1fx.Input{SigIndices: []uint32{1}}, + }, + }, + { + UTXOID: avax.UTXOID{TxID: txID, OutputIndex: 1}, + Asset: avax.Asset{ID: avaxAssetID}, + FxID: [32]byte{}, + In: &stakeable.LockIn{ + Locktime: uint64(1666781236), // a unix time + TransferableIn: &secp256k1fx.TransferInput{ + Amt: 2000000000, + Input: secp256k1fx.Input{SigIndices: []uint32{1}}, + }, + }, + }, + }, + Memo: []byte{}, + }, + }, + Validator: txs.Validator{ + NodeID: validatorID, + Start: 1656084079, + End: 1687620079, + Wght: 2000000000, + }, + Subnet: constants.PrimaryNetworkID, + Signer: &signer.Empty{}, + StakeOuts: []*avax.TransferableOutput{{ + Asset: avax.Asset{ID: avaxAssetID}, + FxID: [32]byte{}, + Out: &secp256k1fx.TransferOutput{ + Amt: 2000000000, + OutputOwners: secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{stakeAddr}, + }, + }, + }}, + ValidatorRewardsOwner: &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{rewardAddr}, + }, + DelegatorRewardsOwner: &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{rewardAddr}, + }, + DelegationShares: 20000, + } + + signedTx, _ := txs.NewSigned(addPermissionlessValidator, block.Codec, nil) + + inputTxAccounts := map[string]*types.AccountIdentifier{ + addPermissionlessValidator.Ins[0].String(): {Address: stakeAddr.String()}, + addPermissionlessValidator.Ins[1].String(): {Address: stakeAddr.String()}, + } + + return signedTx, addPermissionlessValidator, inputTxAccounts +} diff --git a/mapper/pchain/tx_builder.go b/mapper/pchain/tx_builder.go index 33b67891..92f8c067 100644 --- a/mapper/pchain/tx_builder.go +++ b/mapper/pchain/tx_builder.go @@ -43,10 +43,10 @@ func BuildTx( case OpAddPermissionlessDelegator: return buildAddPermissionlessDelegatorTx(matches, payloadMetadata, codec, avaxAssetID) case OpAddValidator: - // TODO: Remove Post-Durango activation + // TODO: Remove Post-Durango return buildAddValidatorTx(matches, payloadMetadata, codec, avaxAssetID) case OpAddDelegator: - // TODO: Remove Post-Durango activation + // TODO: Remove Post-Durango return buildAddDelegatorTx(matches, payloadMetadata, codec, avaxAssetID) default: return nil, nil, fmt.Errorf("invalid tx type: %s", opType) @@ -124,7 +124,7 @@ func buildExportTx( return tx, signers, tx.Sign(codec, nil) } -// TODO: Remove Post-Durango activation +// TODO: Remove Post-Durango // [buildAddValidatorTx] returns a duly initialized tx if it does not err func buildAddValidatorTx( matches []*parser.Match, @@ -188,7 +188,7 @@ func buildAddValidatorTx( return tx, signers, tx.Sign(codec, nil) } -// TODO: Remove Post-Durango activation +// TODO: Remove Post-Durango // [buildAddDelegatorTx] returns a duly initialized tx if it does not err func buildAddDelegatorTx( matches []*parser.Match, diff --git a/mapper/pchain/tx_dependency_test.go b/mapper/pchain/tx_dependency_test.go index 6f48ba85..a67c2034 100644 --- a/mapper/pchain/tx_dependency_test.go +++ b/mapper/pchain/tx_dependency_test.go @@ -5,10 +5,12 @@ import ( "time" "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/utils/constants" "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" "github.com/ava-labs/avalanchego/utils/timer/mockable" "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/platformvm/reward" + "github.com/ava-labs/avalanchego/vms/platformvm/signer" "github.com/ava-labs/avalanchego/vms/platformvm/stakeable" "github.com/ava-labs/avalanchego/vms/platformvm/txs" "github.com/ava-labs/avalanchego/vms/secp256k1fx" @@ -114,6 +116,7 @@ func TestTxDependencyIsCreateChain(t *testing.T) { require.Equal(res, res2) } +// TODO: Remove Post-Durango func TestTxDependencyIsAddValidator(t *testing.T) { require := require.New(t) @@ -216,3 +219,113 @@ func TestTxDependencyIsAddValidator(t *testing.T) { res2 := dep.GetUtxos() require.Equal(res, res2) } + +func TestTxDependencyIsAddPermissionlessValidator(t *testing.T) { + require := require.New(t) + + var ( + clk = mockable.Clock{} + avaxAssetID = ids.GenerateTestID() + validatorWeight = uint64(2022) + ) + + in := &avax.TransferableInput{ + UTXOID: avax.UTXOID{ + TxID: ids.ID{'t', 'x', 'I', 'D'}, + OutputIndex: 2, + }, + Asset: avax.Asset{ID: avaxAssetID}, + In: &secp256k1fx.TransferInput{ + Amt: uint64(5678), + Input: secp256k1fx.Input{SigIndices: []uint32{0}}, + }, + } + out := &avax.TransferableOutput{ + Asset: avax.Asset{ID: avaxAssetID}, + Out: &secp256k1fx.TransferOutput{ + Amt: uint64(1234), + OutputOwners: secp256k1fx.OutputOwners{ + Threshold: 1, + Addrs: []ids.ShortID{preFundedKeys[0].PublicKey().Address()}, + }, + }, + } + stake := &avax.TransferableOutput{ + Asset: avax.Asset{ID: avaxAssetID}, + Out: &stakeable.LockOut{ + Locktime: uint64(clk.Time().Add(time.Second).Unix()), + TransferableOut: &secp256k1fx.TransferOutput{ + Amt: validatorWeight, + OutputOwners: secp256k1fx.OutputOwners{ + Threshold: 1, + Addrs: []ids.ShortID{preFundedKeys[0].PublicKey().Address()}, + }, + }, + }, + } + utx := &txs.AddPermissionlessValidatorTx{ + BaseTx: txs.BaseTx{BaseTx: avax.BaseTx{ + NetworkID: uint32(1492), + BlockchainID: ids.GenerateTestID(), + Ins: []*avax.TransferableInput{in}, + Outs: []*avax.TransferableOutput{out}, + }}, + Validator: txs.Validator{ + NodeID: ids.GenerateTestNodeID(), + Start: uint64(clk.Time().Unix()), + End: uint64(clk.Time().Add(time.Hour).Unix()), + Wght: validatorWeight, + }, + Subnet: constants.PrimaryNetworkID, + Signer: &signer.Empty{}, + StakeOuts: []*avax.TransferableOutput{stake}, + ValidatorRewardsOwner: &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{preFundedKeys[1].PublicKey().Address()}, + }, + DelegatorRewardsOwner: &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{preFundedKeys[1].PublicKey().Address()}, + }, + DelegationShares: reward.PercentDenominator, + } + tx, err := txs.NewSigned(utx, txs.Codec, nil) + require.NoError(err) + + dep := &SingleTxDependency{Tx: tx} + res := dep.GetUtxos() + require.Len(res, 2) + + expectedUTXOs := []*avax.UTXO{ + { + UTXOID: avax.UTXOID{ + TxID: tx.ID(), + OutputIndex: 0, + }, + Asset: out.Asset, + Out: out.Out, + }, + { + UTXOID: avax.UTXOID{ + TxID: tx.ID(), + OutputIndex: 1, + }, + Asset: stake.Asset, + Out: stake.Out, + }, + } + + utxo, found := res[expectedUTXOs[0].UTXOID] + require.True(found) + require.Equal(utxo, expectedUTXOs[0]) + + utxo, found = res[expectedUTXOs[1].UTXOID] + require.True(found) + require.Equal(utxo, expectedUTXOs[1]) + + // show idempotency + res2 := dep.GetUtxos() + require.Equal(res, res2) +} diff --git a/mapper/pchain/tx_parser.go b/mapper/pchain/tx_parser.go index 751dddd7..0d9e95d0 100644 --- a/mapper/pchain/tx_parser.go +++ b/mapper/pchain/tx_parser.go @@ -272,7 +272,7 @@ func (t *TxParser) parseAddValidatorTx(txID ids.ID, tx *txs.AddValidatorTx) (*tx } func (t *TxParser) parseAddPermissionlessValidatorTx(txID ids.ID, tx *txs.AddPermissionlessValidatorTx) (*txOps, error) { - ops, err := t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpAddValidator) + ops, err := t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpAddPermissionlessValidator) if err != nil { return nil, err } @@ -308,7 +308,7 @@ func (t *TxParser) parseAddDelegatorTx(txID ids.ID, tx *txs.AddDelegatorTx) (*tx } func (t *TxParser) parseAddPermissionlessDelegatorTx(txID ids.ID, tx *txs.AddPermissionlessDelegatorTx) (*txOps, error) { - ops, err := t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpAddDelegator) + ops, err := t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpAddPermissionlessDelegator) if err != nil { return nil, err } diff --git a/mapper/pchain/tx_parser_test.go b/mapper/pchain/tx_parser_test.go index aef19fff..79cd2d71 100644 --- a/mapper/pchain/tx_parser_test.go +++ b/mapper/pchain/tx_parser_test.go @@ -144,6 +144,7 @@ func TestMapOutOperation(t *testing.T) { require.Nil(rosettaOutOp[0].Metadata["sig_indices"]) } +// TODO: Remove Post-Durango func TestMapAddValidatorTx(t *testing.T) { require := require.New(t) @@ -177,6 +178,40 @@ func TestMapAddValidatorTx(t *testing.T) { require.Equal(1, cntMetaType) } +func TestMapAddPermissionlessValidatorTx(t *testing.T) { + require := require.New(t) + + signedTx, addPermissionlessValidatorTx, inputAccounts := buildAddPermissionlessValidator() + + require.Len(addPermissionlessValidatorTx.Ins, 2) + require.Empty(addPermissionlessValidatorTx.Outs) + + ctrl := gomock.NewController(t) + pchainClient := client.NewMockPChainClient(ctrl) + parserCfg := TxParserConfig{ + IsConstruction: true, + Hrp: avaconstants.FujiHRP, + ChainIDs: chainIDs, + AvaxAssetID: avaxAssetID, + PChainClient: pchainClient, + } + parser, err := NewTxParser(parserCfg, inputAccounts, nil) + require.NoError(err) + rosettaTransaction, err := parser.Parse(signedTx) + require.NoError(err) + + total := len(addPermissionlessValidatorTx.Ins) + len(addPermissionlessValidatorTx.Outs) + len(addPermissionlessValidatorTx.StakeOuts) + require.Len(rosettaTransaction.Operations, total) + + cntTxType, cntInputMeta, cntOutputMeta, cntMetaType := verifyRosettaTransaction(rosettaTransaction.Operations, OpAddPermissionlessValidator, OpTypeStakeOutput) + + require.Equal(3, cntTxType) + require.Equal(2, cntInputMeta) + require.Zero(cntOutputMeta) + require.Equal(1, cntMetaType) +} + +// TODO: Remove Post-Durango func TestMapAddDelegatorTx(t *testing.T) { require := require.New(t) @@ -229,6 +264,58 @@ func TestMapAddDelegatorTx(t *testing.T) { require.Equal(OpTypeStakeOutput, rosettaTransaction.Operations[2].Metadata["type"]) } +func TestMapAddPermissionlessDelegatorTx(t *testing.T) { + require := require.New(t) + + signedTx, addPermissionlessDelegatorTx, inputAccounts := buildAddPermissionlessDelegator() + + require.Len(addPermissionlessDelegatorTx.Ins, 1) + require.Len(addPermissionlessDelegatorTx.Outs, 1) + require.Len(addPermissionlessDelegatorTx.StakeOuts, 1) + + ctrl := gomock.NewController(t) + pchainClient := client.NewMockPChainClient(ctrl) + parserCfg := TxParserConfig{ + IsConstruction: true, + Hrp: avaconstants.FujiHRP, + ChainIDs: chainIDs, + AvaxAssetID: avaxAssetID, + PChainClient: pchainClient, + } + parser, err := NewTxParser(parserCfg, inputAccounts, nil) + require.NoError(err) + rosettaTransaction, err := parser.Parse(signedTx) + require.NoError(err) + + total := len(addPermissionlessDelegatorTx.Ins) + len(addPermissionlessDelegatorTx.Outs) + len(addPermissionlessDelegatorTx.StakeOuts) + require.Len(rosettaTransaction.Operations, total) + + cntTxType, cntInputMeta, cntOutputMeta, cntMetaType := verifyRosettaTransaction(rosettaTransaction.Operations, OpAddPermissionlessDelegator, OpTypeStakeOutput) + + require.Equal(3, cntTxType) + require.Equal(1, cntInputMeta) + require.Equal(1, cntOutputMeta) + require.Equal(1, cntMetaType) + + require.Equal(types.CoinSpent, rosettaTransaction.Operations[0].CoinChange.CoinAction) + require.Nil(rosettaTransaction.Operations[1].CoinChange) + require.Nil(rosettaTransaction.Operations[2].CoinChange) + + require.Equal(addPermissionlessDelegatorTx.Ins[0].UTXOID.String(), rosettaTransaction.Operations[0].CoinChange.CoinIdentifier.Identifier) + + require.Equal(int64(0), rosettaTransaction.Operations[0].OperationIdentifier.Index) + require.Equal(int64(1), rosettaTransaction.Operations[1].OperationIdentifier.Index) + require.Equal(int64(2), rosettaTransaction.Operations[2].OperationIdentifier.Index) + + require.Equal(OpAddPermissionlessDelegator, rosettaTransaction.Operations[0].Type) + require.Equal(OpAddPermissionlessDelegator, rosettaTransaction.Operations[1].Type) + require.Equal(OpAddPermissionlessDelegator, rosettaTransaction.Operations[2].Type) + + require.Equal(OpTypeInput, rosettaTransaction.Operations[0].Metadata["type"]) + require.Equal(OpTypeOutput, rosettaTransaction.Operations[1].Metadata["type"]) + require.Equal(OpTypeStakeOutput, rosettaTransaction.Operations[2].Metadata["type"]) +} + func TestMapImportTx(t *testing.T) { require := require.New(t) signedTx, importTx, inputAccounts := buildImport() diff --git a/mapper/pchain/types.go b/mapper/pchain/types.go index 8945d66d..770f02cc 100644 --- a/mapper/pchain/types.go +++ b/mapper/pchain/types.go @@ -87,7 +87,7 @@ type StakingOptions struct { BLSProofOfPossession string `json:"bls_proof_of_possession"` ValidationRewardsOwners []string `json:"reward_addresses"` DelegationRewardsOwners []string `json:"delegator_reward_addresses"` - Start uint64 `json:"start"` // TODO: Remove Post-Durango Activation + Start uint64 `json:"start"` // TODO: Remove Post-Durango End uint64 `json:"end"` Subnet string `json:"subnet"` Shares uint32 `json:"shares"` @@ -122,7 +122,7 @@ type StakingMetadata struct { BLSProofOfPossession string `json:"bls_proof_of_possession"` ValidationRewardsOwners []string `json:"reward_addresses"` DelegationRewardsOwners []string `json:"delegator_reward_addresses"` - Start uint64 `json:"start"` // TODO: Remove Post-Durango Activation + Start uint64 `json:"start"` // TODO: Remove Post-Durango End uint64 `json:"end"` Subnet string `json:"subnet"` Shares uint32 `json:"shares"` From ae5f7ae6a00fdf0f10ce27eeeb8a222c2262e506 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:06:22 -0700 Subject: [PATCH 08/13] default to primary network --- mapper/pchain/tx_builder.go | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/mapper/pchain/tx_builder.go b/mapper/pchain/tx_builder.go index 92f8c067..db9d2846 100644 --- a/mapper/pchain/tx_builder.go +++ b/mapper/pchain/tx_builder.go @@ -7,6 +7,7 @@ import ( "github.com/ava-labs/avalanchego/codec" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils" + "github.com/ava-labs/avalanchego/utils/constants" "github.com/ava-labs/avalanchego/utils/formatting/address" "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/platformvm/signer" @@ -264,12 +265,16 @@ func buildAddPermissionlessValidatorTx( return nil, nil, err } - subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) - if err != nil { - return nil, nil, err - } - if len(subnetBytes) != ids.IDLen { - return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) + subnetID := constants.PrimaryNetworkID + if metadata.Subnet != "" { + subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) + if err != nil { + return nil, nil, err + } + if len(subnetBytes) != ids.IDLen { + return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) + } + subnetID = ids.ID(subnetBytes) } publicKeyBytes, err := mapper.DecodeToBytes(metadata.BLSPublicKey) @@ -338,7 +343,7 @@ func buildAddPermissionlessValidatorTx( End: metadata.End, Wght: weight, }, - Subnet: ids.ID(subnetBytes), + Subnet: subnetID, Signer: pop, StakeOuts: stakeOutputs, ValidatorRewardsOwner: validationRewardsOwner, @@ -386,12 +391,16 @@ func buildAddPermissionlessDelegatorTx( return nil, nil, err } - subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) - if err != nil { - return nil, nil, err - } - if len(subnetBytes) != ids.IDLen { - return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) + subnetID := constants.PrimaryNetworkID + if metadata.Subnet != "" { + subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) + if err != nil { + return nil, nil, err + } + if len(subnetBytes) != ids.IDLen { + return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) + } + subnetID = ids.ID(subnetBytes) } tx := &txs.Tx{Unsigned: &txs.AddPermissionlessDelegatorTx{ @@ -407,7 +416,7 @@ func buildAddPermissionlessDelegatorTx( End: metadata.End, Wght: weight, }, - Subnet: ids.ID(subnetBytes), + Subnet: subnetID, StakeOuts: stakeOutputs, DelegationRewardsOwner: rewardsOwner, }} From a474c92f24667f07b09152402ccb50f62e6baed5 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:37:27 -0700 Subject: [PATCH 09/13] fixes --- mapper/pchain/tx_builder.go | 17 +++++------------ service/backend/pchain/construction.go | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/mapper/pchain/tx_builder.go b/mapper/pchain/tx_builder.go index daa03a0b..2a608590 100644 --- a/mapper/pchain/tx_builder.go +++ b/mapper/pchain/tx_builder.go @@ -8,6 +8,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils" "github.com/ava-labs/avalanchego/utils/constants" + "github.com/ava-labs/avalanchego/utils/formatting" "github.com/ava-labs/avalanchego/utils/formatting/address" "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/avalanchego/vms/platformvm/signer" @@ -272,21 +273,17 @@ func buildAddPermissionlessValidatorTx( subnetID := constants.PrimaryNetworkID if metadata.Subnet != "" { - subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) + subnetID, err = ids.FromString(metadata.Subnet) if err != nil { - return nil, nil, err - } - if len(subnetBytes) != ids.IDLen { return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) } - subnetID = ids.ID(subnetBytes) } - publicKeyBytes, err := mapper.DecodeToBytes(metadata.BLSPublicKey) + publicKeyBytes, err := formatting.Decode(formatting.HexNC, metadata.BLSPublicKey) if err != nil { return nil, nil, err } - popBytes, err := mapper.DecodeToBytes(metadata.BLSProofOfPossession) + popBytes, err := formatting.Decode(formatting.HexNC, metadata.BLSProofOfPossession) if err != nil { return nil, nil, err } @@ -398,14 +395,10 @@ func buildAddPermissionlessDelegatorTx( subnetID := constants.PrimaryNetworkID if metadata.Subnet != "" { - subnetBytes, err := mapper.DecodeToBytes(metadata.Subnet) + subnetID, err = ids.FromString(metadata.Subnet) if err != nil { - return nil, nil, err - } - if len(subnetBytes) != ids.IDLen { return nil, nil, fmt.Errorf("%w: invalid subnet id", errInvalidMetadata) } - subnetID = ids.ID(subnetBytes) } tx := &txs.Tx{Unsigned: &txs.AddPermissionlessDelegatorTx{ diff --git a/service/backend/pchain/construction.go b/service/backend/pchain/construction.go index cfffc91e..fbaba57c 100644 --- a/service/backend/pchain/construction.go +++ b/service/backend/pchain/construction.go @@ -69,7 +69,7 @@ func (b *Backend) ConstructionMetadata( metadata, suggestedFee, err = b.buildImportMetadata(ctx, req.Options) case pmapper.OpExportAvax: metadata, suggestedFee, err = b.buildExportMetadata(ctx, req.Options) - case pmapper.OpAddValidator, pmapper.OpAddDelegator: + case pmapper.OpAddValidator, pmapper.OpAddDelegator, pmapper.OpAddPermissionlessDelegator, pmapper.OpAddPermissionlessValidator: metadata, suggestedFee, err = buildStakingMetadata(req.Options) metadata.Threshold = opMetadata.Threshold metadata.Locktime = opMetadata.Locktime From 48b8725dbff77d4f526a7eee89a6e8f1133d2bf0 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:50:05 -0500 Subject: [PATCH 10/13] address comment --- mapper/pchain/tx_parser.go | 44 ++++++++++++++++++++++++++------------ mapper/pchain/types.go | 10 ++++++--- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/mapper/pchain/tx_parser.go b/mapper/pchain/tx_parser.go index 0d9e95d0..6db789ac 100644 --- a/mapper/pchain/tx_parser.go +++ b/mapper/pchain/tx_parser.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "math/big" + "time" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/formatting/address" @@ -266,7 +267,7 @@ func (t *TxParser) parseAddValidatorTx(txID ids.ID, tx *txs.AddValidatorTx) (*tx if err != nil { return nil, err } - addMetadataToStakeOuts(ops, &tx.Validator) + addValidatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) return ops, nil } @@ -281,7 +282,7 @@ func (t *TxParser) parseAddPermissionlessValidatorTx(txID ids.ID, tx *txs.AddPer if err != nil { return nil, err } - addMetadataToStakeOuts(ops, &tx.Validator) + addValidatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) if tx.Signer != nil { for _, out := range ops.StakeOuts { @@ -302,7 +303,7 @@ func (t *TxParser) parseAddDelegatorTx(txID ids.ID, tx *txs.AddDelegatorTx) (*tx if err != nil { return nil, err } - addMetadataToStakeOuts(ops, &tx.Validator) + addDelegatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) return ops, nil } @@ -317,7 +318,7 @@ func (t *TxParser) parseAddPermissionlessDelegatorTx(txID ids.ID, tx *txs.AddPer if err != nil { return nil, err } - addMetadataToStakeOuts(ops, &tx.Validator) + addDelegatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) return ops, nil } @@ -338,33 +339,48 @@ func (t *TxParser) parseRewardValidatorTx(tx *txs.RewardValidatorTx) (*txOps, er return nil, err } - var v *txs.Validator switch utx := dep.Tx.Unsigned.(type) { case *txs.AddValidatorTx: - v = &utx.Validator + addValidatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) case *txs.AddDelegatorTx: - v = &utx.Validator + addDelegatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) case *txs.AddPermissionlessValidatorTx: - v = &utx.Validator + addValidatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) case *txs.AddPermissionlessDelegatorTx: - v = &utx.Validator + addDelegatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) default: return nil, errUnknownRewardSourceTransaction } - addMetadataToStakeOuts(ops, v) return ops, nil } -func addMetadataToStakeOuts(ops *txOps, validator *txs.Validator) { +func addValidatorMetadataToStakeOuts(ops *txOps, validator txs.ValidatorTx, startTime time.Time) { if validator == nil { return } for _, out := range ops.StakeOuts { - out.Metadata[MetadataValidatorNodeID] = validator.NodeID.String() - out.Metadata[MetadataStakingStartTime] = validator.Start - out.Metadata[MetadataStakingEndTime] = validator.End + out.Metadata[MetadataValidatorNodeID] = validator.NodeID() + out.Metadata[MetadataStakingStartTime] = startTime + out.Metadata[MetadataStakingEndTime] = validator.EndTime() + out.Metadata[MetadataValidatorRewardsOwner] = validator.ValidationRewardsOwner() + out.Metadata[MetadataDelegationRewardsOwner] = validator.DelegationRewardsOwner() + out.Metadata[MetadataSubnetID] = validator.SubnetID() + } +} + +func addDelegatorMetadataToStakeOuts(ops *txOps, delegator txs.DelegatorTx, startTime time.Time) { + if delegator == nil { + return + } + + for _, out := range ops.StakeOuts { + out.Metadata[MetadataValidatorNodeID] = delegator.NodeID() + out.Metadata[MetadataStakingStartTime] = startTime + out.Metadata[MetadataStakingEndTime] = delegator.EndTime() + out.Metadata[MetadataDelegatorRewardsOwner] = delegator.RewardsOwner() + out.Metadata[MetadataSubnetID] = delegator.SubnetID() } } diff --git a/mapper/pchain/types.go b/mapper/pchain/types.go index 770f02cc..3c8c1789 100644 --- a/mapper/pchain/types.go +++ b/mapper/pchain/types.go @@ -37,9 +37,13 @@ const ( MetadataMessage = "message" MetadataSigner = "signer" - MetadataValidatorRewards = "validator_rewards" - MetadataDelegationRewards = "delegation_rewards" - MetadataDelegationFeeRewards = "delegation_fee_rewards" + MetadataValidatorRewards = "validator_rewards" + MetadataValidatorRewardsOwner = "validator_rewards_owner" + MetadataDelegationRewardsOwner = "delegation_rewards_owner" + MetadataDelegatorRewardsOwner = "delegator_rewards_owner" + MetadataDelegationRewards = "delegation_rewards" + MetadataDelegationFeeRewards = "delegation_fee_rewards" + MetadataSubnetID = "subnet_id" SubAccountTypeSharedMemory = "shared_memory" SubAccountTypeUnlocked = "unlocked" From 8f0ae87d49f1f9595ac0ceb7756203e7997d53ed Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:04:54 -0500 Subject: [PATCH 11/13] nits --- mapper/pchain/tx_parser.go | 16 ++++++------ service/backend/pchain/construction_test.go | 29 +++++++++++++++++++++ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/mapper/pchain/tx_parser.go b/mapper/pchain/tx_parser.go index 6db789ac..d2ec3025 100644 --- a/mapper/pchain/tx_parser.go +++ b/mapper/pchain/tx_parser.go @@ -361,12 +361,12 @@ func addValidatorMetadataToStakeOuts(ops *txOps, validator txs.ValidatorTx, star } for _, out := range ops.StakeOuts { - out.Metadata[MetadataValidatorNodeID] = validator.NodeID() - out.Metadata[MetadataStakingStartTime] = startTime - out.Metadata[MetadataStakingEndTime] = validator.EndTime() + out.Metadata[MetadataValidatorNodeID] = validator.NodeID().String() + out.Metadata[MetadataStakingStartTime] = uint64(startTime.Unix()) + out.Metadata[MetadataStakingEndTime] = uint64(validator.EndTime().Unix()) out.Metadata[MetadataValidatorRewardsOwner] = validator.ValidationRewardsOwner() out.Metadata[MetadataDelegationRewardsOwner] = validator.DelegationRewardsOwner() - out.Metadata[MetadataSubnetID] = validator.SubnetID() + out.Metadata[MetadataSubnetID] = validator.SubnetID().String() } } @@ -376,11 +376,11 @@ func addDelegatorMetadataToStakeOuts(ops *txOps, delegator txs.DelegatorTx, star } for _, out := range ops.StakeOuts { - out.Metadata[MetadataValidatorNodeID] = delegator.NodeID() - out.Metadata[MetadataStakingStartTime] = startTime - out.Metadata[MetadataStakingEndTime] = delegator.EndTime() + out.Metadata[MetadataValidatorNodeID] = delegator.NodeID().String() + out.Metadata[MetadataStakingStartTime] = uint64(startTime.Unix()) + out.Metadata[MetadataStakingEndTime] = uint64(delegator.EndTime().Unix()) out.Metadata[MetadataDelegatorRewardsOwner] = delegator.RewardsOwner() - out.Metadata[MetadataSubnetID] = delegator.SubnetID() + out.Metadata[MetadataSubnetID] = delegator.SubnetID().String() } } diff --git a/service/backend/pchain/construction_test.go b/service/backend/pchain/construction_test.go index 62659fb9..ff3abe6d 100644 --- a/service/backend/pchain/construction_test.go +++ b/service/backend/pchain/construction_test.go @@ -10,6 +10,8 @@ import ( "github.com/ava-labs/avalanchego/api/info" "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/utils/formatting/address" + "github.com/ava-labs/avalanchego/vms/secp256k1fx" "github.com/coinbase/rosetta-sdk-go/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -535,6 +537,11 @@ func TestAddValidatorTxConstruction(t *testing.T) { endTime := startTime + 14*86400 shares := uint32(200000) + _, _, stakeRewardAddrBytes, err := address.Parse(stakeRewardAccount.Address) + require.NoError(t, err) + stakeRewardAddrID, err := ids.ToShortID(stakeRewardAddrBytes) + require.NoError(t, err) + operations := []*types.Operation{ { OperationIdentifier: &types.OperationIdentifier{Index: 0}, @@ -566,6 +573,17 @@ func TestAddValidatorTxConstruction(t *testing.T) { "staking_start_time": startTime, "staking_end_time": endTime, "validator_node_id": nodeID, + "subnet_id": pChainID.String(), + "delegation_rewards_owner": &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{stakeRewardAddrID}, + }, + "validator_rewards_owner": &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{stakeRewardAddrID}, + }, }, }, } @@ -770,6 +788,11 @@ func TestAddDelegatorTxConstruction(t *testing.T) { startTime := uint64(1659592163) endTime := startTime + 14*86400 + _, _, stakeRewardAddrBytes, err := address.Parse(stakeRewardAccount.Address) + require.NoError(t, err) + stakeRewardAddrID, err := ids.ToShortID(stakeRewardAddrBytes) + require.NoError(t, err) + operations := []*types.Operation{ { OperationIdentifier: &types.OperationIdentifier{Index: 0}, @@ -801,6 +824,12 @@ func TestAddDelegatorTxConstruction(t *testing.T) { "staking_start_time": startTime, "staking_end_time": endTime, "validator_node_id": nodeID, + "subnet_id": pChainID.String(), + "delegator_rewards_owner": &secp256k1fx.OutputOwners{ + Locktime: 0, + Threshold: 1, + Addrs: []ids.ShortID{stakeRewardAddrID}, + }, }, }, } From 86febe391463706e962b91d6bee4a9c4425644e5 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:11:54 -0500 Subject: [PATCH 12/13] AvalancheGo@v1.11.2 --- Makefile | 2 +- go.mod | 47 +++--- go.sum | 367 +++++++-------------------------------------- service/rosetta.go | 2 +- 4 files changed, 78 insertions(+), 340 deletions(-) diff --git a/Makefile b/Makefile index 5b4d4033..e1cff584 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ DOCKER_ORG ?= avaplatform DOCKER_IMAGE ?= ${DOCKER_ORG}/${PROJECT} DOCKER_LABEL ?= latest DOCKER_TAG ?= ${DOCKER_IMAGE}:${DOCKER_LABEL} -AVALANCHE_VERSION ?= v1.10.19 +AVALANCHE_VERSION ?= v1.11.2 build: export CGO_CFLAGS="-O -D__BLST_PORTABLE__" && go build -o ./rosetta-server ./cmd/server diff --git a/go.mod b/go.mod index da7eb363..6a4981ed 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,14 @@ module github.com/ava-labs/avalanche-rosetta go 1.21 require ( - github.com/ava-labs/avalanchego v1.10.19 - github.com/ava-labs/coreth v0.12.11-rc.2 + github.com/ava-labs/avalanchego v1.11.2 + github.com/ava-labs/coreth v0.13.1-rc.5 github.com/coinbase/rosetta-sdk-go v0.6.5 github.com/ethereum/go-ethereum v1.12.0 github.com/stretchr/testify v1.8.4 go.uber.org/mock v0.4.0 - golang.org/x/crypto v0.17.0 - golang.org/x/sync v0.5.0 + golang.org/x/crypto v0.18.0 + golang.org/x/sync v0.6.0 ) require ( @@ -21,7 +21,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -38,7 +38,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect @@ -49,11 +49,11 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/google/renameio/v2 v2.0.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/rpc v1.2.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect @@ -92,28 +92,27 @@ require ( github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/otel v1.11.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.0 // indirect - go.opentelemetry.io/otel/sdk v1.11.0 // indirect - go.opentelemetry.io/otel/trace v1.11.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/sdk v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.3 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 426fd1fa..5d7880f0 100644 --- a/go.sum +++ b/go.sum @@ -1,36 +1,4 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= @@ -71,13 +39,12 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.10.19 h1:gQkDbbhtJGOFJvsFxL4cryQ+T+FxctAaJ6AJppWPgl8= -github.com/ava-labs/avalanchego v1.10.19/go.mod h1:1z/GGtH/p70ai+KjSdEudNziiQ5yKIC2XTlcDIkD56w= -github.com/ava-labs/coreth v0.12.11-rc.2 h1:roDTUOuTLoku4FYr7icHh2IMkxk2GRAqUocGZCXh2Mw= -github.com/ava-labs/coreth v0.12.11-rc.2/go.mod h1:YEYzy0l/7ig9gKV2P9yxzucnIml1TUa4L8foGQ15KO0= +github.com/ava-labs/avalanchego v1.11.2 h1:8iodZ+RjqpRwHdiXPPtvaNt72qravge7voGzw3yPRzg= +github.com/ava-labs/avalanchego v1.11.2/go.mod h1:oTVnF9idL57J4LM/6RByTmKhI4QvV6OCnF99ysyBljE= +github.com/ava-labs/coreth v0.13.1-rc.5 h1:YcTs9nryZLkf4gPmMyFx1TREFpDTPdg/VCNGGHSF2TY= +github.com/ava-labs/coreth v0.13.1-rc.5/go.mod h1:4y1igTe/sFOIrpAtXoY+AdmfftNHrmrhBBRVfGCAPcw= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -114,8 +81,8 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -132,13 +99,7 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= @@ -199,11 +160,7 @@ github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.24/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= @@ -232,21 +189,17 @@ github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= @@ -274,24 +227,12 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -300,7 +241,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -311,46 +251,29 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -361,15 +284,11 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 h1:kr3j8iIMR4ywO/O0rvksXaJvauGGCMg2zAZIiNZ9uIQ= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0/go.mod h1:ummNFgdgLhhX7aIiy35vVmQNS0rWXknfPE0qe6fmFXg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= @@ -383,7 +302,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= @@ -401,8 +319,6 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= @@ -545,8 +461,6 @@ github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJf github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= @@ -591,6 +505,7 @@ github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUW github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -648,38 +563,30 @@ github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.11.0 h1:kfToEGMDq6TrVrJ9Vht84Y8y9enykSZzDDZglV0kIEk= -go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0 h1:0dly5et1i/6Th3WHn0M6kYiJfFNzhhxanrJ0bOfnjEo= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0/go.mod h1:+Lq4/WkdCkjbGcBMVHHg2apTbv8oMBf29QCnyCCJjNQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0 h1:eyJ6njZmH16h9dOKCi7lMswAnGsSOwgTqWzfxqcuNr8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0/go.mod h1:FnDp7XemjN3oZ3xGunnfOUTVwd2XcvLbtRAuOSU3oc8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0 h1:j2RFV0Qdt38XQ2Jvi4WIsQ56w8T7eSirYbMw19VXRDg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.0/go.mod h1:pILgiTEtrqvZpoiuGdblDgS5dbIaTgDrkIuKfEFkt+A= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.0 h1:v29I/NbVp7LXQYMFZhU6q17D0jSEbYOAVONlrO1oH5s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.0/go.mod h1:/RpLsmbQLDO1XCbWAM4S6TSwj8FKwwgyKKyqtvVfAnw= -go.opentelemetry.io/otel/sdk v1.11.0 h1:ZnKIL9V9Ztaq+ME43IUi/eo22mNsb6a7tGfzaOWB5fo= -go.opentelemetry.io/otel/sdk v1.11.0/go.mod h1:REusa8RsyKaq0OlyangWXaw97t2VogoO4SSEeKkSTAk= -go.opentelemetry.io/otel/trace v1.11.0 h1:20U/Vj42SX+mASlXLmSGBg6jpI1jQtv682lZtTAOVFI= -go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 h1:H2JFgRcGiyHg7H7bwcwaQJYrNFqCqrbTQ8K4p1OvDu8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0/go.mod h1:WfCWp1bGoYK8MeULtI15MmQVczfR+bFkk0DF3h06QmQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= @@ -691,7 +598,6 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -701,41 +607,22 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -747,32 +634,16 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -784,64 +655,39 @@ golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -866,15 +712,13 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -883,9 +727,7 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -895,45 +737,13 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -945,87 +755,27 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.11.0 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E= gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1034,13 +784,11 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1062,7 +810,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1074,12 +821,4 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/service/rosetta.go b/service/rosetta.go index 93558483..e9ce5f2b 100644 --- a/service/rosetta.go +++ b/service/rosetta.go @@ -14,6 +14,6 @@ var NodeVersion = fmt.Sprintf( ) const ( - MiddlewareVersion = "0.1.41" + MiddlewareVersion = "0.1.42" BlockchainName = "Avalanche" ) From 2299db76e5ed2604f4cac988e9c0af7f1fc061b4 Mon Sep 17 00:00:00 2001 From: dhrubabasu <7675102+dhrubabasu@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:58:50 -0500 Subject: [PATCH 13/13] nit --- mapper/pchain/tx_parser.go | 34 +++++++++------ service/backend/pchain/construction_test.go | 46 +++++---------------- 2 files changed, 32 insertions(+), 48 deletions(-) diff --git a/mapper/pchain/tx_parser.go b/mapper/pchain/tx_parser.go index d2ec3025..c8a4edae 100644 --- a/mapper/pchain/tx_parser.go +++ b/mapper/pchain/tx_parser.go @@ -267,7 +267,7 @@ func (t *TxParser) parseAddValidatorTx(txID ids.ID, tx *txs.AddValidatorTx) (*tx if err != nil { return nil, err } - addValidatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) + addValidatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime(), t.cfg.Hrp) return ops, nil } @@ -282,7 +282,7 @@ func (t *TxParser) parseAddPermissionlessValidatorTx(txID ids.ID, tx *txs.AddPer if err != nil { return nil, err } - addValidatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) + addValidatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime(), t.cfg.Hrp) if tx.Signer != nil { for _, out := range ops.StakeOuts { @@ -303,7 +303,7 @@ func (t *TxParser) parseAddDelegatorTx(txID ids.ID, tx *txs.AddDelegatorTx) (*tx if err != nil { return nil, err } - addDelegatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) + addDelegatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime(), t.cfg.Hrp) return ops, nil } @@ -318,7 +318,7 @@ func (t *TxParser) parseAddPermissionlessDelegatorTx(txID ids.ID, tx *txs.AddPer if err != nil { return nil, err } - addDelegatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime()) + addDelegatorMetadataToStakeOuts(ops, tx, tx.Validator.StartTime(), t.cfg.Hrp) return ops, nil } @@ -341,13 +341,13 @@ func (t *TxParser) parseRewardValidatorTx(tx *txs.RewardValidatorTx) (*txOps, er switch utx := dep.Tx.Unsigned.(type) { case *txs.AddValidatorTx: - addValidatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) + addValidatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime(), t.cfg.Hrp) case *txs.AddDelegatorTx: - addDelegatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) + addDelegatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime(), t.cfg.Hrp) case *txs.AddPermissionlessValidatorTx: - addValidatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) + addValidatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime(), t.cfg.Hrp) case *txs.AddPermissionlessDelegatorTx: - addDelegatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime()) + addDelegatorMetadataToStakeOuts(ops, utx, utx.Validator.StartTime(), t.cfg.Hrp) default: return nil, errUnknownRewardSourceTransaction } @@ -355,7 +355,15 @@ func (t *TxParser) parseRewardValidatorTx(tx *txs.RewardValidatorTx) (*txOps, er return ops, nil } -func addValidatorMetadataToStakeOuts(ops *txOps, validator txs.ValidatorTx, startTime time.Time) { +func getAddressArray(owners *secp256k1fx.OutputOwners, hrp string) []string { + addrs := make([]string, len(owners.Addrs)) + for i, addr := range owners.Addresses() { + addrs[i], _ = address.Format("P", hrp, addr) + } + return addrs +} + +func addValidatorMetadataToStakeOuts(ops *txOps, validator txs.ValidatorTx, startTime time.Time, hrp string) { if validator == nil { return } @@ -364,13 +372,13 @@ func addValidatorMetadataToStakeOuts(ops *txOps, validator txs.ValidatorTx, star out.Metadata[MetadataValidatorNodeID] = validator.NodeID().String() out.Metadata[MetadataStakingStartTime] = uint64(startTime.Unix()) out.Metadata[MetadataStakingEndTime] = uint64(validator.EndTime().Unix()) - out.Metadata[MetadataValidatorRewardsOwner] = validator.ValidationRewardsOwner() - out.Metadata[MetadataDelegationRewardsOwner] = validator.DelegationRewardsOwner() + out.Metadata[MetadataValidatorRewardsOwner] = getAddressArray(validator.ValidationRewardsOwner().(*secp256k1fx.OutputOwners), hrp) + out.Metadata[MetadataDelegationRewardsOwner] = getAddressArray(validator.DelegationRewardsOwner().(*secp256k1fx.OutputOwners), hrp) out.Metadata[MetadataSubnetID] = validator.SubnetID().String() } } -func addDelegatorMetadataToStakeOuts(ops *txOps, delegator txs.DelegatorTx, startTime time.Time) { +func addDelegatorMetadataToStakeOuts(ops *txOps, delegator txs.DelegatorTx, startTime time.Time, hrp string) { if delegator == nil { return } @@ -379,7 +387,7 @@ func addDelegatorMetadataToStakeOuts(ops *txOps, delegator txs.DelegatorTx, star out.Metadata[MetadataValidatorNodeID] = delegator.NodeID().String() out.Metadata[MetadataStakingStartTime] = uint64(startTime.Unix()) out.Metadata[MetadataStakingEndTime] = uint64(delegator.EndTime().Unix()) - out.Metadata[MetadataDelegatorRewardsOwner] = delegator.RewardsOwner() + out.Metadata[MetadataDelegatorRewardsOwner] = getAddressArray(delegator.RewardsOwner().(*secp256k1fx.OutputOwners), hrp) out.Metadata[MetadataSubnetID] = delegator.SubnetID().String() } } diff --git a/service/backend/pchain/construction_test.go b/service/backend/pchain/construction_test.go index ff3abe6d..5d5f22bf 100644 --- a/service/backend/pchain/construction_test.go +++ b/service/backend/pchain/construction_test.go @@ -10,8 +10,6 @@ import ( "github.com/ava-labs/avalanchego/api/info" "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/utils/formatting/address" - "github.com/ava-labs/avalanchego/vms/secp256k1fx" "github.com/coinbase/rosetta-sdk-go/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -537,11 +535,6 @@ func TestAddValidatorTxConstruction(t *testing.T) { endTime := startTime + 14*86400 shares := uint32(200000) - _, _, stakeRewardAddrBytes, err := address.Parse(stakeRewardAccount.Address) - require.NoError(t, err) - stakeRewardAddrID, err := ids.ToShortID(stakeRewardAddrBytes) - require.NoError(t, err) - operations := []*types.Operation{ { OperationIdentifier: &types.OperationIdentifier{Index: 0}, @@ -570,20 +563,12 @@ func TestAddValidatorTxConstruction(t *testing.T) { "threshold": 1.0, // the following are ignored by payloads endpoint but generated by parse // added here so that we can simply compare with parse outputs - "staking_start_time": startTime, - "staking_end_time": endTime, - "validator_node_id": nodeID, - "subnet_id": pChainID.String(), - "delegation_rewards_owner": &secp256k1fx.OutputOwners{ - Locktime: 0, - Threshold: 1, - Addrs: []ids.ShortID{stakeRewardAddrID}, - }, - "validator_rewards_owner": &secp256k1fx.OutputOwners{ - Locktime: 0, - Threshold: 1, - Addrs: []ids.ShortID{stakeRewardAddrID}, - }, + "staking_start_time": startTime, + "staking_end_time": endTime, + "validator_node_id": nodeID, + "subnet_id": pChainID.String(), + "delegation_rewards_owner": []string{stakeRewardAccount.Address}, + "validator_rewards_owner": []string{stakeRewardAccount.Address}, }, }, } @@ -788,11 +773,6 @@ func TestAddDelegatorTxConstruction(t *testing.T) { startTime := uint64(1659592163) endTime := startTime + 14*86400 - _, _, stakeRewardAddrBytes, err := address.Parse(stakeRewardAccount.Address) - require.NoError(t, err) - stakeRewardAddrID, err := ids.ToShortID(stakeRewardAddrBytes) - require.NoError(t, err) - operations := []*types.Operation{ { OperationIdentifier: &types.OperationIdentifier{Index: 0}, @@ -821,15 +801,11 @@ func TestAddDelegatorTxConstruction(t *testing.T) { "threshold": 1.0, // the following are ignored by payloads endpoint but generated by parse // added here so that we can simply compare with parse outputs - "staking_start_time": startTime, - "staking_end_time": endTime, - "validator_node_id": nodeID, - "subnet_id": pChainID.String(), - "delegator_rewards_owner": &secp256k1fx.OutputOwners{ - Locktime: 0, - Threshold: 1, - Addrs: []ids.ShortID{stakeRewardAddrID}, - }, + "staking_start_time": startTime, + "staking_end_time": endTime, + "validator_node_id": nodeID, + "subnet_id": pChainID.String(), + "delegator_rewards_owner": []string{stakeRewardAccount.Address}, }, }, }