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] v1.0.4-beta #1804

Merged
merged 19 commits into from
May 22, 2023
Merged

[release] v1.0.4-beta #1804

merged 19 commits into from
May 22, 2023

Conversation

shamardy
Copy link
Collaborator

@shamardy shamardy commented May 5, 2023

Features:

  • NFT integration #900
    • Proxy support was added #1775

Enhancements/Fixes:

  • Some enhancements were done for enable_bch_with_tokens,enable_eth_with_tokens,enable_tendermint_with_assets RPCs in #1762
    • A new parameter get_balances was added to the above methods requests, when this parameter is set to false, balances will not be returned in the response. The default value for this parameter is true to ensure backward compatibility.
    • Token balances requests are now performed concurrently for the above methods.
  • Swap watcher nodes #1750
    • PoC for ETH/UTXO and ERC20/UTXO swaps with rewards
    • Improved protocol to let only the taker pay the reward
  • Add passive parent coin state for keeping tokens active when platform is disabled #1763
  • Detect a chain reorganization, if it occurs, redownload and revalidate the new best chain headers for SPV #1728
  • Fix moralis request in wasm target, add moralis tests #1817
  • Optimize release compilation profile for mm2 #1821
  • PoSV support for UTXO coins was added in #1815

shamardy and others added 3 commits May 1, 2023 19:16
* add `get_balances` param to enable with tokens methods, request tokens balances from rpcs concurrently

* make balance response fields optional, early return on get_balances check, integration tests for get_balances

* request bch balance at the start of bch_and_slp_history_loop if get_balances is false

* fix enable with tokens responses to remove only the balance field from response if get_balances is false

* return token tickers if get_balances is false

---------

Reviewed-by: ozkanonur <work@onurozkan.dev>, rozhkovdmitrii <rozhkovdmitrii@yandex.ru>, cipig, smk762
* add proxy support

* make nft feature default

* CHANGELOG entry

* remove nft feature flag

* add MORALIS_API_ENDPOINT

* improve readability of the url building

---------

Reviewed-by: ozkanonur <work@onurozkan.dev>, shamardy <shamardy@yahoo.com>
@shamardy shamardy changed the title [release] v1.0.4 [release] v1.0.4-beta May 5, 2023
@shamardy shamardy marked this pull request as ready for review May 5, 2023 15:20
@shamardy shamardy requested review from ca333, cipig and smk762 May 5, 2023 15:20
@shamardy
Copy link
Collaborator Author

shamardy commented May 5, 2023

Hoping to include these PRs in this release too once review is finished

This release PR should be reviewed and due for merging next friday

Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: smk762
onur-ozkan and others added 2 commits May 9, 2023 21:38
* [wip] implement coin state handling

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

* [wip] finish is_available and update_is_available implementations

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

* [wip] save dev state

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

* [wip] update tests

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

* update solana tests

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

* update solana tests

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

* update error handling for `disable_coin`

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

* fix clippy on `--all-features`

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

* implement unit & integration tests

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

* cancel orders for passive coins as well

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

* refactor coin state handling

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

* shorthand `fn lp_coins::is_available`

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

* update `coins::lp_coinfind`

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

* create `fn is_platform_coin` for `MmCoinEnum`

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

---------

Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>, caglaryucekaya <caglaryucekaya@gmail.com>
* add watcher reward functionality for eth-erc20-utxo swaps

* refactor watcher tests and add tests for eth-erc20-utxo swaps

* update swap contract abi

* use improved contract to allow only the taker to pay watcher rewards

* add changes to the CHANGELOG

* use enum for ETH payment states

* move watcher reward functions to coins module

* add watcher_common module

* fix bugs and use a better sepolia rpc endpoint

* use timeout for gas price queries

* define a separate get_base_price_in_rel function for tests

* get watcher reward inside watcher_validate_taker_payment

* implement checked_div method for BigDecimal and replace divs with it

* implement CheckedDiv for MmNumber and use it in get_cex_rates

* move the wasm-timer import to dev-dependencies in coins toml

* rename an environment variable used for tests

* use helper functions to get time

* rename the local big_decimal module

---------

Reviewed-by: shamardy <shamardy@yahoo.com>, ozkanonur <work@onurozkan.dev>, borngraced, Alrighttt
@onur-ozkan onur-ozkan added the blocked requires additional attention label May 11, 2023
Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>
@shamardy shamardy removed the blocked requires additional attention label May 11, 2023
borngraced and others added 8 commits May 11, 2023 17:19
* check for chain reorg and resolve
+ unit test for electrum and wasm

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

