Skip to content

Commit 80848e0

Browse files
authored
Feat/enable staking (#143)
* chore: add the bootnodes to the production chain-spec * chore: bump the CLI version * feat: update Dockerfile * feat: enable staking and disable normal vesting * Update Dockerfile to copy polimec-raw-chain-spec.json to /data directory
1 parent 79d59a2 commit 80848e0

File tree

5 files changed

+26
-27
lines changed

5 files changed

+26
-27
lines changed

Cargo.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ homepage = "https://www.polimec.org/"
2020
license-file = "LICENSE"
2121
readme = "README.md"
2222
repository = "https://github.com/Polimec/polimec-node"
23-
version = "0.1.0"
23+
version = "0.3.2"
2424

2525
[profile.release]
2626
# Substrate runtime requires unwinding.

Dockerfile

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ RUN cargo build --locked --release -p $PACKAGE
99
FROM debian:bookworm-slim
1010
ARG PACKAGE
1111
COPY --from=builder /polimec/target/release/$PACKAGE /usr/local/bin/polimec
12+
COPY --from=builder /polimec/chain-specs/polimec-raw-chain-spec.json /data
13+
14+
# 30333 for parachain p2p
15+
# 30334 for relaychain p2p
16+
# 9944 for Websocket & RPC call
17+
# 9615 for Prometheus (metrics)
18+
EXPOSE 30333 30334 9944 9615
1219

13-
EXPOSE 30333 9933 9944 9615
1420
VOLUME ["/data"]
1521

16-
ENTRYPOINT ["/usr/bin/bash"]
22+
ENTRYPOINT ["/usr/local/bin/polimec"]

chain-specs/raw-base-polkadot.json chain-specs/polimec-raw-chain-spec.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"name": "Polimec Polkadot",
33
"id": "polimec-base",
44
"chainType": "Live",
5-
"bootNodes": [],
5+
"bootNodes": [
6+
"/ip4/141.95.47.7/tcp/30333/p2p/12D3KooWSCjh8tN5yzmLgxWR4kauD5NmCmP2ymc3D5WubvMETg6b",
7+
"/ip4/57.128.20.108/tcp/30333/p2p/12D3KooWEe7ps1v1mfhjMNaSaukgxsFVL6cqeEQudqZ5t3oQiXNL"
8+
],
69
"telemetryEndpoints": null,
710
"protocolId": "polimec",
811
"properties": {

runtimes/base/src/lib.rs

+6-16
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
172172
spec_name: create_runtime_str!("polimec-mainnet"),
173173
impl_name: create_runtime_str!("polimec-mainnet"),
174174
authoring_version: 1,
175-
spec_version: 0_003_001,
175+
spec_version: 0_003_002,
176176
impl_version: 0,
177177
apis: RUNTIME_API_VERSIONS,
178178
transaction_version: 1,
@@ -194,7 +194,7 @@ pub struct BaseCallFilter;
194194
impl Contains<RuntimeCall> for BaseCallFilter {
195195
fn contains(c: &RuntimeCall) -> bool {
196196
use pallet_balances::Call::*;
197-
use pallet_parachain_staking::Call::*;
197+
use pallet_vesting::Call::*;
198198

199199
match c {
200200
// Transferability lock.
@@ -205,20 +205,10 @@ impl Contains<RuntimeCall> for BaseCallFilter {
205205
transfer_allow_death { .. } => false,
206206
_ => true,
207207
},
208-
// Staking "disabled" @ TGE.
209-
RuntimeCall::ParachainStaking(inner_call) => match inner_call {
210-
cancel_candidate_bond_less { .. } => true,
211-
execute_candidate_bond_less { .. } => true,
212-
schedule_candidate_bond_less { .. } => true,
213-
set_auto_compound { .. } => true,
214-
set_blocks_per_round { .. } => true,
215-
set_collator_commission { .. } => true,
216-
set_inflation { .. } => true,
217-
set_parachain_bond_account { .. } => true,
218-
set_parachain_bond_reserve_percent { .. } => true,
219-
set_staking_expectations { .. } => true,
220-
set_total_selected { .. } => true,
221-
_ => false,
208+
RuntimeCall::Vesting(inner_call) => match inner_call {
209+
// Vested transfes are not allowed.
210+
vested_transfer { .. } => false,
211+
_ => true,
222212
},
223213
_ => true,
224214
}

0 commit comments

Comments
 (0)