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

[release] 1.0.1-beta #1721

Merged
merged 93 commits into from
Mar 27, 2023
Merged

[release] 1.0.1-beta #1721

merged 93 commits into from
Mar 27, 2023

Conversation

ca333
Copy link

@ca333 ca333 commented Mar 15, 2023

Changelog:

Features:

  • NFT integration WIP #900
    • NFT integration PoC added. Includes ERC721 support for ETH and BSC #1652
    • Withdraw ERC1155 and EVM based chains support added for NFT PoC #1704
  • Swap watcher nodes #1431
    • Watcher rewards for ETH swaps were added #1658
  • Cosmos integration WIP #1432
    • ibc_withdraw, ibc_chains and ibc_transfer_channels RPC methods were added #1636
  • Lightning integration WIP #1045
    • rust-lightning was updated to v0.0.113 in #1655
    • Channel current_confirmations and required_confirmations were added to channel details RPCs in #1655
    • Uuid is now used for internal channel id instead of u64 #1655
    • Some unit tests were added for multi path payments in #1655
    • Some unit tests for claiming swaps on-chain for closed channels were added in #1655, these unit tests are currently failing.
    • protocol_info fields are now used to check if a lightning order can be matched or not in #1655
    • 2 issues discovered while executing a KMD/LNBTC swap were fixed in #1655, these issues were:
      • When electrums were down, if a channel was closed, the channel closing transaction wasn't broadcasted. A check for a network error to rebroadcast the tx after a delay was added.
      • If an invoice payment failed, retring paying the same invoice would cause the payment to not be updated to successful in the DB even if it were successful. A method to update the payment in the DB was added to fix this.
    • mm2_git crate was added to provide an abstraction layer on Git for doing query/parse operations over the repositories #1636

Enhancements/Fixes:

  • Use env_logger to achieve flexible log filtering #1725
  • IndexedDB Cursor can now iterate over the items step-by-step #1678
  • Uuid lib was update from v0.7.4 to v1.2.2 in #1655
  • A bug was fixed in #1706 where EVM swap transactions were failing if sent before the approval transaction confirmation.
  • Tendermint account sequence problem due to running multiple instances were fixed in #1694
  • Maker/taker pubkeys were added to new columns in stats_swaps table in #1665 and #1717
  • Get rid of unnecessary / old dependencies: crossterm, crossterm_winapi, mio 0.7.13, miow, ntapi, signal-hook, signal-hook-mio in #1710
  • A bug that caused EVM swap payments validation to fail because the tx was not available yet in the RPC node when calling eth_getTransactionByHash was fixed in #1716. eth_getTransactionByHash in now retried in wait_for_confirmations until tx is found in the RPC node, this makes sure that the transaction is returned from eth_getTransactionByHash later when validating.
  • CI/CD migrated from Azure to Github runners #1699
  • CI tests are much stabilized #1699
  • Integration and unit tests are seperated on CI stack #1699
  • Codebase is updated in linting rules at wasm and test stack #1699
  • crossbeam bumped to 0.8 from 0.7 #1699
  • Un-used/Unstable parts of mm2 excluded from build outputs which avoids mm2 runtime from potential UB #1699
  • Build time optimizations applied such as sharing generics instead of duplicating them in binary (which reduces output sizes) #1699
  • RUSTSEC-2020-0036, RUSTSEC-2021-0139 and RUSTSEC-2023-0018 resolved #1699
  • Enabled linting checks for wasm and test stack on CI #1699
  • Release container base image updated to debian stable from ubuntu bionic #1699
  • Fix dylib linking error of rusb #1699
  • OperationFailure::Other error was expanded. New error variants were matched with HwRpcError, so error type will be HwError, not InternalError #1719
  • RPC calls for evm chains was reduced in wait_for_confirmations function in #1724
  • A possible endless loop in evm wait_for_htlc_tx_spend was fixed in #1724
  • Wait time for taker fee validation was increased from 30 to 60 seconds in #1730 to give the fee tx more time to appear in most nodes mempools.

