Skip to content

Commit

Permalink
Merge pull request #1634 from orbs-network/feature/pv2
Browse files Browse the repository at this point in the history
separate client and consensus block protocols
  • Loading branch information
noambergIL authored Oct 25, 2020
2 parents eec7a96 + 04f761f commit cc7401b
Show file tree
Hide file tree
Showing 29 changed files with 127 additions and 143 deletions.
5 changes: 3 additions & 2 deletions config/config_accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ func emptyConfig() mutableNodeConfig {
}

const (
MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE = primitives.ProtocolVersion(1) // do not re-define in other places (not even in tests) cannot be smaller than min will fail
MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE = primitives.ProtocolVersion(1) // do not re-define in other places (not even in tests)
MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION = primitives.ProtocolVersion(2) // do not re-define in other places (not even in tests) cannot be smaller than min will fail
MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION = primitives.ProtocolVersion(1) // do not re-define in other places (not even in tests)
MAXIMAL_CLIENT_PROTOCOL_VERSION = primitives.ProtocolVersion(1) // maximal client protocol version (planned to be fully backwards compatible)
VIRTUAL_CHAIN_ID = "VIRTUAL_CHAIN_ID"
NETWORK_TYPE = "NETWORK_TYPE"

Expand Down
4 changes: 2 additions & 2 deletions config/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
)

