Friday, December 29, 2017

Ubuntu 17.04 and 17.10 network wait on start up issue

systemctl disable systemd-networkd-wait-online.service
systemctl mask systemd-networkd-wait-online.service

After disabling service will still start. Need to mask it

Friday, December 15, 2017

Istanbul BFT

Istanbul BFT inherits from the original PBFT by using 3-phase consensus, PRE-PREPARE, PREPARE, and COMMIT. The system can tolerate at most of F faulty nodes in a N validator nodes network, where N = 3F + 1. Before each round, the validators will pick one of them as the proposer, by default, in a round robin fashion.

The proposer will then propose a new block proposal and broadcast it along with the PRE-PREPARE message.

Upon receiving the PRE-PREPARE message from the proposer, validators enter the state of PRE-PREPARED and then broadcast PREPARE message. This step is to make sure all validators are working on the same sequence and the same round.

While receiving 2F + 1 of PREPARE messages, the validator enters the state of PREPARED and then broadcasts COMMIT message. This step is to inform its peers that it accepts the proposed block and is going to insert the block to the chain.

Lastly, validators wait for 2F + 1 of COMMIT messages to enter COMMITTED state and then insert the block to the chain.

https://raw.githubusercontent.com/getamis/files/master/images/istanbul_state_machine.jpg

Monday, December 11, 2017

DAG

Terms that matter

Weight (Own weight): The weight of transaction A is proportional to the effort put in by its issuer, which can be assumed to be 3^n.
Cumulative weight: Transaction A’s own weight + the sum of own weights of all the followed transactions that directly/indirectly approve transaction A. (E.g. In figure 4, transaction D has own weight as 1, and cumulative weight as 6 = D’s own weight + A’s own weight + B’ own weight + C’s own weight = 1 + 1 + 3 + 1.)
 
 
 
 
 
 
Figure 4: Weights (from IOTA white paper). Own weights at right-bottom. Cumulative weights at left-top, as bold.
Score: Transaction A’s own weight + the sum of own weights of all previous transactions approved by transaction A. (E.g. In figure 5, transaction A has score as 9 = A’s own weight + B’s own weight + D’s own weight + F’s own weight + G’s own weight = 1 + 3 + 1 + 3 + 1.)
 
 
 
Figure 5: Score (from IOTA white paper). Score at left-top, in the circle.



Height: The length of the longest oriented path to the genesis.
Depth: The length of the longest reverse-oriented oath to certain tips.
For instance, in figure 5, the height of D is 3 (D → F → G → genesis), and the depth of D is 2 (D ← B ← A).

Sunday, November 19, 2017

Turing, Turing Machine, Turing Alan Mathison

Turing, Alan Mathison |ˈt(y)o͝oriNG| (1912–54), English mathematician. He developed the concept of a theoretical computing machine and carried out important code-breaking work during World War II. He also investigated artificial intelligence.
Turing machinea mathematical model of a hypothetical computing machine that can use a predefined set of rules to determine a result from a set of input variables.Turing testa test for intelligence in a computer, requiring that a human being should be unable to distinguish the machine from another human being by using the replies to questions put to both.
In colloquial usage, the terms "Turing complete" or "Turing equivalent" are used to mean that any real-world general-purpose computer or computer language can approximately simulate the computational aspects of any other real-world general-purpose computer or computer language.
Real computers constructed so far are essentially similar to a single-tape Turing machine; thus the associated mathematics can apply by abstracting their operation far enough. However, real computers have limited physical resources, so they are only linear bounded automaton complete. In contrast, a universal computer is defined as a device with a Turing complete instruction set, infinite memory, and infinite available time.

In computability theory, several closely related terms are used to describe the computational power of a computational system (such as an abstract machine or programming language):
Turing completeness
A computational system that can compute every Turing-computable function is called Turing-complete (or Turing-powerful). Alternatively, such a system is one that can simulate a universal Turing machine.
Turing equivalence
A Turing-complete system is called Turing equivalent if every function it can compute is also Turing computable; i.e., it computes precisely the same class of functions as do Turing machines. Alternatively, a Turing-equivalent system is one that can simulate, and be simulated by, a universal Turing machine. (All known Turing-complete systems are Turing equivalent, which adds support to the Church–Turing thesis.)
(Computational) universality
A system is called universal with respect to a class of systems if it can compute every function computable by systems in that class (or can simulate each of those systems). Typically, the term universality is tacitly used with respect to a Turing-complete class of systems. The term "weakly universal" is sometimes used to distinguish a system (e.g. a cellular automaton) whose universality is achieved only by modifying the standard definition of Turing machine so as to include input streams with infinitely many 1s.


Friday, November 17, 2017

get zookeeper stable version from its distribution web site

Run the following command at one line:
zkver=$(curl http://www.apache.org/dist/zookeeper/stable/
|grep -o 'zookeeper-[0-9].[0-9].[0-9][0-9].tar.gz'
|(head -n1 && tail -n1)|sed 's/.tar.gz//')
The results:
echo $zkver
zookeeper-3.4.10

Wednesday, November 8, 2017

How to test if a port is open and running

For the port which are not secured, do the following:

telnet www.somesite 80
GET /index.html HTTP/1.1
Host: www.somesite
  
For the ports which are secured, do the following:
 
openssl s_client -connect www.somesite:443 
For the server uses self-signed certificate and secured port, do the following:
 
openssl s_client -connect 12.34.56.78:443 -servername www.somesite
The servername should be the server name specified in the TLS certificate

Wednesday, November 1, 2017