onur-ozkan and others added 30 commits March 3, 2023 17:58
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
* wip

* wip

* wip some structures were added

* wip

* wip

* wip

* fn get_my_address was moved into lp_coins.rs

* wip get_my_address

* get_my_address works

* send_moralis_request, errors, get_nft_list wip

* add targets for send_moralis_request

* wip

* wip

* wip use fn slurp_req_body in fn send_moralis_request

* wip fix wasm

* wip cursor in get_nft_list

* wip impl Deserialize for Wrap

* get_nft_list

* remove unnecessary notes

* wip get_nft_transfers

* get_nft_transfers works

* polish code

* polish code

* remove Option from some fields in Nft struct

* wip get_nft_metadata

* use NftWrapper in fn get_nft_metadata, add some doc comments

* remove allow(dead_code)

* change order in Chain enum

* fix doc comment

* beautify json

* add from in withdraw requests

* String::new(), serde UPPERCASE, pub(crate) SerdeStringWrap,line break

* use ok_or_else, remove if cursor is null, remove !nfts_list.is_empty()

* derive order, simplify match protocol

* replace Chain::Bnb with Chain::Bsc

* change status code matching, add derive Copy

* fn withdraw_erc721

* move nft from eth to coin crate

* remove memo

* wip

* add fn coins_conf_check

* add from_stringify

* add feature enable-nft-integration, fix coins_conf_check

* add doc comment for withdraw_nft

* fix coins_conf_check

* fix deref which would be done by auto-deref

* fix conflicts, add feature log file

* fix wasm

---------

Reviewed-by: @ozkanonur, @sergeyboyko0791, @borngraced, @shamardy
* add watcher_validate_taker_payment unit tests for eth, erc20 and utxo

* reuse ethereum validate_fee method for watcher validations

* add contract support parameter to eth coin activation parameters

* fix lock_duration overflow bug by adding validation

* use the refactored etomic swap contract

* fix a watcher bug in wait_for_htlc_tx_spend and add a test case

* change swap contract address and abi

* remove the contract_supports_watchers method

* add watcher_reward to negotiaton data

* add watcher reward functionality

* fix merge conflicts

* remove log file

* remove watcher reward related parts from negotiation data

* disable the watcher rewards

* small fixes

* disable watcher rewards

* remove log file

* minor fixes

* add test case for multiple watchers spending the same payment

* use serde default for contract_supports_watchers field

* use multiple attempts to get gas price for watcher rewards

---------
Reviewed-by: @ozkanonur, @shamardy
* Save dev state

* Refactor IndexedDB Cursor

* Add `CursorIter::next`
* Add `IdbEmptyCursor`

* Fix merge conflicts

* Fix and optimize `IndexedDbBlockHeaderStorage`

* Make `height: BeBigUint` instead of `u64`
* Fix `BlockHeaderStorageTable::TICKER_HEIGHT_INDEX` index

* Fix TODOs

* Fix PR issues

---------
Reviewed-by: @borngraced, @shamardy
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
…p-work

Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
…p-work

Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
…p-work

Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
* propose change.log

add a chronological "living" changelog file as a index for the dev.logs

* introduce CHANGELOG.md

* [docs] update changelog

* [docs] add changelog date/tag

* update changelog

* update date

* re-enable mac ci, add one more change log

---------

Co-authored-by: shamardy <shamardy@yahoo.com>
Reviewed-by: ozkanonur <work@onurozkan.dev>
…p-work

Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
* save dev state (p.o.c)

Signed-off-by: ozkanonur <work@onurozkan.dev>

* implement `ibc_withdraw` RPC

Signed-off-by: ozkanonur <work@onurozkan.dev>

* impl integration test for `ibc_withdraw`

Signed-off-by: ozkanonur <work@onurozkan.dev>

* unify tendermint `ibc_withdraw` methods

Signed-off-by: ozkanonur <work@onurozkan.dev>

* create `mm2_git` crate and implement Git abstraction layer

