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

v0.0.5 updates #49

Merged
merged 9 commits into from
Dec 2, 2024
Merged

v0.0.5 updates #49

merged 9 commits into from
Dec 2, 2024

Conversation

buffrr
Copy link
Member

@buffrr buffrr commented Dec 2, 2024

This PR adds many things for stability, fixes some bugs and makes error handling more robust.

  • Add a regtest preset data diretory for Bitcoin core with 10,000 spaces already opened for auction and 100 funded wallets.
  • Write a new set of integration tests covering various edge cases
  • Create a tx checker that's used as a last line of defense before a tx is broadcasted to make sure it's not accidentally revoking spaces ... etc can be skipped with --skip-tx-check
  • Ensure fee bumping maintains the original locktime as that's important for bid outputs
  • Make coin selection for bid outputs more conservative
  • Add checkpackage rpc command which is useful for the mempool. It can take a list of ordered transactions and simulate what they will do. It can be useful for mempool bids, opens ... etc and can be integrated perhaps for the explorer.
  • Fix a bug that could cause a space to be revoked during batch transfers.

This check was added as an additional safety check, but it should use the output index
to actually determine if there's an existing space as it could cause a revoke during batch transfers (perhaps we should remove it all together)
If a user was outbid while their transaction is still in the mempool, the pending transaction gets stuck in the wallet which could result in building invalid chains of transactions on top.

The solution is either to rescan the wallet to forget the tx or, for now, we just watch bids in memory and manually insert them to the chain so that bdk can purge the double spent tx.

This is a temporary solution until bdk does this automatically or adds better tx invalidation APIs
This is to prevent accidental revokes and used as a last line of defense before a transaction is broadcasted
@buffrr buffrr merged commit d3c1457 into spacesprotocol:main Dec 2, 2024
1 check passed
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.

1 participant