How should i start learning code of any cryptocurrency? [closed] - blockchain

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I want to learn about the code of cryptocurrency with all it's features including POS and master node features, currently I have XSN code (stake-net coin)
and i want to learn it so i can make use of it to learn different features of blockchain. There is no purpose to clone it or anything. How should i start learning it? I mean from which file should i start learning the code. I have learned basics of c++ but unfortunately I'm not that much good with c++. So from which file should i start learning it there is a lot .cpp and header files. Is there any one can had the same experience learning it?

Well, you should not start learning by looking at someone else's source code.
The only real way to learn about blockchain programming is to take isolated problems and try to implement it yourself in minimum examples.
You can start by coding each one of them separately in its own example application:
Blockchain data structures and their serialisation (network / disk)
Storing block data into rolling binary blob file on disk containing the serialised blocks, while at the same time having some sort of indexed database for looking up block hashes and getting their disk-position of the block when a block needs to be "loaded" into memory.
P2P networking component, where you organise your unstructured P2P environment under the premise that most nodes will have a limit on inbound socket connection or be behind a NAT
In the same context you can dig into asynchronous network programming and how to properly do it with select() / epoll()
Proof of work scaling mechanism, which comes up with a hash target value depending on the time that was needed for the last X blocks
"Dominating chain" connector, where the "predominant" chain gets selected out of many multiple chain candidates (forking)
When you are done understanding these first simple building blocks, you can think about the next step; the actual functions of the Blockchain like maintaining balances and transferring coins.

Related

What is the best way to call functions over a network? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm planning the network communications system for a program. The program is divided a client and a server class, but I might split them into separate programs if they get too big, and nothing else prevents it.
At the moment, all of the network communication is to call set and get functions on the server (of which their are about 500, and I expect to generate about 500-1,600 requests per second across eight clients in typical operations).
My current plan is to use a basic network API to send machine code inspired Opcodes to the server as a string, along with a few bytes of parameters, and have the server select the function and interpret the parameters using a massive switch statement.
However, with hundreds of possible function to call, this will get A) hard to read, and B)slow to implement. I'm also a bit concerned about the performance of large switch statements.
In light of that, could anyone confirm if this is the best way to implement function calls over a network, or tell me if there's a better way. I'd love a magic API that allows be to do something like x = callServerFunc(server, function, parameter1...) but my searches have not yet found such a library.
You can write your code from scratch. Feel free on how to do it.
Or you can use one of many ready mature technologies. Just google for CORBA, DCOM, XPCOM and so on. You can look at Remote call in common. Or consider existing web-based technologies with different data formats. This is just a starting point. This tehnologies are mature but heavyweight. You'll need some knowledge and practice to start with them.

