Skip to content

j-moreno-c-r/Misfit_core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Misfit-Core

A tool for create specified invalid parameters for tests in bicoin.

Documentation

run a regtest

For run a regtest, with the bitcoin binaries installed

bitcoind -regetst

Installation

Clone the repo

git clone https://github.com/j-moreno-c-r/Misfit_core

Enter the directory

cd Misfit_core

Create a python venv to install dependecies

python3 -m venv .venv

activate the venv

source .venv/bin/activate

Install the dependencies

pip install .

And run like a normal cli

misfit-core

Basic usage

Usage: misfit-core [OPTIONS] <COMMAND>

Commands:

  • createblock Create a block with invalid specified parameters
  • createtx Create transaction with invalid specified parameters

Options:

  • --help Show this help message

Create a misfit block

Create a block with invalid specified parameters

Usage: misfit-core createblock [OPTIONS]

Options:

  • --help Show this help message

  • Block:

    • --version Set the block version as random invalid parameter

    • --prevblock Set the previous block hash as random invalid parameter

    • --merkleroot Set the merkle root as random invalid parameter

    • --timestamp Set the timestamp as random invalid parameter

    • --bits Set the bits as random invalid parameter

    • --nonce Set the nonce as random invalid parameter

  • Transactions:

    • --tx_count Set a number of transactions in block

    • --invalid_tx_count Set a number of invalid transactions in block (if is not set, all transactions will be invalid)

    • --tx_version Set the transaction version as random invalid parameter

    • --tx_marker Set the transaction market as random invalid parameter

    • --tx_flag Set the transaction flag as random invalid parameter

    • --tx_locktime Set the transaction locktime as random invalid parameter

    • Inputs:

      • --tx_in_count Set the number of transaction inputs

      • --invalid_tx_in_count Set the number of invalid transaction inputs (if not set, all inputs will be invalid)

      • --tx_in_txid Set the txid from inputs of transactions as random invalid parameter

      • --tx_in_vout Set the vout from inputs of transactions as random invalid parameter

      • --tx_in_script_size Set the size of scriptsig from inputs of transactions as random invalid parameter

      • --tx_in_script Set the scriptsig from inputs of transactions as random invalid parameter

      • --tx_in_sequence Set the sequence from inputs of transactions as random invalid parameter

    • Outputs:

      • --tx_out_count Set the number of transaction outputs

      • --invalid_tx_out_count Set the number of invalid transaction outputs (if not set, all outputs will be invalid)

      • --tx_out_amount Set the amount from outputs of transactions as random invalid parameter

      • --tx_out_script_size Set the size of scriptpubkey from outputs of transactions as random invalid parameter

      • --tx_out_script Set the scriptpubkey from outputs of transactions as random invalid parameter

    • Witness:

      • --tx_witness_count Set the number of transaction witness itens

      • --invalid_tx_witness_count Set the number of invalid transaction witness itens (if not set, all witness itens will be invalid)

      • --tx_witness_size Set the item size from witness item of transactions as random invalid parameter

      • --tx_witness_item Set the item from witness of transactions as random invalid parameter

Create a misfit transaction

Create transaction with invalid specified parameters

Usage: misfit-core createtx [OPTIONS]

Options:

  • --help Show this help message

  • --tx_count Set a number of transactions in block

  • --invalid_tx_count Set a number of invalid transactions in block (if is not set, all transactions will be invalid)

  • --tx_version Set the transaction version as random invalid parameter

  • --tx_marker Set the transaction market as random invalid parameter

  • --tx_flag Set the transaction flag as random invalid parameter

  • --tx_locktime Set the transaction locktime as random invalid parameter

  • Inputs:

    • --tx_in_count Set the number of transaction inputs

    • --invalid_tx_in_count Set the number of invalid transaction inputs (if not set, all inputs will be invalid)

    • --tx_in_txid Set the txid from inputs of transactions as random invalid parameter

    • --tx_in_vout Set the vout from inputs of transactions as random invalid parameter

    • --tx_in_script_size Set the size of scriptsig from inputs of transactions as random invalid parameter

    • --tx_in_script Set the scriptsig from inputs of transactions as random invalid parameter

    • --tx_in_sequence Set the sequence from inputs of transactions as random invalid parameter

  • Outputs:

    • --tx_out_count Set the number of transaction outputs

    • --invalid_tx_out_count Set the number of invalid transaction outputs (if not set, all outputs will be invalid)

    • --tx_out_amount Set the amount from outputs of transactions as random invalid parameter

    • --tx_out_script_size Set the size of scriptpubkey from outputs of transactions as random invalid parameter

    • --tx_out_script Set the scriptpubkey from outputs of transactions as random invalid parameter

  • Witness:

    • --tx_witness_count Set the number of transaction witness itens

    • --invalid_tx_witness_count Set the number of invalid transaction witness itens (if not set, all witness itens will be invalid)

    • --tx_witness_size Set the item size from witness item of transactions as random invalid parameter

    • --tx_witness_item Set the item from witness of transactions as random invalid parameter

About

hackton 2025 floripa, a TUI to made test food

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published