Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Connolly dckc

View GitHub Profile
View xsnap-harden.md
connolly@jambox:~/projects/agoric/agoric-sdk/packages/xs-vat-worker/build-xsnap$ make  run-xsnap
xsnap -m output/build.js
about to harden top stuf...
enqueue(val, undefined)
enqueue(val, unknown.0)
enqueue(val, unknown.1)
enqueue(val, unknown.2)
enqueue(val, unknown.length)
View makefile
#
# Copyright (c) 2016-2017 Moddable Tech, Inc.
#
# This file is part of the Moddable SDK Tools.
#
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
View result.rho
new out, Result, REVAddress(`rho:rchain:REVAddress`) in {
/**
* The RChain genesis contracts typically use
* (true, T) \/ (false, Problem) to indicate
* a success or failure outcome.
* We abbreviate this as Result<T> (cf. rust).
*
* And we use `Problem` for { "message": String, ... }
*/
View README.md

Snapshot test sketch

see especially the // snapshot worker? comments in main.js.

tested on linux with moddable version 54d8e94710ed6f8c310f046c4fbc83c967ccd346

Run as usual

View scan_transactions.py
# pip install pyrchain
# pip install requests
from rchain.client import RClient
from rchain.param import testnet_param
from itertools import accumulate
from datetime import datetime
import requests
step = 50
View ballot-supplement.md

Board: WEC

Wile E. Coyote for Board Member

Wile E. Coyote

In each episode, the cunning, insidious and constantly hungry Coyote repeatedly attempts to catch and subsequently eat the Road Runner, a fast-running ground bird, but is never successful. Instead of his animal instincts, the Coyote uses absurdly complex contraptions (sometimes in the manner of Rube Goldberg) to try to catch his prey, which comically backfire, with the Coyote often getting injured in slapstick fashion.

Board: RR

View rnode.yml
swagger: "2.0"
info:
title: "RChain node (rnode)"
version: "0.9.25.2"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
paths:
/status:
get:
View indie-chat.md

I ran into the "pick a matrix client" thing again today...

https://matrix.to/#/#freenode_#etesync:matrix.org

I picked a web client... but then there was a login thing... I want to login using my own domain.

What does that cost?

Can I docker run something on my colo node?

View SRI-for-CAS.md

[9:44 AM] dckc:: SRI only works for <script> and . [9:47 AM] dckc:: <script> does seem to work within data: ... so one could construct a data: URI that uses <script> with subresource integrity to securely fetch js (which would in turn supply HTML, CSS, etc.). .. [9:47 AM] dckc:: so yes, that's technically sufficient to do secure content-addressable storage retrieval... [9:47 AM] dckc:: but the UX isn't much better than having people install a browser add-on [9:48 AM] dckc:: now a browser-add-on that would verify web pages based on on-chain info would be straightforward

rchain/RevVault.rho at dev · rchain/rchain https://github.com/rchain/rchain/blob/dev/casper/src/main/resources/RevVault.rho#L193-L196

View node-crash.txt
20:18 connolly@jambox$ cd /home/connolly/projects/agoric/agoric-sdk ; env 'NODE_OPTIONS=--require "/snap/codium/56/usr/share/codium/resources/app/extensions/ms-vscode.js-debug/src/bootloader.bundle.js" ' 'VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"/tmp/node-cdp.18618-8.sock","deferredMode":false,"waitForDebugger":"","execPath":"/home/connolly/.nvm/versions/node/v14.2.0/bin/node","onlyEntrypoint":false,"fileCallback":"/tmp/node-debug-callback-c5b794cd1092179f"}' /home/connolly/.nvm/versions/node/v14.2.0/bin/node -r esm ./packages/SwingSet/test/workers/test-worker.js
Debugger listening on ws://127.0.0.1:39491/dc9e2337-a7cb-4643-9013-2eb97e89cabe
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Removing intrinsics.Reflect.decorate
Removing intrinsics.Reflect.metadata
Removing intrinsics.Reflect.defineMetadata
Removing intrinsics.Reflect.hasMetadata
Removing intrinsics.Reflect.hasOwnMetadata
Removing intrinsics.Reflect.getMetadata