Skip to content

Commit

Permalink
chore!(workspace): Bump versions and dump gas price (#3806)
Browse files Browse the repository at this point in the history
  • Loading branch information
breathx authored Mar 11, 2024
1 parent 9455255 commit 80fffbc
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 71 deletions.
122 changes: 61 additions & 61 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "1.1.2"
version = "1.2.0"
authors = ["Gear Technologies"]
edition = "2021"
license = "GPL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion gcli/tests/cmd/claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::common::{
};
use gsdk::Api;

const REWARD_PER_BLOCK: u128 = 75_000; // 3_000 gas * 25 value per gas
const REWARD_PER_BLOCK: u128 = 18_000; // 3_000 gas * 6 value per gas

#[tokio::test]
async fn test_command_claim_works() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion gtest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ pub mod constants {
/// requirement.
pub const EXISTENTIAL_DEPOSIT: Value = 10 * UNITS;
/// Value per gas.
pub const VALUE_PER_GAS: Value = 25;
pub const VALUE_PER_GAS: Value = 6;
/// Duration of one block in msecs.
pub const BLOCK_DURATION_IN_MSECS: u64 = 3000;
/// Duration of one epoch.
Expand Down
2 changes: 1 addition & 1 deletion pallets/gear-bank/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ mod consts {

pub const EXISTENTIAL_DEPOSIT: Balance = 100_000;

pub const VALUE_PER_GAS: Balance = 25;
pub const VALUE_PER_GAS: Balance = 6;
}

pub use consts::*;
Expand Down
4 changes: 2 additions & 2 deletions pallets/gear-bank/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ fn withdraw_gas_small_amount() {
#[test]
fn withdraw_gas_small_amount_user_account_deleted() {
new_test_ext().execute_with(|| {
const GAS_VALUE_AMOUNT: Balance = EXISTENTIAL_DEPOSIT - VALUE_PER_GAS;
const GAS_VALUE_AMOUNT: Balance = (EXISTENTIAL_DEPOSIT - 1) / VALUE_PER_GAS * VALUE_PER_GAS;
assert!(GAS_VALUE_AMOUNT < CurrencyOf::<Test>::minimum_balance());

const GAS_AMOUNT: u64 = (GAS_VALUE_AMOUNT / VALUE_PER_GAS) as u64;
Expand Down Expand Up @@ -523,7 +523,7 @@ fn spend_gas_small_amount() {
#[test]
fn spend_gas_small_amount_validator_account_deleted() {
new_test_ext().execute_with(|| {
const GAS_VALUE_AMOUNT: Balance = EXISTENTIAL_DEPOSIT - VALUE_PER_GAS;
const GAS_VALUE_AMOUNT: Balance = (EXISTENTIAL_DEPOSIT - 1) / VALUE_PER_GAS * VALUE_PER_GAS;
assert!(GAS_VALUE_AMOUNT < CurrencyOf::<Test>::minimum_balance());

const GAS_AMOUNT: u64 = (GAS_VALUE_AMOUNT / VALUE_PER_GAS) as u64;
Expand Down
2 changes: 1 addition & 1 deletion pallets/gear/src/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ impl Default for Limits {
impl<T: Config> Default for InstructionWeights<T> {
fn default() -> Self {
Self {
version: 1110,
version: 1200,
i64const: cost_instr!(instr_i64const, 1),
i64load: cost_instr!(instr_i64load, 0),
i32load: cost_instr!(instr_i32load, 0),
Expand Down
2 changes: 1 addition & 1 deletion runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ parameter_types! {
pub const BlockHashCount: BlockNumber = 2400;
}

pub const VALUE_PER_GAS: u128 = 25;
pub const VALUE_PER_GAS: u128 = 6;

pub type NegativeImbalance<T> = <pallet_balances::Pallet<T> as Currency<
<T as frame_system::Config>::AccountId,
Expand Down
2 changes: 1 addition & 1 deletion runtime/vara/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// The version of the runtime specification. A full node will not attempt to use its native
// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
// `spec_version`, and `authoring_version` are the same between Wasm and native.
spec_version: 1120,
spec_version: 1200,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
3 changes: 2 additions & 1 deletion runtime/vara/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ use crate::*;

/// All migrations that will run on the next runtime upgrade.
pub type Migrations = (
// not yet executed
/* release v1.2.0 */
// migration for stored contexts
pallet_gear_messenger::migrations::MigrateToV3<Runtime>,
// check for existence of the rent pool account
pallet_gear_staking_rewards::migrations::CheckRentPoolId<Runtime>,
Expand Down

0 comments on commit 80fffbc

Please sign in to comment.