Replies: 2 comments
-
I think you are talking about using codon to make a proof of work miner. In this case codon will be not faster than any other language (CUDA, OpenCL, C++, Go, Rust, etc), the limit is bound to CPU or GPU of the running machine, in other words, the limit is bound to the running hardware, not to the language itself. Today, the most famous proof of work cryptocurrency, bitcoin uses sha-256 as block hashing function and it is no more profitable when using CPU/GPU (hardware). Due this, people (at date of this message) are using an ASIC/ASSP which is a very specialized hardware that runs a very narrow set of algorithms. So some ASICs specialized to run sha256 sums (hardware) were developed in order to make bitcoin profitable, and every day a new ASIC (a new hardware) is developed what obsoletes the old ones (make the old ones less profitable) in an endless cycle. Hash functions are algorithms, some of they are suitable for parallelism, some not. The fact that Codon can run code in parallel and using GPU's, makes it in pair with any other language that already has native libraries implementing these algorithms, but this do not imply that Codon will be better or faster that any hash libraries already implemented in another language. Could Codon implement some hash algorithms in the standard library? Of course, yes. If the goal of this project is to be 100% python compatible, the developers will implement the standard python If you want to make some software using Codon to work with bitcoin and want a sha256 hash function, I suggest you to write a FFI function to OpenSSL or to libsodium. The sha256 algorithm itself is not so easy to be implemented purely in codon itself (without FFI), but is not impossible. In this case I suggest you to copy the pure python implementation of this algorithm provided by PyPy and see if it works in conda without any modification. PS: If you clarify your question further, I'll be glad to answer it accordingly. |
Beta Was this translation helpful? Give feedback.
-
Ok, now, I'm seeing the title of your question, you are asking about I don't know too much about this algorithm, but my words about speed are still valid, the limit is bound to hardware, not to the language. Anything who is already efficient and it is already implement in another language, could not have any real gain in Codon (see FAQ: Codon is no faster than Python for my application). Again, if you want to make some software using Codon, my suggestions are still valid, but I don't know any library or python version of this algorithm to indicate since I don´t know to much about it to trust in some random library or code available at google. Trusting is very important issue here in order to start to use someone else code (regardless of whether it is binary or source), especially when it comes to cryptography. Maybe someone put a hidden backdoor in it (yes, NSA, I'm talking about you). But if I'm just a lunatic and you are not concern about this, google is your friend [Pure Python] / [Libraries for FFI]. PS: Again, if you clarify your question further, I'll be glad to answer it accordingly. |
Beta Was this translation helpful? Give feedback.
-
whether the standard library will work bitcoin. and will it be faster.
how hash functions work ?
Beta Was this translation helpful? Give feedback.
All reactions