Options for hot deployment [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
My requirement is to seamlessly hot deploy code update to a running service without losing the current status, including collection data. Is there any c++ framework out there I can use to develop such a solution?
You probably should read some research papers on dynamic software updating, e.g. on Kitsune (which you might use)
There is a major issue about updating the call stack (and instances in local variables); read also about continuations; and you might have some special case (if your application is event loop driven like most GUI applications are, you probably want to update the code outside of event handlers).
You certainly should think of dynamic software update very early in your design. Perhaps some terminology and concepts from garbage collection & persistence & serialization techniques are relevant.
Your requirement (to seamlessly hot deploy code update to a running service without losing the current status) is very hard and will need a lot of work (probably years) and is still a difficult & interesting research topic (definitely it is a good PhD subject).
You might want to use your own meta-programming techniques, that is generate most of the relevant C+++ support code by your own code generators.
If you already have a significant code base, you could consider customizing a recent GCC compiler with MELT (e.g. to query the compiler's internal representations and generate some code from them) -but even that means a lot of work-
PS. Coding in something better than C++, like Erlang or Common Lisp, would make your goal less difficult.

Communication method for data exchange between a server and several clients for 10+ years [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
We're running an experiment which will involve collecting data from multiple stations around the world. Each station will be providing HDF5 files with magnetic field measurements in a rate of 1 kHz and some auxiliary data in real time. The latency is going to be a few minutes.
I'm assigned to design this program (in C++, with clients/server model, with server being in linux and clients being cross-platform), and apparently I'll be designing this from scratch. My first concern is not to really do everything from scratch because this will be more error prone and pure wrong, so my question here is: What information/file transfer protocols/libraries should I use so that
The program can live for 10+ years with minimal maintenance
I can have very good support from the community for when I need help.
Since we need something relatively secure, my first thought was libssh (the only cross platform opensource library available out there for ssh), but then after discussing with some pros there I realized that the support there isn't so wonderful because only a few people work with libssh. The pros there hesitated in suggesting OpenSSL, but with OpenSSL I'll have to write my own authentication (apparently, I'm not an expert and that's why I'm asking).
What would you suggest? Please share your vision to whether I should go for OpenSSL, libssh, or something else.
PS: Please, if you're going to start off by saying this question is off-topic, move on and ignore it. Consider being helpful rather than critical.
If you require any additional information, please ask.
I think that OpenSSL might be a good choice.
No you do not have to "write you own authentication" - you just need to generate certificates and keys and put them in the right places - that is all.
I would suggest to look at the examples in <openssl-source-dir>/demos and <openssl-source-dir>/apps to get you started. Reading a book about OpenSSL would also be a good idea - for many other reasons (sometimes not directly related with SSL/TLS).
I hope that helps.

Ocaml and Algorithmic Trading [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm completely new to the Algorithmic Trading domain. I've just completed a course that was Ocaml based, and read about Jane Street. Obviously they are a huge company with a large amount of resources, but is it feasible to use Ocaml for small time algorithmic trading?
I know that probably seems like a stupid question, but (from what i've found) there aren't any trading APIs for Ocaml. This would mean one would have to written from scratch correct?
Any insight would be greatly appreciated guys, like I said I am a complete noob to this domain.
Thanks!
I've recently noticed this package in Opam that could provide a starting point for a trading API:
"IBX is a pure OCaml implementation of the Interactive Brokers Trader Workstation API (TWS API) built on top of Jane Street's Core and Async library."
As for open source trading algorithms in general this project started recently:
http://scarcecapital.com/hft/
I think this question is probably too open-ended for the Stack Overflow environment to be useful to you. Stack Overflow is for when you have a specific problem you're trying to solve.
But being opinionated, I can't help but say that OCaml might be pretty good for algorithmic trading. The strong typing system and immutable data tend to help avoid errors while allowing you to code quickly. This, at least, is what I've found. But you'd need to plug OCaml in to your data sources and your trade execution channel, which would be extra work. Knowing nothing about this area, I don't know if there are libraries for other languages.
Most likely the folks who are actually doing this have an incentive to keep their secrets to themselves. But that would be true regardless of the language.

Looking for C++ datawarehousing for time series data [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I need a C++ library that can store and retrieve time series on demand to stream to client front-ends. I will be storing each component as structure of arrays format. I am currently using MySQL for correctness, but the DB access is starting to get ridiculously slow. I am trying to migrate away from this. Intuitively I can build such a library but it is not my business goal and will take quite a bit of implementation to get working. I am looking for an existing solution that can meet the following requirements:
O(1) lookup scheme
Excellent compression, each component is separated, so there should be plenty of redundancy that can be removed
Scalable to terabytes
(optional: Audit tracking)
Most important: Transactional support. There is going to be BIG data, and I can't have the possibility of a bad run corrupt an entire dataset which will create an unnecessary burden for backups and downtime during restores.
Also checkout TempoDB: http://tempo-db.com I'm a co-founder, and we built the service to solve this problem. We don't have a C++ client yet, but could work with you to develop one.
Take a look at OpenTSDB it's been develop at StumbleUpon by Benoit Sigoure:
http://opentsdb.net/
TeaFiles provide simple and efficient time series storage in flat files, enriched with item metadata and description. They might be a building block of the system you aim for. Currently free open source libraries exist for C++ (github.com/discretelogics/TeaFiles), C# and Python.
I am a founder of discretelogics and we coined this file format to overcome litations flat file time series storage while preserving its unrivaled speed.
Take a look at HDF5. It has a quick lookup scheme, has C, C++, Python interfaces. Has compression. Can get pretty big. Maintains metadata. Doesn't do auditing. You'll need a wrapper to handle multi-user capability.