Allow to pass custom VUB for IR service calls #790
38 changed files with 421 additions and 187 deletions
|
@ -1,6 +1,9 @@
|
||||||
package control
|
package control
|
||||||
|
|
||||||
import "github.com/spf13/cobra"
|
import (
|
||||||
|
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
)
|
||||||
|
|
||||||
var irCmd = &cobra.Command{
|
var irCmd = &cobra.Command{
|
||||||
Use: "ir",
|
Use: "ir",
|
||||||
|
@ -19,3 +22,13 @@ func initControlIRCmd() {
|
||||||
initControlIRHealthCheckCmd()
|
initControlIRHealthCheckCmd()
|
||||||
initControlIRRemoveContainerCmd()
|
initControlIRRemoveContainerCmd()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func printVUB(cmd *cobra.Command, vub uint32) {
|
||||||
|
cmd.Printf("Transaction's valid until block is %d\n", vub)
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseVUB(cmd *cobra.Command) uint32 {
|
||||||
|
vub, err := cmd.Flags().GetUint32(irFlagNameVUB)
|
||||||
|
commonCmd.ExitOnErr(cmd, "invalid valid until block value: %w", err)
|
||||||
|
return vub
|
||||||
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ To check removal status "frostfs-cli container list" command can be used.`,
|
||||||
}
|
}
|
||||||
|
|
||||||
func initControlIRRemoveContainerCmd() {
|
func initControlIRRemoveContainerCmd() {
|
||||||
initControlFlags(removeContainerCmd)
|
initControlIRFlags(removeContainerCmd)
|
||||||
|
|
||||||
flags := removeContainerCmd.Flags()
|
flags := removeContainerCmd.Flags()
|
||||||
flags.String(commonflags.CIDFlag, "", commonflags.CIDFlagUsage)
|
flags.String(commonflags.CIDFlag, "", commonflags.CIDFlagUsage)
|
||||||
|
@ -60,6 +60,7 @@ func removeContainer(cmd *cobra.Command, _ []string) {
|
||||||
} else {
|
} else {
|
||||||
cmd.Println("User containers sheduled to removal")
|
cmd.Println("User containers sheduled to removal")
|
||||||
}
|
}
|
||||||
|
printVUB(cmd, resp.GetBody().GetVub())
|
||||||
}
|
}
|
||||||
|
|
||||||
func prepareRemoveContainerRequest(cmd *cobra.Command) *ircontrol.RemoveContainerRequest {
|
func prepareRemoveContainerRequest(cmd *cobra.Command) *ircontrol.RemoveContainerRequest {
|
||||||
|
@ -90,5 +91,8 @@ func prepareRemoveContainerRequest(cmd *cobra.Command) *ircontrol.RemoveContaine
|
||||||
commonCmd.ExitOnErr(cmd, "invalid container ID: %w", containerID.DecodeString(cidStr))
|
commonCmd.ExitOnErr(cmd, "invalid container ID: %w", containerID.DecodeString(cidStr))
|
||||||
req.Body.ContainerId = containerID[:]
|
req.Body.ContainerId = containerID[:]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req.Body.Vub = parseVUB(cmd)
|
||||||
|
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ var removeNodeCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
func initControlIRRemoveNodeCmd() {
|
func initControlIRRemoveNodeCmd() {
|
||||||
initControlFlags(removeNodeCmd)
|
initControlIRFlags(removeNodeCmd)
|
||||||
|
|
||||||
flags := removeNodeCmd.Flags()
|
flags := removeNodeCmd.Flags()
|
||||||
flags.String("node", "", "Node public key as a hex string")
|
flags.String("node", "", "Node public key as a hex string")
|
||||||
|
@ -41,6 +41,7 @@ func removeNode(cmd *cobra.Command, _ []string) {
|
||||||
req := new(ircontrol.RemoveNodeRequest)
|
req := new(ircontrol.RemoveNodeRequest)
|
||||||
req.SetBody(&ircontrol.RemoveNodeRequest_Body{
|
req.SetBody(&ircontrol.RemoveNodeRequest_Body{
|
||||||
Key: nodeKey,
|
Key: nodeKey,
|
||||||
|
Vub: parseVUB(cmd),
|
||||||
})
|
})
|
||||||
|
|
||||||
commonCmd.ExitOnErr(cmd, "could not sign request: %w", ircontrolsrv.SignMessage(pk, req))
|
commonCmd.ExitOnErr(cmd, "could not sign request: %w", ircontrolsrv.SignMessage(pk, req))
|
||||||
|
@ -55,4 +56,5 @@ func removeNode(cmd *cobra.Command, _ []string) {
|
||||||
verifyResponse(cmd, resp.GetSignature(), resp.GetBody())
|
verifyResponse(cmd, resp.GetSignature(), resp.GetBody())
|
||||||
|
|
||||||
cmd.Println("Node removed")
|
cmd.Println("Node removed")
|
||||||
|
printVUB(cmd, resp.GetBody().GetVub())
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ var tickEpochCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
func initControlIRTickEpochCmd() {
|
func initControlIRTickEpochCmd() {
|
||||||
initControlFlags(tickEpochCmd)
|
initControlIRFlags(tickEpochCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
func tickEpoch(cmd *cobra.Command, _ []string) {
|
func tickEpoch(cmd *cobra.Command, _ []string) {
|
||||||
|
@ -25,7 +25,9 @@ func tickEpoch(cmd *cobra.Command, _ []string) {
|
||||||
c := getClient(cmd, pk)
|
c := getClient(cmd, pk)
|
||||||
|
|
||||||
req := new(ircontrol.TickEpochRequest)
|
req := new(ircontrol.TickEpochRequest)
|
||||||
req.SetBody(new(ircontrol.TickEpochRequest_Body))
|
req.SetBody(&ircontrol.TickEpochRequest_Body{
|
||||||
|
Vub: parseVUB(cmd),
|
||||||
|
})
|
||||||
|
|
||||||
err := ircontrolsrv.SignMessage(pk, req)
|
err := ircontrolsrv.SignMessage(pk, req)
|
||||||
commonCmd.ExitOnErr(cmd, "could not sign request: %w", err)
|
commonCmd.ExitOnErr(cmd, "could not sign request: %w", err)
|
||||||
|
@ -40,4 +42,5 @@ func tickEpoch(cmd *cobra.Command, _ []string) {
|
||||||
verifyResponse(cmd, resp.GetSignature(), resp.GetBody())
|
verifyResponse(cmd, resp.GetSignature(), resp.GetBody())
|
||||||
|
|
||||||
cmd.Println("Epoch tick requested")
|
cmd.Println("Epoch tick requested")
|
||||||
|
printVUB(cmd, resp.GetBody().GetVub())
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,10 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
irFlagNameVUB = "vub"
|
||||||
|
)
|
||||||
|
|
||||||
func initControlFlags(cmd *cobra.Command) {
|
func initControlFlags(cmd *cobra.Command) {
|
||||||
ff := cmd.Flags()
|
ff := cmd.Flags()
|
||||||
ff.StringP(commonflags.WalletPath, commonflags.WalletPathShorthand, commonflags.WalletPathDefault, commonflags.WalletPathUsage)
|
ff.StringP(commonflags.WalletPath, commonflags.WalletPathShorthand, commonflags.WalletPathDefault, commonflags.WalletPathUsage)
|
||||||
|
@ -22,6 +26,13 @@ func initControlFlags(cmd *cobra.Command) {
|
||||||
ff.DurationP(commonflags.Timeout, commonflags.TimeoutShorthand, commonflags.TimeoutDefault, commonflags.TimeoutUsage)
|
ff.DurationP(commonflags.Timeout, commonflags.TimeoutShorthand, commonflags.TimeoutDefault, commonflags.TimeoutUsage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func initControlIRFlags(cmd *cobra.Command) {
|
||||||
|
initControlFlags(cmd)
|
||||||
|
|
||||||
|
ff := cmd.Flags()
|
||||||
|
ff.Uint32(irFlagNameVUB, 0, "Valid until block value for notary transaction")
|
||||||
|
}
|
||||||
|
|
||||||
func signRequest(cmd *cobra.Command, pk *ecdsa.PrivateKey, req controlSvc.SignedMessage) {
|
func signRequest(cmd *cobra.Command, pk *ecdsa.PrivateKey, req controlSvc.SignedMessage) {
|
||||||
err := controlSvc.SignMessage(pk, req)
|
err := controlSvc.SignMessage(pk, req)
|
||||||
commonCmd.ExitOnErr(cmd, "could not sign request: %w", err)
|
commonCmd.ExitOnErr(cmd, "could not sign request: %w", err)
|
||||||
|
|
|
@ -418,7 +418,8 @@ func (c *cfg) updateNetMapState(stateSetter func(*nmClient.UpdatePeerPrm)) error
|
||||||
prm.SetKey(c.key.PublicKey().Bytes())
|
prm.SetKey(c.key.PublicKey().Bytes())
|
||||||
stateSetter(&prm)
|
stateSetter(&prm)
|
||||||
|
|
||||||
return c.cfgNetmap.wrapper.UpdatePeerState(prm)
|
_, err := c.cfgNetmap.wrapper.UpdatePeerState(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
type netInfo struct {
|
type netInfo struct {
|
||||||
|
|
|
@ -246,7 +246,7 @@ type testMorphClient struct {
|
||||||
batchTransferedGas []batchTransferGas
|
batchTransferedGas []batchTransferGas
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *testMorphClient) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) error {
|
func (c *testMorphClient) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) (uint32, error) {
|
||||||
c.invokedMethods = append(c.invokedMethods,
|
c.invokedMethods = append(c.invokedMethods,
|
||||||
invokedMethod{
|
invokedMethod{
|
||||||
contract: contract,
|
contract: contract,
|
||||||
|
@ -254,7 +254,7 @@ func (c *testMorphClient) Invoke(contract util.Uint160, fee fixedn.Fixed8, metho
|
||||||
method: method,
|
method: method,
|
||||||
args: args,
|
args: args,
|
||||||
})
|
})
|
||||||
return nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *testMorphClient) TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error {
|
func (c *testMorphClient) TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error {
|
||||||
|
|
|
@ -30,7 +30,7 @@ func (ap *Processor) processEmit() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// there is no signature collecting, so we don't need extra fee
|
// there is no signature collecting, so we don't need extra fee
|
||||||
err := ap.morphClient.Invoke(contract, 0, emitMethod)
|
_, err := ap.morphClient.Invoke(contract, 0, emitMethod)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ap.log.Warn(logs.AlphabetCantInvokeAlphabetEmitMethod, zap.String("error", err.Error()))
|
ap.log.Warn(logs.AlphabetCantInvokeAlphabetEmitMethod, zap.String("error", err.Error()))
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ type (
|
||||||
}
|
}
|
||||||
|
|
||||||
morphClient interface {
|
morphClient interface {
|
||||||
Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) error
|
Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) (uint32, error)
|
||||||
TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error
|
TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error
|
||||||
BatchTransferGas(receivers []util.Uint160, amount fixedn.Fixed8) error
|
BatchTransferGas(receivers []util.Uint160, amount fixedn.Fixed8) error
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,7 +399,7 @@ func (c *testNetmapClient) NetMap() (*netmap.NetMap, error) {
|
||||||
return c.netmap, nil
|
return c.netmap, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *testNetmapClient) NewEpoch(epoch uint64, force bool) error {
|
func (c *testNetmapClient) NewEpoch(epoch uint64) error {
|
||||||
c.newEpochs = append(c.newEpochs, epoch)
|
c.newEpochs = append(c.newEpochs, epoch)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ func (np *Processor) processNewEpochTick() bool {
|
||||||
nextEpoch := np.epochState.EpochCounter() + 1
|
nextEpoch := np.epochState.EpochCounter() + 1
|
||||||
np.log.Debug(logs.NetmapNextEpoch, zap.Uint64("value", nextEpoch))
|
np.log.Debug(logs.NetmapNextEpoch, zap.Uint64("value", nextEpoch))
|
||||||
|
|
||||||
err := np.netmapClient.NewEpoch(nextEpoch, false)
|
err := np.netmapClient.NewEpoch(nextEpoch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
np.log.Error(logs.NetmapCantInvokeNetmapNewEpoch, zap.Error(err))
|
np.log.Error(logs.NetmapCantInvokeNetmapNewEpoch, zap.Error(err))
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -60,7 +60,7 @@ type (
|
||||||
EpochDuration() (uint64, error)
|
EpochDuration() (uint64, error)
|
||||||
MorphTxHeight(h util.Uint256) (res uint32, err error)
|
MorphTxHeight(h util.Uint256) (res uint32, err error)
|
||||||
NetMap() (*netmap.NetMap, error)
|
NetMap() (*netmap.NetMap, error)
|
||||||
NewEpoch(epoch uint64, force bool) error
|
NewEpoch(epoch uint64) error
|
||||||
MorphIsValidScript(script []byte, signers []transaction.Signer) (valid bool, err error)
|
MorphIsValidScript(script []byte, signers []transaction.Signer) (valid bool, err error)
|
||||||
MorphNotarySignAndInvokeTX(mainTx *transaction.Transaction) error
|
MorphNotarySignAndInvokeTX(mainTx *transaction.Transaction) error
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,11 +19,13 @@ type netmapClientWrapper struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *netmapClientWrapper) UpdatePeerState(p netmapclient.UpdatePeerPrm) error {
|
func (w *netmapClientWrapper) UpdatePeerState(p netmapclient.UpdatePeerPrm) error {
|
||||||
return w.netmapClient.UpdatePeerState(p)
|
_, err := w.netmapClient.UpdatePeerState(p)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *netmapClientWrapper) MorphNotaryInvoke(contract util.Uint160, fee fixedn.Fixed8, nonce uint32, vub *uint32, method string, args ...any) error {
|
func (w *netmapClientWrapper) MorphNotaryInvoke(contract util.Uint160, fee fixedn.Fixed8, nonce uint32, vub *uint32, method string, args ...any) error {
|
||||||
return w.netmapClient.Morph().NotaryInvoke(contract, fee, nonce, vub, method, args...)
|
_, err := w.netmapClient.Morph().NotaryInvoke(contract, fee, nonce, vub, method, args...)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *netmapClientWrapper) ContractAddress() util.Uint160 {
|
func (w *netmapClientWrapper) ContractAddress() util.Uint160 {
|
||||||
|
@ -42,8 +44,8 @@ func (w *netmapClientWrapper) NetMap() (*netmap.NetMap, error) {
|
||||||
return w.netmapClient.NetMap()
|
return w.netmapClient.NetMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *netmapClientWrapper) NewEpoch(epoch uint64, force bool) error {
|
func (w *netmapClientWrapper) NewEpoch(epoch uint64) error {
|
||||||
return w.netmapClient.NewEpoch(epoch, force)
|
return w.netmapClient.NewEpoch(epoch)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *netmapClientWrapper) MorphIsValidScript(script []byte, signers []transaction.Signer) (valid bool, err error) {
|
func (w *netmapClientWrapper) MorphIsValidScript(script []byte, signers []transaction.Signer) (valid bool, err error) {
|
||||||
|
|
|
@ -117,7 +117,7 @@ func (s *Server) voteForSidechainValidator(prm governance.VoteValidatorPrm) erro
|
||||||
)
|
)
|
||||||
|
|
||||||
if prm.Hash != nil {
|
if prm.Hash != nil {
|
||||||
nonce, vub, err = s.morphClient.CalculateNonceAndVUB(*prm.Hash)
|
nonce, vub, err = s.morphClient.CalculateNonceAndVUB(prm.Hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not calculate nonce and `validUntilBlock` values: %w", err)
|
return fmt.Errorf("could not calculate nonce and `validUntilBlock` values: %w", err)
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ func (s *Server) voteForSidechainValidator(prm governance.VoteValidatorPrm) erro
|
||||||
}
|
}
|
||||||
|
|
||||||
s.contracts.alphabet.iterate(func(letter GlagoliticLetter, contract util.Uint160) {
|
s.contracts.alphabet.iterate(func(letter GlagoliticLetter, contract util.Uint160) {
|
||||||
err := s.morphClient.NotaryInvoke(contract, s.feeConfig.SideChainFee(), nonce, vubP, voteMethod, epoch, validators)
|
_, err := s.morphClient.NotaryInvoke(contract, s.feeConfig.SideChainFee(), nonce, vubP, voteMethod, epoch, validators)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.log.Warn(logs.InnerringCantInvokeVoteMethodInAlphabetContract,
|
s.log.Warn(logs.InnerringCantInvokeVoteMethodInAlphabetContract,
|
||||||
zap.Int8("alphabet_index", int8(letter)),
|
zap.Int8("alphabet_index", int8(letter)),
|
||||||
|
|
|
@ -36,5 +36,6 @@ func (c *Client) Burn(p BurnPrm) error {
|
||||||
prm.SetArgs(p.to, p.amount, p.id)
|
prm.SetArgs(p.to, p.amount, p.id)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
return c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,5 +48,6 @@ func (c *Client) Lock(p LockPrm) error {
|
||||||
prm.SetArgs(p.id, p.user, p.lock, p.amount, p.dueEpoch)
|
prm.SetArgs(p.id, p.user, p.lock, p.amount, p.dueEpoch)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
return c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,5 +36,6 @@ func (c *Client) Mint(p MintPrm) error {
|
||||||
prm.SetArgs(p.to, p.amount, p.id)
|
prm.SetArgs(p.to, p.amount, p.id)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
return c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ func (c *Client) TransferX(p TransferPrm) error {
|
||||||
prm.SetArgs(from, to, p.Amount, p.Details)
|
prm.SetArgs(from, to, p.Amount, p.Details)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
err = c.client.Invoke(prm)
|
_, err = c.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", transferXMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", transferXMethod, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,8 +174,9 @@ func wrapFrostFSError(err error) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invoke invokes contract method by sending transaction into blockchain.
|
// Invoke invokes contract method by sending transaction into blockchain.
|
||||||
|
// Returns valid until block value.
|
||||||
// Supported args types: int64, string, util.Uint160, []byte and bool.
|
// Supported args types: int64, string, util.Uint160, []byte and bool.
|
||||||
func (c *Client) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) error {
|
func (c *Client) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) (uint32, error) {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
success := false
|
success := false
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@ -186,12 +187,12 @@ func (c *Client) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string,
|
||||||
defer c.switchLock.RUnlock()
|
defer c.switchLock.RUnlock()
|
||||||
|
|
||||||
if c.inactive {
|
if c.inactive {
|
||||||
return ErrConnectionLost
|
return 0, ErrConnectionLost
|
||||||
}
|
}
|
||||||
|
|
||||||
txHash, vub, err := c.rpcActor.SendTunedCall(contract, method, nil, addFeeCheckerModifier(int64(fee)), args...)
|
txHash, vub, err := c.rpcActor.SendTunedCall(contract, method, nil, addFeeCheckerModifier(int64(fee)), args...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke %s: %w", method, err)
|
return 0, fmt.Errorf("could not invoke %s: %w", method, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
c.logger.Debug(logs.ClientNeoClientInvoke,
|
c.logger.Debug(logs.ClientNeoClientInvoke,
|
||||||
|
@ -200,7 +201,7 @@ func (c *Client) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string,
|
||||||
zap.Stringer("tx_hash", txHash.Reverse()))
|
zap.Stringer("tx_hash", txHash.Reverse()))
|
||||||
|
|
||||||
success = true
|
success = true
|
||||||
return nil
|
return vub, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestInvokeIterator invokes contract method returning an iterator and executes cb on each element.
|
// TestInvokeIterator invokes contract method returning an iterator and executes cb on each element.
|
||||||
|
|
|
@ -26,7 +26,8 @@ func Delete(c *Client, witness core.RemovalWitness) error {
|
||||||
prm.SetToken(tok.Marshal())
|
prm.SetToken(tok.Marshal())
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.Delete(prm)
|
_, err := c.Delete(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeletePrm groups parameters of Delete client operation.
|
// DeletePrm groups parameters of Delete client operation.
|
||||||
|
@ -62,13 +63,13 @@ func (d *DeletePrm) SetKey(key []byte) {
|
||||||
// Delete removes the container from FrostFS system
|
// Delete removes the container from FrostFS system
|
||||||
// through Container contract call.
|
// through Container contract call.
|
||||||
//
|
//
|
||||||
// Returns any error encountered that caused
|
// Returns valid until block and any error encountered that caused
|
||||||
// the removal to interrupt.
|
// the removal to interrupt.
|
||||||
//
|
//
|
||||||
// If TryNotary is provided, calls notary contract.
|
// If TryNotary is provided, calls notary contract.
|
||||||
func (c *Client) Delete(p DeletePrm) error {
|
func (c *Client) Delete(p DeletePrm) (uint32, error) {
|
||||||
if len(p.signature) == 0 && !p.IsControl() {
|
if len(p.signature) == 0 && !p.IsControl() {
|
||||||
return errNilArgument
|
return 0, errNilArgument
|
||||||
}
|
}
|
||||||
|
|
||||||
prm := client.InvokePrm{}
|
prm := client.InvokePrm{}
|
||||||
|
@ -76,9 +77,9 @@ func (c *Client) Delete(p DeletePrm) error {
|
||||||
prm.SetArgs(p.cnr, p.signature, p.key, p.token)
|
prm.SetArgs(p.cnr, p.signature, p.key, p.token)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
err := c.client.Invoke(prm)
|
res, err := c.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", deleteMethod, err)
|
return 0, fmt.Errorf("could not invoke method (%s): %w", deleteMethod, err)
|
||||||
}
|
}
|
||||||
return nil
|
return res.VUB, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ func (c *Client) PutEACL(p PutEACLPrm) error {
|
||||||
prm.SetArgs(p.table, p.sig, p.key, p.token)
|
prm.SetArgs(p.table, p.sig, p.key, p.token)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
err := c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", setEACLMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", setEACLMethod, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ func (c *Client) StartEstimation(p StartEstimationPrm) error {
|
||||||
prm.SetArgs(p.epoch)
|
prm.SetArgs(p.epoch)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
if err := c.client.Invoke(prm); err != nil {
|
if _, err := c.client.Invoke(prm); err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", startEstimationMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", startEstimationMethod, err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -47,7 +47,7 @@ func (c *Client) StopEstimation(p StopEstimationPrm) error {
|
||||||
prm.SetArgs(p.epoch)
|
prm.SetArgs(p.epoch)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
if err := c.client.Invoke(prm); err != nil {
|
if _, err := c.client.Invoke(prm); err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", stopEstimationMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", stopEstimationMethod, err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -41,7 +41,7 @@ func (c *Client) AnnounceLoad(p AnnounceLoadPrm) error {
|
||||||
prm.SetArgs(p.a.Epoch(), binCnr, p.a.Value(), p.key)
|
prm.SetArgs(p.a.Epoch(), binCnr, p.a.Value(), p.key)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
err := c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", putSizeMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", putSizeMethod, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ func (c *Client) Put(p PutPrm) error {
|
||||||
prm.SetMethod(method)
|
prm.SetMethod(method)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
err := c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", method, err)
|
return fmt.Errorf("could not invoke method (%s): %w", method, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ func (x *Client) BindKeys(p BindKeysPrm) error {
|
||||||
prm.SetArgs(p.scriptHash, p.keys)
|
prm.SetArgs(p.scriptHash, p.keys)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
err := x.client.Invoke(prm)
|
_, err := x.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", bindKeysMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", bindKeysMethod, err)
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ func (x *Client) UnbindKeys(args UnbindKeysPrm) error {
|
||||||
prm.SetArgs(args.scriptHash, args.keys)
|
prm.SetArgs(args.scriptHash, args.keys)
|
||||||
prm.InvokePrmOptional = args.InvokePrmOptional
|
prm.InvokePrmOptional = args.InvokePrmOptional
|
||||||
|
|
||||||
err := x.client.Invoke(prm)
|
_, err := x.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", unbindKeysMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", unbindKeysMethod, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,8 @@ func (x *Client) Cheque(p ChequePrm) error {
|
||||||
prm.SetArgs(p.id, p.user, p.amount, p.lock)
|
prm.SetArgs(p.id, p.user, p.amount, p.lock)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
return x.client.Invoke(prm)
|
_, err := x.client.Invoke(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// AlphabetUpdatePrm groups parameters of AlphabetUpdate operation.
|
// AlphabetUpdatePrm groups parameters of AlphabetUpdate operation.
|
||||||
|
@ -71,5 +72,6 @@ func (x *Client) AlphabetUpdate(p AlphabetUpdatePrm) error {
|
||||||
prm.SetArgs(p.id, p.pubs)
|
prm.SetArgs(p.id, p.pubs)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
return x.client.Invoke(prm)
|
_, err := x.client.Invoke(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ func (x *Client) AddKeys(p CommonBindPrm) error {
|
||||||
prm.SetArgs(p.ownerID, p.keys)
|
prm.SetArgs(p.ownerID, p.keys)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
err := x.client.Invoke(prm)
|
_, err := x.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", addKeysMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", addKeysMethod, err)
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ func (x *Client) RemoveKeys(args CommonBindPrm) error {
|
||||||
prm.SetArgs(args.ownerID, args.keys)
|
prm.SetArgs(args.ownerID, args.keys)
|
||||||
prm.InvokePrmOptional = args.InvokePrmOptional
|
prm.InvokePrmOptional = args.InvokePrmOptional
|
||||||
|
|
||||||
err := x.client.Invoke(prm)
|
_, err := x.client.Invoke(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", removeKeysMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", removeKeysMethod, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,8 @@ func (c *Client) SetConfig(p SetConfigPrm) error {
|
||||||
prm.SetArgs(p.id, p.key, p.value)
|
prm.SetArgs(p.id, p.key, p.value)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
return c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// RawNetworkParameter is a FrostFS network parameter which is transmitted but
|
// RawNetworkParameter is a FrostFS network parameter which is transmitted but
|
||||||
|
|
|
@ -34,7 +34,8 @@ func (c *Client) UpdateInnerRing(p UpdateIRPrm) error {
|
||||||
prm.SetArgs(args)
|
prm.SetArgs(args)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
return c.client.Invoke(prm)
|
_, err := c.client.Invoke(prm)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetInnerRingList return current IR list.
|
// GetInnerRingList return current IR list.
|
||||||
|
|
|
@ -8,17 +8,32 @@ import (
|
||||||
|
|
||||||
// NewEpoch updates FrostFS epoch number through
|
// NewEpoch updates FrostFS epoch number through
|
||||||
// Netmap contract call.
|
// Netmap contract call.
|
||||||
// If `force` is true, this call is normally initiated by a control
|
func (c *Client) NewEpoch(epoch uint64) error {
|
||||||
// service command and uses a control notary transaction internally
|
|
||||||
// to ensure all nodes produce the same transaction with high probability.
|
|
||||||
func (c *Client) NewEpoch(epoch uint64, force bool) error {
|
|
||||||
prm := client.InvokePrm{}
|
prm := client.InvokePrm{}
|
||||||
prm.SetMethod(newEpochMethod)
|
prm.SetMethod(newEpochMethod)
|
||||||
prm.SetArgs(epoch)
|
prm.SetArgs(epoch)
|
||||||
prm.SetControlTX(force)
|
|
||||||
|
|
||||||
if err := c.client.Invoke(prm); err != nil {
|
_, err := c.client.Invoke(prm)
|
||||||
|
if err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", newEpochMethod, err)
|
return fmt.Errorf("could not invoke method (%s): %w", newEpochMethod, err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewEpochControl updates FrostFS epoch number through
|
||||||
|
// control notary transaction internally to ensure all
|
||||||
|
// nodes produce the same transaction with high probability.
|
||||||
|
// If vub > 0, vub will be used as valid until block value.
|
||||||
|
func (c *Client) NewEpochControl(epoch uint64, vub uint32) (uint32, error) {
|
||||||
|
prm := client.InvokePrm{}
|
||||||
|
prm.SetMethod(newEpochMethod)
|
||||||
|
prm.SetArgs(epoch)
|
||||||
|
prm.SetControlTX(true)
|
||||||
|
prm.SetVUB(vub)
|
||||||
|
|
||||||
|
res, err := c.client.Invoke(prm)
|
||||||
|
if err != nil {
|
||||||
|
return 0, fmt.Errorf("could not invoke method (%s): %w", newEpochMethod, err)
|
||||||
|
}
|
||||||
|
return res.VUB, nil
|
||||||
|
}
|
||||||
|
|
|
@ -36,24 +36,27 @@ func (c *Client) AddPeer(p AddPeerPrm) error {
|
||||||
prm.SetArgs(p.nodeInfo.Marshal())
|
prm.SetArgs(p.nodeInfo.Marshal())
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
if err := c.client.Invoke(prm); err != nil {
|
if _, err := c.client.Invoke(prm); err != nil {
|
||||||
return fmt.Errorf("could not invoke method (%s): %w", method, err)
|
return fmt.Errorf("could not invoke method (%s): %w", method, err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ForceRemovePeer marks the given peer as offline via a notary control transaction.
|
// ForceRemovePeer marks the given peer as offline via a notary control transaction.
|
||||||
func (c *Client) ForceRemovePeer(nodeInfo netmap.NodeInfo) error {
|
// If vub > 0, vub will be used as valid until block value.
|
||||||
|
func (c *Client) ForceRemovePeer(nodeInfo netmap.NodeInfo, vub uint32) (uint32, error) {
|
||||||
if !c.client.WithNotary() {
|
if !c.client.WithNotary() {
|
||||||
return fmt.Errorf("peer can be forcefully removed only in notary environment")
|
return 0, fmt.Errorf("peer can be forcefully removed only in notary environment")
|
||||||
}
|
}
|
||||||
|
|
||||||
prm := UpdatePeerPrm{}
|
prm := UpdatePeerPrm{}
|
||||||
prm.SetKey(nodeInfo.PublicKey())
|
prm.SetKey(nodeInfo.PublicKey())
|
||||||
prm.SetControlTX(true)
|
prm.SetControlTX(true)
|
||||||
|
prm.SetVUB(vub)
|
||||||
|
|
||||||
if err := c.UpdatePeerState(prm); err != nil {
|
vub, err := c.UpdatePeerState(prm)
|
||||||
return fmt.Errorf("updating peer state: %v", err)
|
if err != nil {
|
||||||
|
return 0, fmt.Errorf("updating peer state: %v", err)
|
||||||
}
|
}
|
||||||
return nil
|
return vub, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ func (u *UpdatePeerPrm) SetMaintenance() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdatePeerState changes peer status through Netmap contract call.
|
// UpdatePeerState changes peer status through Netmap contract call.
|
||||||
func (c *Client) UpdatePeerState(p UpdatePeerPrm) error {
|
func (c *Client) UpdatePeerState(p UpdatePeerPrm) (uint32, error) {
|
||||||
method := updateStateMethod
|
method := updateStateMethod
|
||||||
|
|
||||||
if c.client.WithNotary() && c.client.IsAlpha() {
|
if c.client.WithNotary() && c.client.IsAlpha() {
|
||||||
|
@ -55,8 +55,9 @@ func (c *Client) UpdatePeerState(p UpdatePeerPrm) error {
|
||||||
prm.SetArgs(int64(p.state), p.key)
|
prm.SetArgs(int64(p.state), p.key)
|
||||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||||
|
|
||||||
if err := c.client.Invoke(prm); err != nil {
|
res, err := c.client.Invoke(prm)
|
||||||
return fmt.Errorf("could not invoke smart contract: %w", err)
|
if err != nil {
|
||||||
|
return 0, fmt.Errorf("could not invoke smart contract: %w", err)
|
||||||
}
|
}
|
||||||
return nil
|
return res.VUB, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,7 +289,7 @@ func (c *Client) UpdateNotaryList(prm UpdateNotaryListPrm) error {
|
||||||
panic(notaryNotEnabledPanicMsg)
|
panic(notaryNotEnabledPanicMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
nonce, vub, err := c.CalculateNonceAndVUB(prm.hash)
|
nonce, vub, err := c.CalculateNonceAndVUB(&prm.hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not calculate nonce and `valicUntilBlock` values: %w", err)
|
return fmt.Errorf("could not calculate nonce and `valicUntilBlock` values: %w", err)
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ func (c *Client) UpdateNeoFSAlphabetList(prm UpdateAlphabetListPrm) error {
|
||||||
panic(notaryNotEnabledPanicMsg)
|
panic(notaryNotEnabledPanicMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
nonce, vub, err := c.CalculateNonceAndVUB(prm.hash)
|
nonce, vub, err := c.CalculateNonceAndVUB(&prm.hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not calculate nonce and `valicUntilBlock` values: %w", err)
|
return fmt.Errorf("could not calculate nonce and `valicUntilBlock` values: %w", err)
|
||||||
}
|
}
|
||||||
|
@ -355,13 +355,15 @@ func (c *Client) UpdateNeoFSAlphabetList(prm UpdateAlphabetListPrm) error {
|
||||||
// blockchain. Fallback tx is a `RET`. If Notary support is not enabled
|
// blockchain. Fallback tx is a `RET`. If Notary support is not enabled
|
||||||
// it fallbacks to a simple `Invoke()`.
|
// it fallbacks to a simple `Invoke()`.
|
||||||
//
|
//
|
||||||
|
// Returns valid until block value.
|
||||||
|
//
|
||||||
// `nonce` and `vub` are used only if notary is enabled.
|
// `nonce` and `vub` are used only if notary is enabled.
|
||||||
func (c *Client) NotaryInvoke(contract util.Uint160, fee fixedn.Fixed8, nonce uint32, vub *uint32, method string, args ...any) error {
|
func (c *Client) NotaryInvoke(contract util.Uint160, fee fixedn.Fixed8, nonce uint32, vub *uint32, method string, args ...any) (uint32, error) {
|
||||||
c.switchLock.RLock()
|
c.switchLock.RLock()
|
||||||
defer c.switchLock.RUnlock()
|
defer c.switchLock.RUnlock()
|
||||||
|
|
||||||
if c.inactive {
|
if c.inactive {
|
||||||
return ErrConnectionLost
|
return 0, ErrConnectionLost
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.notary == nil {
|
if c.notary == nil {
|
||||||
|
@ -376,19 +378,19 @@ func (c *Client) NotaryInvoke(contract util.Uint160, fee fixedn.Fixed8, nonce ui
|
||||||
// not expected to be signed by the current node.
|
// not expected to be signed by the current node.
|
||||||
//
|
//
|
||||||
// Considered to be used by non-IR nodes.
|
// Considered to be used by non-IR nodes.
|
||||||
func (c *Client) NotaryInvokeNotAlpha(contract util.Uint160, fee fixedn.Fixed8, method string, args ...any) error {
|
func (c *Client) NotaryInvokeNotAlpha(contract util.Uint160, fee fixedn.Fixed8, vubP *uint32, method string, args ...any) (uint32, error) {
|
||||||
c.switchLock.RLock()
|
c.switchLock.RLock()
|
||||||
defer c.switchLock.RUnlock()
|
defer c.switchLock.RUnlock()
|
||||||
|
|
||||||
if c.inactive {
|
if c.inactive {
|
||||||
return ErrConnectionLost
|
return 0, ErrConnectionLost
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.notary == nil {
|
if c.notary == nil {
|
||||||
return c.Invoke(contract, fee, method, args...)
|
return c.Invoke(contract, fee, method, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.notaryInvoke(false, false, contract, rand.Uint32(), nil, method, args...)
|
return c.notaryInvoke(false, false, contract, rand.Uint32(), vubP, method, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotarySignAndInvokeTX signs and sends notary request that was received from
|
// NotarySignAndInvokeTX signs and sends notary request that was received from
|
||||||
|
@ -440,10 +442,11 @@ func (c *Client) NotarySignAndInvokeTX(mainTx *transaction.Transaction) error {
|
||||||
|
|
||||||
func (c *Client) notaryInvokeAsCommittee(method string, nonce, vub uint32, args ...any) error {
|
func (c *Client) notaryInvokeAsCommittee(method string, nonce, vub uint32, args ...any) error {
|
||||||
designate := c.GetDesignateHash()
|
designate := c.GetDesignateHash()
|
||||||
return c.notaryInvoke(true, true, designate, nonce, &vub, method, args...)
|
_, err := c.notaryInvoke(true, true, designate, nonce, &vub, method, args...)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint160, nonce uint32, vub *uint32, method string, args ...any) error {
|
func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint160, nonce uint32, vub *uint32, method string, args ...any) (uint32, error) {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
success := false
|
success := false
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@ -452,22 +455,22 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
|
||||||
|
|
||||||
alphabetList, err := c.notary.alphabetSource()
|
alphabetList, err := c.notary.alphabetSource()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
until, err := c.getUntilValue(vub)
|
until, err := c.getUntilValue(vub)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
cosigners, err := c.notaryCosigners(invokedByAlpha, alphabetList, committee)
|
cosigners, err := c.notaryCosigners(invokedByAlpha, alphabetList, committee)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
nAct, err := notary.NewActor(c.client, cosigners, c.acc)
|
nAct, err := notary.NewActor(c.client, cosigners, c.acc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
mainH, fbH, untilActual, err := nAct.Notarize(nAct.MakeTunedCall(contract, method, nil, func(r *result.Invoke, t *transaction.Transaction) error {
|
mainH, fbH, untilActual, err := nAct.Notarize(nAct.MakeTunedCall(contract, method, nil, func(r *result.Invoke, t *transaction.Transaction) error {
|
||||||
|
@ -482,7 +485,7 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
|
||||||
}, args...))
|
}, args...))
|
||||||
|
|
||||||
if err != nil && !alreadyOnChainError(err) {
|
if err != nil && !alreadyOnChainError(err) {
|
||||||
return err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
c.logger.Debug(logs.ClientNotaryRequestInvoked,
|
c.logger.Debug(logs.ClientNotaryRequestInvoked,
|
||||||
|
@ -492,7 +495,7 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
|
||||||
zap.String("fallback_hash", fbH.StringLE()))
|
zap.String("fallback_hash", fbH.StringLE()))
|
||||||
|
|
||||||
success = true
|
success = true
|
||||||
return nil
|
return until, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) notaryCosignersFromTx(mainTx *transaction.Transaction, alphabetList keys.PublicKeys) ([]actor.SignerAccount, error) {
|
func (c *Client) notaryCosignersFromTx(mainTx *transaction.Transaction, alphabetList keys.PublicKeys) ([]actor.SignerAccount, error) {
|
||||||
|
@ -760,17 +763,19 @@ func CalculateNotaryDepositAmount(c *Client, gasMul, gasDiv int64) (fixedn.Fixed
|
||||||
|
|
||||||
// CalculateNonceAndVUB calculates nonce and ValidUntilBlock values
|
// CalculateNonceAndVUB calculates nonce and ValidUntilBlock values
|
||||||
// based on transaction hash.
|
// based on transaction hash.
|
||||||
func (c *Client) CalculateNonceAndVUB(hash util.Uint256) (nonce uint32, vub uint32, err error) {
|
func (c *Client) CalculateNonceAndVUB(hash *util.Uint256) (nonce uint32, vub uint32, err error) {
|
||||||
return c.calculateNonceAndVUB(hash, false)
|
return c.calculateNonceAndVUB(hash, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CalculateNonceAndVUBControl calculates nonce and rounded ValidUntilBlock values
|
// CalculateNonceAndVUBControl calculates nonce and rounded ValidUntilBlock values
|
||||||
// based on transaction hash for use in control transactions.
|
// based on transaction hash for use in control transactions.
|
||||||
func (c *Client) CalculateNonceAndVUBControl(hash util.Uint256) (nonce uint32, vub uint32, err error) {
|
func (c *Client) CalculateNonceAndVUBControl(hash *util.Uint256) (nonce uint32, vub uint32, err error) {
|
||||||
return c.calculateNonceAndVUB(hash, true)
|
return c.calculateNonceAndVUB(hash, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) calculateNonceAndVUB(hash util.Uint256, roundBlockHeight bool) (nonce uint32, vub uint32, err error) {
|
// If hash specified, transaction's height and hash are used to compute VUB and nonce.
|
||||||
|
// If not, then current block height used to compute VUB and nonce.
|
||||||
|
func (c *Client) calculateNonceAndVUB(hash *util.Uint256, roundBlockHeight bool) (nonce uint32, vub uint32, err error) {
|
||||||
c.switchLock.RLock()
|
c.switchLock.RLock()
|
||||||
defer c.switchLock.RUnlock()
|
defer c.switchLock.RUnlock()
|
||||||
|
|
||||||
|
@ -782,12 +787,19 @@ func (c *Client) calculateNonceAndVUB(hash util.Uint256, roundBlockHeight bool)
|
||||||
return 0, 0, nil
|
return 0, 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
nonce = binary.LittleEndian.Uint32(hash.BytesLE())
|
var height uint32
|
||||||
|
|
||||||
height, err := c.getTransactionHeight(hash)
|
if hash != nil {
|
||||||
|
height, err = c.getTransactionHeight(*hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, 0, fmt.Errorf("could not get transaction height: %w", err)
|
return 0, 0, fmt.Errorf("could not get transaction height: %w", err)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
height, err = c.rpcActor.GetBlockCount()
|
||||||
|
if err != nil {
|
||||||
|
return 0, 0, fmt.Errorf("could not get chain height: %w", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// For control transactions, we round down the block height to control the
|
// For control transactions, we round down the block height to control the
|
||||||
// probability of all nodes producing the same transaction, since it depends
|
// probability of all nodes producing the same transaction, since it depends
|
||||||
|
@ -797,7 +809,10 @@ func (c *Client) calculateNonceAndVUB(hash util.Uint256, roundBlockHeight bool)
|
||||||
height = height / inc * inc
|
height = height / inc * inc
|
||||||
}
|
}
|
||||||
|
|
||||||
return nonce, height + c.notary.txValidTime, nil
|
if hash != nil {
|
||||||
|
return binary.LittleEndian.Uint32(hash.BytesLE()), height + c.notary.txValidTime, nil
|
||||||
|
}
|
||||||
|
return height + c.notary.txValidTime, height + c.notary.txValidTime, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) getTransactionHeight(h util.Uint256) (uint32, error) {
|
func (c *Client) getTransactionHeight(h util.Uint256) (uint32, error) {
|
||||||
|
|
|
@ -100,6 +100,8 @@ type InvokePrmOptional struct {
|
||||||
// It's only used by notary transactions and it affects only the
|
// It's only used by notary transactions and it affects only the
|
||||||
// computation of `validUntilBlock` values.
|
// computation of `validUntilBlock` values.
|
||||||
controlTX bool
|
controlTX bool
|
||||||
|
// vub is used to set custom valid until block value.
|
||||||
|
vub uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHash sets optional hash of the transaction.
|
// SetHash sets optional hash of the transaction.
|
||||||
|
@ -120,6 +122,15 @@ func (i *InvokePrmOptional) IsControl() bool {
|
||||||
return i.controlTX
|
return i.controlTX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetVUB sets valid until block value.
|
||||||
|
func (i *InvokePrmOptional) SetVUB(v uint32) {
|
||||||
|
i.vub = v
|
||||||
|
}
|
||||||
|
|
||||||
|
type InvokeRes struct {
|
||||||
|
VUB uint32
|
||||||
|
}
|
||||||
|
|
||||||
// Invoke calls Invoke method of Client with static internal script hash and fee.
|
// Invoke calls Invoke method of Client with static internal script hash and fee.
|
||||||
// Supported args types are the same as in Client.
|
// Supported args types are the same as in Client.
|
||||||
//
|
//
|
||||||
|
@ -129,41 +140,54 @@ func (i *InvokePrmOptional) IsControl() bool {
|
||||||
//
|
//
|
||||||
// If fee for the operation executed using specified method is customized, then StaticClient uses it.
|
// If fee for the operation executed using specified method is customized, then StaticClient uses it.
|
||||||
// Otherwise, default fee is used.
|
// Otherwise, default fee is used.
|
||||||
func (s StaticClient) Invoke(prm InvokePrm) error {
|
func (s StaticClient) Invoke(prm InvokePrm) (InvokeRes, error) {
|
||||||
|
var res InvokeRes
|
||||||
|
var err error
|
||||||
|
var vubP *uint32
|
||||||
if s.tryNotary {
|
if s.tryNotary {
|
||||||
if s.alpha {
|
if s.alpha {
|
||||||
var (
|
var (
|
||||||
nonce uint32 = 1
|
nonce uint32 = 1
|
||||||
vubP *uint32
|
|
||||||
vub uint32
|
vub uint32
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
if prm.hash != nil {
|
if prm.hash != nil {
|
||||||
if prm.controlTX {
|
if prm.controlTX {
|
||||||
nonce, vub, err = s.client.CalculateNonceAndVUBControl(*prm.hash)
|
nonce, vub, err = s.client.CalculateNonceAndVUBControl(prm.hash)
|
||||||
} else {
|
} else {
|
||||||
nonce, vub, err = s.client.CalculateNonceAndVUB(*prm.hash)
|
nonce, vub, err = s.client.CalculateNonceAndVUB(prm.hash)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not calculate nonce and VUB for notary alphabet invoke: %w", err)
|
return InvokeRes{}, fmt.Errorf("could not calculate nonce and VUB for notary alphabet invoke: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
vubP = &vub
|
vubP = &vub
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.client.NotaryInvoke(s.scScriptHash, s.fee, nonce, vubP, prm.method, prm.args...)
|
if prm.vub > 0 {
|
||||||
|
vubP = &prm.vub
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.client.NotaryInvokeNotAlpha(s.scScriptHash, s.fee, prm.method, prm.args...)
|
res.VUB, err = s.client.NotaryInvoke(s.scScriptHash, s.fee, nonce, vubP, prm.method, prm.args...)
|
||||||
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.client.Invoke(
|
if prm.vub > 0 {
|
||||||
|
vubP = &prm.vub
|
||||||
|
}
|
||||||
|
|
||||||
|
res.VUB, err = s.client.NotaryInvokeNotAlpha(s.scScriptHash, s.fee, vubP, prm.method, prm.args...)
|
||||||
|
return res, err
|
||||||
|
}
|
||||||
|
|
||||||
|
res.VUB, err = s.client.Invoke(
|
||||||
s.scScriptHash,
|
s.scScriptHash,
|
||||||
s.fee,
|
s.fee,
|
||||||
prm.method,
|
prm.method,
|
||||||
prm.args...,
|
prm.args...,
|
||||||
)
|
)
|
||||||
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestInvokePrm groups parameters of the TestInvoke operation.
|
// TestInvokePrm groups parameters of the TestInvoke operation.
|
||||||
|
|
|
@ -53,9 +53,11 @@ func (s *Server) TickEpoch(_ context.Context, req *control.TickEpochRequest) (*c
|
||||||
return nil, fmt.Errorf("getting current epoch: %w", err)
|
return nil, fmt.Errorf("getting current epoch: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.netmapClient.NewEpoch(epoch+1, true); err != nil {
|
vub, err := s.netmapClient.NewEpochControl(epoch+1, req.GetBody().GetVub())
|
||||||
|
if err != nil {
|
||||||
return nil, fmt.Errorf("forcing new epoch: %w", err)
|
return nil, fmt.Errorf("forcing new epoch: %w", err)
|
||||||
}
|
}
|
||||||
|
resp.Body.Vub = vub
|
||||||
|
|
||||||
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
|
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
@ -93,9 +95,11 @@ func (s *Server) RemoveNode(_ context.Context, req *control.RemoveNodeRequest) (
|
||||||
return nil, status.Error(codes.FailedPrecondition, "node is already offline")
|
return nil, status.Error(codes.FailedPrecondition, "node is already offline")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.netmapClient.ForceRemovePeer(nodeInfo); err != nil {
|
vub, err := s.netmapClient.ForceRemovePeer(nodeInfo, req.GetBody().GetVub())
|
||||||
|
if err != nil {
|
||||||
return nil, fmt.Errorf("forcing node removal: %w", err)
|
return nil, fmt.Errorf("forcing node removal: %w", err)
|
||||||
}
|
}
|
||||||
|
resp.Body.Vub = vub
|
||||||
|
|
||||||
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
|
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
@ -113,13 +117,15 @@ func (s *Server) RemoveContainer(_ context.Context, req *control.RemoveContainer
|
||||||
if len(req.Body.GetContainerId()) > 0 && len(req.Body.GetOwner()) > 0 {
|
if len(req.Body.GetContainerId()) > 0 && len(req.Body.GetOwner()) > 0 {
|
||||||
return nil, status.Error(codes.InvalidArgument, "specify the owner and container at the same time is not allowed")
|
return nil, status.Error(codes.InvalidArgument, "specify the owner and container at the same time is not allowed")
|
||||||
}
|
}
|
||||||
|
var vub uint32
|
||||||
if len(req.Body.GetContainerId()) > 0 {
|
if len(req.Body.GetContainerId()) > 0 {
|
||||||
var containerID cid.ID
|
var containerID cid.ID
|
||||||
if err := containerID.Decode(req.Body.GetContainerId()); err != nil {
|
if err := containerID.Decode(req.Body.GetContainerId()); err != nil {
|
||||||
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to parse container ID: %s", err.Error()))
|
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to parse container ID: %s", err.Error()))
|
||||||
}
|
}
|
||||||
if err := s.removeContainer(containerID); err != nil {
|
var err error
|
||||||
|
vub, err = s.removeContainer(containerID, req.GetBody().GetVub())
|
||||||
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -138,14 +144,17 @@ func (s *Server) RemoveContainer(_ context.Context, req *control.RemoveContainer
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, containerID := range cids {
|
for _, containerID := range cids {
|
||||||
if err := s.removeContainer(containerID); err != nil {
|
vub, err = s.removeContainer(containerID, req.GetBody().GetVub())
|
||||||
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resp := &control.RemoveContainerResponse{
|
resp := &control.RemoveContainerResponse{
|
||||||
Body: &control.RemoveContainerResponse_Body{},
|
Body: &control.RemoveContainerResponse_Body{
|
||||||
|
Vub: vub,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
|
if err := SignMessage(&s.prm.key.PrivateKey, resp); err != nil {
|
||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
|
@ -153,13 +162,15 @@ func (s *Server) RemoveContainer(_ context.Context, req *control.RemoveContainer
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) removeContainer(containerID cid.ID) error {
|
func (s *Server) removeContainer(containerID cid.ID, vub uint32) (uint32, error) {
|
||||||
var prm container.DeletePrm
|
var prm container.DeletePrm
|
||||||
prm.SetCID(containerID[:])
|
prm.SetCID(containerID[:])
|
||||||
prm.SetControlTX(true)
|
prm.SetControlTX(true)
|
||||||
|
prm.SetVUB(vub)
|
||||||
|
|
||||||
if err := s.containerClient.Delete(prm); err != nil {
|
vub, err := s.containerClient.Delete(prm)
|
||||||
return fmt.Errorf("forcing container removal: %w", err)
|
if err != nil {
|
||||||
|
return 0, fmt.Errorf("forcing container removal: %w", err)
|
||||||
}
|
}
|
||||||
return nil
|
return vub, nil
|
||||||
}
|
}
|
||||||
|
|
219
pkg/services/control/ir/service.pb.go
generated
219
pkg/services/control/ir/service.pb.go
generated
|
@ -560,6 +560,9 @@ type TickEpochRequest_Body struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Valid until block value override.
|
||||||
|
Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TickEpochRequest_Body) Reset() {
|
func (x *TickEpochRequest_Body) Reset() {
|
||||||
|
@ -594,10 +597,20 @@ func (*TickEpochRequest_Body) Descriptor() ([]byte, []int) {
|
||||||
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{2, 0}
|
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{2, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *TickEpochRequest_Body) GetVub() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Vub
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type TickEpochResponse_Body struct {
|
type TickEpochResponse_Body struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Valid until block value for transaction.
|
||||||
|
Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TickEpochResponse_Body) Reset() {
|
func (x *TickEpochResponse_Body) Reset() {
|
||||||
|
@ -632,12 +645,21 @@ func (*TickEpochResponse_Body) Descriptor() ([]byte, []int) {
|
||||||
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{3, 0}
|
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{3, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *TickEpochResponse_Body) GetVub() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Vub
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type RemoveNodeRequest_Body struct {
|
type RemoveNodeRequest_Body struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
|
// Valid until block value override.
|
||||||
|
Vub uint32 `protobuf:"varint,2,opt,name=vub,proto3" json:"vub,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveNodeRequest_Body) Reset() {
|
func (x *RemoveNodeRequest_Body) Reset() {
|
||||||
|
@ -679,10 +701,20 @@ func (x *RemoveNodeRequest_Body) GetKey() []byte {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *RemoveNodeRequest_Body) GetVub() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Vub
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type RemoveNodeResponse_Body struct {
|
type RemoveNodeResponse_Body struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Valid until block value for transaction.
|
||||||
|
Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveNodeResponse_Body) Reset() {
|
func (x *RemoveNodeResponse_Body) Reset() {
|
||||||
|
@ -717,6 +749,13 @@ func (*RemoveNodeResponse_Body) Descriptor() ([]byte, []int) {
|
||||||
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{5, 0}
|
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{5, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *RemoveNodeResponse_Body) GetVub() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Vub
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type RemoveContainerRequest_Body struct {
|
type RemoveContainerRequest_Body struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -724,6 +763,8 @@ type RemoveContainerRequest_Body struct {
|
||||||
|
|
||||||
ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
ContainerId []byte `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
||||||
Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
|
Owner []byte `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
|
||||||
|
// Valid until block value override.
|
||||||
|
Vub uint32 `protobuf:"varint,3,opt,name=vub,proto3" json:"vub,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveContainerRequest_Body) Reset() {
|
func (x *RemoveContainerRequest_Body) Reset() {
|
||||||
|
@ -772,10 +813,20 @@ func (x *RemoveContainerRequest_Body) GetOwner() []byte {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *RemoveContainerRequest_Body) GetVub() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Vub
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type RemoveContainerResponse_Body struct {
|
type RemoveContainerResponse_Body struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Valid until block value for transaction.
|
||||||
|
Vub uint32 `protobuf:"varint,1,opt,name=vub,proto3" json:"vub,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveContainerResponse_Body) Reset() {
|
func (x *RemoveContainerResponse_Body) Reset() {
|
||||||
|
@ -810,6 +861,13 @@ func (*RemoveContainerResponse_Body) Descriptor() ([]byte, []int) {
|
||||||
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{7, 0}
|
return file_pkg_services_control_ir_service_proto_rawDescGZIP(), []int{7, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *RemoveContainerResponse_Body) GetVub() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Vub
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_pkg_services_control_ir_service_proto protoreflect.FileDescriptor
|
var File_pkg_services_control_ir_service_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_pkg_services_control_ir_service_proto_rawDesc = []byte{
|
var file_pkg_services_control_ir_service_proto_rawDesc = []byte{
|
||||||
|
@ -839,7 +897,7 @@ var file_pkg_services_control_ir_service_proto_rawDesc = []byte{
|
||||||
0x3c, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
0x3c, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||||
0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||||
0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x84, 0x01,
|
0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x96, 0x01,
|
||||||
0x0a, 0x10, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x0a, 0x10, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x32, 0x20, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63,
|
0x32, 0x20, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63,
|
||||||
|
@ -847,82 +905,89 @@ var file_pkg_services_control_ir_service_proto_rawDesc = []byte{
|
||||||
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72,
|
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72,
|
||||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||||
0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04,
|
0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x18, 0x0a, 0x04,
|
||||||
0x42, 0x6f, 0x64, 0x79, 0x22, 0x86, 0x01, 0x0a, 0x11, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f,
|
0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x62, 0x6f,
|
0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0x98, 0x01, 0x0a, 0x11, 0x54, 0x69, 0x63, 0x6b, 0x45,
|
||||||
0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e,
|
0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04,
|
||||||
0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65,
|
0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x72, 0x63,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64,
|
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68,
|
||||||
0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62,
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||||
0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x98, 0x01,
|
0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69,
|
||||||
0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
|
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12,
|
||||||
0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x10, 0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75,
|
||||||
0x0b, 0x32, 0x21, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65,
|
0x62, 0x22, 0xaa, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65,
|
||||||
0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18,
|
||||||
0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69,
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
|
0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74,
|
0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32,
|
||||||
0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x18,
|
0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
|
0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69,
|
||||||
0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d,
|
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
|
||||||
0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
0x72, 0x65, 0x1a, 0x2a, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||||
0x36, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
|
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
|
0x76, 0x75, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0x9a,
|
||||||
0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64,
|
0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73,
|
||||||
0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20,
|
||||||
0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63,
|
0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
|
||||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04, 0x42,
|
0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a,
|
||||||
0x6f, 0x64, 0x79, 0x22, 0xc9, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f,
|
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a,
|
0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67,
|
||||||
0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69,
|
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||||
0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43,
|
0x65, 0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x75, 0x62,
|
||||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0xdb, 0x01, 0x0a, 0x16,
|
||||||
0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69,
|
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52,
|
||||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01,
|
||||||
0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||||
0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x3f,
|
0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||||
0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f,
|
||||||
0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f,
|
0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
|
||||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e,
|
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||||
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22,
|
0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67,
|
||||||
0x92, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x51, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21,
|
||||||
0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x62,
|
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||||
0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x72, 0x63, 0x6f,
|
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49,
|
||||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74,
|
0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
|
||||||
0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f,
|
0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x03,
|
||||||
0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62, 0x22, 0xa4, 0x01, 0x0a, 0x17, 0x52, 0x65,
|
||||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72,
|
0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20,
|
||||||
0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x06, 0x0a, 0x04,
|
0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
|
||||||
0x42, 0x6f, 0x64, 0x79, 0x32, 0xcb, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f,
|
||||||
0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
0x64, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
|
||||||
0x6f, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
|
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
0x6c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67,
|
||||||
0x6c, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,
|
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x18, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x10,
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f,
|
0x0a, 0x03, 0x76, 0x75, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x76, 0x75, 0x62,
|
||||||
0x63, 0x68, 0x12, 0x1b, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54,
|
0x32, 0xcb, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x65, 0x72, 0x76,
|
||||||
0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65,
|
||||||
0x1c, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b,
|
0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48,
|
||||||
0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a,
|
0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x72,
|
0x74, 0x1a, 0x1e, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x48, 0x65,
|
||||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f,
|
0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f,
|
0x65, 0x12, 0x46, 0x0a, 0x09, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1b,
|
||||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65,
|
0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f,
|
0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x69, 0x72,
|
||||||
0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x69, 0x72,
|
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x45, 0x70, 0x6f, 0x63,
|
||||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f,
|
0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x52, 0x65, 0x6d,
|
||||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
|
0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74,
|
||||||
0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
|
||||||
0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||||
0x73, 0x65, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f,
|
||||||
0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65,
|
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x69, 0x72, 0x63, 0x6f, 0x6e, 0x74,
|
||||||
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x72,
|
0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
||||||
0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x69, 0x72, 0x63,
|
||||||
|
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e,
|
||||||
|
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44,
|
||||||
|
0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e,
|
||||||
|
0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f,
|
||||||
|
0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67,
|
||||||
|
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x72, 0x2f, 0x63, 0x6f, 0x6e,
|
||||||
|
0x74, 0x72, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -21,8 +21,7 @@ service ControlService {
|
||||||
// Health check request.
|
// Health check request.
|
||||||
message HealthCheckRequest {
|
message HealthCheckRequest {
|
||||||
// Health check request body.
|
// Health check request body.
|
||||||
message Body {
|
message Body {}
|
||||||
}
|
|
||||||
|
|
||||||
// Body of health check request message.
|
// Body of health check request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
@ -49,14 +48,20 @@ message HealthCheckResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message TickEpochRequest {
|
message TickEpochRequest {
|
||||||
message Body{}
|
message Body{
|
||||||
|
// Valid until block value override.
|
||||||
|
uint32 vub = 1;
|
||||||
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TickEpochResponse {
|
message TickEpochResponse {
|
||||||
message Body{}
|
message Body{
|
||||||
|
// Valid until block value for transaction.
|
||||||
|
uint32 vub = 1;
|
||||||
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
|
@ -65,6 +70,8 @@ message TickEpochResponse {
|
||||||
message RemoveNodeRequest {
|
message RemoveNodeRequest {
|
||||||
message Body{
|
message Body{
|
||||||
bytes key = 1;
|
bytes key = 1;
|
||||||
|
// Valid until block value override.
|
||||||
|
uint32 vub = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
@ -72,7 +79,10 @@ message RemoveNodeRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message RemoveNodeResponse {
|
message RemoveNodeResponse {
|
||||||
message Body{}
|
message Body{
|
||||||
|
// Valid until block value for transaction.
|
||||||
|
uint32 vub = 1;
|
||||||
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
|
@ -82,6 +92,8 @@ message RemoveContainerRequest {
|
||||||
message Body{
|
message Body{
|
||||||
bytes container_id = 1;
|
bytes container_id = 1;
|
||||||
bytes owner = 2;
|
bytes owner = 2;
|
||||||
|
// Valid until block value override.
|
||||||
|
uint32 vub = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
@ -89,7 +101,10 @@ message RemoveContainerRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message RemoveContainerResponse {
|
message RemoveContainerResponse {
|
||||||
message Body{}
|
message Body{
|
||||||
|
// Valid until block value for transaction.
|
||||||
|
uint32 vub = 1;
|
||||||
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
|
|
40
pkg/services/control/ir/service_frostfs.pb.go
generated
40
pkg/services/control/ir/service_frostfs.pb.go
generated
|
@ -174,6 +174,7 @@ func (x *TickEpochRequest_Body) StableSize() (size int) {
|
||||||
if x == nil {
|
if x == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
size += proto.UInt32Size(1, x.Vub)
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,6 +187,14 @@ func (x *TickEpochRequest_Body) StableSize() (size int) {
|
||||||
//
|
//
|
||||||
// Structures with the same field values have the same binary format.
|
// Structures with the same field values have the same binary format.
|
||||||
func (x *TickEpochRequest_Body) StableMarshal(buf []byte) []byte {
|
func (x *TickEpochRequest_Body) StableMarshal(buf []byte) []byte {
|
||||||
|
if x == nil {
|
||||||
|
return []byte{}
|
||||||
|
}
|
||||||
|
if buf == nil {
|
||||||
|
buf = make([]byte, x.StableSize())
|
||||||
|
}
|
||||||
|
var offset int
|
||||||
|
offset += proto.UInt32Marshal(1, buf[offset:], x.Vub)
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,6 +260,7 @@ func (x *TickEpochResponse_Body) StableSize() (size int) {
|
||||||
if x == nil {
|
if x == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
size += proto.UInt32Size(1, x.Vub)
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,6 +273,14 @@ func (x *TickEpochResponse_Body) StableSize() (size int) {
|
||||||
//
|
//
|
||||||
// Structures with the same field values have the same binary format.
|
// Structures with the same field values have the same binary format.
|
||||||
func (x *TickEpochResponse_Body) StableMarshal(buf []byte) []byte {
|
func (x *TickEpochResponse_Body) StableMarshal(buf []byte) []byte {
|
||||||
|
if x == nil {
|
||||||
|
return []byte{}
|
||||||
|
}
|
||||||
|
if buf == nil {
|
||||||
|
buf = make([]byte, x.StableSize())
|
||||||
|
}
|
||||||
|
var offset int
|
||||||
|
offset += proto.UInt32Marshal(1, buf[offset:], x.Vub)
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,6 +347,7 @@ func (x *RemoveNodeRequest_Body) StableSize() (size int) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
size += proto.BytesSize(1, x.Key)
|
size += proto.BytesSize(1, x.Key)
|
||||||
|
size += proto.UInt32Size(2, x.Vub)
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,6 +368,7 @@ func (x *RemoveNodeRequest_Body) StableMarshal(buf []byte) []byte {
|
||||||
}
|
}
|
||||||
var offset int
|
var offset int
|
||||||
offset += proto.BytesMarshal(1, buf[offset:], x.Key)
|
offset += proto.BytesMarshal(1, buf[offset:], x.Key)
|
||||||
|
offset += proto.UInt32Marshal(2, buf[offset:], x.Vub)
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,6 +434,7 @@ func (x *RemoveNodeResponse_Body) StableSize() (size int) {
|
||||||
if x == nil {
|
if x == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
size += proto.UInt32Size(1, x.Vub)
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,6 +447,14 @@ func (x *RemoveNodeResponse_Body) StableSize() (size int) {
|
||||||
//
|
//
|
||||||
// Structures with the same field values have the same binary format.
|
// Structures with the same field values have the same binary format.
|
||||||
func (x *RemoveNodeResponse_Body) StableMarshal(buf []byte) []byte {
|
func (x *RemoveNodeResponse_Body) StableMarshal(buf []byte) []byte {
|
||||||
|
if x == nil {
|
||||||
|
return []byte{}
|
||||||
|
}
|
||||||
|
if buf == nil {
|
||||||
|
buf = make([]byte, x.StableSize())
|
||||||
|
}
|
||||||
|
var offset int
|
||||||
|
offset += proto.UInt32Marshal(1, buf[offset:], x.Vub)
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -493,6 +522,7 @@ func (x *RemoveContainerRequest_Body) StableSize() (size int) {
|
||||||
}
|
}
|
||||||
size += proto.BytesSize(1, x.ContainerId)
|
size += proto.BytesSize(1, x.ContainerId)
|
||||||
size += proto.BytesSize(2, x.Owner)
|
size += proto.BytesSize(2, x.Owner)
|
||||||
|
size += proto.UInt32Size(3, x.Vub)
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,6 +544,7 @@ func (x *RemoveContainerRequest_Body) StableMarshal(buf []byte) []byte {
|
||||||
var offset int
|
var offset int
|
||||||
offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId)
|
offset += proto.BytesMarshal(1, buf[offset:], x.ContainerId)
|
||||||
offset += proto.BytesMarshal(2, buf[offset:], x.Owner)
|
offset += proto.BytesMarshal(2, buf[offset:], x.Owner)
|
||||||
|
offset += proto.UInt32Marshal(3, buf[offset:], x.Vub)
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -579,6 +610,7 @@ func (x *RemoveContainerResponse_Body) StableSize() (size int) {
|
||||||
if x == nil {
|
if x == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
size += proto.UInt32Size(1, x.Vub)
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,6 +623,14 @@ func (x *RemoveContainerResponse_Body) StableSize() (size int) {
|
||||||
//
|
//
|
||||||
// Structures with the same field values have the same binary format.
|
// Structures with the same field values have the same binary format.
|
||||||
func (x *RemoveContainerResponse_Body) StableMarshal(buf []byte) []byte {
|
func (x *RemoveContainerResponse_Body) StableMarshal(buf []byte) []byte {
|
||||||
|
if x == nil {
|
||||||
|
return []byte{}
|
||||||
|
}
|
||||||
|
if buf == nil {
|
||||||
|
buf = make([]byte, x.StableSize())
|
||||||
|
}
|
||||||
|
var offset int
|
||||||
|
offset += proto.UInt32Marshal(1, buf[offset:], x.Vub)
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue