npub1r0ulywwu593kzjdu9uluxdq80t54n65kql9vl9z7lrutkgnachssk7zzyc
This file contains hidden or 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 strict'; | |
const assert = require('assert'); | |
const window_of_time_ms = 86400000 * 4; // 96 hours | |
class Note { | |
constructor(event) { | |
this.event = event; | |
this.weight = { |
This file contains hidden or 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
#!/bin/sh | |
echo "$(/sbin/ip route|awk '/default/ { print $3 }') host.docker.internal" >> /etc/hosts | |
if [ ! -z "$BTCPAY_SSHKEYFILE" ] && ! [ -f "$BTCPAY_SSHKEYFILE" ]; then | |
echo "Creating BTCPay Server SSH key File..." | |
ssh-keygen -t rsa -f "$BTCPAY_SSHKEYFILE" -q -P "" -m PEM -C btcpayserver > /dev/null | |
if [ -f "$BTCPAY_SSHAUTHORIZEDKEYS" ]; then | |
# Because the file is mounted, set -i does not work | |
sed '/btcpayserver$/d' "$BTCPAY_SSHAUTHORIZEDKEYS" > "$BTCPAY_SSHAUTHORIZEDKEYS.new" |
This file contains hidden or 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 file is based on: | |
# https://github.com/btcpayserver/btcpayserver/blob/master/amd64.Dockerfile | |
# | |
# There are several changes made: | |
# - Change to fetch from remote git repository | |
# - Addition to run as btcpayserver user | |
FROM mcr.microsoft.com/dotnet/sdk:3.1.413-bullseye AS builder | |
RUN set -ex && \ |
All times for min
, max
, average
and median
are in microseconds, and length
is in bytes. Benchmarks results include writing, reading, and pruning of 3GiB (3 * 1024 * 1024 * 1024
) of data on both HDD and SSD with a block size distribution from mainnet. See the PR at bcoin-org/bcoin#703 for further details.
real 0m6.444s
user 0m4.610s
sys 0m3.884s
This proposes a structure for wallet management stategies for the bcoin wallet.
As it is currently you can mix several wallet management strategies within the same wallet in bcoin. This leads to permutations with unintended behavior.
For example, here are a few:
- HD wallets with many accounts without any transactions that will make address discovery from nearly impossible without
BIP: x Layer: Applications Title: Multi-Account Hierarchy for P2WSH Multi-signature Deterministic Wallets Author: Braydon Fuller <[email protected]> Comments-Summary: No comments yet. Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-x Status: Draft Type: Standards Track Created: 2019-02-12
This file contains hidden or 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
// original: https://gist.github.com/braydonf/e9572bb40c084691fa20 | |
'use strict'; | |
const path = require('path'); | |
const {Block, Network} = require('bcoin'); | |
const fs = require('bfile'); | |
const bufio = require('bufio'); | |
(async function() { |
This file contains hidden or 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
// Finding Lost Shards | |
// -------------------------------------------------------------------------------------- | |
const result = db.storageevents.aggregate([ | |
{ | |
$match: { | |
$and: [ | |
{storage: {$gt: 0}} | |
] | |
} | |
}, |
This file contains hidden or 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
block-stream results: | |
[ { writes: | |
[ { msElapsed: 60, | |
fileKey: 'b2d4baca8ac61c63dcf5ca835d71cb091c62295a', | |
sBucketIndex: 49, | |
fileSizeBytes: 8388608 }, | |
{ msElapsed: 250, | |
fileKey: '70eb91e9659e8d86bc0b6ec5e87a8f65da646bde', | |
sBucketIndex: 243, |
NewerOlder