Signed-off-by: ozkanonur <work@onurozkan.dev>

* implement `ibc_transfer_channels` and `ibc_chains`

Signed-off-by: ozkanonur <work@onurozkan.dev>

* add wasm compatibility to `mm2_git::github_client`

Signed-off-by: ozkanonur <work@onurozkan.dev>

* use `KomodoPlatform` source for `chain-registry`

Signed-off-by: ozkanonur <work@onurozkan.dev>

* move ibc rpc related sources into `coins::rpc_command`

Signed-off-by: ozkanonur <work@onurozkan.dev>

* inline `try_from` for `MsgTransfer`

Signed-off-by: ozkanonur <work@onurozkan.dev>

* use request ticker itself instead of platform one

Signed-off-by: ozkanonur <work@onurozkan.dev>

* add new error variant `WithdrawError::ActionNotAllowed`

Signed-off-by: ozkanonur <work@onurozkan.dev>

* typo fix

Signed-off-by: ozkanonur <work@onurozkan.dev>

---------

Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>, borngraced <samiodev@icloud.com>, laruh
ca333 and others added 3 commits March 15, 2023 22:07
* [ci] change release branch from mm2.1 to main (#1697)

* change release branch from mm2.1 to main

* replace mm2.1 to main in eth_tests

* ci: disable mac ci steps (#1701)

Reviewed-by: ozkanonur <work@onurozkan.dev>

* docs: introduce CHANGELOG.md (#1680)

* propose change.log

add a chronological "living" changelog file as a index for the dev.logs

* introduce CHANGELOG.md

* [docs] update changelog

* [docs] add changelog date/tag

* update changelog

* update date

* re-enable mac ci, add one more change log

---------

Co-authored-by: shamardy <shamardy@yahoo.com>
Reviewed-by: ozkanonur <work@onurozkan.dev>, shamardy <shamardy@yahoo.com>
Signed-off-by: ozkanonur <work@onurozkan.dev>
@onur-ozkan
Copy link
Member

must have -> #1722

Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>
onur-ozkan and others added 15 commits March 17, 2023 14:09
Signed-off-by: ozkanonur <work@onurozkan.dev>
* use pubkeys with prefix

Signed-off-by: borngraced <samuelonoja970@gmail.com>

* match start event separately

Signed-off-by: borngraced <samuelonoja970@gmail.com>

* improve error msgs

Signed-off-by: borngraced <samuelonoja970@gmail.com>

* return error if key is none

Signed-off-by: borngraced <samuelonoja970@gmail.com>

* use SwapPubkeys::new()

Signed-off-by: borngraced <samuelonoja970@gmail.com>

* remove SwapPubkeys::new()

Signed-off-by: borngraced <samuelonoja970@gmail.com>

* update CHANGELOG.md

Signed-off-by: borngraced <samuelonoja970@gmail.com>

---------

Signed-off-by: borngraced <samuelonoja970@gmail.com>
Reviewed-by: shamardy <shamardy@yahoo.com>, smk
* expand Other in OperationFailure

* use OperationFailure in TrezorError

* wip

* expand failure in HwError

* match errors for HwRpcError, not internal type

* add display

* add entry in the changelog file

* add PongMessageMismatch to HwRpcError

---------

Reviewed-by: shamardy <shamardy@yahoo.com>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
…t_for_htlc_tx_spend (#1724)

* wait for confirmation of evm swap payment state initialization

* remove unneeded todo related to checking payment state for QRC20

* remove another todo that is not needed

* fix test_tx_history_tbtc_non_segwit

* remove wait_for_payment_state_initialization check

* reduce eth wait_for_confirmations calls

* fix another endless loop issue introduced by the new code

* log confirmation by adding status.append(" Confirmed.")

* add entry for #1724 in change log

* fix confirmation_block_number to be the right block number and add checks for overflow

---------

Reviewed-by: cipig, laruh, caglaryucekaya <caglaryucekaya@gmail.com>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: caglaryucekaya <caglaryucekaya@gmail.com>
sec fixes, build-time optimizations, dependency optimizations, CI migration, etc
@ca333 ca333 requested a review from DeckerSU March 23, 2023 23:01
Signed-off-by: ozkanonur <work@onurozkan.dev>
@onur-ozkan
Copy link
Member

onur-ozkan commented Mar 24, 2023

For this release, we want to have #1733 which provides:

  • Pre-built binaries using more compatible glibc version. (blocker for release)
  • Fixes SIGSEGV (blocker for release)
  • Recent pushed commits cancels any in-progress previous pipelines. (this is noting to do with release, it's for dev experience)

@onur-ozkan onur-ozkan added the blocked requires additional attention label Mar 24, 2023
laruh and others added 2 commits March 24, 2023 20:04
…PoC (#1704)

* wip

* wip

* wip some structures were added

* wip

* wip

* wip

* fn get_my_address was moved into lp_coins.rs

* wip get_my_address

* get_my_address works

* send_moralis_request, errors, get_nft_list wip

* add targets for send_moralis_request

* wip

* wip

* wip use fn slurp_req_body in fn send_moralis_request

* wip fix wasm

* wip cursor in get_nft_list

* wip impl Deserialize for Wrap

* get_nft_list

* remove unnecessary notes

* wip get_nft_transfers

* get_nft_transfers works

* polish code

* polish code

* remove Option from some fields in Nft struct

* wip get_nft_metadata

* use NftWrapper in fn get_nft_metadata, add some doc comments

* remove allow(dead_code)

* change order in Chain enum

* fix doc comment

* beautify json

* add from in withdraw requests

* String::new(), serde UPPERCASE, pub(crate) SerdeStringWrap,line break

* use ok_or_else, remove if cursor is null, remove !nfts_list.is_empty()

* derive order, simplify match protocol

* replace Chain::Bnb with Chain::Bsc

* change status code matching, add derive Copy

* fn withdraw_erc721

* move nft from eth to coin crate

* remove memo

* wip

* add fn coins_conf_check

* add from_stringify

* add feature enable-nft-integration, fix coins_conf_check

* add doc comment for withdraw_nft

* fix coins_conf_check

* fix deref which would be done by auto-deref

* fix conflicts, add feature log file

* fix wasm

* find_wallet_amount, withdraw_erc1155

* add Avalanche, Fantom, Polygon chains

* simplify code

* amount_dec in tx details

* add get_eth_nft_gas_details

* add derive Clone, PartialEq

* doc comments

* fix merge conflict

* TokenNotFoundInWallet

* use eth_coin.my_address()?

* add entry in the changelog file

* use get_eth_gas_details for nft and fungible tokens

* remove redundant attributes, count field, add type GasDetails, add iterator

* fix merge conflicts

* get_valid_nft_add_to_withdraw, use just bool for max

* polish eth_value_for_estimate

* remove nft: bool

* add line spaces, add bold text

---------

Reviewed-by: shamardy <shamardy@yahoo.com>, ozkanonur <work@onurozkan.dev>
* use `ubuntu-18.04` for dev and release builds

Signed-off-by: ozkanonur <work@onurozkan.dev>

* always cancel previous `in-progress` pipelines when new commit pushed

Signed-off-by: ozkanonur <work@onurozkan.dev>

* switch from `ubuntu-latest` to `ubuntu-18.04` for all builds

Signed-off-by: ozkanonur <work@onurozkan.dev>

* turn off share generics nightly feature

Signed-off-by: ozkanonur <work@onurozkan.dev>

* set JEMALLOC environments in CI

Signed-off-by: ozkanonur <work@onurozkan.dev>

* rollback jemalloc entry from changelog

Signed-off-by: ozkanonur <work@onurozkan.dev>

---------

Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>
@onur-ozkan onur-ozkan removed the blocked requires additional attention label Mar 24, 2023
@ca333 ca333 merged commit 6bb79b3 into main Mar 27, 2023
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.

9 participants