Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the bitcoin finality confirmation requirement from 2 to 1 block #800

Closed

Conversation

devbordecraft
Copy link

No description provided.

@devbordecraft
Copy link
Author

For reference : #796

@binarybaron
Copy link
Collaborator

binarybaron commented Oct 4, 2021

If we do this, we should also reduce it to 1 for testnet.

bitcoin_finality_confirmations: 2,

@rishflab
Copy link
Member

rishflab commented Oct 6, 2021

The 2 block requirement on the cli only affects the refund tx.

On the ASB, the bitcoin finality confirmations can be set to 1 using the config file. This will get you the swap reduction time you desire.

@rishflab rishflab closed this Dec 7, 2021
bors bot added a commit that referenced this pull request Dec 25, 2021
894: Reduce `bitcoin_finality_confirmations` from 2 to 1 r=da-kami a=binarybaron

Reduces `bitcoin_finality_confirmations` from 2 to 1. This lowers the total time needed for a swap by an average of 10 minutes

I'm aware that this has been proposed before (#800) and was rejected. 

> On the ASB, the bitcoin finality confirmations can be set to 1 using the config file. This will get you the swap reduction time you desire.

I believe this is not correct. There is no way for ASB operators to configure the `bitcoin_finality_confirmations` setting. Only the `target_block` can be configured manually, but this is only used for estimating the fee rate when a btc transaction is published and not for deciding when it is safe to assume that the transaction is finalized.

E.g the `config.toml` file of my (testate) asb
```
[data]
dir = "/root/.local/share/xmr-btc-swap/asb/testnet"

[network]
listen = ["/ip4/0.0.0.0/tcp/9939", "/ip4/0.0.0.0/tcp/9940/ws"]
external_addresses = ["/dnsaddr/unstoppableswap.net"]
rendezvous_point = "/dnsaddr/discover.unstoppableswap.net/p2p/12D3KooWA6cnqJpVnreBVnoro8midDL9Lpzmg8oJPoAGi7YYaamE"

[bitcoin]
electrum_rpc_url = "ssl://electrum.blockstream.info:60002"
target_block = 1  # My asb still waits for 2 confirmations on the btc lock tx
network = "Testnet"

[monero]
wallet_rpc_url = "http://127.0.0.1:38083/json_rpc"
network = "Stagenet"

[tor]
control_port = 9051
socks5_port = 9050

[maker]
min_buy_btc = 0.0001
max_buy_btc = 0.1
ask_spread = 0.00
price_ticker_ws_url = "wss://ws.kraken.com"
```

Co-authored-by: binarybaron <you@domain.com>
bors bot added a commit that referenced this pull request Apr 14, 2022
894: Reduce `bitcoin_finality_confirmations` from 2 to 1 r=binarybaron a=binarybaron

Reduces `bitcoin_finality_confirmations` from 2 to 1. This lowers the total time needed for a swap by an average of 10 minutes

I'm aware that this has been proposed before (#800) and was rejected. 

> On the ASB, the bitcoin finality confirmations can be set to 1 using the config file. This will get you the swap reduction time you desire.

I believe this is not correct. There is no way for ASB operators to configure the `bitcoin_finality_confirmations` setting. Only the `target_block` can be configured manually, but this is only used for estimating the fee rate when a btc transaction is published and not for deciding when it is safe to assume that the transaction is finalized.

E.g the `config.toml` file of my (testate) asb
```
[data]
dir = "/root/.local/share/xmr-btc-swap/asb/testnet"

[network]
listen = ["/ip4/0.0.0.0/tcp/9939", "/ip4/0.0.0.0/tcp/9940/ws"]
external_addresses = ["/dnsaddr/unstoppableswap.net"]
rendezvous_point = "/dnsaddr/discover.unstoppableswap.net/p2p/12D3KooWA6cnqJpVnreBVnoro8midDL9Lpzmg8oJPoAGi7YYaamE"

[bitcoin]
electrum_rpc_url = "ssl://electrum.blockstream.info:60002"
target_block = 1  # My asb still waits for 2 confirmations on the btc lock tx
network = "Testnet"

[monero]
wallet_rpc_url = "http://127.0.0.1:38083/json_rpc"
network = "Stagenet"

[tor]
control_port = 9051
socks5_port = 9050

[maker]
min_buy_btc = 0.0001
max_buy_btc = 0.1
ask_spread = 0.00
price_ticker_ws_url = "wss://ws.kraken.com"
```

Co-authored-by: binarybaron <you@domain.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants