- More scalable/faster than a blockchain (not enough utxos)
- Much better privacy security model than a blockchain
- Same or better theft security model than TTP but much worse than a blockchain
If it's so great, why hasn't it been done yet?
| 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` |
| --- 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; |
| #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; |
| """ 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 |
| """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: |
| // 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); |
If it's so great, why hasn't it been done yet?
These are the steps I took to install and run a nostr relay on a new server.
First, you'll need the server, this tutorial is using the most basic server Hetzner provides (CX11 - €4.15/mo), you don't need much. If you don't know where to get your server from and decide to go with Hetzner, consider using my affiliate link: https://hetzner.cloud/?ref=4FZql6rUwaeQ
Once you have your server running, log into it via SSH. I'm on a MacOS, so I'll use Terminal as my command line tool. open a new Terminal window and paste the following commands:
| #define static_assert(c) do { int _x = 1/((int)c); } while (0) | |
| int main() { | |
| static_assert(sizeof(int) == 4); | |
| static_assert(sizeof(int) < 4); | |
| return 0; | |
| } | |
| /* output: | |
| $ gcc t.c |
| import 'dart:io'; | |
| import 'dart:convert'; | |
| String serverUrl = 'wss://nostr-pub.wellorder.net'; | |
| var userPublickey = "3235036bd0957dfb27ccda02d452d7c763be40c91a1ac082ba6983b25238388c"; | |
| var userSubReq = '["REQ","latest",{ "authors": ["$userPublickey"], "limit": 5 } ]'; | |
| class EventData { | |
| String id; | |
| String pubkey; |