Skip to content

Commit

Permalink
fix: add missing consensus constants to get_constants grpc (#5183)
Browse files Browse the repository at this point in the history
Description
---
Adds `validator_node_registration_min_deposit_amount` `validator_node_registration_min_lock_height` `validator_node_registration_shuffle_interval_epoch` fields to `get_constants` base node GRPC method.

Motivation and Context
---
These fields are required for L2 consensus

How Has This Been Tested?
---
Type changes only, lints pass

<!-- Does this include a breaking change? If so, include this line as a footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
  • Loading branch information
sdbondi authored Feb 15, 2023
1 parent 30c0db1 commit 9900d5d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions applications/tari_app_grpc/proto/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,8 @@ message ConsensusConstants {
repeated OutputType permitted_output_types = 29;
/// The length of an epoch
uint64 epoch_length = 30;
// The minimum deposit amount for a validator node registration
uint64 validator_node_registration_min_deposit_amount = 31;
uint64 validator_node_registration_min_lock_height = 32;
uint64 validator_node_registration_shuffle_interval_epoch = 33;
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ impl From<ConsensusConstants> for grpc::ConsensusConstants {
permitted_output_types,
validator_node_validity_period: cc.validator_node_validity_period_epochs().as_u64(),
epoch_length: cc.epoch_length(),
validator_node_registration_min_deposit_amount: cc
.validator_node_registration_min_deposit_amount()
.as_u64(),
validator_node_registration_min_lock_height: cc.validator_node_registration_min_lock_height(),
validator_node_registration_shuffle_interval_epoch: cc
.validator_node_registration_shuffle_interval()
.as_u64(),
}
}
}

0 comments on commit 9900d5d

Please sign in to comment.