Git Product home page Git Product logo

esc's Introduction

Enterprise Service Chain

Enterprise Service Chain (ESC) is a block chain based software tool facilitating high volumes of simple transactions that, in most cases, send tokens between accounts as in other crypto currencies. The name is derived from the concept of the Enterprise Service Bus in which a crypto currency is used as the protocol of communication.

The main features of the Enterprise Service Chain can be summarized as follows:

  • Delegated Proof of Stake as block consensus mechanism to reduce network maintenance costs
  • Small account and transaction identifiers, reduced transaction set and parallel processing of transactions to facilitate high transaction volumes (>100kHz one-one transactions, >1MHz one-many transactions)
  • Nodes are heavily penalized for double spends so most transactions can be trusted almost instantly
  • Small set of VIP nodes responsible for network integrity to facilitate incorporation of slow nodes with reduced transaction processing capabilities
  • Hash of all accounts is part of the block and enables instant synchronization with the block chain
  • Hierarchical organization of accounts and nodes facilitates KYC, AML , eID supply and governance
  • Dividend payments to account holders and node managers to support the growth of the economy of the ESC system

Details

A white paper provides a more detailed description of the concept of the Enterprise Service Chain.

Current status

The software is currently an academic proof of concept. It does not have a user-friendly class structure. It lacks comments. It has small bugs. It has a long ToDo list, but it can be deployed and tested. An instruction for the deployment will be provided shortly.

Installation

The software is developed for Linux platform. There is no intent to support other platforms. The software was tested on Debian and Ubuntu. To compile the software You need boost and ssl libraries. Check the Makefile if anything else is missing.

sudo apt-get install openssl libboost-all-dev libssl-dev

Start with cloning the git directory.

git clone https://github.com/adshares/esc.git

Before compiling ESC You could check if the ed25519 cryptography software is working correctly and what compile option gives You better speed for Your CPU.

cd esc/ed25519
make -f Makefile.sse2
./mytest
make clean
make
./mytest

I our case compiling for sse2 reduces the speed of batch signature verifications by over 30% (it is not the case on AWS). The results of the 2 runs are shown below. The line stating with "BATC" reports number of signature verifications per second. Compiling against the regular Makefile (make) generates a code that can perform over 30k signature verifications per second.

START
HASH: 1295553.388/s [79.074MiB/s]
PKEY: 29027.926/s
SIGN: 28596.429/s [1.745MiB/s]
OPEN: 8721.537/s [0.532MiB/s]
BATC: 18608.159/s [1.136MiB/s]

START
HASH: 836288.155/s [51.043MiB/s]
PKEY: 48491.258/s
SIGN: 47754.419/s [2.915MiB/s]
OPEN: 14017.216/s [0.856MiB/s]
BATC: 30312.243/s [1.850MiB/s]

Keep the compiled object files in the directory and compile ESC.

cd ..
make

The default Makefile contains the DEBUG option. If You want to run production speed tests, then compile against Makefile.ndebug. The compilation should finish in few seconds.

When compiling, the compiler will detect if You have a recent kernel that supports the "FALLOC_FL_COLLAPSE_RANGE" option for fallocate(). This option is used to remove old (first) pages from log files and works only on ext4 file systems. If You don't have a recent kernel or run the software on a different file system, then user log files will not be purged (will grow forever). We will consider adding support for this case in the future.

Setting up a local test net

Create a directory for Your first node and the first user and create links to executables for convenience.

mkdir /tmp/node1
ln -s $PWD/escd /tmp/node1/escd
mkdir /tmp/user0
ln -s $PWD/esc /tmp/user0/esc
ln -s $PWD/ed25519/key  /tmp/user0/key
cd /tmp/node1/

To start the first node enter

./escd --init 1

The program will detect that it is in an empty directory and will create an initial setup with a single node and an administrator account for the node. The current version is compiled with temporary development setting with a much shorter block period (32s, defined in default.hpp). Keep the node running for at least 1 block period to initialize the block-chain correctly. You can stop a node by typing a dot (".") followed by enter. Currently, killing the node with a signal (^C) may destroy the database files. You can continue with the same block-chain by running the code again with the '--init 1' switch.

