This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gnostr-org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/script/interpreter.cpp | |
+++ b/src/script/interpreter.cpp | |
@@ -504,6 +504,14 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& | |
return set_error(serror, SCRIPT_ERR_MINIMALDATA); | |
} | |
stack.push_back(vchPushValue); | |
+ if ((flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) && opcode == OP_FALSE) { | |
+ auto pc_tmp = pc; | |
+ opcodetype next_opcode; | |
+ valtype dummy_data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use rand_chacha::ChaCha20Rng; | |
use schnorr_fun::fun::{KeyPair, Scalar}; | |
use schnorr_fun::{Message, nonce, Schnorr}; | |
use schnorr_fun::adaptor::Adaptor; | |
use schnorr_fun::fun::marker::Public; | |
use schnorr_fun::musig::MuSig; | |
use sha2::Sha256; | |
fn main() { | |
// Little proof of concept. Doesn't actually do real transactions, but you get the idea. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/init.cpp b/src/init.cpp | |
index af39e8078..c0b5e09dc 100644 | |
--- a/src/init.cpp | |
+++ b/src/init.cpp | |
@@ -553,6 +553,7 @@ void SetupServerArgs(ArgsManager& argsman) | |
argsman.AddArg("-dustrelayfee=<amt>", strprintf("Fee rate (in %s/kvB) used to define dust, the value of an output such that it will cost more than its value in fees at this fee rate to spend it. (default: %s)", CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE)), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::NODE_RELAY); | |
argsman.AddArg("-bytespersigop", strprintf("Equivalent bytes per sigop in transactions for relay and mining (default: %u)", DEFAULT_BYTES_PER_SIGOP), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); | |
argsman.AddArg("-datacarrier", strprintf("Relay and mine data carrier transactions (default: %u)", DEFAULT_ACCEPT_DATACARRIER), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY); | |
+ argsman.AddArg("-relayopfalseopif", strprintf("Relay and mine transactions containing the OP_FALSE OP_I |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This script is written for linux. | |
1. Download the file | |
2. Review it | |
nano ./dropnonusefulnodes.sh | |
3. Mark it as executable `chmod +x dropnonusefulnodes.sh` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/script/interpreter.cpp | |
+++ b/src/script/interpreter.cpp | |
@@ -504,6 +504,14 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& | |
return set_error(serror, SCRIPT_ERR_MINIMALDATA); | |
} | |
stack.push_back(vchPushValue); | |
+ if ((flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) && opcode == OP_FALSE) { | |
+ auto pc_tmp = pc; | |
+ opcodetype next_opcode; | |
+ valtype dummy_data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <math.h> | |
#include "BTCUtil.h" | |
#include "../libraries/mnemonic/mnemonic.h" | |
#include "../libraries/mnemonic/wordlist.h" | |
static const char *answer = "bc1qh07vgylvs66k850vr5e7efxxemhdgczj8w72xq"; | |
static int found = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Python nostr client to for air-gapped shit posting | |
Requirements: | |
- python-nostr: On the same folder the air_nostr.py is, clone and rename it | |
git clone https://github.com/jeffthibault/python-nostr | |
mv python-nostr python_nostr | |
- opencv, embit, qrcode | |
pip install opencv-python embit qrcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Uses Embit and qrcode modules to convert hex and bech32 keys to BIP39 seed words and vice-versa. | |
Also generates ascii compact seed QR codes and public keys. | |
Install Embit: | |
pip install embit | |
Exemple: Words as input: | |
python nostr_c_seed_qr.py picture body actor coil end satoshi fish mom distance proof thank play fantasy friend dinner clump boring ozone review cart virtual toss foot infant | |
Exemple: Hex key as input: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2022 @RandyMcmillan. All rights reserved. | |
// Use of this source code is governed by a BSD-style license | |
// that can be found in the LICENSE file. | |
import 'dart:math'; | |
void main() { | |
var i = 5; | |
var p = pow(2,i); |
NewerOlder