Pages:
Author

Topic: dev branch work - page 2. (Read 264 times)

newbie
Activity: 8
Merit: 0
December 21, 2021, 07:03:43 PM
#3
Ok. So what about CppBlockUtils.py, which no longer exists? There are a few calls into that module in dialog code (e.g. MultiSigDialogs.py calling CryptoECDSA()). Looks like the plan is to add boilerplate to CppBridge.py for each method like this.

Anyway so far I have been separating the dialogs and forms out incrementally, keeping the code in a runnable state as I make changes where possible, and not changing logic having to do with CppBridge code. But the calls to missing modules, where I'm not quite sure how to resolve them, are making it hard for me to proceed this way.
legendary
Activity: 3640
Merit: 1345
Armory Developer
December 18, 2021, 05:22:42 AM
#2
CppBlockUtils to get a random number using Crypto++ library.

This was a C++ library wrapped around with SWIG. I got rid of that. Now there's a stand alone C++ process (CppBridge, I'll probably renamed it to ArmoryBridge in the near future) that handles all things crypto, manages wallets and talks to the blockchain service (ArmoryDB), and talks to the GUI via a 2 way encrypted socket.

All those Cpp.somefunction() calls are dead now. They have to be replaced with TheBridge.somefunction(), assuming the function name is transparent. They probably aren't, I'm trying to migrate all wallet handling and cryptopgraphic operations out of the python GUI and into the C++ bridge. The bridge is essentially a protobuf API service over an encrypted socket, and ArmoryQt is a "dumb" GUI in py3/qt5 (using pyside2).

Quote
Most dialogs were originally implemented in one place (qtdialogs/qtdialogs.py, and some in qtdialogs/qtdefines.py), and some of these have been pulled out into their own modules.

qtdialogs and qtdefines are waaaay too big. I'm trying to refactor all these dialogs into independant files and fix the circular import issues that is plaguing qtdialogs. I do it as I go: try some feature in the GUI, fix it and refactor its code into a dedicate file. Ideally, I want to isolate all of the legacy GUI this way. Then I can start adding new GUI in its own files using QtQuick (.qml).

Quote
jasvet.py, which was removed from the git repo in January. This module has some cryptographic functions and calls CppBlockUtils to get a random number using Crypto++ library.

This is old crypto code copied into the repo. It was used to sign and verify Bitcoin messages. It used python's own random library to generator the R value (instead of the C++ PRNG), so we stopped using it for signing circa 2014. It was kept around for verifying the signed Bitcoin messages however (since that needs no rng).

You can still find this file in the master branch: https://github.com/goatpig/BitcoinArmory/blob/master/jasvet.py

Quote
What was the plan when this jasvet.py module was removed?

I removed the module cause it was getting in the way when I started migrating to py3. I haven't gotten around to fixing this part of the GUI yet. It should be replaced by routines from BridgeSigner (https://github.com/goatpig/BitcoinArmory/blob/dev/armoryengine/CppBridge.py#L1128). The code exists in C++ but needs exposed via protobuf, so this one requires some C++ work as well.

Quote
Aside from that, am I on the right track in trying to untangle these PySide2 dialogs?

Yes. Feel free to PR your stuff, I'll gladly review and merge.
newbie
Activity: 8
Merit: 0
December 17, 2021, 07:42:14 PM
#1
Hi,

I built the latest dev branch and was able to successfully get the Armory UI running. It looks like the code is in the middle of migration to PySide2, and some of the menus are disconnected.

Most dialogs were originally implemented in one place (qtdialogs/qtdialogs.py, and some in qtdialogs/qtdefines.py), and some of these have been pulled out into their own modules. I successfully untangled a few more of them and got them to work properly in the UI, and then got stuck on ui/toolsDialogs.py. This imports from a module called jasvet.py, which was removed from the git repo in January. This module has some cryptographic functions and calls CppBlockUtils to get a random number using Crypto++ library.

What was the plan when this jasvet.py module was removed? Aside from that, am I on the right track in trying to untangle these PySide2 dialogs?
Pages:
Jump to: