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

Simple Ledger Protocol (SLP) integration #1921

Merged
merged 70 commits into from
Sep 26, 2022
Merged

Simple Ledger Protocol (SLP) integration #1921

merged 70 commits into from
Sep 26, 2022

Conversation

ghost
Copy link

@ghost ghost commented Aug 8, 2022

Closes #1168
Should help with the resolution of #1897

Only tBCH and sTST are available for the moment

Don't forget to reset your assets config

Things that should be tested (tick/untick if something is not working properly, edit if something is missing):

  • Enabling tBCH
  • Enabling sTST when tBCH is enabled
  • Enabling sTST when tBCH is not enabled should enable tBCH
  • Enabling tBCH after disabling it
  • Enabling sTST after disabling it
  • Disabling tBCH
  • Disabling sTST
  • Disabling tBCH when sTST is not enabled should disable sTST
  • Send tBCH
  • Send sTST
  • Receive tBCH
  • Receive sTST
  • sTST and tBCH transactions history
  • Other coins transactions history
  • Swaps between tBCH and other coins
  • Swaps between sTST and other coins
  • Swaps between tBCH and sTST
  • Swaps between USDF and tBCH
  • Swaps between USDF and other coins
  • Enable USDF
  • Disable USDF

@tonymorony
Copy link
Contributor

@SylEze what is outstanding to un-draft/test this one?

@ghost ghost requested review from smk762 and Canialon September 2, 2022 12:07
@cipig
Copy link
Member

cipig commented Sep 12, 2022

getting this crash when i start ADEX from this branch:

[14:16:41] [info] [mm2.service.cpp:216] [3586283]: Retrieving Wallet information of /home/florian/.atomic_qt/config/0.5.6-coins.cipinew.json
[14:16:41] [error] [mm2.service.cpp:232] [3586283]: exception caught: Undefined given coin type.
[14:16:41] [info] [qt.global.coins.cfg.model.cpp:210] [3586283]: Initializing global coin cfg model with size 1
[14:16:41] [info] [global.provider.cpp:443] [3586283]: Forcing update providers
[14:16:41] [info] [qt.addressbook.page.cpp:66] [3586283]: post_login: filling addressbook from cfg
[14:16:41] [info] [addressbook.cfg.cpp:44] [3586283]: Addressbook configuration file read.
[14:16:41] [warning] [qt.addressbook.proxy.filter.model.cpp:79] [3586283]: No filter behavior on role 259
[14:16:41] [info] [main.prerequisites.hpp:90] [3586283]: Success: Login
[14:16:41] [info] [global.provider.cpp:105] [3586316]: refresh_other_coins_rates - try 1
[14:16:41] [info] [global.provider.cpp:105] [3586316]: refresh_other_coins_rates - try 1
[14:16:41] [info] [global.provider.cpp:105] [3586316]: refresh_other_coins_rates - try 1
[14:16:41] [info] [global.provider.cpp:482] [3586316]: Successfully retrieving rate after 1 try
[14:16:41] [warning] [coinpaprika.hpp:103] [3586313]: rpc answer code is 400 (Bad Parameters), body: {"error":"invalid parameters"}

[14:16:41] [info] [global.provider.cpp:140] [3586313]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[14:16:41] [warning] [coinpaprika.hpp:103] [3586318]: rpc answer code is 400 (Bad Parameters), body: {"error":"invalid parameters"}

[14:16:41] [info] [global.provider.cpp:140] [3586318]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[14:16:41] [warning] [coinpaprika.hpp:103] [3586321]: rpc answer code is 400 (Bad Parameters), body: {"error":"invalid parameters"}

[14:16:41] [info] [global.provider.cpp:140] [3586321]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[14:16:42] [info] [mm2.service.cpp:1582] [3586375]: mm2 is initialized
[14:16:42] [debug] [app.cpp:541] [3586375]: on_mm2_initialized_event l541
[14:16:42] [info] [qt.wallet.manager.cpp:343] [3586375]: Set status: enabling_coins
[14:16:42] [error] [mm2.service.cpp:720] [3586375]: BCH is not present in the config. Cannot enable SLP tokens.
[14:16:42] [error] [main.prerequisites.hpp:107] [3586375]: sigabort received, cleaning mm2
[14:16:42] [info] [main.prerequisites.hpp:90] [3586283]: Current font changed to Ubuntu.
[14:16:43] [error] [main.prerequisites.hpp:113] [3586375]: stacktrace:  0# signal_handler(int) at main.cpp:?
 1# 0x00007FF323607D60 in /lib/x86_64-linux-gnu/libc.so.6
 2# void entt::dispatcher::pool_handler<atomic_dex::enabling_coin_failed>::trigger<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const* const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const* const&) in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 3# atomic_dex::mm2_service::enable_slp_coins(std::vector<atomic_dex::coin_config, std::allocator<atomic_dex::coin_config> > const&) in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 4# atomic_dex::mm2_service::enable_coins(std::vector<atomic_dex::coin_config, std::allocator<atomic_dex::coin_config> > const&) in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 5# atomic_dex::mm2_service::enable_default_coins() in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 6# std::thread::_State_impl<std::thread::_Invoker<std::tuple<atomic_dex::mm2_service::spawn_mm2_instance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)::$_21> > >::_M_run() at mm2.service.cpp:?
 7# 0x00007FF3239BDED0 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 8# 0x00007FF32FBAFEA7 in /lib/x86_64-linux-gnu/libpthread.so.0
 9# clone in /lib/x86_64-linux-gnu/libc.so.6

[14:16:43] [warning] [main.prerequisites.hpp:93] [3586375]: QObject::~QObject: Timers cannot be stopped from another thread
[14:16:43] [warning] [main.prerequisites.hpp:93] [3586375]: QObject::~QObject: Timers cannot be stopped from another thread

@ghost
Copy link
Author

ghost commented Sep 14, 2022

getting this crash when i start ADEX from this branch:

[14:16:41] [info] [mm2.service.cpp:216] [3586283]: Retrieving Wallet information of /home/florian/.atomic_qt/config/0.5.6-coins.cipinew.json
[14:16:41] [error] [mm2.service.cpp:232] [3586283]: exception caught: Undefined given coin type.
[14:16:41] [info] [qt.global.coins.cfg.model.cpp:210] [3586283]: Initializing global coin cfg model with size 1
[14:16:41] [info] [global.provider.cpp:443] [3586283]: Forcing update providers
[14:16:41] [info] [qt.addressbook.page.cpp:66] [3586283]: post_login: filling addressbook from cfg
[14:16:41] [info] [addressbook.cfg.cpp:44] [3586283]: Addressbook configuration file read.
[14:16:41] [warning] [qt.addressbook.proxy.filter.model.cpp:79] [3586283]: No filter behavior on role 259
[14:16:41] [info] [main.prerequisites.hpp:90] [3586283]: Success: Login
[14:16:41] [info] [global.provider.cpp:105] [3586316]: refresh_other_coins_rates - try 1
[14:16:41] [info] [global.provider.cpp:105] [3586316]: refresh_other_coins_rates - try 1
[14:16:41] [info] [global.provider.cpp:105] [3586316]: refresh_other_coins_rates - try 1
[14:16:41] [info] [global.provider.cpp:482] [3586316]: Successfully retrieving rate after 1 try
[14:16:41] [warning] [coinpaprika.hpp:103] [3586313]: rpc answer code is 400 (Bad Parameters), body: {"error":"invalid parameters"}

[14:16:41] [info] [global.provider.cpp:140] [3586313]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[14:16:41] [warning] [coinpaprika.hpp:103] [3586318]: rpc answer code is 400 (Bad Parameters), body: {"error":"invalid parameters"}

[14:16:41] [info] [global.provider.cpp:140] [3586318]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[14:16:41] [warning] [coinpaprika.hpp:103] [3586321]: rpc answer code is 400 (Bad Parameters), body: {"error":"invalid parameters"}

[14:16:41] [info] [global.provider.cpp:140] [3586321]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[14:16:42] [info] [mm2.service.cpp:1582] [3586375]: mm2 is initialized
[14:16:42] [debug] [app.cpp:541] [3586375]: on_mm2_initialized_event l541
[14:16:42] [info] [qt.wallet.manager.cpp:343] [3586375]: Set status: enabling_coins
[14:16:42] [error] [mm2.service.cpp:720] [3586375]: BCH is not present in the config. Cannot enable SLP tokens.
[14:16:42] [error] [main.prerequisites.hpp:107] [3586375]: sigabort received, cleaning mm2
[14:16:42] [info] [main.prerequisites.hpp:90] [3586283]: Current font changed to Ubuntu.
[14:16:43] [error] [main.prerequisites.hpp:113] [3586375]: stacktrace:  0# signal_handler(int) at main.cpp:?
 1# 0x00007FF323607D60 in /lib/x86_64-linux-gnu/libc.so.6
 2# void entt::dispatcher::pool_handler<atomic_dex::enabling_coin_failed>::trigger<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const* const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const* const&) in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 3# atomic_dex::mm2_service::enable_slp_coins(std::vector<atomic_dex::coin_config, std::allocator<atomic_dex::coin_config> > const&) in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 4# atomic_dex::mm2_service::enable_coins(std::vector<atomic_dex::coin_config, std::allocator<atomic_dex::coin_config> > const&) in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 5# atomic_dex::mm2_service::enable_default_coins() in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
 6# std::thread::_State_impl<std::thread::_Invoker<std::tuple<atomic_dex::mm2_service::spawn_mm2_instance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)::$_21> > >::_M_run() at mm2.service.cpp:?
 7# 0x00007FF3239BDED0 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 8# 0x00007FF32FBAFEA7 in /lib/x86_64-linux-gnu/libpthread.so.0
 9# clone in /lib/x86_64-linux-gnu/libc.so.6

[14:16:43] [warning] [main.prerequisites.hpp:93] [3586375]: QObject::~QObject: Timers cannot be stopped from another thread
[14:16:43] [warning] [main.prerequisites.hpp:93] [3586375]: QObject::~QObject: Timers cannot be stopped from another thread

The coins cfg had wrong entries for asset's type. When it does not recognize an asset type it just throws an exception. You got a crash because the file parsing did not return anything.
Please manually reset your cfg inside your folders

Sorry for the inconvenience

@cipig

@smk762
Copy link
Collaborator

smk762 commented Sep 15, 2022

  • enabling coins ok (BCH /tBCH / SLP)

  • send/receive ok for USDF

  • explorer link ok from history and after tx

  • SLP coins in addressbook, and can filter to see only SLP.

  • no related entry in "use standard network address" option for SLP

  • addressbook address validation fails for slptest: addresses, and error overflows visible area
    image

  • USDF still strangely wont disable. Nothing stand out in logs to indicate why.

@Canialon @SirSevenG ping me to test swapping when you are online.

@smk762
Copy link
Collaborator

smk762 commented Sep 21, 2022

Activation looks rock solid now (except eth/erc20 but that's a network infra issue). thanks!
Disabling USDF now works again.
Addressbook issues from last comment still exist.

@smk762
Copy link
Collaborator

smk762 commented Sep 22, 2022

Able to add USDF address now. ✔️
Getting a crash for SLP (use network protocol mode) when it tries to "enable SLP".
Also saw a residual error message after USDF entry, video below

SLP_addressbook.mp4

Copy link
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

Working as expected here, congrats @SylEze :)
Addressbook error text persistence is in dev too, will move that to a new issue.

Copy link
Contributor

@Canialon Canialon left a comment

Choose a reason for hiding this comment

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

image

@smk762 smk762 merged commit 2684810 into dev Sep 26, 2022
@smk762 smk762 mentioned this pull request Nov 18, 2022
@smk762 smk762 changed the title Slp tokens Simple Ledger Protocol (SLP) integration Nov 18, 2022
@smk762 smk762 deleted the slp_tokens branch August 7, 2023 07:39
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.

SLP tokens integration.
5 participants