Skip to content

Instantly share code, notes, and snippets.

@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::*;
@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.

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>
[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
@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"

Value Checking with OP_CHECKTEMPLATEVERIFY:

Here we propose defining semantics with OP_CHECKTEMPLATEVERIFY for 2 items on the stack

First some constants:

case 0: case 1: case 2: case 3: case 4: case 5:
@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: