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

fix: Mock mainnet begin block deployment fix btc duplicate payment #1259

Conversation

ws4charlie
Copy link
Contributor

Description

Duplicate payment happened to bitcoin outbound nonce 0.
payment1: https://blockstream.info/tx/71395db26ae81147dd79176e394c598b9480036c5ef6e44608b3356283168872
payment2: https://blockstream.info/tx/26aa6b32b7f16cc6671ac1419e91bac5fb78b5d24536df0da0120a3f75bf9116

This PR is to special handle nonce 0 to avoid duplicate payments.

Closes:

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Checklist:

  • I have added unit tests that prove my fix feature works

@ws4charlie ws4charlie merged commit 22f9107 into mock-mainnet-begin-block-deployment Oct 10, 2023
lumtis pushed a commit that referenced this pull request Oct 16, 2023
* add begin blocked deployemnts for mock mainent

* panic when telemetry server does not start

* report bitcoin fee in sat/byte instead of stas/KB

* compensate for the low gaslimit on BTC

* fix: Mock mainnet begin block deployment fix btc duplicate payment (#1259)

* special handling to avoid duplicate payment on bitcoin outbound nonce 0

* use cctx amount instead of txResult's amount because it's not available in bitcoin mainnet

---------

Co-authored-by: charliec <[email protected]>

* fix: Mock mainnet begin block deployment fix btc duplicate payment (#1266)

* special handling to avoid duplicate payment on bitcoin outbound nonce 0

* use cctx amount instead of txResult's amount because it's not available in bitcoin mainnet

* mockmain bootstrap from double payment on nonce 0

---------

Co-authored-by: charliec <[email protected]>

* revert hard coded outTx hash for nonce 0

* removed division by 1000 in fee calculation (#1275)

Co-authored-by: charliec <[email protected]>

* try to fix smoketest due to BTC ZRC20 audit

---------

Co-authored-by: Tanmay <[email protected]>
Co-authored-by: Tanmay <[email protected]>
Co-authored-by: Charlie Chen <[email protected]>
Co-authored-by: charliec <[email protected]>
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.

3 participants