./escd --init 1

The first node will start with the default node secret key stored in key/key.txt . The secret key to the admin account is the same. Secret keys can be created by running the key executable with a selected brain-key-string (ed25519/key "brain-key-string"). Both keys can be changed later. In production the node key and the admin key should differ for security reasons. To add more nodes and users open a new terminal and connect to the running node as admin (user with account number 0). We have created a directory for the user previously. Let's go there.

cd /tmp/user0

Let's create the file containing the connection setting for the user.

echo 'port=9081' > settings.cfg
echo 'host=127.0.0.1' >> settings.cfg
echo 'address=0001-00000000-XXXX' >> settings.cfg
echo 'secret=14B183205CA661F589AD83809952A692DFA48F5D490B10FD120DA7BF10F2F4A0' >> settings.cfg
chmod go-r settings.cfg

This is the account address of our user 0001-00000000-XXXX. Last 4 characters should be hex characters defining the checksum. If 'XXXX' is provided the checksum is not tested. Let's try to connect to the node and get the current status of our user.

echo '{"run":"get_me"}' | ./esc 2>err.txt

This command should list the current status of the user. We should get something like this:

{
    "tx": {
        "data": "1001000000000001000000000045975E5960A14655AC8341861CECEAB040054058CC3EF62708565B75C4173FB80D60BD74D7DFCFE3EC3C441A95B48D703E6578BFBC161AF3CC1A0F118B32D278336C5704",
        "account_msid": "0"
    },
    "account": {
        "address": "0001-00000000-9B6F",
        "node": "1",
        "id": "0",
        "msid": "1",
        "time": "1499368832",
        "date": "2017-07-06 21:20:32",
        "status": "0",
        "paired_node": "1",
        "paired_id": "0",
        "local_change": "1499368832",
        "remote_change": "1499371296",
        "balance": "4611617760.726175776",
        "public_key": "7D21F4EE7DE72EEDDC2EBFFEC5E7F33F140A975A629EE312075BB04610A9CFFF",
        "hash": "000000000100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
    },
    "network_account": {
        "address": "0001-00000000-9B6F",
        "node": "1",
        "id": "0",
        "msid": "1",
        "time": "1499368832",
        "date": "2017-07-06 21:20:32",
        "status": "0",
        "paired_node": "1",
        "paired_id": "0",
        "local_change": "1499368832",
        "remote_change": "1499371296",
        "balance": "4611617760.726175776",
        "public_key": "7D21F4EE7DE72EEDDC2EBFFEC5E7F33F140A975A629EE312075BB04610A9CFFF",
        "hash": "000000000100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
        "checksum": "true"
    }
}

No standard output means the connection failed. You can try to examine err.txt for some clues. Correct standard output show the correct account number for the admin of the first node, which is "0001-00000000-9B6F" (the checksum is 9B6F). Now let's change our secret key and create a new account with a new key. First let's generate 2 keys.

./key "user-0-0"
SK: FF767FC8FAF9CFA8D2C3BD193663E8B8CAC85005AD56E085FAB179B52BD88DD6
PK: D69BCCF69C2D0F6CED025A05FA7F3BA687D1603AC1C8D9752209AC2BBF2C4D17
SG: 7A1CA8AF3246222C2E06D2ADE525A693FD81A2683B8A8788C32B7763DF6037A5DF3105B92FEF398AF1CDE0B92F18FE68DEF301E4BF7DB0ABC0AEA6BE24969006
./key "user-0-1"
SK: 5BF11F5D0130EC994F04B6C5321566A853B7393C33F12E162A6D765ADCCCB45C
PK: C9965A1417F52B22514559B7608E4E2C1238FCA3602382C535D42D1759A2F196
SG: ED8479C0EDA3BB02B5B355E05F66F8161811F5AD9AE9473AA91E2DA32457EAB850BC6A04D6D4D5DDFAB4B192D2516D266A38CEA4251B16ABA1DF1B91558A4A05

The secret keys are printed in the lines starting with "SK:". The line starting with "SG:" contains the signature of an empty phrase signed with the secret key. This signature is uses as checksum when creating a new account. Let's change the key for the admin account now:

(echo '{"run":"get_me"}'; echo '{"run":"change_account_key","pkey":"D69BCCF69C2D0F6CED025A05FA7F3BA687D1603AC1C8D9752209AC2BBF2C4D17","signature":"7A1CA8AF3246222C2E06D2ADE525A693FD81A2683B8A8788C32B7763DF6037A5DF3105B92FEF398AF1CDE0B92F18FE68DEF301E4BF7DB0ABC0AEA6BE24969006"}') | ./esc

After this the admin needs a new secret key to connect to its account, so let's fix the settings.txt file.

echo 'port=9081' > settings.cfg
echo 'host=127.0.0.1' >> settings.cfg
echo 'address=0001-00000000-9B6F' >> settings.cfg
echo 'secret= FF767FC8FAF9CFA8D2C3BD193663E8B8CAC85005AD56E085FAB179B52BD88DD6' >> settings.cfg

And confirm that we can connect again with the new key.

echo '{"run":"get_me"}' | ./esc 2>err.txt

The output should indicate that our transaction id was incremented and is now equal 2 ("msid": "2",). Let's now create the second user.

(echo '{"run":"get_me"}'; echo '{"run":"create_account","node":"0001"}') | ./esc

The new user is managed by our node so the creation process will be fast and the node will report the new account number for the local user in the paired_id field ("paired_id": "1"). Let's read the status of the new user account.

echo '{"run":"get_account","address":"0001-00000001-XXXX"}' | ./esc

We should see that the correct new account address is "0001-00000001-8B4E". The balance of the new user is too small to make any transactions so let's send him some funds.

(echo '{"run":"get_me"}'; echo '{"run":"send_one","address":"0001-00000001-8B4E","amount":0.1,"message":"000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"}') | ./esc

The new balance shold be 0.362144000

echo '{"run":"get_account","address":"0001-00000001-8B4E"}' | ./esc 2>/dev/null | grep balance

Let's change the public key of the new user by connecting as the new user with the current coppied key. Do not forget to use the "--address 0001-00000001-8B4E" here, otherwise You will change Your own public key. In normal cases You don't know the corresponding secret key so You will loose Your account.

(echo '{"run":"get_me"}'; echo '{"run":"change_account_key","pkey":"C9965A1417F52B22514559B7608E4E2C1238FCA3602382C535D42D1759A2F196","signature":"ED8479C0EDA3BB02B5B355E05F66F8161811F5AD9AE9473AA91E2DA32457EAB850BC6A04D6D4D5DDFAB4B192D2516D266A38CEA4251B16ABA1DF1B91558A4A05"}' )  | ./esc  --address 0001-00000001-8B4E

The output should indicate that the public key was changed. Let's connect as the new user after setting up the new environment.

mkdir ../user1
cd ../user1
echo 'port=9081' > settings.cfg
echo 'host=127.0.0.1' >> settings.cfg
echo 'address=0001-00000001-8B4E ' >> settings.cfg
echo 'secret= 5BF11F5D0130EC994F04B6C5321566A853B7393C33F12E162A6D765ADCCCB45C ' >> settings.cfg
chmod go-r settings.cfg
echo '{"run":"get_me"}' | ../user0/esc

The output should indicate that You have successfully connected to the node as user "0001-00000001-8B4E". You don't have enough funds to create a new node. User0 will help You.

cd ../user0
(echo '{"run":"get_me"}'; echo '{"run":"send_one","address":"0001-00000001-8B4E","amount":70.0,"message":"000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"}') | ./esc

Let's now try to create a new node. The new node will get the public key of the requesting user.

(echo '{"run":"get_me"}'; echo '{"run":"create_node"}') | ../user0/esc

It will take at least 1 block time for the network to create a new node. You can examine the log of the first node. Before block creation the node should show now info about 3 nodes (the first one is the unused node number 0). You should see lines like these

NOD: 00000000 00000000 ffff0000 00000000 595E8D80 0 0000000000000000 0
NOD: eef4217d c08c88e1 8936fa16 0000003C 595EA5BB 6 3FFFC1DB71A5379A 2
NOD: 145a96c9 e186f4ad ffff0002 00000000 595EA5A0 0 0000000FFFF08000 1

When the new node is created You can send some funds to the new admin account (0002-00000000-XXXX) if You plan to perform any transaction. We will skip it because we will only try to connect a new node.

Let's create the directory and the files for the new node

mkdir ../node2
cd ../node2
echo 'svid=2' > options.cfg
echo 'offi=9082' >> options.cfg
echo 'port=9092' >> options.cfg
echo 'addr=127.0.0.1' >> options.cfg
echo 'peer=127.0.0.1:9091' >> options.cfg
mkdir key
chmod go-rx key/
echo '5BF11F5D0130EC994F04B6C5321566A853B7393C33F12E162A6D765ADCCCB45C' > key/key.txt
chmod go-r key/key.txt

The configuration file (options.txt) indicates an initial peer address that we want to start syncing from. To connect to the network we also need a recent network topology file that already includes our new node. This file can be found in a recent block directory of the running node (and all nodes on the network). The blocks are in ../node1/blk/xxx/xxxxx. The block numbers correspond to unix time. Let's take a servers.txt file from ../node1/blk/595/EA9C0/ .

cp ../node1/blk/595/EA9C0/servers.txt ./

Now we should be able to connect the new node to the network.

../node1/escd -m 1 -f 1

The connection should be established shortly. You can stop the node again by pressing '.' and enter. The -m switch indicates that we need only 1 signature to trust the blocks (we have only 1 node). The -f switch indicates that we want to start from the current status of the block-chain. After stopping the second node, we should start it again without the -f option to load the missing blocks.

../node1/escd -m 1

Connecting more nodes can be done iteratively . The nodes broadcast their IPs and ports on the network so there is no need to provide many peers in the options.cfg file.

Please remember that the current version is just a proof of concept. We will create a production version of the block-chain in the coming months.

esc's People

Contributors

jzemlo avatar m-pilarczyk avatar pawelpodkalicki avatar tytusdezoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

hongweikang

esc's Issues

First call to get_broadcast does not return any data

First call returns:

[tx] => Array
                (
                    [data] => 0D020001000000BEA6EB58E5F27DDBA71E726DCB07CD7A98B423EF6F899939283675CB77C4C0CDB9EC6AFB71ED4D41793FFB6D7F4CD55A0517A7C543F8CBE31F37C72D7EBBA605A97C780D
                )

            [to_block_hex] => 58ECF7E0
            [to_block] => 1491924960
            [from_block_hex] => 58EBA6BE
            [from_block] => 1491838654
            [broadcast] => 

Next, exactly same call, returns data

Deployment process

  • versioning
  • production environment
  • monitoring
  • keys distribution
  • security

"no peers error" shortly after test network start

I tried to start test network (32 sec block time) with custom genesis file. Genesis file was prepared for retrieve funds test. genesis file has two accounts in two nodes (2x2). All accounts have same key.

In about 70% attempts shortly after start I get an error:
ERROR: no peers, panic
This error signalises that operations between nodes are not available.

Full logs and genesis file are available in 20180521_logs_2nodes_nopeer.zip archive.
There are 3 logs: two wrong cases and one correct. All were observed with the same genesis file.

HPX: send_one with negative amount is possible

It is possible to send transfer with negative amount. What is more, it is possible to get funds from other account that way (at least log shows events for such operation). After this operation node stops.

HPX log is available in 20180528_1722_logs_negative_transfer.zip archive

tx.deduct inconsistency with wiki

Value of tx.deduct is returned in response for transaction function (eg. send_one, send_many) and is transaction amount without fees. From sender's perspective total cost of transaction is tx.deduct + tx.fee, what is inconsistient with wiki. In wiki tx.fee is part of tx.deduct, which is total transaction cost.

If wiki should be changed, please reassign to me.

HPX: Transfer to non-existent user in node stops node.

HPX: Transfer to non-existent user in node stops node.
send_one from 0001-00000000-9B6F to 0001-FFFFFFFF-XXXX (amount was 0.00000000001)
Node 1 stopped

