Skip to content

Commit

Permalink
Release 3.4.0: Kensetsu Phase 1 (#1036)
Browse files Browse the repository at this point in the history
* release(kensetsu): prepare release

* release: bump version to 3.4.0

---------

Co-authored-by: Vladimir Stepanenko <[email protected]>
  • Loading branch information
Alexey-N-Chernyshov and vovac12 authored May 17, 2024
1 parent 1975edb commit 47a7f6d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 31 deletions.
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "framenode"
version = "3.3.0"
version = "3.4.0"
authors = ["Parity Technologies <[email protected]>"]
build = "build.rs"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion node/chain_spec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "framenode-chain-spec"
version = "3.3.0"
version = "3.4.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license = "BSD-4-Clause"
homepage = "https://sora.org"
repository = "https://github.com/sora-xor/sora2-network"
name = "framenode-runtime"
version = "3.3.0"
version = "3.4.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
29 changes: 7 additions & 22 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,10 @@ pub use order_book_benchmarking;
#[cfg(feature = "private-net")]
pub use qa_tools;
pub use {
assets, dex_api, eth_bridge, frame_system, liquidity_proxy, multicollateral_bonding_curve_pool,
order_book, trading_pair, xst,
assets, dex_api, eth_bridge, frame_system, kensetsu, liquidity_proxy,
multicollateral_bonding_curve_pool, order_book, trading_pair, xst,
};

#[cfg(feature = "ready-to-test")] // kensetsu
pub use kensetsu;

/// An index to a block.
pub type BlockNumber = u32;

Expand Down Expand Up @@ -256,10 +253,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("sora-substrate"),
impl_name: create_runtime_str!("sora-substrate"),
authoring_version: 1,
spec_version: 83,
spec_version: 84,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 83,
transaction_version: 84,
state_version: 0,
};

Expand Down Expand Up @@ -1927,7 +1924,6 @@ impl hermes_governance_platform::Config for Runtime {
type WeightInfo = hermes_governance_platform::weights::SubstrateWeight<Runtime>;
}

#[cfg(feature = "ready-to-test")] // kensetsu
parameter_types! {
pub KensetsuTreasuryTechAccountId: TechAccountId = {
TechAccountId::from_generic_pair(
Expand All @@ -1952,13 +1948,10 @@ parameter_types! {
// Not as important as some essential transactions (e.g. im_online or similar ones)
pub KensetsuOffchainWorkerTxPriority: TransactionPriority =
Perbill::from_percent(10) * TransactionPriority::max_value();
// 100 blocks, if tx spoils, worker will resend it
// pub KensetsuOffchainWorkerTxLongevity: TransactionLongevity = 100;
// TODO set 100 for release
pub KensetsuOffchainWorkerTxLongevity: TransactionLongevity = 5;
// 10 blocks, if tx spoils, worker will resend it
pub KensetsuOffchainWorkerTxLongevity: TransactionLongevity = 10;
}

#[cfg(feature = "ready-to-test")] // kensetsu
impl kensetsu::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Randomness = pallet_babe::ParentBlockRandomness<Self>;
Expand Down Expand Up @@ -2440,8 +2433,6 @@ construct_runtime! {
HermesGovernancePlatform: hermes_governance_platform::{Pallet, Call, Storage, Event<T>} = 55,
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 56,
OrderBook: order_book::{Pallet, Call, Storage, Event<T>} = 57,

#[cfg(feature = "ready-to-test")] // kensetsu
Kensetsu: kensetsu::{Pallet, Call, Storage, Event<T>, ValidateUnsigned} = 58,

// Leaf provider should be placed before any pallet which is uses it
Expand Down Expand Up @@ -3196,8 +3187,6 @@ impl_runtime_apis! {
) {
use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList};
use frame_support::traits::StorageInfoTrait;

#[cfg(feature = "ready-to-test")] // kensetsu
use kensetsu_benchmarking::Pallet as KensetsuBench;
use liquidity_proxy_benchmarking::Pallet as LiquidityProxyBench;
use pool_xyk_benchmarking::Pallet as XYKPoolBench;
Expand All @@ -3215,7 +3204,6 @@ impl_runtime_apis! {
list_benchmark!(list, extra, farming, Farming);
list_benchmark!(list, extra, iroha_migration, IrohaMigration);
list_benchmark!(list, extra, dex_api, DEXAPI);
#[cfg(feature = "ready-to-test")] // kensetsu
list_benchmark!(list, extra, kensetsu, KensetsuBench::<Runtime>);
list_benchmark!(list, extra, liquidity_proxy, LiquidityProxyBench::<Runtime>);
list_benchmark!(list, extra, multicollateral_bonding_curve_pool, MulticollateralBondingCurvePool);
Expand Down Expand Up @@ -3271,8 +3259,6 @@ impl_runtime_apis! {
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};

#[cfg(feature = "ready-to-test")] // kensetsu
use kensetsu_benchmarking::Pallet as KensetsuBench;
use liquidity_proxy_benchmarking::Pallet as LiquidityProxyBench;
use pool_xyk_benchmarking::Pallet as XYKPoolBench;
Expand All @@ -3281,7 +3267,7 @@ impl_runtime_apis! {
use demeter_farming_platform_benchmarking::Pallet as DemeterFarmingPlatformBench;
use xst_benchmarking::Pallet as XSTPoolBench;
use order_book_benchmarking::Pallet as OrderBookBench;
#[cfg(feature = "ready-to-test")] // kensetsu

impl kensetsu_benchmarking::Config for Runtime {}
impl liquidity_proxy_benchmarking::Config for Runtime {}
impl pool_xyk_benchmarking::Config for Runtime {}
Expand Down Expand Up @@ -3314,7 +3300,6 @@ impl_runtime_apis! {
add_benchmark!(params, batches, farming, Farming);
add_benchmark!(params, batches, iroha_migration, IrohaMigration);
add_benchmark!(params, batches, dex_api, DEXAPI);
#[cfg(feature = "ready-to-test")] // kensetsu
add_benchmark!(params, batches, kensetsu, KensetsuBench::<Runtime>);
add_benchmark!(params, batches, liquidity_proxy, LiquidityProxyBench::<Runtime>);
add_benchmark!(params, batches, multicollateral_bonding_curve_pool, MulticollateralBondingCurvePool);
Expand Down
10 changes: 4 additions & 6 deletions runtime/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#[cfg(feature = "ready-to-test")] // kensetsu
use crate::*;

#[cfg(not(feature = "ready-to-test"))]
pub type Migrations = ();

#[cfg(feature = "ready-to-test")] // kensetsu
pub type Migrations = (kensetsu::migrations::remove_hard_cap::RemoveHardCap<Runtime>,);
pub type Migrations = (
kensetsu::migrations::init::RegisterTreasuryTechAccount<Runtime>,
kensetsu::migrations::init::GrantPermissionsTreasuryTechAccount<Runtime>,
);

0 comments on commit 47a7f6d

Please sign in to comment.