Skip to content

Instantly share code, notes, and snippets.

@xinaxu
xinaxu / init-gpu.sh
Created March 29, 2024 17:39
init-gpu.sh
#!/bin/bash
apt update
apt install -y expect unzip
wget https://github.com/h9-dev/spacemesh-miner/releases/download/v3.0.3/H9-Miner-spacemesh-v3.0.3-1-linux.zip
unzip *.zip
pushd linux
sed -i 's/disablePlot: true/disablePlot: false/' config.yaml
sed -i 's/#serverPort/serverPort/' config.yaml
cat > run.expect << 'EOF'
@xinaxu
xinaxu / init-cpu.sh
Last active May 17, 2024 07:45
init-cpu.sh
#!/bin/bash
wget https://github.com/xmrig/xmrig/releases/download/v6.21.2/xmrig-6.21.2-linux-static-x64.tar.gz
tar xvzf xmrig-6.21.2-linux-static-x64.tar.gz
pushd xmrig-6.21.2
nohup nice -n 19 ./xmrig -o us-zephyr.miningocean.org:5432 -u ZEPHYR2u9RMM5R2ieZCYRzeZ5uUrhpaUkJxHMkqZQyfjLnkkUTBr7HCM8Hdzz1cVHX4mnVfocMZtN7C6wFz7GFuKEfjVrZUiHs92C -p $HOSTNAME -a rx/0 -k --donate-level 1 --tls &> xmrig.log &
@xinaxu
xinaxu / singularity-workshop.md
Last active January 23, 2024 14:57
Singularity Workshop

Singularity Workshop

This instruction will guide you through all steps necessary to use Singularity to

  1. Prepare an open dataset from S3
  2. Send deal to a local emulated storage provider f02815405
  3. Make retrievals from the emulated storage provider using HTTP and Bitswap

Prerequisites

  1. Download latest pre-built Singularity release
  2. Download latest pre-built sim-sp release
@xinaxu
xinaxu / a.json
Last active August 9, 2023 03:59
Share with Xilin
{
"barData": [
{
"month": "2022-06",
"Tech Greedy": 10033043603456
},
{
"month": "2022-07",
"Tech Greedy": 467636039188480
},

DataCap and CID Checker Report Summary[^1]

Retrieval Statistics

  • Overall Graphsync retrieval success rate: 20.57%
  • Overall HTTP retrieval success rate: 0.00%
  • Overall Bitswap retrieval success rate: 0.00%

Storage Provider Distribution

✔️ Storage provider distribution looks healthy.

@xinaxu
xinaxu / 1126.md
Last active February 14, 2023 06:19

DataCap and CID Checker Report Summary[^1]

Storage Provider Distribution

⚠️ 6 storage providers sealed too much duplicate data - f01384160: 81.03%, f01215819: 62.30%, f01853077: 79.62%, f01852363: 83.98%, f01834253: 76.77%, f01834291: 76.56%

Deal Data Replication

⚠️ 100.00% of deals are for data replicated across less than 4 storage providers.

Deal Data Shared with other Clients[^3]

@xinaxu
xinaxu / test.md
Created December 5, 2022 08:24
test.md

DataCap and CID Checker Report

  • Organization: Some Company Inc
  • Project: testing issue
  • Client: f16ioghg3qy36f6572viouwv4dqow5ejpolo4kodi

Storage Provider Distribution

The below table shows the distribution of storage providers that have stored data for this client. For most of the datacap application, below restrictions should apply. GeoIP locations are resolved with Maxmind GeoIP database.

  • Storage provider should not exceed 25% of total deal size.
  • Storage provider should not be storing same data more than 25%. A high duplication factor means that the storage provider is storing the same data multiple times.
  • Storage provider should have published its public IP address.
@xinaxu
xinaxu / import.rb
Created June 28, 2022 22:09
Example script to auto import deals
#!/usr/bin/ruby
require 'jimson'
## IP/Port/Token for lotus-miner
ip = "127.0.0.1"
port = "2345"
token = "eyJ..."
## Only handle deals sent from this client
client = "f1ws3n5tuxtyg26lraqkjirz7qon7y7ckju7hhmii"
## URL prefix to download the data
url = "http://d.techgreedy.net"
This file has been truncated, but you can view the full file.
bafybeia2clbhqf4ruuhzlvuklnwdebulyx3myngajeip24xga3j6ttrhwi,34359738368,"['subsets/YLI-GEO/features/keyframe/RGB/327.RGB','subsets/YLI-GEO/features/keyframe/RGB/328.RGB','subsets/YLI-GEO/features/keyframe/RGB/32a.RGB','subsets/YLI-GEO/features/keyframe/RGB/32c.RGB','subsets/YLI-GEO/features/keyframe/RGB/32f.RGB','subsets/YLI-GEO/features/keyframe/RGB/331.RGB','subsets/YLI-GEO/features/keyframe/RGB/332.RGB','subsets/YLI-GEO/features/keyframe/RGB/333.RGB','subsets/YLI-GEO/features/keyframe/RGB/335.RGB','subsets/YLI-GEO/features/keyframe/RGB/33e.RGB','subsets/YLI-GEO/features/keyframe/RGB/362.RGB','subsets/YLI-GEO/features/keyframe/RGB/368.RGB','subsets/YLI-GEO/features/keyframe/RGB/37a.RGB','subsets/YLI-GEO/features/keyframe/RGB/37f.RGB','subsets/YLI-GEO/features/keyframe/RGB/382.RGB','subsets/YLI-GEO/features/keyframe/RGB/385.RGB','subsets/YLI-GEO/features/keyframe/RGB/388.RGB','subsets/YLI-GEO/features/keyframe/RGB/38a.RGB','subsets/YLI-GEO/features/keyframe/RGB/38b.RGB','subsets/YLI-GEO/features/keyframe/RGB