- The primary issue with a SMT is the calculation between each leaf and their intersection with other leaves.
- A tree with a single sparse element is very easy as you just can add that element in an calculate the path up the tree.
- When you have multiple keys then you need to make sure when you calculate the path up the tree you need to consider the impact other leaves have on your path to get to the root.
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
#include <iostream> | |
#include <chrono> | |
#include <openssl/sha.h> | |
#include <cpuid.h> | |
bool check_sha_support() { | |
unsigned int eax, ebx, ecx, edx; | |
if (__get_cpuid(7, &eax, &ebx, &ecx, &edx)) { | |
return (ebx & (1 << 29)) != 0; // Check bit 29 for SHA extensions | |
} |
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 actix_web::{get, web, App, HttpResponse, HttpServer, Responder}; | |
use bitcoincore_rpc::{Auth, Client, RpcApi}; | |
use serde_json::Value; | |
struct AppState { | |
btc_client: Client, | |
} | |
#[get("/blocktemplate")] | |
async fn get_block_template(data: web::Data<AppState>) -> impl Responder { |
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/bash | |
# Update the system | |
sudo yum update -y | |
# Install Docker | |
sudo amazon-linux-extras install docker -y | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
sudo usermod -aG docker ec2-user |
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
import requests | |
import csv | |
from datetime import datetime | |
import time | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
# Bitcoin node RPC connection details | |
rpc_user = 'your_rpc_username' | |
rpc_password = 'your_rpc_password' |
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
import requests | |
import csv | |
from datetime import datetime | |
import time | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
# Bitcoin node RPC connection details | |
rpc_user = 'your_rpc_username' | |
rpc_password = 'your_rpc_password' |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"net/http" | |
) | |
type SystemInfo struct { |
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
clang++ -x cuda --cuda-gpu-arch=sm_61 -I/opt/cuda/lib64 axpy.cu -o axpy -L/opt/cuda/lib32 -lcudart_static -ldl -lrt -pthread | |
clang++: warning: CUDA version is newer than the latest supported version 12.3 [-Wunknown-cuda-version] | |
In file included from <built-in>:1: | |
In file included from /usr/local/lib/clang/18/include/__clang_cuda_runtime_wrapper.h:41: | |
In file included from /usr/local/lib/clang/18/include/cuda_wrappers/cmath:27: | |
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/cmath:49: | |
/usr/lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/bits/std_abs.h:137:7: error: __float128 is not supported on this target | |
137 | abs(__float128 __x) | |
| ^ |
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
#include <iostream> | |
__global__ void axpy(float a, float* x, float* y) { | |
y[threadIdx.x] = a * x[threadIdx.x]; | |
} | |
int main(int argc, char* argv[]) { | |
const int kDataLen = 4; | |
float a = 2.0f; |
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
### | |
# Portland.HODL USB HID Latency Tester | |
# Engineered for RaspberryPi(4/5) | |
import csv | |
import hid | |
import time | |
import RPi.GPIO as GPIO | |
def list_hid_devices(): |
NewerOlder