Skip to content

Instantly share code, notes, and snippets.

View warner's full-sized avatar

Brian Warner warner

  • San Francisco, CA
View GitHub Profile
FxAccountClient.prototype._passwordChangeFinish = function(email, newPassword, oldCreds) {
var self = this;
var newWrapKb;
var authPW;
var oldWrapKB;
var p1 = this.accountKeys(oldCreds.keyFetchToken, oldCreds.oldUnwrapBKey);
var p2 = credentials.setup(email, newPassword);
var p3 = hawkCredentials(oldCreds.passwordChangeToken, 'passwordChangeToken', 2 * 32);
Promise.all([p1, p2, p3])
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
define([
'intern!tdd',
'intern/chai!assert',
'sjcl',
'client/lib/credentials',
'tests/addons/environment'
@warner
warner / keybase.md
Last active February 9, 2017 01:17

Keybase proof

I hereby claim:

  • I am warner on github.
  • I am warner (https://keybase.io/warner) on keybase.
  • I have a public key ASBnjfSs_vOUoJthxiXW1MIWuIL09sFu7YNmZ1wL436IAwo

To claim this, I am signing this object:

Some text from an etherpad about the "servers of happiness" docs, for ticket #1382
pasted to IRC last week:
Suppose your upload achieves a happiness count of C, and your encoding is configured to need a minimum of K shares (aka "shares.needed"). Then immediately after a successful upload, we know we can tolerate the loss of any C - K servers.
We provide shares.happy as a parameter to the upload process so that it knows whether it was successful or not: if the uploader cannot place shares to meet this C >= shares.happy threshold, it aborts the upload, rather than finishing with an insufficiently robust placement. There is another parameter, shares.total (aka "N"), which provides a goal: the uploader will attempt to place N unique shares. But as long as it can achieve shares.happy, it will indicate success.
Another way to state this property is that for *any* subset of shares.happy servers that have shares after a successful upload, only K need to retain them.
@warner
warner / README.md
Last active April 1, 2016 07:18
git chaos

diagram from GitX

--- /Users/warner/stuff/crypto/ethereum/dao.out 2016-07-19 18:18:44.000000000 -0700
+++ /tmp/1.out 2016-07-19 18:27:56.000000000 -0700
@@ -1,7 +1,4 @@
/*
-
-- Bytecode Verification performed was compared on second iteration -
-
This file is part of the DAO.
The DAO is free software: you can redistribute it and/or modify
@warner
warner / Makefile
Last active January 30, 2019 00:11
setup:
npm install esm
setup-old:
npm install esm@3.0.84
run:
ESM_DISABLE_CACHE=1 node -r esm test.js
@warner
warner / import-tap.js
Created March 17, 2020 05:13
failing import of 'tap' under SES-0.7.3
import tap from 'tap';
@warner
warner / bootstrap.js
Last active July 18, 2020 18:03
make-vat-transcript
/* global harden */
import { E } from '@agoric/eventual-send';
import { producePromise } from '@agoric/produce-promise';
function ignore(p) {
p.then(() => 0, () => 0);
}
export function buildRootObject() {
const callbackObj = harden({