nymius / bdk-coin-select-simulation Goto Github PK
View Code? Open in Web Editor NEWA bdk-coin-select simulator.
License: MIT License
A bdk-coin-select simulator.
License: MIT License
Describe the bug
The deposit count in the results.csv
output, which samples the simulation results on each 500 withdraw attempts, is not being reported correctly.
To Reproduce
Steps to reproduce the behavior:
(on bash)
cd bdk-coin-select-simulation
rm -f simulation_results/
git checkout 3e0c309
cargo build --manifest-path ./Cargo.toml -p bdk-coin-select-simulation --release
cargo run --manifest-path ./Cargo.toml -r -p bdk-coin-select-simulation -- ./data/scenarios/bustabit-2019-2020-tiny.csv ./simulation_results
head -n 500 data/scenarios/bustabit-2019-2020-tiny.csv | grep -v '^-' | wc -l
Expected behavior
The results of the steps 6
and 7
of the previous section should be equal.
Desktop (please complete the following information):
> lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
> rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)
> cargo --version
cargo 1.75.0 (1d8b05cdd 2023-11-20)
Additional context
During simulations is possible to cat the other simulation files, like utxos.csv
or full_results.csv
and get the data that has been already written to the document. However, this is not possible with results.csv
.
It's not clear how failed payments should be managed, opening up the opportunity to extract multiple scenarios out of a single simulation.
Some policies that I thought about were:
Could you provide more use cases for this?
This policies are only applicable to simulations, as in real life, individual wallets will inform their users about the failed payments, drop it immediately and wait for the user to top up the wallet to retry the payment. Or in enterprise situations, failed payments are going to be enqueued, but trigger other logic, like automatic top up policies, before proceeding paying.
Describe the solution you'd like
Something like a SimulationConfig
context for which a single payment policy could be specified, which can be passed through command line parameters.
Describe alternatives you've considered
I've wondered if this is necessary at all. The policy could be hard coded, but this tools wants to be interoperable between different coin selection implementations, and provide flexibility for simulations, so I'm positive this is a needed feature.
Additional context
This came to my mind after seeing the high failure rate of the current simulated algorithm. A less restrictive failed payment policy could help to increase the success ratio.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.