func ValidateNodeLogic(cfg NodeConfig) error {
if MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE < MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE {
return errors.Errorf("Maximal Protocol version %d must be equal or higher than minimal Protocol Version %d", MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE, MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE)
if MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION < MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION {
return errors.Errorf("Maximal Protocol version %d must be equal or higher than minimal Protocol Version %d", MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION, MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION)
}
if cfg.BlockSyncNoCommitInterval() < cfg.BenchmarkConsensusRetryInterval() {
return errors.Errorf("node sync timeout must be greater than benchmark consensus timeout (BlockSyncNoCommitInterval = %s, is greater than BenchmarkConsensusRetryInterval %s)",
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ require (
github.com/ethereum/go-ethereum v1.9.6
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/google/go-cmp v0.3.1
github.com/huin/goupnp v1.0.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions services/blockstorage/test/commit_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ func TestCommitBlockReturnsErrorWhenProtocolVersionMismatches(t *testing.T) {
allowingErrorsMatching("protocol version mismatch in transactions block header").
start(ctx)

_, err := harness.commitBlock(ctx, builders.BlockPair().WithProtocolVersion(config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE+1).Build())
_, err := harness.commitBlock(ctx, builders.BlockPair().WithProtocolVersion(config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION+1).Build())

require.EqualError(t, err, fmt.Sprintf("protocol version (%d) higher than maximal supported (%d) in transactions block header", config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE+1, config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE))
require.EqualError(t, err, fmt.Sprintf("protocol version (%d) higher than maximal supported (%d) in transactions block header", config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION+1, config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION))
})
}

Expand Down
6 changes: 3 additions & 3 deletions services/blockstorage/test/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ func TestValidateBlockWithInvalidProtocolVersion(t *testing.T) {
block := builders.BlockPair().Build()
var prevBlock *protocol.BlockPairContainer

errorProtocolVersion := config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE+100
expectedTxErrMsg := fmt.Sprintf("protocol version (%d) higher than maximal supported (%d) in transactions block header", errorProtocolVersion, config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE)
expectedRxErrMsg := fmt.Sprintf("protocol version (%d) higher than maximal supported (%d) in results block header", errorProtocolVersion, config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE)
errorProtocolVersion := config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION +100
expectedTxErrMsg := fmt.Sprintf("protocol version (%d) higher than maximal supported (%d) in transactions block header", errorProtocolVersion, config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION)
expectedRxErrMsg := fmt.Sprintf("protocol version (%d) higher than maximal supported (%d) in results block header", errorProtocolVersion, config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION)

block.TransactionsBlock.Header.MutateProtocolVersion(errorProtocolVersion)
_, err := harness.blockStorage.ValidateBlockForCommit(ctx, &services.ValidateBlockForCommitInput{BlockPair: block, PrevBlockPair: prevBlock})
Expand Down
8 changes: 4 additions & 4 deletions services/blockstorage/validate_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ func (s *Service) validateProtocolVersion(blockPair *protocol.BlockPairContainer
txBlockHeader := blockPair.TransactionsBlock.Header
rsBlockHeader := blockPair.ResultsBlock.Header

if txBlockHeader.ProtocolVersion() > config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE {
return fmt.Errorf("protocol version (%d) higher than maximal supported (%d) in transactions block header", txBlockHeader.ProtocolVersion(), config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE)
if txBlockHeader.ProtocolVersion() > config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION {
return fmt.Errorf("protocol version (%d) higher than maximal supported (%d) in transactions block header", txBlockHeader.ProtocolVersion(), config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION)
}

if rsBlockHeader.ProtocolVersion() > config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE {
return fmt.Errorf("protocol version (%d) higher than maximal supported (%d) in results block header", rsBlockHeader.ProtocolVersion(), config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE)
if rsBlockHeader.ProtocolVersion() > config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION {
return fmt.Errorf("protocol version (%d) higher than maximal supported (%d) in results block header", rsBlockHeader.ProtocolVersion(), config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION)
}

return nil
Expand Down
11 changes: 6 additions & 5 deletions services/consensuscontext/create_transactions_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package consensuscontext
import (
"context"
"github.com/orbs-network/crypto-lib-go/crypto/digest"
"github.com/orbs-network/orbs-network-go/config"
"github.com/orbs-network/orbs-network-go/services/processor/native/repository/Triggers"
"github.com/orbs-network/orbs-spec/types/go/primitives"
"github.com/orbs-network/orbs-spec/types/go/protocol"
Expand Down Expand Up @@ -48,7 +49,7 @@ func (s *service) createTransactionsBlock(ctx context.Context, input *services.R
return nil, errors.New("transactions pool GetTransactionsForOrdering returned proposed block timestamp of zero")
}

transactionsForBlock := s.updateTransactions(proposedTransactions.SignedTransactions, proposedProtocolVersion.ProtocolVersion, proposedBlockTimestamp)
transactionsForBlock := s.updateTransactions(proposedTransactions.SignedTransactions, proposedBlockTimestamp)
txCount := len(transactionsForBlock)

merkleTransactionsRoot, err := digest.CalcTransactionsMerkleRoot(transactionsForBlock)
Expand Down Expand Up @@ -117,10 +118,10 @@ func (s *service) fetchTransactions(ctx context.Context, blockProtocolVersion pr
return proposedTransactions, nil
}

func (s *service) createTriggerTransaction(protocolVersion primitives.ProtocolVersion, blockTime primitives.TimestampNano) *protocol.SignedTransaction {
func (s *service) createTriggerTransaction(blockTime primitives.TimestampNano) *protocol.SignedTransaction {
return (&protocol.SignedTransactionBuilder{
Transaction: &protocol.TransactionBuilder{
ProtocolVersion: protocolVersion,
ProtocolVersion: config.MAXIMAL_CLIENT_PROTOCOL_VERSION,
VirtualChainId: s.config.VirtualChainId(),
Timestamp: blockTime,
ContractName: primitives.ContractName(triggers_systemcontract.CONTRACT_NAME),
Expand All @@ -129,9 +130,9 @@ func (s *service) createTriggerTransaction(protocolVersion primitives.ProtocolVe
}).Build()
}

func (s *service) updateTransactions(txs []*protocol.SignedTransaction, protocolVersion primitives.ProtocolVersion, blockTime primitives.TimestampNano) []*protocol.SignedTransaction {
func (s *service) updateTransactions(txs []*protocol.SignedTransaction, blockTime primitives.TimestampNano) []*protocol.SignedTransaction {
if s.config.ConsensusContextTriggersEnabled() {
txs = append(txs, s.createTriggerTransaction(protocolVersion, blockTime))
txs = append(txs, s.createTriggerTransaction(blockTime))
}
return txs
}
6 changes: 3 additions & 3 deletions services/consensuscontext/create_transactions_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func newHarnessWithConfigOnly(enableTriggers bool) *service {

func requireTransactionToBeATriggerTransaction(t *testing.T, tx *protocol.SignedTransaction, cfg config.ConsensusContextConfig) {
require.Empty(t, tx.Signature())
require.Equal(t, config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE, tx.Transaction().ProtocolVersion())
require.Equal(t, config.MAXIMAL_CLIENT_PROTOCOL_VERSION, tx.Transaction().ProtocolVersion())
require.Equal(t, cfg.VirtualChainId(), tx.Transaction().VirtualChainId())
require.Equal(t, primitives.ContractName(triggers_systemcontract.CONTRACT_NAME), tx.Transaction().ContractName())
require.Equal(t, primitives.MethodName(triggers_systemcontract.METHOD_TRIGGER), tx.Transaction().MethodName())
Expand All @@ -39,15 +39,15 @@ func requireTransactionToBeATriggerTransaction(t *testing.T, tx *protocol.Signed
func TestConsensusContextCreateBlock_UpdateDoesntAddTriggerWhenDisabled(t *testing.T) {
s := newHarnessWithConfigOnly(false)
txs := []*protocol.SignedTransaction{builders.Transaction().Build()}
outputTxs := s.updateTransactions(txs, 1, 0)
outputTxs := s.updateTransactions(txs, 0)
require.Equal(t, len(txs), len(outputTxs), "should not add txs")
require.EqualValues(t, txs[0], outputTxs[0], "should be same tx")
}

func TestConsensusContextCreateBlock_UpdateAddTriggerWhenEnabled(t *testing.T) {
s := newHarnessWithConfigOnly(true)
txs := []*protocol.SignedTransaction{builders.Transaction().Build()}
outputTxs := s.updateTransactions(txs, 1, 6)
outputTxs := s.updateTransactions(txs, 6)
require.Equal(t, len(txs)+1, len(outputTxs), "should not add txs")
require.EqualValues(t, txs[0], outputTxs[0], "should be same tx")
requireTransactionToBeATriggerTransaction(t, outputTxs[1], s.config)
Expand Down
2 changes: 1 addition & 1 deletion services/consensuscontext/test/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func newHarness(logger log.Logger, enableTriggers bool) *harness {
cfg := config.ForConsensusContextTests(enableTriggers)

management := &services.MockManagement{}
setManagementValues(management, config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE, primitives.TimestampSeconds(time.Now().Unix()), 50)
setManagementValues(management, config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION, primitives.TimestampSeconds(time.Now().Unix()), 50)

metricFactory := metric.NewRegistry()

Expand Down
14 changes: 7 additions & 7 deletions services/consensuscontext/validate_transactions_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ type txValidatorContext struct {

func validateTxProtocolVersion(ctx context.Context, vctx *txValidatorContext) error {
checkedProtocolVersion := vctx.input.TransactionsBlock.Header.ProtocolVersion()
if checkedProtocolVersion > config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE {
return errors.Wrapf(ErrMismatchedProtocolVersion, "maximal %v actual %v", config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE, checkedProtocolVersion)
if checkedProtocolVersion > config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION {
return errors.Wrapf(ErrMismatchedProtocolVersion, "maximal %v actual %v", config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION, checkedProtocolVersion)
}
if checkedProtocolVersion < config.MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE {
return errors.Wrapf(ErrMismatchedProtocolVersion, "minimal %v actual %v", config.MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE, checkedProtocolVersion)
if checkedProtocolVersion < config.MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION {
return errors.Wrapf(ErrMismatchedProtocolVersion, "minimal %v actual %v", config.MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION, checkedProtocolVersion)
}
return nil
}
Expand Down Expand Up @@ -181,7 +181,7 @@ func validateTransactionsBlockTriggerCompliance(ctx context.Context, cfg config.
if !validateTransactionsBlockTxTriggerIsValidTime(txs[txCount-1], transactionsBlock.Header.Timestamp()) {
return ErrTriggerEnabledAndTriggerInvalidTime
}
if !validateTransactionsBlockTxTriggerIsValid(txs[txCount-1], transactionsBlock.Header.ProtocolVersion(), cfg) {
if !validateTransactionsBlockTxTriggerIsValid(txs[txCount-1], cfg) {
return ErrTriggerEnabledAndTriggerInvalid
}

Expand Down Expand Up @@ -213,13 +213,13 @@ func validateTransactionsBlockTxTriggerIsValidTime(signedTransaction *protocol.S
return signedTransaction.Transaction().Timestamp() == blockTime
}

func validateTransactionsBlockTxTriggerIsValid(signedTransaction *protocol.SignedTransaction, blockProtocolVersion primitives.ProtocolVersion, cfg config.ConsensusContextConfig) bool {
func validateTransactionsBlockTxTriggerIsValid(signedTransaction *protocol.SignedTransaction, cfg config.ConsensusContextConfig) bool {
if len(signedTransaction.Signature()) != 0 {
return false
}

transaction := signedTransaction.Transaction()
if transaction.ProtocolVersion() != blockProtocolVersion ||
if transaction.ProtocolVersion() > config.MAXIMAL_CLIENT_PROTOCOL_VERSION ||
transaction.VirtualChainId() != cfg.VirtualChainId() ||
len(transaction.InputArgumentArray()) != 0 ||
len(transaction.Signer().Raw()) != 0 {
Expand Down
14 changes: 7 additions & 7 deletions services/consensuscontext/validate_transactions_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestTransactionsBlockValidators(t *testing.T) {

t.Run("should NOT return error for transaction block with minimal protocol version", func(t *testing.T) {
vctx := toTxValidatorContext(cfg)
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE); err != nil {
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION); err != nil {
t.Error(err)
}
err := validateTxProtocolVersion(context.Background(), vctx)
Expand All @@ -69,7 +69,7 @@ func TestTransactionsBlockValidators(t *testing.T) {

t.Run("should NOT return error for transaction block with maximal protocol version", func(t *testing.T) {
vctx := toTxValidatorContext(cfg)
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE); err != nil {
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION); err != nil {
t.Error(err)
}
err := validateTxProtocolVersion(context.Background(), vctx)
Expand All @@ -78,7 +78,7 @@ func TestTransactionsBlockValidators(t *testing.T) {

t.Run("should return error for transaction block with lower than minimal protocol version", func(t *testing.T) {
vctx := toTxValidatorContext(cfg)
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE - 1); err != nil {
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION - 1); err != nil {
t.Error(err)
}
err := validateTxProtocolVersion(context.Background(), vctx)
Expand All @@ -87,7 +87,7 @@ func TestTransactionsBlockValidators(t *testing.T) {

t.Run("should return error for transaction block with higher than maximal protocol version", func(t *testing.T) {
vctx := toTxValidatorContext(cfg)
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE + 1); err != nil {
if err := vctx.input.TransactionsBlock.Header.MutateProtocolVersion(config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION + 1); err != nil {
t.Error(err)
}
err := validateTxProtocolVersion(context.Background(), vctx)
Expand Down Expand Up @@ -313,7 +313,7 @@ func TestConsensusContextValidateTransactionsBlockTriggerCompliance(t *testing.T
cfg := config.ForConsensusContextTests(tt.triggerEnabled)
tb := &protocol.TransactionsBlockContainer{
Header: (&protocol.TransactionsBlockHeaderBuilder{
ProtocolVersion: config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE,
ProtocolVersion: config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION,
Timestamp: triggerTx.Transaction().Timestamp(),
}).Build(),
SignedTransactions: tt.txs,
Expand All @@ -331,7 +331,7 @@ func TestConsensusContextValidateTransactionsBlockTriggerCompliance(t *testing.T
}
func TestConsensusContextValidateTransactionsBlockTriggerIsValid(t *testing.T) {
with.Context(func(ctx context.Context) {
pv := config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE
pv := config.MAXIMAL_CLIENT_PROTOCOL_VERSION
cfg := config.ForConsensusContextTests(false)
tests := []struct {
name string
Expand Down Expand Up @@ -371,7 +371,7 @@ func TestConsensusContextValidateTransactionsBlockTriggerIsValid(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
isOk := validateTransactionsBlockTxTriggerIsValid(tt.tx, pv, cfg)
isOk := validateTransactionsBlockTxTriggerIsValid(tt.tx, cfg)
require.Equal(t, tt.expectedToPass, isOk, "validator and expected don't match")
})
}
Expand Down
2 changes: 1 addition & 1 deletion services/management/adapter/file_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func parseProtocolVersion(protocolVersionEvents []protocolVersionEvent) []manage
}

if len(protocolVersionPeriods) == 0 {
protocolVersionPeriods = append(protocolVersionPeriods, management.ProtocolVersionTerm{AsOfReference: 0, Version: config.MINIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE})
protocolVersionPeriods = append(protocolVersionPeriods, management.ProtocolVersionTerm{AsOfReference: 0, Version: config.MINIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION})
}

// TODO POSV2 consider if last PV is larger than config.maximalpv -> fail ?
Expand Down
2 changes: 1 addition & 1 deletion services/management/adapter/memory_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewMemoryProvider(committee []primitives.NodeAddress, topology []*services.
genesisReference: primitives.TimestampSeconds(time.Now().Unix() - DEFAULT_GENESIS_ONSET),
topology: topology,
committees: []management.CommitteeTerm{{AsOfReference: 0, Members: committee, Weights: generateWeightsForCommittee(committee)}},
protocolVersions: []management.ProtocolVersionTerm{{AsOfReference: 0, Version: config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE}},
protocolVersions: []management.ProtocolVersionTerm{{AsOfReference: 0, Version: config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION}},
isSubscriptionActives: []management.SubscriptionTerm{{AsOfReference: 0, IsActive: true}},
}
}
Expand Down
2 changes: 1 addition & 1 deletion services/publicapi/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func isOutputPotentiallyOutOfSync(config config.PublicApiConfig, referenceBlockT

func validateRequest(cfg config.PublicApiConfig, protocolVersion primitives.ProtocolVersion, vcId primitives.VirtualChainId) (protocol.TransactionStatus, error) {
// TODO V2 - revisit this logic once client PV is decided. (OdedW)
if protocolVersion > config.MAXIMAL_PROTOCOL_VERSION_SUPPORTED_VALUE{
if protocolVersion > config.MAXIMAL_CONSENSUS_BLOCK_PROTOCOL_VERSION {
return protocol.TRANSACTION_STATUS_REJECTED_UNSUPPORTED_VERSION, errors.Errorf("invalid protocol version %d", protocolVersion)
}

Expand Down
Loading

0 comments on commit cc7401b

Please sign in to comment.