Closed kayabaNerve closed 3 years ago
This branch is apparently now encompassing our usage of BIP 32, BIP 39, and BIP 44, due to the RPC exposing them and defining certain flows.
All modules are on the new macro. Next up is fleshing out the routes.
Before moving to HTTP, I'd like to port over the Python tests, and when those still run, work on testing the methods as a whole.
Once the tests work again, the methods are implemented and tested, then I'd like to move to HTTP. The Python code outsources all actual RPC transmission to a wrapper, so that shouldn't be a concern to update to.
With the new RPC, providing an extremely standardized way to interact with it, I'd like to do the following:
Archive https://github.com/MerosCrypto/Mineros rather than update it further. It's been made irrelevant by https://github.com/MerosCrypto/meroxidizer. I personally debated keeping it around for research purposes, yet nothing hooks into it. While another miner may be beneficial, l'd rather use a language like Rust (which Meroxidizer is in, making it a poor choice for a second miner) or C++ (no GC).
Speaking of, before this is merged, Meroxidizer must be updated. The RPC sample also needs to be.
As part of this, I'd like to deprecate https://github.com/MerosCrypto/Nim-MerosRPC. It's not used by any active codebase and Nim is quite niche. The one program we created which used it was Mineros, and that has been archived. We're also not starting new apps in Nim at this time. While that isn't an official, nor static, policy, the few apps we have started/hosted (asmr/Meroxidizer) recently have been in Rust.
If we do need a Nim RPC lib, we can unarchive it and update it at that time. It is quality code using a macro off a list of route definitions. The main annoyance is committing to maintaining it, when I arguably don't even want to advocate using it, as it'd be used with Nim.
Currently, we don't return 404 for GET/HEAD, which is technically spec non-compliance. In order to speed this up, support for HTTP pipelining has also been removed as a requirement. A new issue should tackle both.
https://github.com/MerosCrypto/Meros/tree/new-rpc is a branch for the new RPC, solving the design issues with the current RPC. This is a tracking issue for this new branch, which will solve:
265 (TCP RPC < HTTP RPC)
214 (insecure)
162 (bug in setMnemonic)
278 (abuseable memory growth in getBlockTemplate)
It will also fix the usage of array parameters for every route (vastly inferior to using objects) and implement currently unimplemented routes.
As #265 noted, the we'll have to write our own HTTP code, unfortunately. #214 will be resolved using HTTP Bearer Auth. #278 already details its fix, and #162 doesn't have a fix up for discussion.