{"id":13430026,"url":"https://github.com/pontem-network/pontem","last_synced_at":"2025-03-16T05:30:23.126Z","repository":{"id":40652848,"uuid":"317478602","full_name":"pontem-network/pontem","owner":"pontem-network","description":"🚀 Pontem Parachain node with Move VM onboard.","archived":true,"fork":false,"pushed_at":"2022-11-19T17:01:43.000Z","size":4124,"stargazers_count":77,"open_issues_count":4,"forks_count":43,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-27T08:38:09.253Z","etag":null,"topics":["diem","libra","polkadot","pontem-network","substrate"],"latest_commit_sha":null,"homepage":"https://pontem.network","language":"Move","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pontem-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-01T08:44:47.000Z","updated_at":"2024-04-16T11:00:00.000Z","dependencies_parsed_at":"2022-07-14T04:50:31.944Z","dependency_job_id":null,"html_url":"https://github.com/pontem-network/pontem","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pontem-network%2Fpontem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pontem-network%2Fpontem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pontem-network%2Fpontem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pontem-network%2Fpontem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pontem-network","download_url":"https://codeload.github.com/pontem-network/pontem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830912,"owners_count":20354848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diem","libra","polkadot","pontem-network","substrate"],"created_at":"2024-07-31T02:00:49.332Z","updated_at":"2025-03-16T05:30:22.108Z","avatar_url":"https://github.com/pontem-network.png","language":"Move","funding_links":[],"categories":["Move-Powered Blockchains","Move"],"sub_categories":[],"readme":"# Pontem\n\n**Warning:** The repository contains a very out-of-date Move VM version. It can contain bugs or security issues. Use at your own risk.\n\nPontem parachain node with [Move VM pallet](/pallets/sp-mvm/) on board.\n\n* [Pontem docs](https://docs.pontem.network) - if you want to learn about Pontem network.\n* [Validator docs](https://docs.pontem.network/03.-staking/collator) - if you want to launch a validator node.\n* [Bootstrap](https://github.com/pontem-network/bootstrap) - if you want to up node quickly (not for development).\n\n## Local Relaychain \u0026 Parachain Launch\n\nCurrent version built with Nimbus consensus and Parachain Staking implementation.\nRequires relay chain to work correctly.\n\n### Requirements\n\n* [Rust](https://www.rust-lang.org/tools/install)\n* [Dove](https://github.com/pontem-network/move-tools#installation)\n\n### Build\n\nTo build Pontem node run the following commands:\n\n```sh\ncd pontem\nmake init\nmake build\n```\n\nSee built binary at:\n\n```sh\n./target/release/pontem\n```\n\nThere are several options to launch Pontem local parachain:\n\n* [Using polkadot-launch with Relay Chain](#using-polkadot-launch)\n* [Manually with Relay Chain](#manually)\n* [In Dev Mode](#running-in-dev-mode)\n\n### Using polkadot-launch\n\nInstall [polkadot-launch](https://github.com/paritytech/polkadot-launch).\n\n**Note:** you must have polkadot node `v0.9.18` compiled and built placed in `../polkadot/target/release/`.\nTo use different localion you can modify `./launch-config.json`.\n\nCreate keystore path for Pontem:\n\n```sh\nmkdir -p ~/.pontem/keystore-1 # Base path\n```\n\nAdd Nimbus key:\n\n```sh\n# Use \"//Alice\" for URI.\n./target/release/pontem key insert --keystore-path ~/.pontem/keystore-1 --key-type nmbs --scheme sr25519\n```\n\n```sh\n# run pontem-node\npolkadot-launch ./launch-config.json\n```\n\nWait for an minute.\n\nObserve `9946.log` to verify that the node was launched successfully and is producing blocks, also you can use [Web UI](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9946#/explorer).\n\n```sh\ntail -f ./9946.log\n```\n\n### Using polkadot-launch via docker-compose\n\nBuild container:\n\n```sh\ncd pontem\ndocker-compose build\n```\n\nLaunching services:\n\n```sh\ndocker-compose up -d\n```\n\nLog files are in folder `docker-launch`.\n\nIn the `docker-compose.yml` file, you can set the required versions of polkadot and pontem by specifying them in `POLKADOT_VERSION` and `PONTEM_VERSION`, respectively. (note: if you change versions in docker-compose.yaml or change the `.build/launch.Dockerfile`, you need to rerun the `docker-compose build` command).\n\nYou can connect using the following ports:\n\n```sh\n127.0.0.1:9944 # Alice relaychain\n127.0.0.1:9946 # Alice parachain\n```\n\n### Manually\n\nBuild Polkadot:\n\n```sh\ngit clone https://github.com/paritytech/polkadot.git\ncd polkadot\ngit fetch origin\ngit checkout release-v0.9.18\ncargo build --release\n```\n\nLaunch Polkadot Relay Chain:\n\n```sh\n./target/release/polkadot build-spec --chain rococo-local --disable-default-bootnode --raw \u003e rococo-local-cfde.json\n./target/release/polkadot --chain rococo-local-cfde.json --alice --tmp\n./target/release/polkadot --chain rococo-local-cfde.json --bob --tmp --port 30334 # In a separate terminal\n```\n\n[Build](#build) Pontem node and then create keystore path for Pontem:\n\n```sh\nmkdir -p ~/.pontem/keystore-1 # Base path\n```\n\nAdd Nimbus key:\n\n```sh\n# Use \"//Alice\" for URI.\n./target/release/pontem key insert --keystore-path ~/.pontem/keystore-1 --key-type nmbs --scheme sr25519\n```\n\nLaunch parachain node as collator:\n\n```sh\n./target/release/pontem export-genesis-state --chain=local 2000 \u003e genesis-state\n./target/release/pontem export-genesis-wasm \u003e genesis-wasm\n./target/release/pontem --collator --tmp --keystore-path ~/.pontem/keystore-1 --chain=local --port 40335 --ws-port 9946 -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 30335\n```\n\nRegister the parachain:\n\n1. Navigate to [sudo UI](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/sudo) in Relay Chain.\n2. Choose `parasSudoWrapper`.\n3. Choose `sudoScheduleParaInitialize(id, genesis)` method.\n4. Change `id` to `2000`.\n5. Upload `genesis-state` to `genesisHead` field.\n6. Upload `gensis-wasm` to `validationCode` field.\n7. Change `parachain` field to `Yes`.\n8. Send transaction.\n9. Restart `pontem`-node.\n\n## Metadata\n\nMetadata for Polkadot JS can be found in [repository containing types](https://github.com/pontem-network/pontem-types/blob/main/src/index.ts).\n\n* Current amount of top collator is 8.\n* Block time is 12 seconds.\n* There is 1 hour rounds.\n\n## Connect as a new collator\n\nCreate keystore path for the new key:\n\n```sh\nmkdir ~/.pontem/keystore-2 # Base path\n```\n\nAdd new Nimbus key:\n\n```sh\n# Use \"//Bob\" for URI.\n./target/release/pontem key insert --keystore-path ~/.pontem/keystore-2 --key-type nmbs --scheme sr25519\n```\n\nGet your public key:\n\n```sh\n# Use \"//Bob\" for dev purposes URI.\n./target/release/pontem key inspect\n```\n\nYou will see something like:\n\n```sh\nSecret Key URI `//Bob` is account:\nSecret seed:       0x02ca07977bdc4c93b5e00fcbb991b4e8ae20d05444153fd968e04bed6b4946e7\nPublic key (hex):  0xb832ced5ca2de9fe76ef101d8ab1b8dd778e1ab5a809d019c57b78e45ecbaa56\nPublic key (SS58): 5GEDm6TY5apP4bhwuTtTzA7z9vHbCL1V2D5nE8sPga6WKhNH\nAccount ID:        0xb832ced5ca2de9fe76ef101d8ab1b8dd778e1ab5a809d019c57b78e45ecbaa56\nSS58 Address:      5GEDm6TY5apP4bhwuTtTzA7z9vHbCL1V2D5nE8sPga6WKhNH\n```\n\nCopy `Public key (hex)` as your public key, it's going to be your validator public key.\nNow you need to map your public key with your account.\n\nSend new transaction to map your public key with your account:\n\n1. Navigate to [extrinsics](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9946#/extrinsics).\n2. Choose `authorMapping` pallet.\n3. Choose `addAssociation(author_id)` function.\n4. Put your public key in `author_id` field.\n5. Send transaction from your account.\n\nNow create your validator:\n\n1. Navigate to [extrinsics](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9946#/extrinsics).\n2. Choose `parachainStaking` pallet.\n3. Choose `joinCandidates(bond, candidate_count)` function.\n4. Put amount to bond in PONT tokens.\n5. For candidate_count use `1`.\n6. Send transaction.\n\nNow time to launch your node.\n\n**If you used polkadot-launch to launch everything:**\n\n```sh\n/target/release/pontem --collator \\\n     --tmp \\\n    --keystore-path ~/.pontem/keystore-2  \\\n    --chain=local \\\n    --port 40338 \\\n    --ws-port 9947 \\\n    --bootnodes \u003cbootnode\u003e \\\n    -- --execution wasm --chain ./rococo-local.json --port 40336\n```\n\nReplace bootnode with peer address from result of following command:\n\n```ssh\ncat 9946.log | grep 40335 # Something like: /ip4/127.0.0.1/tcp/40335/p2p/12D3KooWM1a6mBNyvZwbN5T3sDuYuxgxmNoj83CnFqaHJzaB8GYV\n```\n\n**If you used manual method:**\n\n```sh\n/target/release/pontem --collator \\\n    --tmp \\\n    --keystore-path ~/.pontem/keystore-2  \\\n    --chain=local \\\n    --port 40338 \\\n    --ws-port 9947 \\\n    --bootnodes \u003cbootnode\u003e \\\n    -- --execution wasm --chain ../polkadot/rococo-local-cfde.json --port 40336\n```\n\nGood documentation also can be found in [Moonriver/Moonbeam Docs](https://docs.moonbeam.network/staking/stake/).\n\n### Running in dev-mode\n\nThere is a possibility to run a single node in development mode, without any consensus involved.\n\nAdd `--dev-service` flag to `cargo run` command to run a single node with disabled consensus:\n\n**IMPORTANT NOTE:** the node with enabled `--dev-service` flag generating blocks when needed (e.g. when a new transaction appears).\n\n```sh\n./target/release/pontem --dev --dev-service --tmp\n```\n\nUse `--sealing` argument to select sealing mode:\n\n1. `instant` (default). Blocks a produced automatically for each transaction\n2. `\u003cnumber\u003e`. Blocks are produced once per `number` milliseconds\n\n\n## Documentation\n\nSee [Move VM Pallet documentation](https://docs.pontem.network/02.-getting-started/getting_started).\n\n### XCM\n\nThe XCM implemented includes assets transferring between Parachains and Relaychain using [XTokens](https://github.com/open-web3-stack/open-runtime-module-library/tree/master/xtokens) pallet.\n\n* Transfers from Relaychain to Parachain happens with `reserveTransferAssets`.\n* XCM teleport and executions are currently disabled.\n* Supports PONT and KSM tokens.\n\n**Dev Relaychain**\n\nIn case you want to run node with dev Relaychain (e.g. using `polkadot-launch`), after launching Relaychain send transaction using **sudo** account:\n\n1. Navigate to [sudo](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/sudo).\n2. Choose `xcmPallet` pallet.\n3. Choose `forceDefaultXcmVersion(maybeXcmVersion)` function.\n4. Enable option `maybeXcmVersion`.\n5. Put `2` into the `maybeXcmVersion` field.\n6. Send transaction.\n\nNow you can use XCM.\n\n## LICENSE\n\nSee [LICENSE](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpontem-network%2Fpontem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpontem-network%2Fpontem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpontem-network%2Fpontem/lists"}