Skip to content

Instantly share code, notes, and snippets.

View JoshOrndorff's full-sized avatar
🌳

Joshy Orndorff JoshOrndorff

🌳
View GitHub Profile
@JoshOrndorff
JoshOrndorff / gist:90e5ca330eb09c7ed0783c521bff745b
Created January 5, 2021 18:57
Command to remove a specific extrinsic
$ curl <endpoint> -H "Content-Type:application/json;charset=utf-8" -d '{
"jsonrpc":"2.0",
"id":1,
"method":"author_removeExtrinsic",
"params": ["0x22ab0100040a00160000000000000000000000000000000000000000000000000000000000000000f6701e1600000000000000000000000000000000000000000000000000000000127a0000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000e2a7010060c06040523480156200001157600080fd5b50604051620068b8380380620068b883398181016040526101008110156200003857600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a0180519651989a9799959894979396929591949391820192846401000000008211156200008857600080fd5b9083019060208201858111156200009e57600080fd5b8251640100000000811182820188101715620000b957600080fd5b82525081516020918201929091019080838360005b83811015620000e8578181015183820152602001620000ce565b50505050905090810190601f168015620001165780820380516001836020036101000a031916815260200191505b50604052505060
@JoshOrndorff
JoshOrndorff / Incrementor.sol
Created October 12, 2021 19:22
Solidity Snippets for Frontier Workshop 2021
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.8.0;
contract Incrementor {
uint private value;
address private last_caller;
function inc() public {
value += 1;
last_caller = msg.sender;
@JoshOrndorff
JoshOrndorff / GrandpaBoardGame.md
Created January 5, 2023 02:06
Grandpa - The Board Game

Grandpa - The Board Game

  • Players: 5+ (4 actual players, 1 author)
  • Play time: 15 - 60 min
  • Materials: A large whiteboard and many colored markers

Overview

Grandpa is a Byzantine fault tolerant blockchain finality gadget (formal spec). This collaborative board game allows players to learn and practice the Grandpa protocol while also having fun together.

@JoshOrndorff
JoshOrndorff / reflections.md
Last active August 28, 2023 18:13
Week 2 Reflections

Joshy's reflections on the Blockchain and Smart Contracts hybrid module as delivered during week 2 of PBA3 in Berkeley 2023.

Content Sequencing and Hybrid Module Approach

For the UCB cohort we largely re-wrote the smart contracts module, moving away from a narrow focus on ink! to a much broader perspective across the blockchain space and historically. We also integrated this content tightly with the existing blockchain module to create a week-long hybrid module. The motivation is that the idea of a smart contract predates blockchain and was a goal well before it was realized on blockchains.

I think this ordering makes a lot of sense and should be kept. However, I think the idea of one massive module can be improved upon. Thank you Nuke and Pauline for the opportunity to teach it as a monolith until the proper delineations became clear.

UCB Content Order - Reminder

@JoshOrndorff
JoshOrndorff / Errata.md
Last active January 12, 2024 13:08
Errata for UTXO Wallet Assignment

This document contains corrections to mistakes in the UTXO wallet assignmetn for PBA's Hong Kong cohort.

Incorrect comment about input and output value

The doc comments on the transaction type incorrectly state that the output value should exceed the input value. This is exactly backwards. Luckily this is only a comment mistake, the tests are correct and this should not affect your programmin experience at all.

/// A Bonecoin Transaction