Skip to content

Commit

Permalink
bump pallets; bump versions: runtime v30, node/client v1.5.4 (#353)
Browse files Browse the repository at this point in the history
* bump encointer-pallets

* bump runtime-version v30, node/client v1.5.4

* [runtime] fix type of existential deposit

* [client] fix build
  • Loading branch information
clangenb authored Sep 22, 2023
1 parent 3e805e3 commit 852355a
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 39 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "encointer-client-notee"
authors = ["encointer.org <[email protected]>"]
edition = "2021"
#keep with node version. major, minor and patch
version = "1.5.3"
version = "1.5.4"

[dependencies]
clap = "2.33"
Expand Down
6 changes: 3 additions & 3 deletions client/src/community_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ impl CommunitySpec for serde_json::Value {
fn demurrage(&self) -> Option<Demurrage> {
match serde_json::from_value::<u64>(self["community"]["demurrage_halving_blocks"].clone()) {
Ok(demurrage_halving_blocks) => {
let demurrage_rate = ln::<BalanceType, BalanceType>(BalanceType::from_num(0.5))
let demurrage_rate = ln::<Demurrage, Demurrage>(Demurrage::from_num(0.5))
.unwrap()
.checked_mul(BalanceType::from_num(-1))
.checked_mul(Demurrage::from_num(-1))
.unwrap()
.checked_div(BalanceType::from_num(demurrage_halving_blocks))
.checked_div(Demurrage::from_num(demurrage_halving_blocks))
.unwrap();

log::info!(
Expand Down
12 changes: 6 additions & 6 deletions client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use encointer_node_notee_runtime::{
Signature, ONE_DAY,
};
use encointer_primitives::{
balances::Demurrage,
balances::{to_U64F64, Demurrage},
bazaar::{Business, BusinessIdentifier, OfferingData},
ceremonies::{
AttestationIndexType, ClaimOfAttendance, CommunityCeremony, CommunityReputation,
Expand Down Expand Up @@ -2509,18 +2509,18 @@ fn get_reputation(
fn apply_demurrage(
entry: BalanceEntry<BlockNumber>,
current_block: BlockNumber,
demurrage_per_block: BalanceType,
demurrage_per_block: Demurrage,
) -> BalanceType {
let elapsed_time_block_number = current_block.checked_sub(entry.last_update).unwrap();
let elapsed_time_u32: u32 = elapsed_time_block_number;
let elapsed_time = BalanceType::from_num(elapsed_time_u32);
let exponent: BalanceType = -demurrage_per_block * elapsed_time;
let elapsed_time = Demurrage::from_num(elapsed_time_u32);
let exponent = -demurrage_per_block * elapsed_time;
debug!(
"demurrage per block {}, current_block {}, last {}, elapsed_blocks {}",
demurrage_per_block, current_block, entry.last_update, elapsed_time
);
let exp_result: BalanceType = exp(exponent).unwrap();
entry.principal.checked_mul(exp_result).unwrap()
let exp_result = exp(exponent).unwrap();
entry.principal.checked_mul(to_U64F64(exp_result).unwrap()).unwrap()
}

fn send_bazaar_xt(matches: &ArgMatches<'_>, bazaar_call: &BazaarCalls) -> Result<(), ()> {
Expand Down
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/encointer/encointer-node"
# * Align minor version with the runtime.
# * Bump patch version for new releases, and make it the release tag.
# * The client should follow this version.
version = "1.5.3"
version = "1.5.4"

[[bin]]
name = "encointer-node-notee"
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "encointer-node-notee-runtime"
repository = "https://github.com/encointer/encointer-node/"
# minor revision must match node/client
# patch revision must match runtime spec_version
version = "1.5.29"
version = "1.5.30"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("encointer-node-notee"),
impl_name: create_runtime_str!("encointer-node-notee"),
authoring_version: 0,
spec_version: 29,
spec_version: 30,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 5,
Expand Down Expand Up @@ -419,7 +419,7 @@ parameter_types! {
pub const MomentsPerDay: Moment = 86_400_000; // [ms/d]
pub const DefaultDemurrage: Demurrage = Demurrage::from_bits(0x0000000000000000000001E3F0A8A973_i128);
/// 0.000005
pub const EncointerExistentialDeposit: BalanceType = BalanceType::from_bits(0x0000000000000000000053e2d6238da4_i128);
pub const EncointerExistentialDeposit: BalanceType = BalanceType::from_bits(0x0000000000000000000053e2d6238da4_u128);
pub const MeetupSizeTarget: u64 = 10;
pub const MeetupMinSize: u64 = 3;
pub const MeetupNewbieLimitDivider: u64 = 2;
Expand Down

0 comments on commit 852355a

Please sign in to comment.