[1527256162] ERROR, bad user 0001:0000FFFF [00000003]
[1527256162] ERROR: bad target user 0001:0000FFFF
[1527256162] ERROR, have invalid message 0001:00000001 !!!
[1527256162] BAD message 0001:00000001 00010000000103E0 3FE00485D142EA0699DA1B4917327A8B3726AEACA21460B33FDF95EC87F857A3
[1527256162] BAD insert blk/5B0/81460/03_0001_00000001.und to blk/5B0/81460/03_0001_00000001_3FE00485D142EA0699DA1B4917327A8B3726AEACA21460B33FDF95EC87F857A3.und failed
[1527256162] BAD insert blk/5B0/81460/03_0001_00000001.msg to blk/5B0/81460/03_0001_00000001_3FE00485D142EA0699DA1B4917327A8B3726AEACA21460B33FDF95EC87F857A3.msg succeeded

Full log is available in 20180525_1551_logs_transfer_to_non_existent.zip

get_log: events could have id

Events in log could have id. Currently there is no such information, every log entry type has slightly different format.

Setup load testing

  • read network configuration
  • send random transfers
  • exam the network
  • create a report

Incorrect create_account log

{
            "time": "1491477919",
            "type_no": "6",
            "type": "create_account",
            "node": "2",
            "account": "3911960917",
            "address": "0002-E92BC955-D28B",
            "node_msid": "111",
            "node_mpos": "78",
            "account_msid": "2",
            "amount": "-3955157242257454751",
            "sender_balance": "1152904439887015133",
            "sender_amount": "268435456",
            "sender_fee": "4096",
            "sender_public_key_prefix_6": "394076263E47",
            "sender_status": "0",
            "inout": "out",
            "id": "00020000006F0000004E"
        },

cannot get broadcast message

In standard test network (3x3, shortened block time) broadcast message "0102030405" was successfully sent by user 0001-00000000-XXXX, but could not be read.

After sending message, function get_broadcast was called every 5 seconds for about 2 mins (4 block times). As from parameter were used value of "0" and values from broadcast function response - current_block_time, previous_block_time, account.time

Full log is available in 20180517_1742_logs_no_broadcast_msg.zip archive.

empty log is text "" instead of array []

Empty log is text "" instead of array []. It does not comply with documentation. Issue could be reproduced by calling get_log with from parameter equal any time in future. For example:

echo '{"run":"get_log","from":"2024236800"}' | ./esc

Below is sample get_log response with empty log.

    "tx": {
        "data": "110100000000000100000000008453F45A8B75CFE69241B39BAA555F14013992301096E79A1CABD401EB4635A5FFA53678F34296D7973012E68879F2F9760385F24AEBCFE3F10A5FC551E73C573FAEF00E"
    },
    "current_block_time": "1525961632",
    "previous_block_time": "1525961600",
    "account": {
        "address": "0001-00000000-9B6F",
        "node": "1",
        "id": "0",
        "msid": "7",
        "time": "1525961312",
        "status": "0",
        "paired_node": "0",
        "paired_id": "0",
        "local_change": "1525961312",
        "remote_change": "1525961568",
        "balance": "478.04995494215",
        "public_key": "A9C0D972D8AAB73805EC4A28291E052E3B5FAFE0ADC9D724917054E5E2690363",
        "hash": "ABCFE935F890AFFD18968FCF214CEE2008A19392CFDABA1B72D5347E14B97448"
    },
    "log": ""
}

escd input ouput

Use consistent output format for node id (4 hexadecimal characters) and account id (8 hexadecimal characters). Currently integers are returned often by esc.

transfer rejected by node

Standard test network (3x3, shortened block time). Network was left idle for about 15 hours. After that time all three nodes has message ERROR: no peers, panic in log.

Runing tests for local and remote tests failed. Every transfer from main account in node1 was rejected - no tx.id in send_one nor send_many response.

Full log is available in archive 20180518_0925_logs_transfer_denied.zip. In directory 20180518_0925_logs are logs before transfer, in 20180518_0933_logs2 are logs after transfer tests.

node disconnected - block differs

Standard test network (3x3, shortened block time) was left idle for the night. No external operations were performed. Node2 disconnected from network, but after restart it does not respond.
Below are lines from last block log. Full log is available in 20180517_0959_logs_node2_off.zip archive.

