mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-14 13:30:11 +00:00
Compare commits
12 Commits
master
...
v0.10.2-rc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a18f2f8802 | ||
![]() |
04dc1947ff | ||
![]() |
36c56f73bf | ||
![]() |
b76ca41109 | ||
![]() |
50fd86e287 | ||
![]() |
79cf0d64d0 | ||
![]() |
b405ea50e5 | ||
![]() |
ccfe8a45dd | ||
![]() |
9dd8136e4b | ||
![]() |
eb1703b948 | ||
![]() |
a6da3251d0 | ||
![]() |
bf198948c4 |
@ -28,6 +28,7 @@ type GetBlockDAGInfoResponseMessage struct {
|
|||||||
Difficulty float64
|
Difficulty float64
|
||||||
PastMedianTime int64
|
PastMedianTime int64
|
||||||
PruningPointHash string
|
PruningPointHash string
|
||||||
|
VirtualDAAScore uint64
|
||||||
|
|
||||||
Error *RPCError
|
Error *RPCError
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,10 @@ type fakeRelayInvsContext struct {
|
|||||||
rwLock sync.RWMutex
|
rwLock sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *fakeRelayInvsContext) GetBlockEvenIfHeaderOnly(blockHash *externalapi.DomainHash) (*externalapi.DomainBlock, error) {
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
||||||
func (f *fakeRelayInvsContext) GetBlockRelations(blockHash *externalapi.DomainHash) ([]*externalapi.DomainHash, *externalapi.DomainHash, []*externalapi.DomainHash, error) {
|
func (f *fakeRelayInvsContext) GetBlockRelations(blockHash *externalapi.DomainHash) ([]*externalapi.DomainHash, *externalapi.DomainHash, []*externalapi.DomainHash, error) {
|
||||||
panic(errors.Errorf("called unimplemented function from test '%s'", f.testName))
|
panic(errors.Errorf("called unimplemented function from test '%s'", f.testName))
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ func (ctx *Context) PopulateBlockWithVerboseData(block *appmessage.RPCBlock, dom
|
|||||||
|
|
||||||
// Get the block if we didn't receive it previously
|
// Get the block if we didn't receive it previously
|
||||||
if domainBlock == nil {
|
if domainBlock == nil {
|
||||||
domainBlock, err = ctx.Domain.Consensus().GetBlock(blockHash)
|
domainBlock, err = ctx.Domain.Consensus().GetBlockEvenIfHeaderOnly(blockHash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -20,18 +20,22 @@ func HandleGetBlock(context *rpccontext.Context, _ *router.Router, request appme
|
|||||||
return errorMessage, nil
|
return errorMessage, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
header, err := context.Domain.Consensus().GetBlockHeader(hash)
|
block, err := context.Domain.Consensus().GetBlockEvenIfHeaderOnly(hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorMessage := &appmessage.GetBlockResponseMessage{}
|
errorMessage := &appmessage.GetBlockResponseMessage{}
|
||||||
errorMessage.Error = appmessage.RPCErrorf("Block %s not found", hash)
|
errorMessage.Error = appmessage.RPCErrorf("Block %s not found", hash)
|
||||||
return errorMessage, nil
|
return errorMessage, nil
|
||||||
}
|
}
|
||||||
block := &externalapi.DomainBlock{Header: header}
|
|
||||||
|
|
||||||
response := appmessage.NewGetBlockResponseMessage()
|
response := appmessage.NewGetBlockResponseMessage()
|
||||||
response.Block = appmessage.DomainBlockToRPCBlock(block)
|
|
||||||
|
|
||||||
err = context.PopulateBlockWithVerboseData(response.Block, header, nil, getBlockRequest.IncludeTransactionVerboseData)
|
if getBlockRequest.IncludeTransactionVerboseData {
|
||||||
|
response.Block = appmessage.DomainBlockToRPCBlock(block)
|
||||||
|
} else {
|
||||||
|
response.Block = appmessage.DomainBlockToRPCBlock(&externalapi.DomainBlock{Header: block.Header})
|
||||||
|
}
|
||||||
|
|
||||||
|
err = context.PopulateBlockWithVerboseData(response.Block, block.Header, block, getBlockRequest.IncludeTransactionVerboseData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, rpccontext.ErrBuildBlockVerboseDataInvalidBlock) {
|
if errors.Is(err, rpccontext.ErrBuildBlockVerboseDataInvalidBlock) {
|
||||||
errorMessage := &appmessage.GetBlockResponseMessage{}
|
errorMessage := &appmessage.GetBlockResponseMessage{}
|
||||||
|
@ -35,6 +35,7 @@ func HandleGetBlockDAGInfo(context *rpccontext.Context, _ *router.Router, _ appm
|
|||||||
response.VirtualParentHashes = hashes.ToStrings(virtualInfo.ParentHashes)
|
response.VirtualParentHashes = hashes.ToStrings(virtualInfo.ParentHashes)
|
||||||
response.Difficulty = context.GetDifficultyRatio(virtualInfo.Bits, context.Config.ActiveNetParams)
|
response.Difficulty = context.GetDifficultyRatio(virtualInfo.Bits, context.Config.ActiveNetParams)
|
||||||
response.PastMedianTime = virtualInfo.PastMedianTime
|
response.PastMedianTime = virtualInfo.PastMedianTime
|
||||||
|
response.VirtualDAAScore = virtualInfo.DAAScore
|
||||||
|
|
||||||
pruningPoint, err := context.Domain.Consensus().PruningPoint()
|
pruningPoint, err := context.Domain.Consensus().PruningPoint()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -84,19 +84,24 @@ func HandleGetBlocks(context *rpccontext.Context, _ *router.Router, request appm
|
|||||||
response := appmessage.NewGetBlocksResponseMessage()
|
response := appmessage.NewGetBlocksResponseMessage()
|
||||||
response.BlockHashes = hashes.ToStrings(blockHashes)
|
response.BlockHashes = hashes.ToStrings(blockHashes)
|
||||||
if getBlocksRequest.IncludeBlocks {
|
if getBlocksRequest.IncludeBlocks {
|
||||||
blocks := make([]*appmessage.RPCBlock, len(blockHashes))
|
rpcBlocks := make([]*appmessage.RPCBlock, len(blockHashes))
|
||||||
for i, blockHash := range blockHashes {
|
for i, blockHash := range blockHashes {
|
||||||
blockHeader, err := context.Domain.Consensus().GetBlockHeader(blockHash)
|
block, err := context.Domain.Consensus().GetBlockEvenIfHeaderOnly(blockHash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
block := &externalapi.DomainBlock{Header: blockHeader}
|
|
||||||
blocks[i] = appmessage.DomainBlockToRPCBlock(block)
|
if getBlocksRequest.IncludeTransactionVerboseData {
|
||||||
err = context.PopulateBlockWithVerboseData(blocks[i], blockHeader, nil, getBlocksRequest.IncludeTransactionVerboseData)
|
rpcBlocks[i] = appmessage.DomainBlockToRPCBlock(block)
|
||||||
|
} else {
|
||||||
|
rpcBlocks[i] = appmessage.DomainBlockToRPCBlock(&externalapi.DomainBlock{Header: block.Header})
|
||||||
|
}
|
||||||
|
err = context.PopulateBlockWithVerboseData(rpcBlocks[i], block.Header, nil, getBlocksRequest.IncludeTransactionVerboseData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
response.Blocks = rpcBlocks
|
||||||
}
|
}
|
||||||
|
|
||||||
return response, nil
|
return response, nil
|
||||||
|
@ -1,11 +1,82 @@
|
|||||||
|
Kaspad v0.10.0 - 2021-04-26
|
||||||
|
===========================
|
||||||
|
Major changes include:
|
||||||
|
* Implementing a signature hashing scheme similar to BIP-143
|
||||||
|
* Replacing HASH160 with BLAKE2B
|
||||||
|
* Replacing ECMH with MuHash
|
||||||
|
* Removing RIPEMD160 and SHA1 from the codebase entirely
|
||||||
|
* Making P2PKH transactions non-standard
|
||||||
|
* Vastly enhancing the CLI wallet
|
||||||
|
* Restructuring kaspad's app/home directory
|
||||||
|
* Modifying block and transaction types in the RPC to be easier to consume clientside
|
||||||
|
|
||||||
|
A partial list of the more-important commits is as follows:
|
||||||
|
* Fix data race in GetBlockChildren (#1579)
|
||||||
|
* Remove payload hash (#1583)
|
||||||
|
* Add the mempool size to getInfo RPC command (#1584)
|
||||||
|
* Change the difficulty to be calculated based on the same block instead of its selected parent (#1591)
|
||||||
|
* Adjust the difficulty in the first difficultyAdjustmentWindowSize blocks (#1592)
|
||||||
|
* Adding DAA score (#1596)
|
||||||
|
* Use DAA score where needed (#1602)
|
||||||
|
* Remove the Services field from NetAddress. (#1610)
|
||||||
|
* Fix getBlocks to not add the anticone when some blocks were filtered by GetHashesBetween (#1611)
|
||||||
|
* Restructure the default ~/.kaspad directory layout (#1613)
|
||||||
|
* Replace the HomeDir flag with a AppDir flag (#1615)
|
||||||
|
* Implement BIP-143-like sighash (#1598)
|
||||||
|
* Change --datadir to --appdir and remove symmetrical connection in stability tests (#1617)
|
||||||
|
* Use BLAKE2B instead of HASH160, and get rid of any usage of RIPEMD160 and SHA1 (#1618)
|
||||||
|
* Replace ECMH with Muhash (#1624)
|
||||||
|
* Add support for multiple staging areas (#1633)
|
||||||
|
* Make sure the ghostdagDataStore cache is at least DifficultyAdjustmentBlockWindow sized (#1635)
|
||||||
|
* Resolve each block status in it's own staging area (#1634)
|
||||||
|
* Add mass limit to mempool (#1627)
|
||||||
|
* In RPC, use RPCTransactions and RPCBlocks instead of TransactionMessages and BlockMessages (#1609)
|
||||||
|
* Use go-secp256k1 v0.0.5 (#1640)
|
||||||
|
* Add a show-address subcommand to kaspawallet (#1653)
|
||||||
|
* Replace p2pkh with p2pk (#1650)
|
||||||
|
* Implement importing private keys into the wallet (#1655)
|
||||||
|
* Add dump unencrypted data sub command to the wallet (#1661)
|
||||||
|
* Add ECDSA support (#1657)
|
||||||
|
* Add OpCheckMultiSigECDSA (#1663)
|
||||||
|
* Add ECDSA support to the wallet (#1664)
|
||||||
|
* Make moving the pruning point faster (#1660)
|
||||||
|
* Implement new mechanism for updating UTXO Diffs (#1671)
|
||||||
|
|
||||||
|
Kaspad v0.9.2 - 2021-03-31
|
||||||
|
===========================
|
||||||
|
* Increase the route capacity of InvTransaction messages. (#1603) (#1637)
|
||||||
|
|
||||||
|
Kaspad v0.9.1 - 2021-03-14
|
||||||
|
===========================
|
||||||
|
* Testnet network reset
|
||||||
|
|
||||||
|
Kaspad v0.9.0 - 2021-03-04
|
||||||
|
===========================
|
||||||
|
|
||||||
|
* Merge big subdags in pick virtual parents (#1574)
|
||||||
|
* Write in the reject message the tx rejection reason (#1573)
|
||||||
|
* Add nil checks for protowire (#1570)
|
||||||
|
* Increase getBlocks limit to 1000 (#1572)
|
||||||
|
* Return RPC error if getBlock's lowHash doesn't exist (#1569)
|
||||||
|
* Add default dns-seeder to testnet (#1568)
|
||||||
|
* Fix utxoindex deserialization (#1566)
|
||||||
|
* Add pruning point hash to GetBlockDagInfo response (#1565)
|
||||||
|
* Use EmitUnpopulated so that kaspactl prints all fields, even the default ones (#1561)
|
||||||
|
* Stop logging an error whenever an RPC/P2P connection is canceled (#1562)
|
||||||
|
* Cleanup the logger and make it asynchronous (#1524)
|
||||||
|
* Close all iterators (#1542)
|
||||||
|
* Add childrenHashes to GetBlock/s RPC commands (#1560)
|
||||||
|
* Add ScriptPublicKey.Version to RPC (#1559)
|
||||||
|
* Fix the target block rate to create less bursty mining (#1554)
|
||||||
|
|
||||||
Kaspad v0.8.10 - 2021-02-25
|
Kaspad v0.8.10 - 2021-02-25
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
[*] Fix bug where invalid mempool transactions were not removed (#1551)
|
* Fix bug where invalid mempool transactions were not removed (#1551)
|
||||||
[*] Add RPC reconnection to the miner (#1552)
|
* Add RPC reconnection to the miner (#1552)
|
||||||
[*] Remove virtual diff parents - only selectedTip is virtualDiffParent now (#1550)
|
* Remove virtual diff parents - only selectedTip is virtualDiffParent now (#1550)
|
||||||
[*] Fix UTXO index (#1548)
|
* Fix UTXO index (#1548)
|
||||||
[*] Prevent fast failing (#1545)
|
* Prevent fast failing (#1545)
|
||||||
[*] Increase the sleep time in kaspaminer when the node is not synced (#1544)
|
* Increase the sleep time in kaspaminer when the node is not synced (#1544)
|
||||||
[*] Disallow header only blocks on RPC, relay and when requesting IBD full blocks (#1537)
|
* Disallow header only blocks on RPC, relay and when requesting IBD full blocks (#1537)
|
||||||
[*] Make templateManager hold a DomainBlock and isSynced bool instead of a GetBlockTemplateResponseMessage (#1538)
|
* Make templateManager hold a DomainBlock and isSynced bool instead of a GetBlockTemplateResponseMessage (#1538)
|
||||||
|
@ -28,15 +28,14 @@ func balance(conf *balanceConfig) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
virtualSelectedParentBlueScoreResponse, err := client.GetVirtualSelectedParentBlueScore()
|
blockDAGInfo, err := client.GetBlockDAGInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
virtualSelectedParentBlueScore := virtualSelectedParentBlueScoreResponse.BlueScore
|
|
||||||
|
|
||||||
var availableBalance, pendingBalance uint64
|
var availableBalance, pendingBalance uint64
|
||||||
for _, entry := range getUTXOsByAddressesResponse.Entries {
|
for _, entry := range getUTXOsByAddressesResponse.Entries {
|
||||||
if isUTXOSpendable(entry, virtualSelectedParentBlueScore, conf.ActiveNetParams.BlockCoinbaseMaturity) {
|
if isUTXOSpendable(entry, blockDAGInfo.VirtualDAAScore, conf.ActiveNetParams.BlockCoinbaseMaturity) {
|
||||||
availableBalance += entry.UTXOEntry.Amount
|
availableBalance += entry.UTXOEntry.Amount
|
||||||
} else {
|
} else {
|
||||||
pendingBalance += entry.UTXOEntry.Amount
|
pendingBalance += entry.UTXOEntry.Amount
|
||||||
|
@ -8,13 +8,12 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func isUTXOSpendable(entry *appmessage.UTXOsByAddressesEntry, virtualSelectedParentBlueScore uint64, coinbaseMaturity uint64) bool {
|
func isUTXOSpendable(entry *appmessage.UTXOsByAddressesEntry, virtualDAAScore uint64, coinbaseMaturity uint64) bool {
|
||||||
if !entry.UTXOEntry.IsCoinbase {
|
if !entry.UTXOEntry.IsCoinbase {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
blockBlueScore := entry.UTXOEntry.BlockDAAScore
|
blockBlueScore := entry.UTXOEntry.BlockDAAScore
|
||||||
// TODO: Check for a better alternative than virtualSelectedParentBlueScore
|
return blockBlueScore+coinbaseMaturity < virtualDAAScore
|
||||||
return blockBlueScore+coinbaseMaturity < virtualSelectedParentBlueScore
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func printErrorAndExit(err error) {
|
func printErrorAndExit(err error) {
|
||||||
|
@ -96,15 +96,15 @@ func fetchSpendableUTXOs(params *dagconfig.Params, client *rpcclient.RPCClient,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
virtualSelectedParentBlueScoreResponse, err := client.GetVirtualSelectedParentBlueScore()
|
|
||||||
|
blockDAGInfo, err := client.GetBlockDAGInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
virtualSelectedParentBlueScore := virtualSelectedParentBlueScoreResponse.BlueScore
|
|
||||||
|
|
||||||
spendableUTXOs := make([]*appmessage.UTXOsByAddressesEntry, 0)
|
spendableUTXOs := make([]*appmessage.UTXOsByAddressesEntry, 0)
|
||||||
for _, entry := range getUTXOsByAddressesResponse.Entries {
|
for _, entry := range getUTXOsByAddressesResponse.Entries {
|
||||||
if !isUTXOSpendable(entry, virtualSelectedParentBlueScore, params.BlockCoinbaseMaturity) {
|
if !isUTXOSpendable(entry, blockDAGInfo.VirtualDAAScore, params.BlockCoinbaseMaturity) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
spendableUTXOs = append(spendableUTXOs, entry)
|
spendableUTXOs = append(spendableUTXOs, entry)
|
||||||
|
@ -112,6 +112,30 @@ func (s *consensus) GetBlock(blockHash *externalapi.DomainHash) (*externalapi.Do
|
|||||||
return block, nil
|
return block, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *consensus) GetBlockEvenIfHeaderOnly(blockHash *externalapi.DomainHash) (*externalapi.DomainBlock, error) {
|
||||||
|
s.lock.Lock()
|
||||||
|
defer s.lock.Unlock()
|
||||||
|
|
||||||
|
stagingArea := model.NewStagingArea()
|
||||||
|
|
||||||
|
block, err := s.blockStore.Block(s.databaseContext, stagingArea, blockHash)
|
||||||
|
if err == nil {
|
||||||
|
return block, nil
|
||||||
|
}
|
||||||
|
if !errors.Is(err, database.ErrNotFound) {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
header, err := s.blockHeaderStore.BlockHeader(s.databaseContext, stagingArea, blockHash)
|
||||||
|
if err != nil {
|
||||||
|
if errors.Is(err, database.ErrNotFound) {
|
||||||
|
return nil, errors.Wrapf(err, "block %s does not exist", blockHash)
|
||||||
|
}
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &externalapi.DomainBlock{Header: header}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *consensus) GetBlockHeader(blockHash *externalapi.DomainHash) (externalapi.BlockHeader, error) {
|
func (s *consensus) GetBlockHeader(blockHash *externalapi.DomainHash) (externalapi.BlockHeader, error) {
|
||||||
s.lock.Lock()
|
s.lock.Lock()
|
||||||
defer s.lock.Unlock()
|
defer s.lock.Unlock()
|
||||||
@ -363,11 +387,17 @@ func (s *consensus) GetVirtualInfo() (*externalapi.VirtualInfo, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
daaScore, err := s.daaBlocksStore.DAAScore(s.databaseContext, stagingArea, model.VirtualBlockHash)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return &externalapi.VirtualInfo{
|
return &externalapi.VirtualInfo{
|
||||||
ParentHashes: blockRelations.Parents,
|
ParentHashes: blockRelations.Parents,
|
||||||
Bits: bits,
|
Bits: bits,
|
||||||
PastMedianTime: pastMedianTime,
|
PastMedianTime: pastMedianTime,
|
||||||
BlueScore: virtualGHOSTDAGData.BlueScore(),
|
BlueScore: virtualGHOSTDAGData.BlueScore(),
|
||||||
|
DAAScore: daaScore,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ type Consensus interface {
|
|||||||
ValidateTransactionAndPopulateWithConsensusData(transaction *DomainTransaction) error
|
ValidateTransactionAndPopulateWithConsensusData(transaction *DomainTransaction) error
|
||||||
|
|
||||||
GetBlock(blockHash *DomainHash) (*DomainBlock, error)
|
GetBlock(blockHash *DomainHash) (*DomainBlock, error)
|
||||||
|
GetBlockEvenIfHeaderOnly(blockHash *DomainHash) (*DomainBlock, error)
|
||||||
GetBlockHeader(blockHash *DomainHash) (BlockHeader, error)
|
GetBlockHeader(blockHash *DomainHash) (BlockHeader, error)
|
||||||
GetBlockInfo(blockHash *DomainHash) (*BlockInfo, error)
|
GetBlockInfo(blockHash *DomainHash) (*BlockInfo, error)
|
||||||
GetBlockRelations(blockHash *DomainHash) (parents []*DomainHash, selectedParent *DomainHash, children []*DomainHash, err error)
|
GetBlockRelations(blockHash *DomainHash) (parents []*DomainHash, selectedParent *DomainHash, children []*DomainHash, err error)
|
||||||
|
@ -6,4 +6,5 @@ type VirtualInfo struct {
|
|||||||
Bits uint32
|
Bits uint32
|
||||||
PastMedianTime int64
|
PastMedianTime int64
|
||||||
BlueScore uint64
|
BlueScore uint64
|
||||||
|
DAAScore uint64
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,22 @@ func (bp *blockProcessor) setBlockStatusAfterBlockValidation(
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (bp *blockProcessor) updateVirtualAcceptanceDataAfterImportingPruningPoint(stagingArea *model.StagingArea) error {
|
||||||
|
|
||||||
|
_, virtualAcceptanceData, virtualMultiset, err :=
|
||||||
|
bp.consensusStateManager.CalculatePastUTXOAndAcceptanceData(stagingArea, model.VirtualBlockHash)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Debugf("Staging virtual acceptance data after importing the pruning point")
|
||||||
|
bp.acceptanceDataStore.Stage(stagingArea, model.VirtualBlockHash, virtualAcceptanceData)
|
||||||
|
|
||||||
|
log.Debugf("Staging virtual multiset after importing the pruning point")
|
||||||
|
bp.multisetStore.Stage(stagingArea, model.VirtualBlockHash, virtualMultiset)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (bp *blockProcessor) validateAndInsertBlock(stagingArea *model.StagingArea, block *externalapi.DomainBlock,
|
func (bp *blockProcessor) validateAndInsertBlock(stagingArea *model.StagingArea, block *externalapi.DomainBlock,
|
||||||
isPruningPoint bool) (*externalapi.BlockInsertionResult, error) {
|
isPruningPoint bool) (*externalapi.BlockInsertionResult, error) {
|
||||||
|
|
||||||
@ -102,6 +118,11 @@ func (bp *blockProcessor) validateAndInsertBlock(stagingArea *model.StagingArea,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
err := bp.updateVirtualAcceptanceDataAfterImportingPruningPoint(stagingArea)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,37 +132,37 @@ func TestBlockWindow(t *testing.T) {
|
|||||||
{
|
{
|
||||||
parents: []string{"H", "F"},
|
parents: []string{"H", "F"},
|
||||||
id: "I",
|
id: "I",
|
||||||
expectedWindow: []string{"F", "D", "H", "C", "G", "B"},
|
expectedWindow: []string{"F", "D", "C", "H", "G", "B"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
parents: []string{"I"},
|
parents: []string{"I"},
|
||||||
id: "J",
|
id: "J",
|
||||||
expectedWindow: []string{"I", "F", "D", "H", "C", "G", "B"},
|
expectedWindow: []string{"I", "F", "D", "C", "H", "G", "B"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
parents: []string{"J"},
|
parents: []string{"J"},
|
||||||
id: "K",
|
id: "K",
|
||||||
expectedWindow: []string{"J", "I", "F", "D", "H", "C", "G", "B"},
|
expectedWindow: []string{"J", "I", "F", "D", "C", "H", "G", "B"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
parents: []string{"K"},
|
parents: []string{"K"},
|
||||||
id: "L",
|
id: "L",
|
||||||
expectedWindow: []string{"K", "J", "I", "F", "D", "H", "C", "G", "B"},
|
expectedWindow: []string{"K", "J", "I", "F", "D", "C", "H", "G", "B"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
parents: []string{"L"},
|
parents: []string{"L"},
|
||||||
id: "M",
|
id: "M",
|
||||||
expectedWindow: []string{"L", "K", "J", "I", "F", "D", "H", "C", "G", "B"},
|
expectedWindow: []string{"L", "K", "J", "I", "F", "D", "C", "H", "G", "B"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
parents: []string{"M"},
|
parents: []string{"M"},
|
||||||
id: "N",
|
id: "N",
|
||||||
expectedWindow: []string{"M", "L", "K", "J", "I", "F", "D", "H", "C", "G"},
|
expectedWindow: []string{"M", "L", "K", "J", "I", "F", "D", "C", "H", "G"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
parents: []string{"N"},
|
parents: []string{"N"},
|
||||||
id: "O",
|
id: "O",
|
||||||
expectedWindow: []string{"N", "M", "L", "K", "J", "I", "F", "D", "H", "C"},
|
expectedWindow: []string{"N", "M", "L", "K", "J", "I", "F", "D", "C", "H"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dagconfig.DevnetParams.Name: {
|
dagconfig.DevnetParams.Name: {
|
||||||
|
@ -68,8 +68,7 @@ func (v *transactionValidator) checkTransactionCoinbaseMaturity(stagingArea *mod
|
|||||||
missingOutpoints = append(missingOutpoints, &input.PreviousOutpoint)
|
missingOutpoints = append(missingOutpoints, &input.PreviousOutpoint)
|
||||||
} else if utxoEntry.IsCoinbase() {
|
} else if utxoEntry.IsCoinbase() {
|
||||||
originDAAScore := utxoEntry.BlockDAAScore()
|
originDAAScore := utxoEntry.BlockDAAScore()
|
||||||
daaScoreSincePrev := povDAAScore - originDAAScore
|
if originDAAScore+v.blockCoinbaseMaturity > povDAAScore {
|
||||||
if daaScoreSincePrev < v.blockCoinbaseMaturity {
|
|
||||||
return errors.Wrapf(ruleerrors.ErrImmatureSpend, "tried to spend coinbase "+
|
return errors.Wrapf(ruleerrors.ErrImmatureSpend, "tried to spend coinbase "+
|
||||||
"transaction output %s from DAA score %d "+
|
"transaction output %s from DAA score %d "+
|
||||||
"to DAA score %d before required maturity "+
|
"to DAA score %d before required maturity "+
|
||||||
@ -266,7 +265,7 @@ func (v *transactionValidator) calcTxSequenceLockFromReferencedUTXOEntries(stagi
|
|||||||
baseHash := povBlockHash
|
baseHash := povBlockHash
|
||||||
|
|
||||||
for {
|
for {
|
||||||
selectedParentDAAScore, err := v.daaBlocksStore.DAAScore(v.databaseContext, stagingArea, povBlockHash)
|
selectedParentDAAScore, err := v.daaBlocksStore.DAAScore(v.databaseContext, stagingArea, baseHash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,17 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
true,
|
true,
|
||||||
uint64(5)),
|
uint64(5)),
|
||||||
}
|
}
|
||||||
txInputWithMaxSequence := externalapi.DomainTransactionInput{
|
immatureInput := externalapi.DomainTransactionInput{
|
||||||
|
PreviousOutpoint: prevOutPoint,
|
||||||
|
SignatureScript: []byte{},
|
||||||
|
Sequence: constants.MaxTxInSequenceNum,
|
||||||
|
UTXOEntry: utxo.NewUTXOEntry(
|
||||||
|
100_000_000, // 1 KAS
|
||||||
|
scriptPublicKey,
|
||||||
|
true,
|
||||||
|
uint64(6)),
|
||||||
|
}
|
||||||
|
txInputWithSequenceLockTimeIsSeconds := externalapi.DomainTransactionInput{
|
||||||
PreviousOutpoint: prevOutPoint,
|
PreviousOutpoint: prevOutPoint,
|
||||||
SignatureScript: []byte{},
|
SignatureScript: []byte{},
|
||||||
Sequence: constants.SequenceLockTimeIsSeconds,
|
Sequence: constants.SequenceLockTimeIsSeconds,
|
||||||
@ -110,7 +120,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
|
|
||||||
validTx := externalapi.DomainTransaction{
|
validTx := externalapi.DomainTransaction{
|
||||||
Version: constants.MaxTransactionVersion,
|
Version: constants.MaxTransactionVersion,
|
||||||
Inputs: []*externalapi.DomainTransactionInput{&txInputWithMaxSequence},
|
Inputs: []*externalapi.DomainTransactionInput{&txInputWithSequenceLockTimeIsSeconds},
|
||||||
Outputs: []*externalapi.DomainTransactionOutput{&txOut},
|
Outputs: []*externalapi.DomainTransactionOutput{&txOut},
|
||||||
SubnetworkID: subnetworks.SubnetworkIDRegistry,
|
SubnetworkID: subnetworks.SubnetworkIDRegistry,
|
||||||
Gas: 0,
|
Gas: 0,
|
||||||
@ -127,7 +137,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
|
|
||||||
txWithImmatureCoinbase := externalapi.DomainTransaction{
|
txWithImmatureCoinbase := externalapi.DomainTransaction{
|
||||||
Version: constants.MaxTransactionVersion,
|
Version: constants.MaxTransactionVersion,
|
||||||
Inputs: []*externalapi.DomainTransactionInput{&txInput},
|
Inputs: []*externalapi.DomainTransactionInput{&immatureInput},
|
||||||
Outputs: []*externalapi.DomainTransactionOutput{&txOut},
|
Outputs: []*externalapi.DomainTransactionOutput{&txOut},
|
||||||
SubnetworkID: subnetworks.SubnetworkIDRegistry,
|
SubnetworkID: subnetworks.SubnetworkIDRegistry,
|
||||||
Gas: 0,
|
Gas: 0,
|
||||||
@ -158,7 +168,15 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
|
|
||||||
povBlockHash := externalapi.NewDomainHashFromByteArray(&[32]byte{0x01})
|
povBlockHash := externalapi.NewDomainHashFromByteArray(&[32]byte{0x01})
|
||||||
tc.DAABlocksStore().StageDAAScore(stagingArea, povBlockHash, consensusConfig.BlockCoinbaseMaturity+txInput.UTXOEntry.BlockDAAScore())
|
tc.DAABlocksStore().StageDAAScore(stagingArea, povBlockHash, consensusConfig.BlockCoinbaseMaturity+txInput.UTXOEntry.BlockDAAScore())
|
||||||
tc.DAABlocksStore().StageDAAScore(stagingArea, povBlockHash, 10)
|
|
||||||
|
// Just use some stub ghostdag data
|
||||||
|
tc.GHOSTDAGDataStore().Stage(stagingArea, povBlockHash, model.NewBlockGHOSTDAGData(
|
||||||
|
0,
|
||||||
|
nil,
|
||||||
|
consensusConfig.GenesisHash,
|
||||||
|
nil,
|
||||||
|
nil,
|
||||||
|
nil))
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
@ -171,7 +189,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "Valid transaction",
|
name: "Valid transaction",
|
||||||
tx: &validTx,
|
tx: &validTx,
|
||||||
povBlockHash: model.VirtualBlockHash,
|
povBlockHash: povBlockHash,
|
||||||
selectedParentMedianTime: 1,
|
selectedParentMedianTime: 1,
|
||||||
isValid: true,
|
isValid: true,
|
||||||
expectedError: nil,
|
expectedError: nil,
|
||||||
@ -189,7 +207,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
{ // The total inputs amount is bigger than the allowed maximum (constants.MaxSompi)
|
{ // The total inputs amount is bigger than the allowed maximum (constants.MaxSompi)
|
||||||
name: "checkTransactionInputAmounts",
|
name: "checkTransactionInputAmounts",
|
||||||
tx: &txWithLargeAmount,
|
tx: &txWithLargeAmount,
|
||||||
povBlockHash: model.VirtualBlockHash,
|
povBlockHash: povBlockHash,
|
||||||
selectedParentMedianTime: 1,
|
selectedParentMedianTime: 1,
|
||||||
isValid: false,
|
isValid: false,
|
||||||
expectedError: ruleerrors.ErrBadTxOutValue,
|
expectedError: ruleerrors.ErrBadTxOutValue,
|
||||||
@ -197,7 +215,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
{ // The total SompiIn (sum of inputs amount) is smaller than the total SompiOut (sum of outputs value) and hence invalid.
|
{ // The total SompiIn (sum of inputs amount) is smaller than the total SompiOut (sum of outputs value) and hence invalid.
|
||||||
name: "checkTransactionOutputAmounts",
|
name: "checkTransactionOutputAmounts",
|
||||||
tx: &txWithBigValue,
|
tx: &txWithBigValue,
|
||||||
povBlockHash: model.VirtualBlockHash,
|
povBlockHash: povBlockHash,
|
||||||
selectedParentMedianTime: 1,
|
selectedParentMedianTime: 1,
|
||||||
isValid: false,
|
isValid: false,
|
||||||
expectedError: ruleerrors.ErrSpendTooHigh,
|
expectedError: ruleerrors.ErrSpendTooHigh,
|
||||||
@ -205,15 +223,15 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
{ // the selectedParentMedianTime is negative and hence invalid.
|
{ // the selectedParentMedianTime is negative and hence invalid.
|
||||||
name: "checkTransactionSequenceLock",
|
name: "checkTransactionSequenceLock",
|
||||||
tx: &validTx,
|
tx: &validTx,
|
||||||
povBlockHash: model.VirtualBlockHash,
|
povBlockHash: povBlockHash,
|
||||||
selectedParentMedianTime: -1,
|
selectedParentMedianTime: -1,
|
||||||
isValid: false,
|
isValid: false,
|
||||||
expectedError: ruleerrors.ErrUnfinalizedTx,
|
expectedError: ruleerrors.ErrUnfinalizedTx,
|
||||||
},
|
},
|
||||||
{ // The SignatureScript (in the txInput) is empty and hence invalid.
|
{ // The SignatureScript (in the immatureInput) is empty and hence invalid.
|
||||||
name: "checkTransactionScripts",
|
name: "checkTransactionScripts",
|
||||||
tx: &txWithInvalidSignature,
|
tx: &txWithInvalidSignature,
|
||||||
povBlockHash: model.VirtualBlockHash,
|
povBlockHash: povBlockHash,
|
||||||
selectedParentMedianTime: 1,
|
selectedParentMedianTime: 1,
|
||||||
isValid: false,
|
isValid: false,
|
||||||
expectedError: ruleerrors.ErrScriptValidation,
|
expectedError: ruleerrors.ErrScriptValidation,
|
||||||
@ -226,7 +244,7 @@ func TestValidateTransactionInContextAndPopulateMassAndFee(t *testing.T) {
|
|||||||
if test.isValid {
|
if test.isValid {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Unexpected error on TestValidateTransactionInContextAndPopulateMassAndFee"+
|
t.Fatalf("Unexpected error on TestValidateTransactionInContextAndPopulateMassAndFee"+
|
||||||
" on test '%v': %v", test.name, err)
|
" on test '%v': %+v", test.name, err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if err == nil || !errors.Is(err, test.expectedError) {
|
if err == nil || !errors.Is(err, test.expectedError) {
|
||||||
|
@ -177,10 +177,10 @@ var testnetGenesisCoinbaseTx = transactionhelper.NewSubnetworkTransaction(0,
|
|||||||
// testnetGenesisHash is the hash of the first block in the block DAG for the test
|
// testnetGenesisHash is the hash of the first block in the block DAG for the test
|
||||||
// network (genesis block).
|
// network (genesis block).
|
||||||
var testnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
|
var testnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
|
||||||
0x8f, 0x83, 0xf5, 0x33, 0x77, 0xa4, 0x80, 0xa7,
|
0xac, 0x23, 0xff, 0xc3, 0x85, 0xd3, 0x88, 0x99,
|
||||||
0x93, 0xf3, 0x17, 0xee, 0x3e, 0x8f, 0xf5, 0xaf,
|
0xfd, 0xb8, 0x83, 0x30, 0x80, 0x3a, 0x3d, 0xbf,
|
||||||
0x16, 0x6d, 0x87, 0x1d, 0x54, 0xfd, 0xe7, 0x79,
|
0xf7, 0x9b, 0x96, 0x9e, 0x4c, 0xd5, 0x1b, 0xf0,
|
||||||
0xa2, 0xab, 0x6f, 0xc3, 0x76, 0x60, 0xc3, 0x64,
|
0x0e, 0x77, 0xb6, 0x87, 0x70, 0xaa, 0x4e, 0x1f,
|
||||||
})
|
})
|
||||||
|
|
||||||
// testnetGenesisMerkleRoot is the hash of the first transaction in the genesis block
|
// testnetGenesisMerkleRoot is the hash of the first transaction in the genesis block
|
||||||
@ -201,9 +201,9 @@ var testnetGenesisBlock = externalapi.DomainBlock{
|
|||||||
testnetGenesisMerkleRoot,
|
testnetGenesisMerkleRoot,
|
||||||
&externalapi.DomainHash{},
|
&externalapi.DomainHash{},
|
||||||
externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()),
|
externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()),
|
||||||
0x177bfd44a10,
|
0x178547bee50,
|
||||||
0x1e7fffff,
|
0x1e7fffff,
|
||||||
0x64d74,
|
0x2de70,
|
||||||
),
|
),
|
||||||
Transactions: []*externalapi.DomainTransaction{testnetGenesisCoinbaseTx},
|
Transactions: []*externalapi.DomainTransaction{testnetGenesisCoinbaseTx},
|
||||||
}
|
}
|
||||||
|
@ -256,11 +256,11 @@ var MainnetParams = Params{
|
|||||||
// TestnetParams defines the network parameters for the test Kaspa network.
|
// TestnetParams defines the network parameters for the test Kaspa network.
|
||||||
var TestnetParams = Params{
|
var TestnetParams = Params{
|
||||||
K: defaultGHOSTDAGK,
|
K: defaultGHOSTDAGK,
|
||||||
Name: "kaspa-testnet-2",
|
Name: "kaspa-testnet-5",
|
||||||
Net: appmessage.Testnet,
|
Net: appmessage.Testnet,
|
||||||
RPCPort: "16210",
|
RPCPort: "16210",
|
||||||
DefaultPort: "16211",
|
DefaultPort: "16211",
|
||||||
DNSSeeds: []string{"testnet-2-dnsseed.daglabs-dev.com"},
|
DNSSeeds: []string{"testnet-5-dnsseed.daglabs-dev.com"},
|
||||||
|
|
||||||
// DAG parameters
|
// DAG parameters
|
||||||
GenesisBlock: &testnetGenesisBlock,
|
GenesisBlock: &testnetGenesisBlock,
|
||||||
|
@ -49,6 +49,7 @@ const (
|
|||||||
RejectInsufficientFee RejectCode = 0x42
|
RejectInsufficientFee RejectCode = 0x42
|
||||||
RejectFinality RejectCode = 0x43
|
RejectFinality RejectCode = 0x43
|
||||||
RejectDifficulty RejectCode = 0x44
|
RejectDifficulty RejectCode = 0x44
|
||||||
|
RejectImmatureSpend RejectCode = 0x45
|
||||||
)
|
)
|
||||||
|
|
||||||
// Map of reject codes back strings for pretty printing.
|
// Map of reject codes back strings for pretty printing.
|
||||||
@ -63,6 +64,7 @@ var rejectCodeStrings = map[RejectCode]string{
|
|||||||
RejectFinality: "REJECT_FINALITY",
|
RejectFinality: "REJECT_FINALITY",
|
||||||
RejectDifficulty: "REJECT_DIFFICULTY",
|
RejectDifficulty: "REJECT_DIFFICULTY",
|
||||||
RejectNotRequested: "REJECT_NOTREQUESTED",
|
RejectNotRequested: "REJECT_NOTREQUESTED",
|
||||||
|
RejectImmatureSpend: "REJECT_IMMATURESPEND",
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns the RejectCode in human-readable form.
|
// String returns the RejectCode in human-readable form.
|
||||||
|
@ -720,6 +720,9 @@ func (mp *mempool) maybeAcceptTransaction(tx *consensusexternalapi.DomainTransac
|
|||||||
if errors.As(err, &missingOutpoints) {
|
if errors.As(err, &missingOutpoints) {
|
||||||
return missingOutpoints.MissingOutpoints, nil, nil
|
return missingOutpoints.MissingOutpoints, nil, nil
|
||||||
}
|
}
|
||||||
|
if errors.Is(err, ruleerrors.ErrImmatureSpend) {
|
||||||
|
return nil, nil, txRuleError(RejectImmatureSpend, "one of the transaction inputs spends an immature UTXO")
|
||||||
|
}
|
||||||
if errors.As(err, &ruleerrors.RuleError{}) {
|
if errors.As(err, &ruleerrors.RuleError{}) {
|
||||||
return nil, nil, newRuleError(err)
|
return nil, nil, newRuleError(err)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package miningmanager_test
|
package miningmanager_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/kaspanet/kaspad/domain/miningmanager/mempool"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@ -70,11 +71,35 @@ func TestValidateAndInsertTransaction(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestImmatureSpend(t *testing.T) {
|
||||||
|
testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
|
||||||
|
factory := consensus.NewFactory()
|
||||||
|
tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestValidateAndInsertTransaction")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("Error setting up TestConsensus: %+v", err)
|
||||||
|
}
|
||||||
|
defer teardown(false)
|
||||||
|
|
||||||
|
miningFactory := miningmanager.NewFactory()
|
||||||
|
miningManager := miningFactory.NewMiningManager(tc, &consensusConfig.Params)
|
||||||
|
tx := createTransactionWithUTXOEntry(t, 0)
|
||||||
|
err = miningManager.ValidateAndInsertTransaction(tx, false)
|
||||||
|
txRuleError := &mempool.TxRuleError{}
|
||||||
|
if !errors.As(err, txRuleError) || txRuleError.RejectCode != mempool.RejectImmatureSpend {
|
||||||
|
t.Fatalf("Unexpected error %+v", err)
|
||||||
|
}
|
||||||
|
transactionsFromMempool := miningManager.AllTransactions()
|
||||||
|
if contains(tx, transactionsFromMempool) {
|
||||||
|
t.Fatalf("Mempool contains a transaction with immature coinbase")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// TestInsertDoubleTransactionsToMempool verifies that an attempt to insert a transaction
|
// TestInsertDoubleTransactionsToMempool verifies that an attempt to insert a transaction
|
||||||
// more than once into the mempool will result in raising an appropriate error.
|
// more than once into the mempool will result in raising an appropriate error.
|
||||||
func TestInsertDoubleTransactionsToMempool(t *testing.T) {
|
func TestInsertDoubleTransactionsToMempool(t *testing.T) {
|
||||||
testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
|
testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
|
||||||
|
consensusConfig.BlockCoinbaseMaturity = 0
|
||||||
factory := consensus.NewFactory()
|
factory := consensus.NewFactory()
|
||||||
tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestInsertDoubleTransactionsToMempool")
|
tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestInsertDoubleTransactionsToMempool")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -99,7 +124,7 @@ func TestInsertDoubleTransactionsToMempool(t *testing.T) {
|
|||||||
// TestHandleNewBlockTransactions verifies that all the transactions in the block were successfully removed from the mempool.
|
// TestHandleNewBlockTransactions verifies that all the transactions in the block were successfully removed from the mempool.
|
||||||
func TestHandleNewBlockTransactions(t *testing.T) {
|
func TestHandleNewBlockTransactions(t *testing.T) {
|
||||||
testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
|
testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
|
||||||
|
consensusConfig.BlockCoinbaseMaturity = 0
|
||||||
factory := consensus.NewFactory()
|
factory := consensus.NewFactory()
|
||||||
tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestHandleNewBlockTransactions")
|
tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestHandleNewBlockTransactions")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -165,7 +190,7 @@ func domainBlocksToBlockIds(blocks []*externalapi.DomainTransaction) []*external
|
|||||||
// will be removed from the mempool.
|
// will be removed from the mempool.
|
||||||
func TestDoubleSpends(t *testing.T) {
|
func TestDoubleSpends(t *testing.T) {
|
||||||
testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
|
testutils.ForAllNets(t, true, func(t *testing.T, consensusConfig *consensus.Config) {
|
||||||
|
consensusConfig.BlockCoinbaseMaturity = 0
|
||||||
factory := consensus.NewFactory()
|
factory := consensus.NewFactory()
|
||||||
tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestDoubleSpends")
|
tc, teardown, err := factory.NewTestConsensus(consensusConfig, "TestDoubleSpends")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -309,7 +334,7 @@ func createTransactionWithUTXOEntry(t *testing.T, i int) *externalapi.DomainTran
|
|||||||
100000000, // 1 KAS
|
100000000, // 1 KAS
|
||||||
scriptPublicKey,
|
scriptPublicKey,
|
||||||
true,
|
true,
|
||||||
uint64(5)),
|
uint64(0)),
|
||||||
}
|
}
|
||||||
txOut := externalapi.DomainTransactionOutput{
|
txOut := externalapi.DomainTransactionOutput{
|
||||||
Value: 10000,
|
Value: 10000,
|
||||||
|
@ -243,7 +243,7 @@ func (as *addressStore) serializeAddress(address *address) []byte {
|
|||||||
serializedSize := 16 + 2 + 8 + 8 // ipv6 + port + timestamp + connectionFailedCount
|
serializedSize := 16 + 2 + 8 + 8 // ipv6 + port + timestamp + connectionFailedCount
|
||||||
serializedNetAddress := make([]byte, serializedSize)
|
serializedNetAddress := make([]byte, serializedSize)
|
||||||
|
|
||||||
copy(serializedNetAddress[:], address.netAddress.IP[:])
|
copy(serializedNetAddress[:], address.netAddress.IP.To16()[:])
|
||||||
binary.LittleEndian.PutUint16(serializedNetAddress[16:], address.netAddress.Port)
|
binary.LittleEndian.PutUint16(serializedNetAddress[16:], address.netAddress.Port)
|
||||||
binary.LittleEndian.PutUint64(serializedNetAddress[18:], uint64(address.netAddress.Timestamp.UnixMilliseconds()))
|
binary.LittleEndian.PutUint64(serializedNetAddress[18:], uint64(address.netAddress.Timestamp.UnixMilliseconds()))
|
||||||
binary.LittleEndian.PutUint64(serializedNetAddress[26:], uint64(address.connectionFailedCount))
|
binary.LittleEndian.PutUint64(serializedNetAddress[26:], uint64(address.connectionFailedCount))
|
||||||
|
@ -3240,6 +3240,7 @@ type GetBlockDagInfoResponseMessage struct {
|
|||||||
PastMedianTime int64 `protobuf:"varint,6,opt,name=pastMedianTime,proto3" json:"pastMedianTime,omitempty"`
|
PastMedianTime int64 `protobuf:"varint,6,opt,name=pastMedianTime,proto3" json:"pastMedianTime,omitempty"`
|
||||||
VirtualParentHashes []string `protobuf:"bytes,7,rep,name=virtualParentHashes,proto3" json:"virtualParentHashes,omitempty"`
|
VirtualParentHashes []string `protobuf:"bytes,7,rep,name=virtualParentHashes,proto3" json:"virtualParentHashes,omitempty"`
|
||||||
PruningPointHash string `protobuf:"bytes,8,opt,name=pruningPointHash,proto3" json:"pruningPointHash,omitempty"`
|
PruningPointHash string `protobuf:"bytes,8,opt,name=pruningPointHash,proto3" json:"pruningPointHash,omitempty"`
|
||||||
|
VirtualDaaScore uint64 `protobuf:"varint,9,opt,name=virtualDaaScore,proto3" json:"virtualDaaScore,omitempty"`
|
||||||
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
|
Error *RPCError `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3331,6 +3332,13 @@ func (x *GetBlockDagInfoResponseMessage) GetPruningPointHash() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *GetBlockDagInfoResponseMessage) GetVirtualDaaScore() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.VirtualDaaScore
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *GetBlockDagInfoResponseMessage) GetError() *RPCError {
|
func (x *GetBlockDagInfoResponseMessage) GetError() *RPCError {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Error
|
return x.Error
|
||||||
@ -5418,7 +5426,7 @@ var file_rpc_proto_rawDesc = []byte{
|
|||||||
0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
|
0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
|
||||||
0x72, 0x6f, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44,
|
0x72, 0x6f, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44,
|
||||||
0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73,
|
0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x22, 0xf4, 0x02, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63,
|
0x73, 0x61, 0x67, 0x65, 0x22, 0x9e, 0x03, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63,
|
||||||
0x6b, 0x44, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x6b, 0x44, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f,
|
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f,
|
||||||
0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65,
|
0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65,
|
||||||
@ -5439,188 +5447,191 @@ var file_rpc_proto_rawDesc = []byte{
|
|||||||
0x68, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f,
|
0x68, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f,
|
||||||
0x69, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70,
|
0x69, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70,
|
||||||
0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12,
|
0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12,
|
||||||
0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
0x28, 0x0a, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f,
|
||||||
0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45,
|
0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61,
|
||||||
0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x55, 0x0a, 0x25, 0x52,
|
0x6c, 0x44, 0x61, 0x61, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72,
|
||||||
0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f,
|
0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73,
|
0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79,
|
0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x55, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65,
|
||||||
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74,
|
||||||
0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c,
|
||||||
0x73, 0x68, 0x22, 0x54, 0x0a, 0x26, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x46, 0x69, 0x6e,
|
0x0a, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48,
|
||||||
0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73,
|
0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c,
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05,
|
0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x54, 0x0a, 0x26,
|
||||||
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70,
|
0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
|
0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d,
|
||||||
0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x27, 0x0a, 0x25, 0x4e, 0x6f, 0x74, 0x69,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
|
||||||
0x66, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69,
|
0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69,
|
||||||
0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72,
|
||||||
0x65, 0x22, 0x54, 0x0a, 0x26, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c,
|
0x6f, 0x72, 0x22, 0x27, 0x0a, 0x25, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x46, 0x69, 0x6e, 0x61,
|
||||||
0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
|
0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65,
|
0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x54, 0x0a, 0x26, 0x4e,
|
||||||
0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72,
|
0x6f, 0x74, 0x69, 0x66, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e,
|
||||||
0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72,
|
0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65,
|
||||||
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x55, 0x0a, 0x23, 0x46, 0x69, 0x6e, 0x61, 0x6c,
|
|
||||||
0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66,
|
|
||||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e,
|
|
||||||
0x0a, 0x12, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
|
|
||||||
0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x69, 0x6f, 0x6c,
|
|
||||||
0x61, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x5b,
|
|
||||||
0x0a, 0x2b, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69,
|
|
||||||
0x63, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69,
|
|
||||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a,
|
|
||||||
0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61,
|
|
||||||
0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69,
|
|
||||||
0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x18, 0x0a, 0x16, 0x53,
|
|
||||||
0x68, 0x75, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65,
|
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x45, 0x0a, 0x17, 0x53, 0x68, 0x75, 0x74, 0x44, 0x6f, 0x77,
|
|
||||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
|
||||||
0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b,
|
|
||||||
0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43,
|
|
||||||
0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x70, 0x0a, 0x18,
|
|
||||||
0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
||||||
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72,
|
|
||||||
0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61,
|
|
||||||
0x72, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18,
|
|
||||||
0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x0b,
|
|
||||||
0x69, 0x73, 0x41, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
|
|
||||||
0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x61,
|
|
||||||
0x0a, 0x19, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70,
|
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68,
|
|
||||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65,
|
|
||||||
0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8,
|
|
||||||
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72,
|
|
||||||
0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
|
|
||||||
0x72, 0x22, 0x40, 0x0a, 0x20, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x74, 0x78, 0x6f, 0x73,
|
|
||||||
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65,
|
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
|
||||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
|
|
||||||
0x73, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x21, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x74, 0x78,
|
|
||||||
0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
||||||
0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
|
|
||||||
0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65,
|
|
||||||
0x72, 0x72, 0x6f, 0x72, 0x22, 0x95, 0x01, 0x0a, 0x1f, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x43, 0x68,
|
|
||||||
0x61, 0x6e, 0x67, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
|
||||||
0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65,
|
|
||||||
0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
|
|
||||||
0x69, 0x72, 0x65, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65,
|
|
||||||
0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64,
|
|
||||||
0x12, 0x3a, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28,
|
|
||||||
0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x55, 0x74,
|
|
||||||
0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e,
|
|
||||||
0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x9c, 0x01, 0x0a,
|
|
||||||
0x15, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65,
|
|
||||||
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
|
|
||||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
|
||||||
0x12, 0x32, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
|
|
||||||
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52,
|
|
||||||
0x70, 0x63, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70,
|
|
||||||
0x6f, 0x69, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x75, 0x74, 0x78, 0x6f, 0x45, 0x6e, 0x74, 0x72,
|
|
||||||
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
|
|
||||||
0x69, 0x72, 0x65, 0x2e, 0x52, 0x70, 0x63, 0x55, 0x74, 0x78, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
|
||||||
0x52, 0x09, 0x75, 0x74, 0x78, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x47, 0x0a, 0x27, 0x53,
|
|
||||||
0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x55, 0x74, 0x78, 0x6f,
|
|
||||||
0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d,
|
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
|
|
||||||
0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65,
|
|
||||||
0x73, 0x73, 0x65, 0x73, 0x22, 0x56, 0x0a, 0x28, 0x53, 0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x74, 0x69,
|
|
||||||
0x66, 0x79, 0x69, 0x6e, 0x67, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
|
||||||
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
|
||||||
0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b,
|
|
||||||
0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43,
|
|
||||||
0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x21,
|
|
||||||
0x47, 0x65, 0x74, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
|
||||||
0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
|
||||||
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01,
|
|
||||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22,
|
|
||||||
0x8c, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64,
|
|
||||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d,
|
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65,
|
|
||||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
|
|
||||||
0x69, 0x72, 0x65, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65,
|
|
||||||
0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69,
|
|
||||||
0x65, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01,
|
|
||||||
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52,
|
|
||||||
0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x31,
|
|
||||||
0x0a, 0x2f, 0x47, 0x65, 0x74, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65,
|
|
||||||
0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63,
|
|
||||||
0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
|
||||||
0x65, 0x22, 0x7c, 0x0a, 0x30, 0x47, 0x65, 0x74, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53,
|
|
||||||
0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75,
|
|
||||||
0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65,
|
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f,
|
|
||||||
0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x53, 0x63,
|
|
||||||
0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20,
|
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e,
|
|
||||||
0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22,
|
|
||||||
0x3b, 0x0a, 0x39, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c,
|
|
||||||
0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c,
|
|
||||||
0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65,
|
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x68, 0x0a, 0x3a,
|
|
||||||
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c,
|
|
||||||
0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53,
|
|
||||||
0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72,
|
|
||||||
0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f,
|
|
||||||
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52,
|
|
||||||
0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x82, 0x01, 0x0a, 0x38, 0x56, 0x69, 0x72, 0x74, 0x75,
|
|
||||||
0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74,
|
|
||||||
0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64,
|
|
||||||
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73,
|
|
||||||
0x61, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x1e, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65,
|
|
||||||
0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65,
|
|
||||||
0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1e, 0x76, 0x69, 0x72,
|
|
||||||
0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65,
|
|
||||||
0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x31, 0x0a, 0x2f, 0x4e,
|
|
||||||
0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e,
|
|
||||||
0x74, 0x55, 0x54, 0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65,
|
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x5e,
|
|
||||||
0x0a, 0x30, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50,
|
|
||||||
0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72,
|
|
||||||
0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
|
||||||
0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01,
|
|
||||||
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52,
|
|
||||||
0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x30,
|
|
||||||
0x0a, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54,
|
|
||||||
0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4e, 0x6f, 0x74,
|
|
||||||
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
|
||||||
0x22, 0x38, 0x0a, 0x36, 0x53, 0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e,
|
|
||||||
0x67, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58,
|
|
||||||
0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
|
|
||||||
0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x65, 0x0a, 0x37, 0x53, 0x74,
|
|
||||||
0x6f, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x69,
|
|
||||||
0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76,
|
|
||||||
0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65,
|
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8,
|
||||||
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72,
|
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72,
|
||||||
0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
|
0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
|
||||||
0x72, 0x22, 0x23, 0x0a, 0x11, 0x42, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d,
|
0x72, 0x22, 0x55, 0x0a, 0x23, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01,
|
0x66, 0x6c, 0x69, 0x63, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x40, 0x0a, 0x12, 0x42, 0x61, 0x6e, 0x52, 0x65, 0x73,
|
0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x76, 0x69, 0x6f, 0x6c,
|
||||||
|
0x61, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x42,
|
||||||
|
0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x5b, 0x0a, 0x2b, 0x46, 0x69, 0x6e, 0x61,
|
||||||
|
0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x6f,
|
||||||
|
0x6c, 0x76, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c,
|
||||||
|
0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x11, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63,
|
||||||
|
0x6b, 0x48, 0x61, 0x73, 0x68, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x68, 0x75, 0x74, 0x44, 0x6f, 0x77,
|
||||||
|
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22,
|
||||||
|
0x45, 0x0a, 0x17, 0x53, 0x68, 0x75, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72,
|
||||||
|
0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52,
|
||||||
|
0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x70, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61,
|
||||||
|
0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||||
|
0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18,
|
||||||
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x48, 0x61, 0x73, 0x68,
|
||||||
|
0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||||
|
0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x41, 0x73, 0x63, 0x65,
|
||||||
|
0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x41,
|
||||||
|
0x73, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x61, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x48,
|
||||||
|
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65,
|
||||||
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
|
||||||
|
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12,
|
||||||
|
0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
|
0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45,
|
||||||
|
0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x40, 0x0a, 0x20, 0x4e,
|
||||||
|
0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||||
|
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||||
|
0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||||
|
0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x4f, 0x0a,
|
||||||
|
0x21, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e,
|
||||||
|
0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||||
|
0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52,
|
||||||
|
0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x95,
|
||||||
|
0x01, 0x0a, 0x1f, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4e,
|
||||||
|
0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||||
|
0x67, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||||
|
0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x55, 0x74,
|
||||||
|
0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e,
|
||||||
|
0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x64, 0x64, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x07, 0x72, 0x65,
|
||||||
|
0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x42, 0x79, 0x41,
|
||||||
|
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72,
|
||||||
|
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x15, 0x55, 0x74, 0x78, 0x6f, 0x73,
|
||||||
|
0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
|
0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x6f, 0x75,
|
||||||
|
0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x70, 0x63, 0x4f, 0x75, 0x74, 0x70,
|
||||||
|
0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x35,
|
||||||
|
0x0a, 0x09, 0x75, 0x74, 0x78, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
|
0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x70,
|
||||||
|
0x63, 0x55, 0x74, 0x78, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x75, 0x74, 0x78, 0x6f,
|
||||||
|
0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x47, 0x0a, 0x27, 0x53, 0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x74,
|
||||||
|
0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67,
|
||||||
|
0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
|
0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20,
|
||||||
|
0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x56,
|
||||||
|
0x0a, 0x28, 0x53, 0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x55,
|
||||||
|
0x74, 0x78, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72,
|
||||||
|
0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52,
|
||||||
|
0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x55, 0x74, 0x78,
|
||||||
|
0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61,
|
||||||
|
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09,
|
||||||
|
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x22, 0x47, 0x65,
|
||||||
|
0x74, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65,
|
||||||
|
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
|
0x12, 0x3a, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||||
|
0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x55, 0x74,
|
||||||
|
0x78, 0x6f, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x45, 0x6e,
|
||||||
|
0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x05,
|
||||||
|
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
|
||||||
|
0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x31, 0x0a, 0x2f, 0x47, 0x65, 0x74, 0x56,
|
||||||
|
0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61,
|
||||||
|
0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x7c, 0x0a, 0x30, 0x47,
|
||||||
|
0x65, 0x74, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65,
|
||||||
|
0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||||
|
0x1c, 0x0a, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x04, 0x52, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a,
|
||||||
|
0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72,
|
||||||
|
0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3b, 0x0a, 0x39, 0x4e, 0x6f, 0x74,
|
||||||
|
0x69, 0x66, 0x79, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
|
||||||
|
0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72,
|
||||||
|
0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d,
|
||||||
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x68, 0x0a, 0x3a, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79,
|
||||||
|
0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50,
|
||||||
|
0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x68,
|
||||||
|
0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73,
|
||||||
|
0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07,
|
||||||
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65,
|
||||||
|
0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
|
||||||
|
0x22, 0x82, 0x01, 0x0a, 0x38, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65,
|
||||||
|
0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63,
|
||||||
|
0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69,
|
||||||
|
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x46, 0x0a,
|
||||||
|
0x1e, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64,
|
||||||
|
0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18,
|
||||||
|
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1e, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x65,
|
||||||
|
0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x75, 0x65,
|
||||||
|
0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x31, 0x0a, 0x2f, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50,
|
||||||
|
0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x53,
|
||||||
|
0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x5e, 0x0a, 0x30, 0x4e, 0x6f, 0x74, 0x69,
|
||||||
|
0x66, 0x79, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54,
|
||||||
|
0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73,
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05,
|
||||||
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70,
|
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
|
0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f,
|
||||||
0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x13, 0x55, 0x6e, 0x62, 0x61,
|
0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x30, 0x0a, 0x2e, 0x50, 0x72, 0x75, 0x6e,
|
||||||
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f,
|
||||||
0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22,
|
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
|
||||||
0x42, 0x0a, 0x14, 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x38, 0x0a, 0x36, 0x53, 0x74,
|
||||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
|
0x6f, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x69,
|
||||||
0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77,
|
0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76,
|
||||||
0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72,
|
0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73,
|
||||||
0x72, 0x6f, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
|
0x73, 0x61, 0x67, 0x65, 0x22, 0x65, 0x0a, 0x37, 0x53, 0x74, 0x6f, 0x70, 0x4e, 0x6f, 0x74, 0x69,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x7c, 0x0a, 0x16,
|
0x66, 0x79, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x69, 0x6e,
|
||||||
0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d,
|
0x74, 0x55, 0x54, 0x58, 0x4f, 0x53, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x32, 0x70, 0x49, 0x64, 0x18,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x32, 0x70, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b,
|
0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45,
|
||||||
0x04, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2a,
|
0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x23, 0x0a, 0x11, 0x42,
|
||||||
0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
|
0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72,
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70,
|
||||||
0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69,
|
0x22, 0x40, 0x0a, 0x12, 0x42, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d,
|
||||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
|
||||||
0x74, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69,
|
0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69,
|
||||||
0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72,
|
||||||
|
0x6f, 0x72, 0x22, 0x25, 0x0a, 0x13, 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18,
|
||||||
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x42, 0x0a, 0x14, 0x55, 0x6e, 0x62,
|
||||||
|
0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
|
0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28,
|
||||||
|
0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50,
|
||||||
|
0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x17, 0x0a,
|
||||||
|
0x15, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d,
|
||||||
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x7c, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66,
|
||||||
|
0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
|
0x12, 0x14, 0x0a, 0x05, 0x70, 0x32, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x05, 0x70, 0x32, 0x70, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x70, 0x6f, 0x6f,
|
||||||
|
0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x65, 0x6d,
|
||||||
|
0x70, 0x6f, 0x6f, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
|
||||||
|
0x72, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x77, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x50, 0x43, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65,
|
||||||
|
0x72, 0x72, 0x6f, 0x72, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||||
|
0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x73, 0x70, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x61, 0x73, 0x70,
|
||||||
|
0x61, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x77, 0x69, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -395,6 +395,7 @@ message GetBlockDagInfoResponseMessage{
|
|||||||
int64 pastMedianTime = 6;
|
int64 pastMedianTime = 6;
|
||||||
repeated string virtualParentHashes = 7;
|
repeated string virtualParentHashes = 7;
|
||||||
string pruningPointHash = 8;
|
string pruningPointHash = 8;
|
||||||
|
uint64 virtualDaaScore = 9;
|
||||||
RPCError error = 1000;
|
RPCError error = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ func (x *GetBlockDagInfoResponseMessage) toAppMessage() (appmessage.Message, err
|
|||||||
Difficulty: x.Difficulty,
|
Difficulty: x.Difficulty,
|
||||||
PastMedianTime: x.PastMedianTime,
|
PastMedianTime: x.PastMedianTime,
|
||||||
PruningPointHash: x.PruningPointHash,
|
PruningPointHash: x.PruningPointHash,
|
||||||
|
VirtualDAAScore: x.VirtualDaaScore,
|
||||||
Error: rpcErr,
|
Error: rpcErr,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
@ -63,6 +64,7 @@ func (x *KaspadMessage_GetBlockDagInfoResponse) fromAppMessage(message *appmessa
|
|||||||
Difficulty: message.Difficulty,
|
Difficulty: message.Difficulty,
|
||||||
PastMedianTime: message.PastMedianTime,
|
PastMedianTime: message.PastMedianTime,
|
||||||
PruningPointHash: message.PruningPointHash,
|
PruningPointHash: message.PruningPointHash,
|
||||||
|
VirtualDaaScore: message.VirtualDAAScore,
|
||||||
Error: err,
|
Error: err,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -1,26 +1,29 @@
|
|||||||
ARG KASPAD_VERSION
|
ARG KASPAD_IMAGE
|
||||||
|
ARG KASPAMINER_IMAGE
|
||||||
|
|
||||||
FROM 578712463641.dkr.ecr.eu-central-1.amazonaws.com/kaspad-release-candidate:$KASPAD_VERSION as kaspad
|
FROM ${KASPAD_IMAGE} as kaspad
|
||||||
FROM 578712463641.dkr.ecr.eu-central-1.amazonaws.com/kaspaminer-release-candidate:$KASPAD_VERSION as kaspaminer
|
FROM ${KASPAMINER_IMAGE} as kaspaminer
|
||||||
|
|
||||||
FROM golang:1.16-alpine
|
FROM golang:1.16-alpine
|
||||||
|
|
||||||
|
RUN mkdir -p /go/src/github.com/kaspanet/kaspad
|
||||||
|
|
||||||
|
WORKDIR /go/src/github.com/kaspanet/kaspad
|
||||||
|
|
||||||
RUN apk add bash build-base git
|
RUN apk add bash build-base git
|
||||||
|
|
||||||
ARG KASPAD_VERSION
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
COPY --from=kaspad /app/ /app/
|
COPY --from=kaspad /app/ /app/
|
||||||
COPY --from=kaspaminer /app/ /app/
|
COPY --from=kaspaminer /app/ /app/
|
||||||
ENV PATH="/app:${PATH}"
|
ENV PATH="/app:${PATH}"
|
||||||
|
|
||||||
COPY . /tests
|
WORKDIR /go/src/github.com/kaspanet/kaspad/stability-tests
|
||||||
|
|
||||||
WORKDIR /tests
|
|
||||||
|
|
||||||
RUN git ls-remote https://github.com/kaspanet/kaspad.git $KASPAD_VERSION | awk '{print $1;}' > /tmp/kaspad_git_commit
|
|
||||||
RUN go mod edit -dropreplace github.com/kaspanet/kaspad
|
|
||||||
RUN go mod edit -replace github.com/kaspanet/kaspad=github.com/kaspanet/kaspad@`cat /tmp/kaspad_git_commit` ;
|
|
||||||
RUN go mod download
|
|
||||||
|
|
||||||
RUN go install ./...
|
RUN go install ./...
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ KASPAD_PID=$!
|
|||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
RUN_STABILITY_TESTS=true go test ../ -- --rpc-address=127.0.0.1:"${KASPAD_RPC_PORT}" --profile=7000
|
RUN_STABILITY_TESTS=true go test ../ -v -timeout 86400s -- --rpc-address=127.0.0.1:"${KASPAD_RPC_PORT}" --profile=7000
|
||||||
TEST_EXIT_CODE=$?
|
TEST_EXIT_CODE=$?
|
||||||
|
|
||||||
kill $KASPAD_PID
|
kill $KASPAD_PID
|
||||||
|
@ -20,8 +20,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
payAddress = "kaspasim:qr79e37hxdgkn4xjjmfxvqvayc5gsmsql2660d08u9ej9vnc8lzcywr265u64"
|
payAddress = "kaspasim:qzuax2jhawd354e54thhpd9m9wg03pdzwjlpr4vtq3k7xrpumhhtwa2hkr3ep"
|
||||||
payAddressPrivateKey = "0ec5d7308f65717f3f0c3e4d962d73056c1c255a16593b3989589281b51ad5bc"
|
payAddressPrivateKey = "05d8f681e954a550395ee2297fc1a14f6e801f554c0b9d48cd7165a7ea72ff77"
|
||||||
fundingCoinbaseTransactionAmount = 1000
|
fundingCoinbaseTransactionAmount = 1000
|
||||||
outputsPerTransaction = 3
|
outputsPerTransaction = 3
|
||||||
transactionFee = 1000
|
transactionFee = 1000
|
||||||
|
@ -11,7 +11,7 @@ const validCharacters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs
|
|||||||
const (
|
const (
|
||||||
appMajor uint = 0
|
appMajor uint = 0
|
||||||
appMinor uint = 10
|
appMinor uint = 10
|
||||||
appPatch uint = 0
|
appPatch uint = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
// appBuild is defined as a variable so it can be overridden during the build
|
// appBuild is defined as a variable so it can be overridden during the build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user