Giter VIP home page Giter VIP logo

generate-block-for-testing's Introduction

generate-block-for-testing

This application is used to perform block generation in a testing network for the bitcoin or the liquid network.

function

  • generatetoaddress
    • use address
    • (in the future) generate address by bip32
    • (in the future) show the generated block's hash.
  • generate block for dynamic federation (liquid network)
    • set fedpeg script
    • set pak entry
    • (in the future) block sign
    • (in the future) maximum witness size
    • (in the future) show the generated block's hash.

usage

command-line argument

Usage: generateblock.exe [--host HOST] [--fedpegscript FEDPEGSCRIPT] [--pak PAK] [--network NETWORK] [--address ADDRESS] [--rpcuserid RPCUSERID] [--rpcpassword RPCPASSWORD] [--logging]

Options:
  --host HOST            connection host & port
  --fedpegscript FEDPEGSCRIPT, -s FEDPEGSCRIPT
                         fedpeg script on dynafed
  --pak PAK, -p PAK      pak entries
  --network NETWORK, -n NETWORK
                         network. (bitcoin:mainnet/testnet/regtest, liquid:liquidv1/liquidregtest/elementsregtest)
  --address ADDRESS, -a ADDRESS
                         bitcoin address for generatetoaddress
  --rpcuserid RPCUSERID
                         connection rpc userID
  --rpcpassword RPCPASSWORD
                         connection rpc password
  --logging, -l          log output
  --help, -h             display this help and exit

environment variable

  • GENERATE_BLOCK_CONNECTION_HOST: host & port.
  • GENERATE_BLOCK_CONNECTION_NETWORK: network type.
    • bitcoin: mainnet, testnet, regtest
    • liquid network: liquidv1, liquidregtest, (elementsregtest)
  • CONNECTION_PRC_USERID: connection rpc userID
  • CONNECTION_PRC_PASSWORD: connection rpc password
  • (for generatetoaddress)
    • GENERATE_BLOCK_GENERATETOADDRESS: bitcoin address
  • (liquid network parameter)
    • DYNAFED_FEDPEG_SCRIPT: fedpeg script.
    • DYNAFED_PAK: pak entry. To set multiple items, separate them with commas.

If both environment variable and command-line argument are set, the value set for command-line argument will take precedence.

example

bitcoin:

generateblock -l --host localhost:18443 --rpcuserid bitcoinrpc --rpcpassword password -n regtest -a bcrt1qpaujknvwumkwplvpdlh6gtsv7hrl60a37fc9tx

liquid network:

generateblock -l --host localhost:18447 --rpcuserid elementsrpc --rpcpassword password -n elementsregtest -s 5121024241bff4d20f2e616bef2f6e5c25145c068d45a78da3ddba433b3101bbe9a37d51ae -p 02b6991705d4b343ba192c2d1b10e7b8785202f51679f26a1f2cdbe9c069f8dceb024fb0908ea9263bedb5327da23ff914ce1883f851337d71b3ca09b32701003d05 -p 030e07d4f657c0c169e04fac5d5a8096adb099874834be59ad1e681e22d952ccda0214156e4ae9168289b4d0c034da94025121d33ad8643663454885032d77640e3d

build

go build ./cmd/generateblock/
make build

format

make format

use library

import gb "github.com/cryptogarageinc/generate-block-for-testing"

generate-block-for-testing's People

Contributors

k-matsuzawa avatar ko-matsu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.