Skip to content

Commit

Permalink
fix: issue with docker image and editting plain spec (#205)
Browse files Browse the repository at this point in the history
* fic: issue with building chain spec

* chore: update the javascript for editing the plain build spec

* Revert "chore: update the javascript for editing the plain build spec"

This reverts commit 15248c1.

* fix: locked docker version for images

* fix: version issue with docker images

* chore: code clean up
  • Loading branch information
shanithkk authored Mar 27, 2024
1 parent 76a0492 commit 9fde036
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 52 deletions.
20 changes: 4 additions & 16 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,20 @@

"parachains": [
{
"name":"frequency",
"name":"acala",
"nodes": [
{
"name": "alice",
"node_type": "collator",
"prometheus": false,
"key":{
"private_phrase":"dizzy rose offer wall social glory debris gift govern seminar almost bicycle" ,
"public_key":"5G3vA9UC6J7hPN5Jqfiz4qFNqYAfahHxffbuQf6dcZZx3Yx6"
}
"prometheus": false

},
{
"name": "bob",
"node_type": "full",
"prometheus": false,
"key": {
"private_phrase":"diamond crane pioneer aisle conduct media news cup price olive dust light" ,
"public_key":"5GgwsM48CCT7oPUyFTTpE5L1t7Fjpe7D8SDNKxJxug15YEKy"
}
"prometheus": false
}
],
"sudo_key": {
"private_phrase":"dizzy rose offer wall social glory debris gift govern seminar almost bicycle" ,
"public_key":"5G3vA9UC6J7hPN5Jqfiz4qFNqYAfahHxffbuQf6dcZZx3Yx6"
}
]
}
],

