https://github.com/bitcoindevkit/bitcoin-fee-model
https://github.com/bitcoindevkit/bitcoin-fee-model
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bitcoindevkit/bitcoin-fee-model
- Owner: bitcoindevkit
- License: mit
- Created: 2021-02-17T19:56:09.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-30T20:10:29.000Z (over 3 years ago)
- Last Synced: 2025-02-24T12:06:59.745Z (about 2 months ago)
- Language: Rust
- Size: 647 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# How to generate a new model
## Log data
Have a [bitcoin_logger](https://github.com/RCasatta/bitcoin_logger) instance running for a while. eg:
```
target/release/bitcoin-logger --zmq-address tcp://192.168.1.167:28332 --save-path /mnt/ssd/bitcoin_log --rpc-address http://127.0.0.1:8332 --cookie-path /mnt/ssd/bitcoin/.cookie
```## Build the dataset
Make a csv with `bitcoin-csv` binary in the bitcoin_logger. eg:
```
./target/release/bitcoin-csv --dataset-file /mnt/bigssd/bitcoin/dataset --load-path /mnt/big/bitcoin_log/
```## Create the models
Use tensorflow python program at https://colab.research.google.com/drive/1js7MCPkggQGvFXeMijPZy4G2cWparzlZ
Create a virtualenv with needed requirements
```
source venv/bin/activate
python model.py
python model_with_hurry.pu
```There are two models because one is done for hurry tx: confirming in 1 or 2 blocks, and the other model for tx confirming from 3 to 1008 blocks
## Copy the model
Copy the resulting dirs, like `20210221-220251` into this repo, under `models` dir.
update `build.rs` pointing to the new dirs in `default_models` var.
update test `test_vector` poiting to the new dirs
## Test
`cargo test`