* refactor remove_headers_from_storage to delete headers with condition

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

* add sleep timer after resolving chain reorg

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

* handle case for empty headers in storage.

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

* seperate detect_chain_reorg and resolve_chain_reorg

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

* impl retrieve_headers_helper and retrieve_and_revalidate_mismatching_header

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

* using loop for retrieve_and_revalidate_mismatching_header

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

* update CHANGELOG.md

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

* implement test_block_header_utxo_loop_with_reorg

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

* get list of electrums with up to date block count and choose a random electrum to retrieve the next chunk from

* remove bad servers, break and return permanent error if all servers are bad

* Refactor iteration of `connections` in `get_servers_with_latest_block_count` function in `rpc_clients.rs`

* use prepared sql statement and params for remove_headers_from_storage

---------

Signed-off-by: borngraced <samuelonoja970@gmail.com>
Co-authored-by: shamardy <shamardy@yahoo.com>
Reviewed-by: ozkanonur <work@onurozkan.dev>, DeckerSU
* remove body from send_moralis_request for wasm target

* test moralis requests

* use constants for urls

* return target check for test

* CHANGELOG entry

---------

Reviewed-by: ozkanonur <work@onurozkan.dev>, shamardy <shamardy@yahoo.com>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>
…the certificate issue is resolved (#1822)

Reviewed-by: laruh
* create CI flows for `adex-cli`

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

* format CI files

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

---------

Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>
…1824)

Reviewed-by: caglaryucekaya <caglaryucekaya@gmail.com>
Reviewed-by: shamardy <shamardy@yahoo.com>
* serialize/ deserialize PoSV transaction

* sign posv transaction

* PoSV supporting configuration

* code fixes and missing n_time

* fix fmt in utxo.rs

* fix fmt in transaction.rs

* add changelog entry

---------

Co-authored-by: John Nash <john@redd.ink>
Co-authored-by: shamardy <shamardy@yahoo.com>
Reviewed-by: cipig, shamardy <shamardy@yahoo.com>
Copy link
Member

@Alrighttt Alrighttt left a comment

Choose a reason for hiding this comment

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

Leaving a partial review, so I can continue on this tomorrow and hopefully have some of these comments talked about or addressed in the mean time

.github/workflows/dev-build.yml Outdated Show resolved Hide resolved
.github/workflows/release-build.yml Show resolved Hide resolved
mm2src/coins/nft.rs Outdated Show resolved Hide resolved
mm2src/coins/nft.rs Outdated Show resolved Hide resolved
Alrighttt
Alrighttt previously approved these changes May 16, 2023
Copy link
Member

@Alrighttt Alrighttt left a comment

Choose a reason for hiding this comment

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

Approving in terms of secure code review, but I will do some further manual testing of both watcher nodes and reorg business logic in the coming week(s).

mm2src/coins/utxo/utxo_builder/utxo_arc_builder.rs Outdated Show resolved Hide resolved
mm2src/coins/lp_coins.rs Show resolved Hide resolved
mm2src/coins/watcher_common.rs Show resolved Hide resolved
mm2src/common/common.rs Outdated Show resolved Hide resolved
cipig
cipig previously approved these changes May 17, 2023
Copy link
Member

@cipig cipig left a comment

Choose a reason for hiding this comment

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

running for 24h on 6 LP nodes and one seed node without problems

* lock SCP github action to v0.8.0

* use strict types for requests in nft_structs.rs

* Remove unneeded comment in block_header_utxo_loop

* use try_into with expect instead of type casting in now_sec_u32/now_sec_i64

* fix nft_tests

* use Url methods to construct the moralis requests urls

---------

Reviewed-by: ozkanonur <contact@onurozkan.dev>, laruh
@shamardy shamardy dismissed stale reviews from cipig and Alrighttt via 0660e75 May 17, 2023 16:49
onur-ozkan and others added 2 commits May 18, 2023 12:26
Signed-off-by: ozkanonur <work@onurozkan.dev>
Reviewed-by: shamardy <shamardy@yahoo.com>
* move eth tests to the new testnet

* replace old contract address usages

* use different addresses for failing tests

* add changelog

* add sepolia url to test_nonce_several_urls test

---------

Reviewed-by: shamardy <shamardy@yahoo.com>
ca333
ca333 previously approved these changes May 22, 2023
Copy link

@ca333 ca333 left a comment

Choose a reason for hiding this comment

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

secure code reviewed @ 4f97d69

@shamardy shamardy merged commit 371595d into main May 22, 2023
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.

9 participants