Skip to content

Instantly share code, notes, and snippets.

@JeremyRubin
JeremyRubin / powswap.py
Created October 30, 2021 21:11
PowSwap Code
#!/usr/bin/python3
# Originally shared ~ 7/1/19 with Dan Elitzer
# Copyright 2019 Jeremy Rubin
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@jeremy I am somewhat perplexed that you think the UASF chain could be wiped out :confused:
Jeremy Rubin 10:28 AM
Can you give me a rigorous definition of "wiped out"
merkle syrup 10:28 AM
Non UASF chain has more HR, longer chain, UASF nodes drop their softfork chain and switch over to “core” chain.
Jeremy Rubin 10:28 AM
because w/o such it's hard to discuss as when I tried previously issues I raised were not a part of being "wiped out"
[Monday, July 13, 2020] [10:11:01 AM PDT] <jeremyrubin> So I have a talk from a while ago. https://www.youtube.com/watch?v=J1CP7qbnpqA It's worth watching for the analysis part. I think that things like "Modern Soft Fork Activation" which introduce more time/latency and signaling period without honesty end up just taking more time. I'm not sure that the product of taking more time is a better outcome, though.
[Monday, July 13, 2020] [10:11:05 AM PDT] <harding> zmnscpxj__: I think that would be sufficient, but I already know about many previous soft forks so I'm might not be the best judge of what knowledge people need.
[Monday, July 13, 2020] [10:11:27 AM PDT] <zmnscpxj__> the BIP8 text lists lockinontimeout together with name, bit, startheight etc. which are params we do not expect users to override
[Monday, July 13, 2020] [10:11:43 AM PDT] <jeremyrubin> Transcript http://diyhpl.us/wiki/transcripts/stanford-blockchain-conference/2019/spork-probabilistic-bitcoin-soft-forks/
[Monday, July 13, 2020] [10:12:10 A
diff --git a/src/consensus/params.h b/src/consensus/params.h
index 28c95e088..076a57f10 100644
--- a/src/consensus/params.h
+++ b/src/consensus/params.h
@@ -8,6 +8,7 @@
#include <uint256.h>
#include <limits>
+#include <optional>
@JeremyRubin
JeremyRubin / msg.md
Created April 9, 2021 20:00
RE: [bitcoin-dev] Update on "Speedy" Trial: The circus rolls on bitcoin/bitcoin-dev

On Coin Flips:

On Consensus and Humming in the IETF

That doesn't mean that the coin flip determined the outcome; if a fatal technical flaw was found in the solution that won the coin flip, it is still incumbent upon the group to address the issue raised or abandon that solution and find another. Rough consensus on the technical points, in the end, is always required. Any way to find a place to start, be it the hum or the coin flip, is only getting to the beginning of the discussion, not the end.

@JeremyRubin
JeremyRubin / a_contract.rs
Created April 9, 2021 02:48
Sapio Contract Demo
// Copyright Judica, Inc 2021
//
// 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 https://mozilla.org/MPL/2.0/.
#[deny(missing_docs)]
use sapio::contract::*;
use sapio::util::amountrange::*;
use sapio::*;
March 23rd 2021 Taproot Activation Meeting Notes.
We had a very productive meeting today. Here is a summary of the meeting -- I've done my best to
summarize in an unbiased way.
1. On the use of a speedy trial variant:
- There are no new objections to speedy trial generally.
- There is desire to know if Rusty retracts or reaffirms his NACK in light of the responses.
import numpy as np
TRIALS = 10000
MARS_DIST_LIGHT_MINUTES_MAX = 22
RTT = MARS_DIST_LIGHT_MINUTES_MAX*60*2
gen = lambda mins: list(np.round(np.random.exponential(mins*60, TRIALS)))
# Assume miner_1 has 50% hashrate and miner_2 has 50%... find blocks every 20 mins each
Board = int
def NewBoard():
# 9*2 digits long
return 0b1_000_000_000_000_000_000
def all_filled(board: Board) -> bool:
return (board & 0b111111111) | ((board >> 9) & 0b111111111) == 0b111111111
winning_patterns = [
0b111_000_000,
0b000_111_000,
0b000_000_111,
travis_fold:start:worker_info
[0K[33;1mWorker information[0m
hostname: 151579ac-8915-47f0-94ea-d7ecbc718941@1.worker-org-95567d544-phbx9.gce-production-3
version: v6.2.1 https://github.com/travis-ci/worker/tree/4e3246c044eb4915c2378ffacd0b3d3ed0136bba
instance: travis-job-ed9d5aca-3b0a-4c5c-84c6-428f469e206d travis-ci-stevonnie-xenial-1553530512-f909ac5 (via amqp)
startup: 6.920152873s
travis_fold:end:worker_info
[0Ktravis_time:start:29ebd9fc
[0Ktravis_time:end:29ebd9fc:start=1572552714744409971,finish=1572552714905957133,duration=161547162,event=no_world_writable_dirs
[0Ktravis_time:start:10b29a20