Skip to content

Instantly share code, notes, and snippets.

View christophersanborn's full-sized avatar

Christopher Sanborn christophersanborn

View GitHub Profile
@christophersanborn
christophersanborn / makeblobs.sh
Created October 3, 2022 12:52
Peerplays NFT deploy script
#!/bin/bash
##
## Note: You'll run this script several times to get various pieces of
## information along the way.
##
## It will create files under ./blobs/, but will not otherwise have
## side-effects.
##
##
@christophersanborn
christophersanborn / rpi-poe-overlay.dts
Last active February 5, 2020 23:09
RPi Fan Control overlay
/*
* Overlay for the Raspberry Pi POE HAT.
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2708";
fragment@0 {
@christophersanborn
christophersanborn / raspi_ledger_devenv.md
Last active July 21, 2019 19:30
Raspberry Pi Developer Environment for Ledger Nano S

Goal: To be able to compile Ledger Nano S apps, load them onto a Ledger Nano S, and interact with those apps entirely from within Raspbian running on a Raspberry Pi. This would be one alternative to running a Ledger Nano dev environment from a virtual machine, as is currently needed if you are devloping from a Windows or Mac OS based host machine.

Compilers:

According to here, Nano development uses both GCC and Clang toolchains, with each serving a slightly different purpose:

  • A standard ARM gcc to build the non-secure (STM32) firmware and link the secure (ST31) applications
  • A standard ARM clang above 4.0.0 with ROPI support to build the secure (ST31) applications

So, if I'm interpretting correctly (iffy), the actual apps we build will compile with Clang, (they're ST31 apps), but the GCC toolchain is still needed for linking, (and additionally for compiling ST32 firmware, if for some reason we are doing that).

@christophersanborn
christophersanborn / bsip_assert_predicates.md
Last active June 8, 2019 20:59
New BSIP Additional Assert Predicates
BSIP: <BSIP number>
Title: Wishlist for New Assert Predicates
Authors: Christopher J. Sanborn, ...
Status: Draft
Type: Protocol
Created: 2019-06-08
Discussion: <url>

Abstract

@christophersanborn
christophersanborn / bsip-slupc.md
Last active June 4, 2019 16:32
Short-lived Unidirectional Payment Channels for BitShares
BSIP: <BSIP number>
Title: Short-lived Unidirectional Payment Channels for BitShares
Authors: Christopher J. Sanborn, ...
Status: Draft
Type: Informational
Created: 2019-06-04
Discussion: <url>

Abstract

@christophersanborn
christophersanborn / ILP_Summit_BitShares_2019.md
Last active May 6, 2019 19:08
ILP Summit Summary for BitShares

Golden Gate

A few weekends ago, I was privileged to attend the ILP Summit 2019 put on by the community developing the Interledger Protocol. The Interledger protocol (hereafter ILP) is intended to facilitate a degree of ledger-agnosticism for users of payment networks, by allowing both the sender and receiver of a payment to use the individual ledgers of their choice, with the ILP network handling any routing and conversion activities needed to make transaction happen. Example: a customer may wish to pay with BTS, but the merchant wishes to receive BTC. Interledger aims to create a network that satisfies both parties.

An interesting aspect of ILP is that the ledgers involved need not necessarily be crypto ledgers or blockchain ledgers. They can as well be fiat ledgers mediated by traditional banking networks.

ILP as a Gateway

ILP presents numerous interesting opportunities and use cases

Developer Pre-Alpha

This is a preview release intended for developers, specifically wallet integrators, i.e. authors of GUI wallets or key managers that wish to implement support for the Ledger Nano S into their own projects.

This is NOT a "stable" or "production-ready" release, and should only be installed on devices intended for testing purposes, initialized with a throwaway wallet seed, and which are not being used to hold significant funds.

Ledger-App-BitShares provides the back-end app that runs on the Ledger Nano S hardware wallet. It does not provide a user-friendly front-end for a good user experience.

This preview release provides:

@christophersanborn
christophersanborn / wsapi_convo_20181216_01.log
Created December 16, 2018 07:43
Attempt to broadcast transaction with Nano signature 2018-12-16 01
{"method": "call", "params": [2, "broadcast_transaction", [{ "ref_block_num": 55627, "ref_block_prefix": 1486988140, "expiration": "2018-12-17T06:46:00", "operations": [[ 0,{ "fee": { "amount": 10420, "asset_id": "1.3.0" }, "from": "1.2.1152699", "to": "1.2.1152620", "amount": { "amount": 500000, "asset_id": "1.3.0" }, "extensions": [] } ] ], "extensions": [], "signatures": [ "204ef3012212680998c674d5f9078f28f28547e0ef6fff2dca4a2f8d2563a78392331c9c5af6989511220aa25ca22686ec9b61a6a84a2da537f9324cb2043b97f0" ]}]], "id": 4}
< {"id":4,"jsonrpc":"2.0","error":{"code":1,"message":"missing required active authority: Missing Active Authority 1.2.1152699","data":{"code":3030001,"name":"tx_missing_active_auth","message":"missing required active authority","stack":[{"context":{"level":"error","file":"transaction.cpp","line":295,"method":"verify_authority","hostname":"","thread_name":"th_a","timestamp":"2018-12-16T07:27:30"},"format":"Missing Active Authority ${id}","data":{"id":"1.2.1152699","auth":{"weight_threshold":1
@christophersanborn
christophersanborn / Scanning_Benchmark_RPi_20181117.txt
Created November 19, 2018 15:42
Scanning Tx Metadata for Owned Tx Outputs using StealthAddress class, Raspberry Pi 3 B+, 2018-11-17, Algorithm 1, Run 1
===========================================================
** Benchmark: Scanning Tx Metadata for Owned Tx Outputs: **
===========================================================
*
* Generating 248 red-herring keys to be our 'non-matches':
* ...Allocated 248 keys in 399 milliseconds.
*
* Generating Bob StealthAddress:
* ...Bob: BTS6B1ALhfjYwYW45XeVBfTNL1uFKRwXc21bHenH7rxvAGduVtCbHeJefk91cc3K1xJwLEtVkwxCdfEdCXK4C6xxa2Ls1JxvMS
*
@christophersanborn
christophersanborn / Scanning_Benchmark_MBP_20181117_2.txt
Created November 17, 2018 18:59
Scanning Tx Metadata for Owned Tx Outputs using StealthAddress class, 2014 MacBook Pro, 2018-11-17, Algorithm 1, Run 2
===========================================================
** Benchmark: Scanning Tx Metadata for Owned Tx Outputs: **
===========================================================
*
* Generating 398 red-herring keys to be our 'non-matches':
* ...Allocated 398 keys in 73 milliseconds.
*
* Generating Bob StealthAddress:
* ...Bob: BTSBBirtYbXSx7WkCq7sFvAUEJRtj9vCM4LHEEstrGgHmjPjRVohqDWSEBdk3dE1rq1qo7owC2U4mZMFFZbKNxZFQmoWg73Dav
*