Skip to content

Instantly share code, notes, and snippets.

View JoshOrndorff's full-sized avatar
🌳

Joshy Orndorff JoshOrndorff

🌳
View GitHub Profile
@JoshOrndorff
JoshOrndorff / backtrace
Created April 1, 2020 13:34
Tokio Panic Backtrace
Version: 2.0.0-alpha.5-da88e4a-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:476
2: rust_begin_unwind
at src/libstd/panicking.rs:380
3: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
4: core::option::expect_failed
@JoshOrndorff
JoshOrndorff / customSpecRaw.json
Last active October 18, 2019 19:12
Rust Belt Rust Workshop Chainspec
{
"name": "Local Testnet",
"id": "local_testnet",
"bootNodes": [
"/ip4/45.55.48.79/tcp/30333/p2p/QmbkCJtvy5eAh7HzKLejDzWWgXKs4QF1ry5akAC5UU2AmC"
],
"telemetryEndpoints": null,
"protocolId": null,
"properties": null,
"consensusEngine": null,
@JoshOrndorff
JoshOrndorff / QuickNDirtyAutomation.js
Created October 7, 2019 16:40
Substrate Query Script
const { ApiPromise } = require('@polkadot/api');
const testKeyring = require('@polkadot/keyring/testing');
const aliceAddr = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const alicePair = testKeyring.default().getPair(aliceAddr);
/**
* Sends a transaction ot the chain returning a promise.
* When the transaction is finalized, resolve to the list of events received.
* When the transaction fails, reject relaying the error message.
@JoshOrndorff
JoshOrndorff / notes.md
Last active September 24, 2019 16:09
Start local network v2.0 draft

These are my notes trying to figure out how to update my local testnet document for Substrate master. I haven't been successful yet.

Reproducability

In case any of these issues are version related, I'm using Substrate, node-template, and subkey from 13fc71c6 and I'm using polkadot-js apps from 75bc4f3d

Here are the keys I've tried to use in case you want to use the exact same keys. Also feel free t oconfirm that I've recorded them correctly by verifying them with subkey inspect //Alice and subkey -e inspect //Alice etc.

Alice SR25519

Secret Key URI `//Alice` is account:
@JoshOrndorff
JoshOrndorff / code.js
Created September 9, 2019 16:51
Template Module frontend
import React, { useState, useEffect } from "react";
import { Form, Input, Grid, Card, Statistic } from "semantic-ui-react";
import TxButton from "./TxButton";
export default function TemplateModule(props) {
const { api, accountPair } = props;
const [status, setStatus] = useState("");
const [currentValue, setCurrentValue] = useState(0);
@JoshOrndorff
JoshOrndorff / writeup.md
Created August 22, 2019 14:41
Pi-Calc Runtime for Substrate

Pi Calc Smart Contract Runtime

History of Mobile Process Calculi

In 1992 Robin Milner et al introduced the pi calculus, a member of the mobile process calculus family, as a new and novel model of computation [paper]. The pi calculus has several properties that make it an attractive option for modern programming. It is Turing complete, allows for straight-forward compositional programming, and is fundamentally concurrent. With the appropriate structure on it's channels, it allows for programming with in object capability paradigm (see architecture section below).

History of Blockchain

In 2009 Bitcoin introduced the proof of work blockchain allowing mutually distrusting parties to coordinate permissionlessly through a currency. In 2013 Ethereum generalized that idea to coordinate on arbitrary computations through a system of smart contracts. Both systems have be

{
"MetadataV7": {
"modules": [
{
"name": "System",
"storage": {
"prefix": "System",
"items": [
{
"name": "AccountNonce",

Keybase proof

I hereby claim:

  • I am joshorndorff on github.
  • I am joshyorndorff (https://keybase.io/joshyorndorff) on keybase.
  • I have a public key ASBsRd-ZZh08aPxCtypMF6Ix29IcqZtEMvXKXxLqHDTX1wo

To claim this, I am signing this object:

@JoshOrndorff
JoshOrndorff / output.txt
Created June 24, 2019 18:44
DocSearch scraper error
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/root/src/index.py", line 98, in <module>
run_config(environ['CONFIG'])
File "/root/src/index.py", line 42, in run_config
config.query_rules
File "src/algolia_helper.py", line 18, in __init__
@JoshOrndorff
JoshOrndorff / Moved
Last active May 24, 2019 20:04
This documentation has moved
https://docs.substrate.dev/docs/deploying-a-substrate-node-chain