Most workshops at Sub0 will require that you have set up your computer to compile Substrate.
You can use this one-liner to do many of these steps for you automatically:
curl https://getsubstrate.io -sSf | bash -s -- --fast| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title>Play with PAPI</title> | |
| </head> | |
| <body> | |
| <h1>Play with PAPI (<a href="https://github.com/polkadot-api/polkadot-api">The Polkadot API</a>)</h1> | |
| <pre id="chainInfo">Loading...</pre> |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Polkadot Balance Fetcher</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; |
| #!/bin/bash | |
| # Name of the folder where files will be copied for each commit | |
| output_folder="commit_files" | |
| # Create the output folder if it doesn't exist | |
| mkdir -p $output_folder | |
| # Counter for incrementing folder names | |
| counter=1 |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script src="//unpkg.com/@polkadot/util/bundle-polkadot-util.js"></script> | |
| <script src="//unpkg.com/@polkadot/util-crypto/bundle-polkadot-util-crypto.js"></script> | |
| <script src="//unpkg.com/@polkadot/types/bundle-polkadot-types.js"></script> | |
| <script src="//unpkg.com/@polkadot/api/bundle-polkadot-api.js"></script> | |
| <script type="text/javascript"> |
| var { ApiPromise, WsProvider } = require('@polkadot/api'); | |
| // Main function which needs to run at start | |
| async function main() { | |
| const provider = new WsProvider('wss://kusama-rpc.polkadot.io/'); | |
| const api = await ApiPromise.create({ provider }); | |
| // Get general information about the node we are connected to | |
| const [chain, nodeName, nodeVersion] = await Promise.all([ |
| var { ApiPromise, WsProvider } = require('@polkadot/api'); | |
| var { BN_ZERO } = require('@polkadot/util'); | |
| async function main() { | |
| const provider = new WsProvider("wss://kusama-rpc.polkadot.io/", false); | |
| provider.connect(); | |
| const api = await ApiPromise.create({ provider }); | |
| // Get general information about the node we are connected to | |
| const [chain, nodeName, nodeVersion] = await Promise.all([ |
| /// A runtime module template with necessary imports | |
| /// Feel free to remove or edit this file as needed. | |
| /// If you change the name of this file, make sure to update its references in runtime/src/lib.rs | |
| /// If you remove this file, you can remove those references | |
| /// For more guidance on Substrate modules, see the example module | |
| /// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs |
| fio --randrepeat=1 --ioengine=posixaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75 |
| ###################################### | |
| +++ Winner Validators: | |
| #1 == W3F-012 [578e1d3e796c1df204ceb0dd0841b28df59ca81b1e49e0c81e08da11eb088158 (EZ7uBY7Z...)] | |
| [stake_total: 26827_KSM (26,827,164,243,973,954)] [vote_count: 5] [ctrl: Some(1e4c6490abbc74684fa6a32b771a6ace358279948b2655685236679ea8d1af67 (DG3eXF79...))] | |
| #2 == cp287-cloudwalk [30599dba50b5f3ba0b36f856a761eb3c0aee61e830d4beb448ef94b6ad92be39 (DfiSM1qq...)] | |
| [stake_total: 22056_KSM (22,056,129,553,895,962)] [vote_count: 15] [ctrl: Some(30599dba50b5f3ba0b36f856a761eb3c0aee61e830d4beb448ef94b6ad92be39 (DfiSM1qq...))] | |
| #3 == W3F-020 [9ee6f9ef5cb4d24b3519c7efca31a60dc27c215100014e50f8871feb381aebba (GAfhRsNq...)] |