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

chore: sync from mockmain #1265

Merged
merged 15 commits into from
Oct 16, 2023
Merged

chore: sync from mockmain #1265

merged 15 commits into from
Oct 16, 2023

Conversation

brewmaster012
Copy link
Collaborator

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

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

Comment on lines 462 to 465
// feerate from RPC is BTC/KB, convert it to satoshi/byte
// FIXME: in zetacore the gaslimit(vsize in BTC) is 100 which is too low for a typical outbound tx
// until we fix the gaslimit in BTC, we need to multiply the feerate by 20 to make sure the tx is confirmed
gasPriceU64, _ := gasPrice.Mul(big.NewFloat(*feeResult.FeeRate), big.NewFloat(20*1e5)).Uint64()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should bring this change to develop now that we can update gas limit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, we hold off merging to develop until we remove this;
we can remove this adjustment after MsgUpdate gas limit of bitcoin chain

@kingpinXD kingpinXD changed the base branch from develop to mock-mainnet-v1 October 11, 2023 01:11
@github-actions github-actions bot added ci Changes to CI pipeline or github actions breaking:proto labels Oct 11, 2023
@github-actions
Copy link

github-actions bot commented Oct 11, 2023

!!!WARNING!!!
nosec detected in the following files: zetaclient/bitcoin_client.go, zetaclient/btc_signer.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Oct 11, 2023
@kingpinXD kingpinXD changed the base branch from mock-mainnet-v1 to develop October 11, 2023 01:34
@github-actions github-actions bot removed ci Changes to CI pipeline or github actions breaking:proto labels Oct 11, 2023
ws4charlie and others added 4 commits October 11, 2023 09:49
…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]>
@lumtis lumtis mentioned this pull request Oct 16, 2023
Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@kevinssgh kevinssgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@lumtis lumtis merged commit 77ed086 into develop Oct 16, 2023
13 checks passed
@lumtis lumtis deleted the mock-mainnet-begin-block-deployment branch October 16, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants