meile-gui icon indicating copy to clipboard operation
meile-gui copied to clipboard

Migrate from sentinel-cli to sentinel_sdk

Open MathNodes opened this issue 2 years ago • 10 comments

Now the Python SDK is completed. The next 2.x release will include this instead of relying on pexpect/wexpect and sentinel-cli. This will simplify code and make it more portable and easier to compile binaries for Windows.

MathNodes avatar Jan 08 '24 02:01 MathNodes

In order to start this migration we had to wait for the official package of mospy with the get_tx method implementation

Tkd-Alex avatar Jan 11 '24 09:01 Tkd-Alex

this issue is in conflict with the #83 , or you would to replace sentinel-cli with sdk only for transaction like Subcribiption / Start/End Session and relay the queries over the meile-cache-server?

Tkd-Alex avatar Jan 11 '24 11:01 Tkd-Alex

So to load the Node dara would just query the meile-cache-server for the same information that sentinel-cli currently produces. All other "wallet" operations would be handled by the SDK

MathNodes avatar Jan 12 '24 00:01 MathNodes

@Tkd-Alex Going thru your commits. Amazing!

MathNodes avatar Jan 12 '24 00:01 MathNodes

One thing I would add before SubscribeToNode in https://github.com/Tkd-Alex/meile-gui/commit/442b37a51e66d926226bf8acd8c0d515fa609db1 is to add a check of the wallet balance versus the amount to deposit. If the balance is lower than the deposit amount an Exception should be raised. I'm unsure what the blockchain message would be if we attempt to subscribe with insufficient balance, nevertheless a check beforehand would solve the troubleshooting of the blockchain message.

MathNodes avatar Jan 12 '24 08:01 MathNodes

Actually a "insufficient" funds would be the in the raw_log of the tx response as I check for this in ParseSubscribe that is now deprecated in https://github.com/Tkd-Alex/meile-gui/commit/e6ebb84f5f2c937eef1c2570715bdb060d206405 . But adding the check before broadcasting I think is a better solution

MathNodes avatar Jan 12 '24 09:01 MathNodes

Finally got through it all. Everything looks good. Please review the few remarks I made. Thank you so much!

MathNodes avatar Jan 13 '24 00:01 MathNodes

  • Check wallet balance before continue to subscribe: https://github.com/Tkd-Alex/meile-gui/commit/3e5e3b15d21e5d1c7666b9a3b4f9564978cc0dc1
  • Move v2ray configuration dataclass from konstants to v2ray dedicated file: https://github.com/Tkd-Alex/meile-gui/commit/d653193c15d695f33d86d9717c117304b17df85f

Tkd-Alex avatar Jan 18 '24 10:01 Tkd-Alex

Looks good. Thank you!

⁣freQniK- Core Developer MathNodes www.mathnodes.com​

On Jan 18, 2024, 5:08 AM, at 5:08 AM, Alessandro Maggio @.***> wrote:

  • Check wallet balance before continue to subscribe: https://github.com/Tkd-Alex/meile-gui/commit/3e5e3b15d21e5d1c7666b9a3b4f9564978cc0dc1
  • Move v2ray configuration dataclass from konstants to v2ray dedicated file: https://github.com/Tkd-Alex/meile-gui/commit/d653193c15d695f33d86d9717c117304b17df85f

-- Reply to this email directly or view it on GitHub: https://github.com/MathNodes/meile-gui/issues/82#issuecomment-1898172743 You are receiving this because you authored the thread.

Message ID: @.***>

MathNodes avatar Jan 19 '24 05:01 MathNodes

Keeping this open for now. Although the code looks stellar it is untested in Meile currently. Will provide update if need be...

MathNodes avatar Apr 16 '24 02:04 MathNodes