Skip to content

Commit a8952a0

Browse files
authored
Merge pull request #395 from subspace/prepare-for-runtime-upgrade
Prepare for runtime upgrade
2 parents b3578dd + e8edad0 commit a8952a0

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

Dockerfile-runtime

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ COPY test /code/test
2828

2929
# Up until this line all Rust images in this repo should be the same to share the same layers
3030

31+
# TODO: Re-enable cost of storage in future
3132
RUN \
32-
/root/.cargo/bin/cargo build --profile production --package subspace-runtime && \
33-
mv target/production/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm subspace_runtime.compact.compressed.wasm && \
33+
/root/.cargo/bin/cargo build --profile production \
34+
--package subspace-runtime \
35+
--features=subspace-runtime/do-not-enforce-cost-of-storage && \
36+
mv \
37+
target/production/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm \
38+
subspace_runtime.compact.compressed.wasm && \
3439
rm -rf target
3540

3641
ENTRYPOINT ["/usr/bin/cat", "subspace_runtime.compact.compressed.wasm"]

crates/subspace-node/src/chain_spec.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub fn testnet_config_compiled() -> Result<SubspaceChainSpec, String> {
9898
AccountId::from_ss58check("5CXTmJEusve5ixyJufqHThmy4qUrrm6FyLCR7QfE4bbyMTNC")
9999
.expect("Wrong root account address");
100100

101-
let mut balances = vec![];
101+
let mut balances = vec![(sudo_account.clone(), 1_000 * SSC)];
102102
let vesting_schedules = TOKEN_GRANTS
103103
.iter()
104104
.flat_map(|&(account_address, amount)| {
@@ -169,6 +169,11 @@ pub fn testnet_config_compiled() -> Result<SubspaceChainSpec, String> {
169169
}
170170

171171
pub fn dev_config() -> Result<SubspaceChainSpec, String> {
172+
let mut properties = Properties::new();
173+
properties.insert("ss58Format".into(), <SS58Prefix as Get<u16>>::get().into());
174+
properties.insert("tokenDecimals".into(), DECIMAL_PLACES.into());
175+
properties.insert("tokenSymbol".into(), "tSSC".into());
176+
172177
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?;
173178

174179
Ok(SubspaceChainSpec::from_genesis(
@@ -204,13 +209,18 @@ pub fn dev_config() -> Result<SubspaceChainSpec, String> {
204209
None,
205210
None,
206211
// Properties
207-
None,
212+
Some(properties),
208213
// Extensions
209214
None,
210215
))
211216
}
212217

213218
pub fn local_config() -> Result<SubspaceChainSpec, String> {
219+
let mut properties = Properties::new();
220+
properties.insert("ss58Format".into(), <SS58Prefix as Get<u16>>::get().into());
221+
properties.insert("tokenDecimals".into(), DECIMAL_PLACES.into());
222+
properties.insert("tokenSymbol".into(), "tSSC".into());
223+
214224
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?;
215225

216226
Ok(SubspaceChainSpec::from_genesis(
@@ -254,7 +264,7 @@ pub fn local_config() -> Result<SubspaceChainSpec, String> {
254264
None,
255265
None,
256266
// Properties
257-
None,
267+
Some(properties),
258268
// Extensions
259269
None,
260270
))

0 commit comments

Comments
 (0)