BLOCK from 0003! differs

BLOCK from 0001! differs
5AFC7731 BAD BLOCK consensus :-( must resync :-( 
5AFC7731 
SIGNAL: 10

5AFC7731 

RESTARTING
5AFC7735 DATABASE check passed, run again with --comm (-c) to commit database change and proceed

HPX: after retrieve_funds from main account - new events are appended to log

I retrieved funds from main account. After successfull operation it had balance equal 0.
After some block periods I checked log for this account. There was difference between account balance and sum of events in log. That was because after retrieve_funds new events was appended to log, while balance didn't become negative.

Should account be deleted in that case?

retrieve_funds: bank_profit not included in balance

After successfull funds retrieval (2 subsequent retrieve_funds calls with delay) in get_log response is bank_profit event which is not included to account balance.

Below is sample get_log response.
account.balance is 37989999.99998022774
balance summed from log is 37990312.18748022771
Difference is

-312.18749999997

Last event:

"profit": "312.18749999997",
"fee": "0.00000000002"

Last event is not included in balance. Please, note that usually bank_profit is computed as subtraction of profit and fee

{
	"tx": {
		"data": "1101000000000001000000000032F8035BA7EB844C54ECB165BF998A048BC2DA6873DCD9872E01FC8268F675439656FDEB90E665F0E5C86D5476AD04FB880FF6C09E00B0A492B7E7764CF11DF3E6FF060A"
	},
	"current_block_time": "1526986816",
	"previous_block_time": "1526986784",
	"account": {
		"address": "0001-00000000-9B6F",
		"node": "1",
		"id": "0",
		"msid": "3",
		"time": "1526986803",
		"status": "0",
		"paired_node": "0",
		"paired_id": "0",
		"local_change": "1526986784",
		"remote_change": "1526986784",
		"balance": "37989999.99998022774",
		"public_key": "A9C0D972D8AAB73805EC4A28291E052E3B5FAFE0ADC9D724917054E5E2690363",
		"hash": "A6B957A1110ABEC30F9A8FA79704651E2FE484EE6FBC9FFD49D9C778FCF999F4"
	},
	"log": [{
			"time": "1526986528",
			"date": "2018-05-22 12:55:28",
			"type_no": "32768",
			"confirmed": "yes",
			"type": "node_started",
			"node_start_msid": "0",
			"node_start_block": "0",
			"account": {
				"balance": "27999999.99999999998",
				"local_change": "1526986496",
				"remote_change": "1526986496",
				"hash_prefix_8": "D4F040F457A1F265",
				"public_key_prefix_6": "A9C0D972D8AA",
				"status": "0",
				"msid": "1",
				"node": "1",
				"id": "0",
				"address": "0001-00000000-9B6F"
			},
			"dividend": "0.00000000000"
		}, {
			"time": "1526986564",
			"date": "2018-05-22 12:56:04",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"profit": "-0.00000004188",
			"node": "1",
			"node_msid": "1",
			"profit_fee": "0.00000000000",
			"profit_div": "0.00000000000"
		}, {
			"time": "1526986564",
			"date": "2018-05-22 12:56:04",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F720",
			"profit_div": "0.00000000000",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000000",
			"fee": "0.00000000002"
		}, {
			"time": "1526986596",
			"date": "2018-05-22 12:56:36",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F740",
			"profit_div": "0.00000000000",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000000",
			"fee": "0.00000000002"
		}, {
			"time": "1526986628",
			"date": "2018-05-22 12:57:08",
			"type_no": "32784",
			"confirmed": "yes",
			"type": "dividend",
			"node_msid": "1",
			"block_id": "5B03F780",
			"dividend": "-0.00000000405"
		}, {
			"time": "1526986628",
			"date": "2018-05-22 12:57:08",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F760",
			"profit_div": "0.00000000000",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000000",
			"fee": "0.00000000002"
		}, {
			"time": "1526986660",
			"date": "2018-05-22 12:57:40",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F780",
			"profit_div": "0.00000000025",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000025",
			"fee": "0.00000000002"
		}, {
			"time": "1526986675",
			"date": "2018-05-22 12:57:55",
			"type_no": "8",
			"confirmed": "yes",
			"type": "retrieve_funds",
			"node": "2",
			"account": "0",
			"address": "0002-00000000-75BD",
			"node_msid": "2",
			"node_mpos": "1",
			"account_msid": "1",
			"amount": "0.00000000000",
			"sender_balance": "27999999.99999995422",
			"sender_amount": "0.00000000000",
			"sender_fee": "0.00001000000",
			"sender_public_key_prefix_6": "A9C0D972D8AA",
			"sender_status": "0",
			"inout": "out",
			"id": "0001:00000002:0001"
		}, {
			"time": "1526986690",
			"date": "2018-05-22 12:58:10",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"profit": "0.00000058234",
			"node": "1",
			"node_msid": "2"
		}, {
			"time": "1526986690",
			"date": "2018-05-22 12:58:10",
			"type_no": "32776",
			"confirmed": "yes",
			"type": "retrieve_funds",
			"node": "2",
			"account": "0",
			"address": "0002-00000000-75BD",
			"block_id": "5B03F7A0",
			"amount": "0.00000000000",
			"sender_balance": "9999999.99999961869",
			"sender_amount": "0.00000000000",
			"sender_fee": "0.00000000000",
			"sender_public_key_prefix_6": "A9C0D972D8AA",
			"sender_status": "0",
			"inout": "in",
			"id": "0002:00000000:5B03F7A0"
		}, {
			"time": "1526986690",
			"date": "2018-05-22 12:58:10",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F7A0",
			"profit_div": "0.00000000000",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000000",
			"fee": "0.00000000002"
		}, {
			"time": "1526986722",
			"date": "2018-05-22 12:58:42",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F7C0",
			"profit_div": "0.00000000000",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000000",
			"fee": "0.00000000002"
		}, {
			"time": "1526986754",
			"date": "2018-05-22 12:59:14",
			"type_no": "32784",
			"confirmed": "yes",
			"type": "dividend",
			"node_msid": "2",
			"block_id": "5B03F800",
			"dividend": "-0.00000000405"
		}, {
			"time": "1526986754",
			"date": "2018-05-22 12:59:14",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F7E0",
			"profit_div": "0.00000000025",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000025",
			"fee": "0.00000000002"
		}, {
			"time": "1526986786",
			"date": "2018-05-22 12:59:46",
			"type_no": "32785",
			"confirmed": "yes",
			"type": "bank_profit",
			"block_id": "5B03F800",
			"profit_div": "0.00000000025",
			"profit_usr": "0.00000000000",
			"profit_get": "0.00000000000",
			"profit": "0.00000000025",
			"fee": "0.00000000002"
		}, {
			"time": "1526986803",
			"date": "2018-05-22 13:00:03",
			"type_no": "8",
			"confirmed": "no",
			"type": "retrieve_funds",
			"node": "2",
			"account": "0",
			"address": "0002-00000000-75BD",
			"node_msid": "3",
			"node_mpos": "1",
			"account_msid": "2",
			"amount": "0.00000000000",
			"sender_balance": "27999999.99999053293",
			"sender_amount": "0.00000000000",
			"sender_fee": "0.00001000000",
			"sender_public_key_prefix_6": "A9C0D972D8AA",
			"sender_status": "0",
			"inout": "out",
			"id": "0001:00000003:0001"
		}, {
			"time": "1526986818",
			"date": "2018-05-22 13:00:18",
			"type_no": "32785",
			"confirmed": "no",
			"type": "bank_profit",
			"profit": "0.00000058234",
			"node": "1",
			"node_msid": "3"
		}, {
			"time": "1526986818",
			"date": "2018-05-22 13:00:18",
			"type_no": "32776",
			"confirmed": "no",
			"type": "retrieve_funds",
			"node": "2",
			"account": "0",
			"address": "0002-00000000-75BD",
			"block_id": "5B03F820",
			"amount": "9989999.99999911249",
			"sender_balance": "9999999.99999911160",
			"sender_amount": "9989999.99999911249",
			"sender_fee": "9999.99999999911",
			"sender_public_key_prefix_6": "A9C0D972D8AA",
			"sender_status": "0",
			"inout": "in",
			"id": "0002:00000000:5B03F820"
		}, {
			"time": "1526986818",
			"date": "2018-05-22 13:00:18",
			"type_no": "32785",
			"confirmed": "no",
			"type": "bank_profit",
			"block_id": "5B03F820",
			"profit_div": "0.00000000000",
			"profit_usr": "0.00000000000",
			"profit_get": "312.18749999997",
			"profit": "312.18749999997",
			"fee": "0.00000000002"
		}
	]
}

deadlock

sometimes a node can hang after "undo changes", This has to be fixed

events from different node in get_log response

I received bank_profit event for node 1 in log for node 2. Below is sample response.
The first event in log has type=bank_profit and node=1. It is event for node 1 and doesn't affect node 2 balance. It is useless.

Please, note that send_one event has also node=1, but it is correct that this event is in log. This is incoming transfer from node 1.

{
    "tx": {
        "data": "110200000000000200000000002221F35AB3CCFF22BAAB85060DDD8C0D53F2B38B85FE58179637C725956225C0348D712F32B7BB49165A7F5C1EE3A524D8FFA4BEDB8C6FFA436F628ACEAB45D385D6FF02"
    },
    "current_block_time": "1525883200",
    "previous_block_time": "1525883168",
    "account": {
        "address": "0002-00000000-75BD",
        "node": "2",
        "id": "0",
        "msid": "1",
        "time": "1525883072",
        "status": "0",
        "paired_node": "2",
        "paired_id": "0",
        "local_change": "1525883072",
        "remote_change": "1525883168",
        "balance": "6459800.99999991217",
        "public_key": "3A9F69FEDCB0694123899C1EA7E14256CAD7B4A2C86311FC6B5ED4027404A282",
        "hash": "CBE212402DEC2D4B32B17D5D7570E30D38AFC423B0471AEF158594CD9620A9B2"
    },
    "log": [{
            "time": "1525883205",
            "date": "2018-05-09 18:26:45",
            "type_no": "32785",
            "confirmed": "no",
            "type": "bank_profit",
            "profit": "0.00312500000",
            "node": "1",
            "node_msid": "1"
        }, {
            "time": "1525883205",
            "date": "2018-05-09 18:26:45",
            "type_no": "32772",
            "confirmed": "no",
            "type": "send_one",
            "node": "1",
            "account": "0",
            "address": "0001-00000000-9B6F",
            "node_msid": "1",
            "node_mpos": "1",
            "account_msid": "1",
            "amount": "100.00000000000",
            "sender_fee": "0.10000000000",
            "message": "0000000000000000000000000000000000000000000000000000000000000000",
            "inout": "in",
            "id": "0001:00000001:0001"
        }, {
            "time": "1525883205",
            "date": "2018-05-09 18:26:45",
            "type_no": "32785",
            "confirmed": "no",
            "type": "bank_profit",
            "profit": "-0.00000004188",
            "node": "2",
            "node_msid": "1"
        }, {
            "time": "1525883205",
            "date": "2018-05-09 18:26:45",
            "type_no": "32785",
            "confirmed": "no",
            "type": "bank_profit",
            "profit": "-0.00000004201",
            "node": "2",
            "node_msid": "2",
            "profit_fee": "0.00000000000",
            "profit_div": "0.00000000000"
        }, {
            "time": "1525883205",
            "date": "2018-05-09 18:26:45",
            "type_no": "32785",
            "confirmed": "no",
            "type": "bank_profit",
            "block_id": "5AF32120",
            "profit_div": "0.00000000000",
            "profit_usr": "0.00000000000",
            "profit_get": "0.00000000000",
            "profit": "0.00000000000",
            "fee": "0.00000000004"
        }
    ]
}

broadcast function: no message length limit

broadcast function sends message. There is no information about message length limit. I suppose that this function should have maximum length of message defined. What kind of data this message should contain and what is the limit of it's size?

add versioning to esc

Command

esc -v

returns

Version 1.0

Version information could provide more information. Please, consider hash commit.

syncing to chain

currently the nodes have problems with syncing. The hand on "waiting for banks". killing the node and starting again helps, but this must be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.