Expand Down
13 changes: 3 additions & 10 deletions parachain/build-spec.star
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,13 @@ def create_parachain_build_spec_with_para_id(plan, image, binary, chain_name, ch
files = {
"/app": "configs",
"/build": chain_name + "plain",
"/javascript": "javascript",
}


run_command = "cd /javascript && npm i && node edit_parachain_plain.js /build/{0}.json {1} \"{2}\" \'{3}\'".format(chain_name, para_id, sudo_key, collators_keys)
plan.print(run_command)
plan.run_sh(
run = run_command,
image = constant.NODE_IMAGE,
run = "sed -e 's/\"parachainId\": *[0-9]\\+/\"parachainId\": {0}/' -e 's/\"para_id\": [0-9]*,/\"para_id\": {0},/' -e 's/\"paraId\": [0-9]*,/\"paraId\": {0},/' -e 's/\"parachain_id\": [0-9]*,/\"parachain_id\": {0},/' /build/{1}.json > /tmp/{1}.json".format(para_id, chain_name),
image = constant.CURL_JQ_IMAGE,
files = files,
store = [StoreSpec(src = "/build/{0}.json".format(chain_name), name = chain_name + "edit")],
store = [StoreSpec(src = "/tmp/{0}.json".format(chain_name), name = chain_name + "edit")],
)


raw_service = create_raw_build_spec_genisis_state_genisis_wasm_for_parachain(plan, binary, image, chain_name)

Expand All @@ -48,4 +42,3 @@ def create_raw_build_spec_genisis_state_genisis_wasm_for_parachain(plan, binary,
)

return chain_name + "raw"

52 changes: 26 additions & 26 deletions parachain/static_files/images.star
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"This Dictionary is for polkadot package, containing parachain and their respective docker images"
parachain_images = {
"acala": {
"image": "acala/acala-node:latest", # NO ws port
"image": "acala/acala-node:2.24.0", # NO ws port
"entrypoint": "/usr/local/bin/acala",
"base": ["acala-local", "/mandala.json", "acala"],
},
"ajuna": {
"image": "ajuna/parachain-ajuna:latest",
"image": "ajuna/parachain-ajuna:0.1.20-stable",
"entrypoint": "/usr/local/bin/ajuna",
"base": ["dev", "/bajun/rococo/bajun-raw.json", "/ajuna/ajuna-raw.json"],
},
"bifrost": {
"image": "bifrostnetwork/bifrost:latest",
"image": "bifrostnetwork/bifrost:bifrost-v0.9.94",
"entrypoint": "/usr/local/bin/bifrost",
"base": ["bifrost-local", "bifrost-kusama-rococo", "bifrost-polkadot"],
},
Expand All @@ -26,22 +26,22 @@ parachain_images = {
"base": ["dev", "iris", "clover"],
},
"frequency": {
"image": "frequencychain/collator-node-local:latest",
"image": "frequencychain/collator-node-local:v1.10.0",
"entrypoint": "/frequency/target/release/frequency",
"base": ["frequency-rococo-local", "frequency-rococo", "frequency"],
},
"integritee": {
"image": "integritee/parachain:latest",
"image": "integritee/parachain:1.9.4",
"entrypoint": "/usr/local/bin/integritee-collator",
"base": ["integritee-rococo-local-dev", "integritee-rococo", "integritee-kusama"],
},
"interlay": {
"image": "interlayhq/interbtc:latest",
"image": "interlayhq/interbtc:1.25.4-9ae20ea-1704967793",
"entrypoint": "/usr/local/bin/interbtc-parachain",
"base": ["interlay-dev", "interlay-testnet-latest", "interlay-latest"],
},
"kilt": {
"image": "kiltprotocol/kilt-node:latest",
"image": "kiltprotocol/kilt-node:1.12.1",
"entrypoint": "/usr/local/bin/node-executable",
"base": ["dev", "/node/dev-specs/kilt-parachain/peregrine-kilt.json", "spiritnet"],
},
Expand All @@ -51,12 +51,12 @@ parachain_images = {
"base": ["dev", "pichiu-westend", "kylin"],
},
"litentry": {
"image": "litentry/litentry-parachain:latest",
"image": "litentry/litentry-parachain:v0.9.17-9172",
"entrypoint": "/usr/local/bin/litentry-collator",
"base": ["litentry-dev", "rococo", "litentry"],
},
"manta": {
"image": "mantanetwork/manta:latest",
"image": "mantanetwork/manta:v4.6.1",
"entrypoint": "/usr/local/bin/manta",
"base": ["manta-local", "manta-testnet", "manta"],
},
Expand All @@ -66,12 +66,12 @@ parachain_images = {
"base": ["moonbeam-local", "alphanet", "moonbeam"],
},
"moonsama": {
"image": "moonsama/moonsama-node:latest",
"image": "moonsama/moonsama-node:v0.0.8",
"entrypoint": "/moonsama/moonsama-node",
"base": ["dev", "template-rococo", "moonsama"],
},
"nodle": {
"image": "nodlecode/chain:latest",
"image": "nodlecode/chain:sha-0981bcc",
"entrypoint": "nodle-parachain",
"base": ["local", "test", "main"],
},
Expand All @@ -81,27 +81,27 @@ parachain_images = {
"base": ["parallel-dev", None, "parallel"],
},
"pendulum": {
"image": "pendulumchain/pendulum-collator:latest",
"entrypoint": "/usr/local/bin/pendulum-collator",
"image": "pendulumchain/pendulum-collator:v0.9.40",
"entrypoint": "/usr/local/bin/amplitude-collator",
"base": ["dev", "foucoco", "/app/pendulum-spec-raw.json"],
},
"phala": {
"image": "phalanetwork/phala-node:latest",
"image": "phalanetwork/phala-node:v0.1.26",
"entrypoint": "/usr/local/bin/khala-node",
"base": ["phala-dev-2035", "rhala", "phala"],
},
"polkadex": {
"image": "polkadex/parachain:latest",
"image": "polkadex/parachain:v1.0.0",
"entrypoint": "/usr/local/bin/parachain-polkadex-node",
"base": ["dev", "xcm-helper-rococo", "mainnet"],
},
"subsocial": {
"image": "dappforce/subsocial-parachain:latest",
"image": "dappforce/subsocial-parachain:b5937cf",
"entrypoint": "/usr/local/bin/subsocial-collator",
"base": ["local-rococo", "/app/soonsocial.json", ""],
},
"zeitgeist": {
"image": "zeitgeistpm/zeitgeist-node-parachain:latest",
"image": "zeitgeistpm/zeitgeist-node-parachain:0.5.0",
"entrypoint": "/usr/local/bin/zeitgeist",
"base": ["dev", "battery_station", "zeitgeist"],
},
Expand All @@ -116,32 +116,32 @@ parachain_images = {
"base": ["altair-local", "catalyst", "altair"],
},
"bajun": {
"image": "ajuna/parachain-bajun:latest",
"image": "ajuna/parachain-bajun:0.3.0-rc1",
"entrypoint": "/usr/local/bin/ajuna",
"base": ["local", "/bajun/rococo/bajun-raw.json", "/bajun/bajun-raw.json"],
},
"calamari": {
"image": "mantanetwork/manta:latest",
"image": "mantanetwork/manta:v4.6.1",
"entrypoint": "/usr/local/bin/manta",
"base": ["calamari-local", "calamari-testnet", "calamari"],
},
"karura": {
"image": "acala/karura-node:latest",
"image": "acala/karura-node:2.24.0",
"entrypoint": "/usr/local/bin/acala",
"base": ["karura-local", "/mandala.json", "karura"],
},
"khala": {
"image": "phalanetwork/khala-node:latest",
"image": "phalanetwork/khala-node:v0.1.26",
"entrypoint": "/usr/local/bin/khala-node",
"base": ["khala-dev-2004", "rhala", "khala"],
},
"kintsugi-btc": {
"image": "interlayhq/interbtc:latest",
"image": "interlayhq/interbtc:1.25.4-9ae20ea-1704967793",
"entrypoint": "tini -- /usr/local/bin/interbtc-parachain",
"base": ["kintsugi-dev", "kintsugi-testnet-latest", "kintsugi"],
},
"litmus": {
"image": "litentry/litentry-parachain:latest",
"image": "litentry/litentry-parachain:v0.9.17-9172",
"entrypoint": "/usr/local/bin/litentry-collator",
"base": ["litmus-dev", "rococo", "litmus"],
},
Expand All @@ -156,17 +156,17 @@ parachain_images = {
"base": ["moonriver-local", "alphanet", "moonriver"],
},
"robonomics": {
"image": "robonomics/robonomics:latest",
"image": "robonomics/robonomics:sha-bd71a23",
"entrypoint": "/usr/local/bin/robonomics",
"base": ["alpha-dev", "ipci-dev", ""],
},
"subzero": {
"image": "playzero/subzero:latest",
"image": "playzero/subzero:3.2.75",
"entrypoint": "/usr/local/bin/subzero",
"base": ["dev", None, "subzero"],
},
"turing": {
"image": "oaknetwork/turing:latest",
"image": "oaknetwork/turing:1.9.0.2",
"entrypoint": "./oak-collator",
"base": ["turing-dev", "turing-staging", "turing"],
},
Expand Down

0 comments on commit 9fde036

Please sign in to comment.