diff --git a/dap-sdk b/dap-sdk
index f2b762fcfbf3d799029d9a52963b09fefd9e711b..10498899c1adcfc7711137597d531539e086f445 160000
--- a/dap-sdk
+++ b/dap-sdk
@@ -1 +1 @@
-Subproject commit f2b762fcfbf3d799029d9a52963b09fefd9e711b
+Subproject commit 10498899c1adcfc7711137597d531539e086f445
diff --git a/modules/chain/dap_chain_cell.c b/modules/chain/dap_chain_cell.c
index 766175ec0d082ba73c9f25a72f415ac5b7262329..146a1dc8a09350dd6f2fb8aba0f044331f4c26bc 100644
--- a/modules/chain/dap_chain_cell.c
+++ b/modules/chain/dap_chain_cell.c
@@ -107,6 +107,17 @@ int dap_chain_cell_init(void)
     return  0;
 }
 
+#ifndef DAP_OS_WINDOWS
+DAP_STATIC_INLINE void s_cell_reclaim_cur_volume(dap_chain_cell_t *a_cell) {
+    if (
+#ifdef MADV_PAGEOUT
+    //madvise(a_cell->map, (size_t)(a_cell->map_end - a_cell->map), MADV_PAGEOUT) &&
+#endif
+    madvise(a_cell->map, (size_t)(a_cell->map_end - a_cell->map), MADV_DONTNEED) )
+        log_it(L_ERROR, "Unable to reclaim the previous volume, errno %d: \"%s\"", errno, dap_strerror(errno));
+}
+#endif
+
 DAP_STATIC_INLINE int s_cell_file_write_header(dap_chain_cell_t *a_cell)
 {
     dap_chain_cell_file_header_t l_hdr = {
@@ -120,7 +131,7 @@ DAP_STATIC_INLINE int s_cell_file_write_header(dap_chain_cell_t *a_cell)
     return fwrite(&l_hdr, sizeof(l_hdr), 1, a_cell->file_storage) ? fflush(a_cell->file_storage) : -1;
 }
 
-DAP_STATIC_INLINE int s_cell_map_new_volume(dap_chain_cell_t *a_cell, size_t a_fpos) {
+DAP_STATIC_INLINE int s_cell_map_new_volume(dap_chain_cell_t *a_cell, size_t a_fpos, bool a_load) {
     int l_fildes = fileno(a_cell->file_storage);
 #ifdef DAP_OS_WINDOWS
     HANDLE hSection = NULL;
@@ -135,12 +146,9 @@ DAP_STATIC_INLINE int s_cell_map_new_volume(dap_chain_cell_t *a_cell, size_t a_f
         };
         
         NTSTATUS err = pfnNtCreateSection(&hSection, SECTION_MAP_READ|SECTION_EXTEND_SIZE|SECTION_MAP_WRITE, 
-                                          NULL, &SectionSize, PAGE_READWRITE, SEC_RESERVE,
-                                          (HANDLE)_get_osfhandle(l_fildes));
-        if ( !NT_SUCCESS(err) ) {
-            log_it(L_ERROR, "NtCreateSection() failed, status %lx", err);
-            return -1;
-        }
+                                          NULL, &SectionSize, PAGE_READWRITE, SEC_RESERVE, (HANDLE)_get_osfhandle(l_fildes));
+        if ( !NT_SUCCESS(err) )
+            return log_it(L_ERROR, "NtCreateSection() failed, status %lx", err), -1;
         a_cell->map_range_bounds = dap_list_append(a_cell->map_range_bounds, hSection);
     }
 #endif
@@ -158,23 +166,17 @@ DAP_STATIC_INLINE int s_cell_map_new_volume(dap_chain_cell_t *a_cell, size_t a_f
     LARGE_INTEGER Offset = {
         .QuadPart = l_volume_start
     };
-    if ( !NT_SUCCESS ( err = pfnNtMapViewOfSection(hSection, GetCurrentProcess(), 
-                                                   (HANDLE)&a_cell->map, 0, 0, 
-                                                   &Offset, &l_map_size,
-                                                   ViewUnmap, MEM_RESERVE,
-                                                   PAGE_WRITECOPY) ) )
-    {
-        log_it(L_ERROR, "NtMapViewOfSection() failed, status %lx", err);
-        NtClose(hSection);
-        return -1;
-    }
+    err = pfnNtMapViewOfSection(hSection, GetCurrentProcess(), (HANDLE)&a_cell->map, 0, 0, 
+                                &Offset, &l_map_size, ViewUnmap, MEM_RESERVE, PAGE_WRITECOPY);
+    if ( !NT_SUCCESS(err) )
+        return NtClose(hSection), log_it(L_ERROR, "NtMapViewOfSection() failed, status %lx", err), -1;
 #else
-    if ( MAP_FAILED == (a_cell->map = mmap(NULL, l_map_size, PROT_READ|PROT_WRITE,
-                                           MAP_PRIVATE, fileno(a_cell->file_storage), l_volume_start)) ) {
-        log_it(L_ERROR, "Chain cell \"%s\" 0x%016"DAP_UINT64_FORMAT_X" cannot be mapped, errno %d",
-                        a_cell->file_storage_path, a_cell->id.uint64, errno);
-        return -1;
-    }
+    if (a_load)
+        s_cell_reclaim_cur_volume(a_cell);
+    if (( a_cell->map = mmap(NULL, l_map_size, PROT_READ|PROT_WRITE, MAP_PRIVATE,
+                             fileno(a_cell->file_storage), l_volume_start) ) == MAP_FAILED )
+        return log_it(L_ERROR, "Chain cell \"%s\" 0x%016"DAP_UINT64_FORMAT_X" cannot be mapped, errno %d",
+                                a_cell->file_storage_path, a_cell->id.uint64, errno), -1;
 #ifdef DAP_OS_DARWIN
     a_cell->cur_vol_start = l_volume_start;
 #endif
@@ -182,6 +184,10 @@ DAP_STATIC_INLINE int s_cell_map_new_volume(dap_chain_cell_t *a_cell, size_t a_f
     a_cell->map_pos = a_cell->map + l_offset;
     a_cell->map_range_bounds = dap_list_append(a_cell->map_range_bounds, a_cell->map);
     a_cell->map_range_bounds = dap_list_append(a_cell->map_range_bounds, a_cell->map_end = a_cell->map + l_map_size);
+#ifndef DAP_OS_WINDOWS    
+    if (a_load)
+        madvise(a_cell->map, l_map_size, MADV_SEQUENTIAL);
+#endif
     return 0;
 }
 
@@ -259,7 +265,7 @@ dap_chain_cell_t * dap_chain_cell_create_fill(dap_chain_t * a_chain, dap_chain_c
         fflush(l_file);
     }
 
-    if ( a_chain->is_mapped && s_cell_map_new_volume(l_cell, 0) ) {
+    if ( a_chain->is_mapped && s_cell_map_new_volume(l_cell, 0, true) ) {
         CLEANUP_AND_RET;
     }
 #undef CLEANUP_AND_RET
@@ -454,7 +460,7 @@ int dap_chain_cell_load(dap_chain_t *a_chain, dap_chain_cell_t *a_cell)
         for ( l_el_size = 0; l_pos < l_full_size; ++q, l_pos += l_el_size + sizeof(uint64_t) ) {
             l_vol_rest = (uint64_t)( a_cell->map_end - a_cell->map_pos );
             if ( l_vol_rest <= sizeof(uint64_t) || l_vol_rest - sizeof(uint64_t) <= *(uint64_t*)a_cell->map_pos)
-                if ( s_cell_map_new_volume(a_cell, l_pos) )
+                if ( s_cell_map_new_volume(a_cell, l_pos, true) )
                     break;
             if (*(uint64_t*)a_cell->map_pos > l_full_size - l_pos ) {
                 log_it(L_ERROR, "Atom size exeeds file remainder: %zu > %zu. "
@@ -469,6 +475,9 @@ int dap_chain_cell_load(dap_chain_t *a_chain, dap_chain_cell_t *a_cell)
             a_cell->map_pos += l_el_size;
             a_chain->load_progress = (int)((float)l_pos/l_full_size * 100 + 0.5);
         }
+#ifndef DAP_OS_WINDOWS
+        s_cell_reclaim_cur_volume(a_cell);
+#endif
     } else { 
         DAP_DELETE(l_hdr);
         size_t l_read = 0;
@@ -519,7 +528,7 @@ static int s_cell_file_atom_add(dap_chain_cell_t *a_cell, dap_chain_atom_ptr_t a
         debug_if (s_debug_more, L_DEBUG, "Before filling volume for atom size %ld, stream pos of %s is %lu, map pos is %lu, space left in map %lu",
                       a_atom_size, a_cell->file_storage_path, l_pos, (size_t)(a_cell->map_pos - a_cell->map), (size_t)(a_cell->map_end - a_cell->map_pos));
         if ( a_atom_size + sizeof(uint64_t) > (size_t)(a_cell->map_end - a_cell->map_pos) )
-            if ( s_cell_map_new_volume(a_cell, (size_t)l_pos) )
+            if ( s_cell_map_new_volume(a_cell, (size_t)l_pos, false) )
                 return -2;
     }
     
diff --git a/modules/chain/dap_chain_ch.c b/modules/chain/dap_chain_ch.c
index 98eef65ffe41e75028818a9269659657618a5404..2771e6b3d14dbbdd6468b099400886b5b68d0370 100644
--- a/modules/chain/dap_chain_ch.c
+++ b/modules/chain/dap_chain_ch.c
@@ -154,39 +154,21 @@ static  dap_memstat_rec_t   s_memstat [MEMSTAT$K_NR] = {
 
 #endif
 
-static const char *s_error_type_to_string(dap_chain_ch_error_type_t a_error)
-{
-    switch (a_error) {
-    case DAP_CHAIN_CH_ERROR_SYNC_REQUEST_ALREADY_IN_PROCESS:
-        return "SYNC_REQUEST_ALREADY_IN_PROCESS";
-    case DAP_CHAIN_CH_ERROR_INCORRECT_SYNC_SEQUENCE:
-        return "INCORRECT_SYNC_SEQUENCE";
-    case DAP_CHAIN_CH_ERROR_SYNC_TIMEOUT:
-        return "SYNCHRONIZATION TIMEOUT";
-    case DAP_CHAIN_CH_ERROR_CHAIN_PKT_DATA_SIZE:
-        return "INVALID_PACKET_SIZE";
-    case DAP_CHAIN_CH_ERROR_LEGACY_PKT_DATA_SIZE:
-        return "INVALID_LEGACY_PACKET_SIZE";
-    case DAP_CHAIN_CH_ERROR_NET_INVALID_ID:
-        return "INVALID_NET_ID";
-    case DAP_CHAIN_CH_ERROR_CHAIN_NOT_FOUND:
-        return "CHAIN_NOT_FOUND";
-    case DAP_CHAIN_CH_ERROR_ATOM_NOT_FOUND:
-        return "ATOM_NOT_FOUND";
-    case DAP_CHAIN_CH_ERROR_UNKNOWN_CHAIN_PKT_TYPE:
-        return "UNKNOWN_CHAIN_PACKET_TYPE";
-    case DAP_CHAIN_CH_ERROR_GLOBAL_DB_INTERNAL_NOT_SAVED:
-        return "GLOBAL_DB_INTERNAL_SAVING_ERROR";
-    case DAP_CHAIN_CH_ERROR_NET_IS_OFFLINE:
-        return "NET_IS_OFFLINE";
-    case DAP_CHAIN_CH_ERROR_OUT_OF_MEMORY:
-        return "OUT_OF_MEMORY";
-    case DAP_CHAIN_CH_ERROR_INTERNAL:
-        return "INTERNAL_ERROR";
-    default:
-        return "UNKNOWN_ERROR";
-    }
-}
+const char* const s_error_type_to_string[] = {
+    [DAP_CHAIN_CH_ERROR_SYNC_REQUEST_ALREADY_IN_PROCESS]= "SYNC_REQUEST_ALREADY_IN_PROCESS",
+    [DAP_CHAIN_CH_ERROR_INCORRECT_SYNC_SEQUENCE]        = "INCORRECT_SYNC_SEQUENCE",
+    [DAP_CHAIN_CH_ERROR_SYNC_TIMEOUT]                   = "SYNCHRONIZATION TIMEOUT",
+    [DAP_CHAIN_CH_ERROR_CHAIN_PKT_DATA_SIZE]            = "INVALID_PACKET_SIZE",
+    [DAP_CHAIN_CH_ERROR_LEGACY_PKT_DATA_SIZE]           = "INVALID_LEGACY_PACKET_SIZE",
+    [DAP_CHAIN_CH_ERROR_NET_INVALID_ID]                 = "INVALID_NET_ID",
+    [DAP_CHAIN_CH_ERROR_CHAIN_NOT_FOUND]                = "CHAIN_NOT_FOUND",
+    [DAP_CHAIN_CH_ERROR_ATOM_NOT_FOUND]                 = "ATOM_NOT_FOUND",
+    [DAP_CHAIN_CH_ERROR_UNKNOWN_CHAIN_PKT_TYPE]         = "UNKNOWN_CHAIN_PACKET_TYPE",
+    [DAP_CHAIN_CH_ERROR_GLOBAL_DB_INTERNAL_NOT_SAVED]   = "GLOBAL_DB_INTERNAL_SAVING_ERROR",
+    [DAP_CHAIN_CH_ERROR_NET_IS_OFFLINE]                 = "NET_IS_OFFLINE",
+    [DAP_CHAIN_CH_ERROR_OUT_OF_MEMORY]                  = "OUT_OF_MEMORY",
+    [DAP_CHAIN_CH_ERROR_INTERNAL]                       = "INTERNAL_ERROR"
+};
 
 /**
  * @brief dap_chain_ch_init
@@ -618,11 +600,9 @@ static bool s_sync_in_chains_callback(void *a_arg)
         DAP_DELETE(l_args);
         return false;
     }
-    char *l_atom_hash_str = NULL;
     dap_hash_fast_t l_atom_hash = { }; 
-    dap_hash_fast(l_atom, l_atom_size, &l_atom_hash); 
-    if (s_debug_more)
-        l_atom_hash_str = dap_hash_fast_to_str_static(&l_atom_hash);
+    dap_hash_fast(l_atom, l_atom_size, &l_atom_hash);
+    char *l_atom_hash_str = dap_hash_fast_to_str_static(&l_atom_hash);
     dap_chain_atom_verify_res_t l_atom_add_res = l_chain->callback_atom_add(l_chain, l_atom, l_atom_size, &l_atom_hash, false);
     bool l_ack_send = false;
     switch (l_atom_add_res) {
@@ -688,7 +668,7 @@ void dap_stream_ch_write_error_unsafe(dap_stream_ch_t *a_ch, dap_chain_net_id_t
 {
     dap_chain_ch_t *l_ch_chain = DAP_CHAIN_CH(a_ch);
     dap_return_if_fail(l_ch_chain);
-    const char *l_err_str = s_error_type_to_string(a_error);
+    const char *l_err_str = a_error < DAP_CHAIN_CH_ERROR_LAST ? s_error_type_to_string[a_error] : "UNDEFINED ERROR";
     dap_chain_ch_pkt_write_unsafe(a_ch, DAP_CHAIN_CH_PKT_TYPE_ERROR, a_net_id, a_chain_id, a_cell_id, l_err_str, strlen(l_err_str) + 1, DAP_CHAIN_CH_PKT_VERSION_LEGACY);
     s_ch_chain_go_idle(l_ch_chain);
 }
@@ -1544,7 +1524,7 @@ static bool s_sync_timer_callback(void *a_arg)
     }
 
     bool l_timer_break = false;
-    const char *l_err_str = s_error_type_to_string(DAP_CHAIN_CH_ERROR_SYNC_TIMEOUT);
+    const char* l_err_str = s_error_type_to_string[DAP_CHAIN_CH_ERROR_SYNC_TIMEOUT];
     if (l_ch_chain->sync_context) {
         struct sync_context *l_context = l_ch_chain->sync_context;
         if (l_context->last_activity + s_sync_timeout <= dap_time_now()) {
diff --git a/modules/chain/include/dap_chain.h b/modules/chain/include/dap_chain.h
index beb262ba03eb3fe930dbbf24599f28b5199d8327..e8e027832c506591033c6de38a4734f08515b731 100644
--- a/modules/chain/include/dap_chain.h
+++ b/modules/chain/include/dap_chain.h
@@ -62,7 +62,10 @@ typedef struct dap_chain_datum_iter {
     size_t cur_size;
     dap_chain_hash_fast_t *cur_hash;
     dap_chain_hash_fast_t *cur_atom_hash;
+    uint32_t action;
+    dap_chain_net_srv_uid_t uid;
     int ret_code;
+    char *token_ticker;
     void *cur_item;
 } dap_chain_datum_iter_t;
 
diff --git a/modules/chain/include/dap_chain_ch.h b/modules/chain/include/dap_chain_ch.h
index 384e5ec3d9154c784f783acb6caa0b6b06122237..da98e7e88fa5c016c40465c49b0c6884e657ba5a 100644
--- a/modules/chain/include/dap_chain_ch.h
+++ b/modules/chain/include/dap_chain_ch.h
@@ -63,7 +63,9 @@ typedef enum dap_chain_ch_error_type {
     DAP_CHAIN_CH_ERROR_INTERNAL,
 // Legacy
     DAP_CHAIN_CH_ERROR_GLOBAL_DB_INTERNAL_NOT_SAVED,
-    DAP_CHAIN_CH_ERROR_LEGACY_PKT_DATA_SIZE
+    DAP_CHAIN_CH_ERROR_LEGACY_PKT_DATA_SIZE,
+    //
+    DAP_CHAIN_CH_ERROR_LAST
 } dap_chain_ch_error_type_t;
 
 int dap_chain_ch_init(void);
diff --git a/modules/chain/tests/dap_chain_ledger_tests.c b/modules/chain/tests/dap_chain_ledger_tests.c
index 1e2a84476aadbf418da3b219a4d5418651019368..d842d8ecf5faceefd37049dd87224231cc16ad09 100644
--- a/modules/chain/tests/dap_chain_ledger_tests.c
+++ b/modules/chain/tests/dap_chain_ledger_tests.c
@@ -491,7 +491,7 @@ int dap_ledger_test_add_new_datum (uint16_t a_datum_type, void* a_datum, size_t
 {
     dap_chain_datum_t* l_new_datum = dap_chain_datum_create(a_datum_type, a_datum, a_datum_size);
     size_t l_new_datum_size = a_datum_size + sizeof(l_new_datum->header);
-    int status = dap_chain_datum_add(a_chain, l_new_datum, l_new_datum_size, a_datum_hash);
+    int status = dap_chain_datum_add(a_chain, l_new_datum, l_new_datum_size, a_datum_hash, NULL);
     dap_assert(status == 0, "Test of transaction adding to ledger:");
     return status;
 }
@@ -531,7 +531,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_assert(l_second_tx, "Test of creating second tx:");  
     dap_chain_hash_fast_t l_second_tx_hash = {0};
     dap_hash_fast(l_second_tx, dap_chain_datum_tx_get_size(l_second_tx), &l_second_tx_hash);
-    dap_assert(!dap_ledger_tx_add(a_ledger, l_second_tx, &l_second_tx_hash, false), "Test of second transaction adding to ledger:");
+    dap_assert(!dap_ledger_tx_add(a_ledger, l_second_tx, &l_second_tx_hash, false, NULL), "Test of second transaction adding to ledger:");
     dap_ledger_test_print_balance(a_ledger, &l_addr);
 
     // try to remove spent tx
@@ -548,7 +548,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_assert_PIF(l_cond_tx, "Test of creating conditional transaction:");  
     dap_chain_hash_fast_t l_cond_tx_hash = {0};
     dap_hash_fast(l_cond_tx, dap_chain_datum_tx_get_size(l_first_tx), &l_cond_tx_hash);
-    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false), "Test of conditional transaction adding to ledger:");
+    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false, NULL), "Test of conditional transaction adding to ledger:");
     dap_ledger_test_print_balance(a_ledger, &l_addr);
     dap_assert(!dap_ledger_tx_remove(a_ledger, l_cond_tx, &l_cond_tx_hash), "Test of conditional transaction removing from ledger:");
     l_balance_after = dap_ledger_test_print_balance(a_ledger, &l_addr);
@@ -561,7 +561,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_assert_PIF(l_cond_tx, "Test of creating conditional transaction:"); 
     dap_hash_fast_t l_cond_tx_hash = {};
     dap_hash_fast(l_cond_tx, dap_chain_datum_tx_get_size(l_cond_tx), &l_cond_tx_hash);
-    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false), "Test of conditional transaction adding to ledger:");
+    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false, NULL), "Test of conditional transaction adding to ledger:");
     dap_ledger_test_print_balance(a_ledger, &l_addr);
 
     dap_cert_t *l_cond_spender_cert = dap_cert_generate_mem_with_seed("newCert", DAP_ENC_KEY_TYPE_SIG_PICNIC, "FMknbirh8*^#$RYU*q", 18);
@@ -571,7 +571,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_chain_datum_tx_t *l_cond_spendind_tx = dap_ledger_test_create_spend_tx_cond(a_from_key, &l_cond_tx_hash, l_cond_spender_cert->enc_key, dap_chain_uint256_from(1U),a_ledger);
     dap_chain_hash_fast_t l_spend_cond_tx_hash = {0};
     dap_hash_fast(l_cond_spendind_tx, dap_chain_datum_tx_get_size(l_cond_spendind_tx), &l_spend_cond_tx_hash);
-    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_spendind_tx, &l_spend_cond_tx_hash, false), "Test adding of transaction spending to a conditional transaction  to ledger:");
+    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_spendind_tx, &l_spend_cond_tx_hash, false, NULL), "Test adding of transaction spending to a conditional transaction  to ledger:");
     uint256_t l_cond_spending_balance_after = dap_ledger_test_print_balance(a_ledger, &l_cond_spender_addr);
     dap_assert(!compare256(l_cond_spending_balance_after, dap_chain_uint256_from(1U)), "Check balance after spending:");
     dap_ledger_test_print_balance(a_ledger, &l_cond_spender_addr);
@@ -588,7 +588,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_chain_datum_tx_t *l_cond_tx = dap_ledger_test_create_tx_cond(a_from_key, a_prev_hash, &l_addr_first, dap_chain_uint256_from(2U),a_ledger);
     dap_hash_fast_t l_cond_tx_hash = {};
     dap_hash_fast(l_cond_tx, dap_chain_datum_tx_get_size(l_cond_tx), &l_cond_tx_hash);
-    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false), "Adding of cond transaction to ledger is");
+    dap_assert(!dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false, NULL), "Adding of cond transaction to ledger is");
 
     dap_cert_t *l_cond_spending_cert = dap_cert_generate_mem_with_seed("newCert", DAP_ENC_KEY_TYPE_SIG_PICNIC, "FMknbirh8*^#$RYU*q", 18);
     dap_chain_addr_t l_cond_spending_addr = {0};
@@ -597,7 +597,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_chain_datum_tx_t *l_cond_returning_tx = dap_ledger_test_create_return_from_tx_cond(&l_cond_tx_hash, a_from_key ,a_ledger);
     dap_chain_hash_fast_t l_cond_returning_tx_hash = {0};
     dap_hash_fast(l_cond_returning_tx, dap_chain_datum_tx_get_size(l_cond_returning_tx), &l_cond_returning_tx_hash);
-    int err_code = dap_ledger_tx_add(a_ledger, l_cond_returning_tx, &l_cond_returning_tx_hash, false);
+    int err_code = dap_ledger_tx_add(a_ledger, l_cond_returning_tx, &l_cond_returning_tx_hash, false, NULL);
     printf("err_code = %s\n", dap_ledger_check_error_str(err_code));
     dap_assert(!err_code, "Returning of funds from cond transaction is");
     uint256_t l_cond_spending_balance_after = dap_ledger_test_print_balance(a_ledger, &l_cond_spending_addr);
@@ -617,7 +617,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_chain_datum_tx_t *l_cond_tx = dap_ledger_test_create_stake_tx_cond(a_from_key, a_prev_hash, dap_chain_uint256_from(20U), a_ledger);
     dap_hash_fast_t l_cond_tx_hash = {};
     dap_hash_fast(l_cond_tx, dap_chain_datum_tx_get_size(l_cond_tx), &l_cond_tx_hash);
-    int err_code = dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false);
+    int err_code = dap_ledger_tx_add(a_ledger, l_cond_tx, &l_cond_tx_hash, false, NULL);
     printf("err_code = %s\n", dap_ledger_check_error_str(err_code));
     dap_assert(!err_code, "Adding of stake cond transaction to ledger is");
 
@@ -632,7 +632,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_chain_datum_tx_t *l_stake_cond_tx = dap_ledger_test_create_stake_tx_cond(a_from_key, a_prev_hash, dap_chain_uint256_from(20U), a_ledger);
     dap_hash_fast_t l_stake_cond_tx_hash = {};
     dap_hash_fast(l_stake_cond_tx, dap_chain_datum_tx_get_size(l_stake_cond_tx), &l_stake_cond_tx_hash);
-    int err_code = dap_ledger_tx_add(a_ledger, l_stake_cond_tx, &l_stake_cond_tx_hash, false);
+    int err_code = dap_ledger_tx_add(a_ledger, l_stake_cond_tx, &l_stake_cond_tx_hash, false, NULL);
     printf("err_code = %s\n", dap_ledger_check_error_str(err_code));
     dap_assert(!err_code, "Adding of stake cond transaction to ledger is");
     sleep(3);
@@ -644,7 +644,7 @@ void dap_ledger_test_datums_removing(dap_ledger_t *a_ledger, dap_hash_fast_t *a_
     dap_chain_datum_tx_t *l_unstake_cond_tx = dap_ledger_test_create_unstake_tx_cond(a_from_key, &l_stake_cond_tx_hash, dap_chain_uint256_from(20U), a_ledger);
     dap_hash_fast_t l_unstake_cond_tx_hash = {};
     dap_hash_fast(l_unstake_cond_tx, dap_chain_datum_tx_get_size(l_unstake_cond_tx), &l_unstake_cond_tx_hash);
-    err_code = dap_ledger_tx_add(a_ledger, l_unstake_cond_tx, &l_unstake_cond_tx_hash, false);
+    err_code = dap_ledger_tx_add(a_ledger, l_unstake_cond_tx, &l_unstake_cond_tx_hash, false, NULL);
     printf("err_code = %s\n", dap_ledger_check_error_str(err_code));
     dap_assert(!err_code, "Adding of unstake cond transaction to ledger is");
     uint256_t l_balance_delegated_after_unstaking = dap_ledger_test_print_delegate_balance(a_ledger, &l_addr);
@@ -694,14 +694,14 @@ dap_hash_fast_t dap_ledger_test_double_spending(
     dap_assert_PIF(l_first_tx, "Can't creating base transaction.");
     dap_chain_hash_fast_t l_first_tx_hash = {0};
     dap_hash_fast(l_first_tx, dap_chain_datum_tx_get_size(l_first_tx), &l_first_tx_hash);
-    dap_assert_PIF(!dap_ledger_tx_add(a_ledger, l_first_tx, &l_first_tx_hash, false), "Can't add first transaction on ledger");
+    dap_assert_PIF(!dap_ledger_tx_add(a_ledger, l_first_tx, &l_first_tx_hash, false, NULL), "Can't add first transaction on ledger");
     //uint256_t l_balance = dap_ledger_calc_balance(a_ledger, &l_addr_first, s_token_ticker);
     // Second tx
     dap_chain_datum_tx_t *l_second_tx = dap_ledger_test_create_tx(a_from_key, a_prev_hash,
                                                                        &a_addr_to, dap_chain_uint256_from(s_standard_value_tx - s_fee));
     dap_chain_hash_fast_t l_second_tx_hash = {0};
     dap_hash_fast(l_second_tx, dap_chain_datum_tx_get_size(l_second_tx), &l_second_tx_hash);
-    dap_assert_PIF(dap_ledger_tx_add(a_ledger, l_second_tx, &l_second_tx_hash, false), "Added second transaction on ledger");
+    dap_assert_PIF(dap_ledger_tx_add(a_ledger, l_second_tx, &l_second_tx_hash, false, NULL), "Added second transaction on ledger");
     dap_pass_msg("The verification test is not able to make two normal transactions per one basic transaction.");
     return l_first_tx_hash; 
 }
@@ -831,7 +831,7 @@ void dap_ledger_test_write_back_list(dap_ledger_t *a_ledger, dap_cert_t *a_cert,
                                                                                       *l_addr_1->addr, a_cert);
         dap_hash_fast_t l_btx_addr1_hash = {0};
         dap_hash_fast(l_btx_addr1, dap_chain_datum_tx_get_size(l_btx_addr1), &l_btx_addr1_hash);
-        int l_ledger_add_code = dap_ledger_tx_add(a_ledger, l_btx_addr1, &l_btx_addr1_hash, false);
+        int l_ledger_add_code = dap_ledger_tx_add(a_ledger, l_btx_addr1, &l_btx_addr1_hash, false, NULL);
         char *l_ledger_tx_add_str = dap_strdup_printf("Can't add base tx in white address. Code: %d", l_ledger_add_code);
         dap_assert_PIF(!l_ledger_add_code, l_ledger_tx_add_str);
         DAP_DELETE(l_ledger_tx_add_str);
@@ -839,13 +839,13 @@ void dap_ledger_test_write_back_list(dap_ledger_t *a_ledger, dap_cert_t *a_cert,
         dap_chain_datum_tx_t *l_tx_to_addr4 = dap_ledger_test_create_tx(l_addr_1->enc_key, &l_btx_addr1_hash,
                                                                               l_addr_4->addr, dap_chain_uint256_from(s_total_supply-s_fee));
         dap_hash_fast(l_tx_to_addr4, dap_chain_datum_tx_get_size(l_tx_to_addr4), &l_tx_addr4_hash);
-        dap_assert_PIF(!dap_ledger_tx_add(a_ledger, l_tx_to_addr4, &l_tx_addr4_hash, false),
+        dap_assert_PIF(!dap_ledger_tx_add(a_ledger, l_tx_to_addr4, &l_tx_addr4_hash, false, NULL),
                        "Can't add transaction to address from white list in ledger");
         dap_chain_datum_tx_t *l_tx_to_addr3 = dap_ledger_test_create_tx(l_addr_4->enc_key, &l_tx_addr4_hash,
                                                                               l_addr_3->addr, dap_chain_uint256_from(s_total_supply-s_fee));
         dap_hash_fast_t l_tx_addr3_hash = {0};
         dap_hash_fast(l_tx_to_addr3, dap_chain_datum_tx_get_size(l_tx_to_addr3), &l_tx_addr3_hash);
-        int res_add_tx = dap_ledger_tx_add(a_ledger, l_tx_to_addr3, &l_tx_addr3_hash, false);
+        int res_add_tx = dap_ledger_tx_add(a_ledger, l_tx_to_addr3, &l_tx_addr3_hash, false, NULL);
         if (!res_add_tx) {
             dap_fail("It was possible to carry out a transaction to a forbidden address");
         } else {
@@ -945,20 +945,20 @@ void dap_ledger_test_write_back_list(dap_ledger_t *a_ledger, dap_cert_t *a_cert,
                                                                                        *l_addr_2->addr, a_cert);
         dap_hash_fast_t l_btx_addr2_hash = {0};
         dap_hash_fast(l_btx_addr2, dap_chain_datum_tx_get_size(l_btx_addr2), &l_btx_addr2_hash);
-        dap_assert_PIF(!dap_ledger_tx_add(a_ledger, l_btx_addr2, &l_btx_addr2_hash, false),
+        dap_assert_PIF(!dap_ledger_tx_add(a_ledger, l_btx_addr2, &l_btx_addr2_hash, false, NULL),
                        "Can't add base tx in white address");
         //Check tx in addr from block list
         dap_chain_datum_tx_t *l_tx_to_addr1 = dap_ledger_test_create_tx(l_addr_4->enc_key, &l_btx_addr2_hash,
                                                                               l_addr_1->addr, dap_chain_uint256_from(s_total_supply));
         dap_hash_fast_t l_tx_addr1_hash = {0};
         dap_hash_fast(l_tx_to_addr1, dap_chain_datum_tx_get_size(l_tx_to_addr1), &l_tx_addr1_hash);
-        dap_assert(dap_ledger_tx_add(a_ledger, l_tx_to_addr1, &l_tx_addr1_hash, false), "Transfer test to a forbidden address.");
+        dap_assert(dap_ledger_tx_add(a_ledger, l_tx_to_addr1, &l_tx_addr1_hash, false, NULL), "Transfer test to a forbidden address.");
         //Check tx in addr from list
         dap_chain_datum_tx_t *l_tx_to_addr3 = dap_ledger_test_create_tx(l_addr_4->enc_key, &l_tx_addr1_hash,
                                                                               l_addr_3->addr, dap_chain_uint256_from(s_total_supply));
         dap_hash_fast_t l_tx_addr3_hash = {0};
         dap_hash_fast(l_tx_to_addr3, dap_chain_datum_tx_get_size(l_tx_to_addr3), &l_tx_addr3_hash);
-        dap_assert(dap_ledger_tx_add(a_ledger, l_tx_to_addr3, &l_tx_addr3_hash, false), "Transfer test to a not forbidden address.");
+        dap_assert(dap_ledger_tx_add(a_ledger, l_tx_to_addr3, &l_tx_addr3_hash, false, NULL), "Transfer test to a not forbidden address.");
     }
 }
 
@@ -1041,7 +1041,7 @@ void dap_ledger_test_run(void){
     dap_hash_fast_t l_hash_btx = {0};
     dap_hash_fast(l_base_tx, l_base_tx_size, &l_hash_btx);
     dap_assert_PIF(!dap_ledger_tx_add_check(l_ledger, l_base_tx, l_base_tx_size, &l_hash_btx), "Check can added base tx in ledger");
-    dap_assert_PIF(!dap_ledger_tx_add(l_ledger, l_base_tx, &l_hash_btx, false), "Added base tx in ledger.");
+    dap_assert_PIF(!dap_ledger_tx_add(l_ledger, l_base_tx, &l_hash_btx, false, NULL), "Added base tx in ledger.");
     uint256_t l_balance_example = dap_chain_uint256_from(s_standard_value_tx);
     uint256_t l_balance = dap_ledger_calc_balance(l_ledger, &l_addr, s_token_ticker);
 	uint256_t l_fee = dap_chain_uint256_from(s_fee);
@@ -1057,7 +1057,7 @@ void dap_ledger_test_run(void){
     if (dap_ledger_tx_add_check(l_ledger, l_base_tx_second, l_base_tx_size2, &l_hash_btx_second)) {
         dap_pass_msg("Checking can added second base tx in ledger");
     }
-    if (dap_ledger_tx_add(l_ledger, l_base_tx_second, &l_hash_btx_second, false)){
+    if (dap_ledger_tx_add(l_ledger, l_base_tx_second, &l_hash_btx_second, false, NULL)){
         dap_pass_msg("Checking for a failure to add a second base transaction for the same issue to the ledger.");
     } else {
         dap_fail("Checking for a failure to add a second base transaction for the same issue to the ledger.");
diff --git a/modules/common/dap_chain_datum.c b/modules/common/dap_chain_datum.c
index 8394a83ea5872759fe1a25480b7602c486bfc783..14e8c79d094406edb53ac64d59fd19806dcf9ef6 100644
--- a/modules/common/dap_chain_datum.c
+++ b/modules/common/dap_chain_datum.c
@@ -150,7 +150,7 @@ void dap_datum_token_dump_tsd_to_json(json_object * json_obj_out, dap_chain_datu
             DAP_DEL_Z(balance);
         }continue;
         case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DATUM_TYPE_ALLOWED_ADD  :
-            json_object_object_add(json_obj_out, "datum_type_allowed_add", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
+                json_object_object_add(json_obj_out, "datum_type_allowed_add", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
             continue;
         case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DATUM_TYPE_ALLOWED_REMOVE  :
             json_object_object_add(json_obj_out, "datum_type_allowed_remove", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
@@ -161,30 +161,38 @@ void dap_datum_token_dump_tsd_to_json(json_object * json_obj_out, dap_chain_datu
         case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DATUM_TYPE_BLOCKED_REMOVE:
             json_object_object_add(json_obj_out, "datum_type_blocked_remove", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
             continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_ALLOWED_ADD:
-            json_object_object_add(json_obj_out, "tx_sender_allowed_add", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_ALLOWED_REMOVE:
-            json_object_object_add(json_obj_out, "tx_sender_allowed_remove", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_ADD:
-            json_object_object_add(json_obj_out, "tx_sender_blocked_add", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_REMOVE:
-            json_object_object_add(json_obj_out, "tx_sender_blocked_remove", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_ALLOWED_ADD:
-            json_object_object_add(json_obj_out, "tx_receiver_allowed_add", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_ALLOWED_REMOVE:
-            json_object_object_add(json_obj_out, "tx_receiver_allowed", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_BLOCKED_ADD:
-            json_object_object_add(json_obj_out, "tx_receiver_blocked_add", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
-        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_BLOCKED_REMOVE:
-            json_object_object_add(json_obj_out, "tx_receiver_blocked_remove", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
-            continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_ALLOWED_ADD: {
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_sender_allowed_add", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_ALLOWED_REMOVE:{
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_sender_allowed_remove", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_ADD: {
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_sender_blocked_add", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_REMOVE: {
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_sender_blocked_remove", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_ALLOWED_ADD: {
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_receiver_allowed_add", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_ALLOWED_REMOVE: {
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_receiver_allowed", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_BLOCKED_ADD: {
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_receiver_blocked_add", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
+        case DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_BLOCKED_REMOVE: {
+                dap_chain_addr_t *l_addr = dap_tsd_get_object(l_tsd, dap_chain_addr_t);
+                json_object_object_add(json_obj_out, "tx_receiver_blocked_remove", json_object_new_string(dap_chain_addr_to_str_static(l_addr)));
+            } continue;
         case DAP_CHAIN_DATUM_TOKEN_TSD_TOKEN_DESCRIPTION:
             json_object_object_add(json_obj_out, "description", json_object_new_string(dap_tsd_get_string_const(l_tsd)));
             continue;
@@ -198,313 +206,6 @@ void dap_datum_token_dump_tsd_to_json(json_object * json_obj_out, dap_chain_datu
     }
 }
 
-/**
- * @brief _dap_chain_datum_tx_out_data
- *
- * @param a_datum
- * @param a_ledger
- * @param a_str_out
- * @param a_hash_out_type
- * @param save_processed_tx
- * @param a_tx_hash_processed
- * @param l_tx_num
- */
-bool dap_chain_datum_dump_tx(dap_chain_datum_tx_t *a_datum,
-                             const char *a_ticker,
-                             dap_string_t *a_str_out,
-                             const char *a_hash_out_type,
-                             dap_hash_fast_t *a_tx_hash,
-                             dap_chain_net_id_t a_net_id)
-{
-    bool l_is_first = false;
-    dap_chain_tx_in_t *l_in_item = (dap_chain_tx_in_t *)dap_chain_datum_tx_item_get(a_datum, NULL, NULL, TX_ITEM_TYPE_IN, NULL);
-    if (l_in_item && dap_hash_fast_is_blank(&l_in_item->header.tx_prev_hash))
-        l_is_first = true;
-    char l_tmp_buf[DAP_TIME_STR_SIZE];
-    const char *l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-            ? dap_enc_base58_encode_hash_to_str_static(a_tx_hash)
-            : dap_chain_hash_fast_to_str_static(a_tx_hash);
-    dap_time_to_str_rfc822(l_tmp_buf, DAP_TIME_STR_SIZE, a_datum->header.ts_created);
-    dap_string_append_printf(a_str_out, "transaction:%s hash %s\n TS Created: %s%s%s\n Items:\n",
-                             l_is_first ? " (emit)" : "", l_hash_str, l_tmp_buf,
-                             a_ticker ? " Token ticker: " : "", a_ticker ? a_ticker : "");
-    dap_hash_fast_t l_hash_tmp = { };
-    byte_t *item; size_t l_size;
-    TX_ITEM_ITER_TX(item, l_size, a_datum) {
-        switch (*item) {
-        case TX_ITEM_TYPE_IN:
-            l_hash_tmp = ((dap_chain_tx_in_t*)item)->header.tx_prev_hash;
-            l_hash_str = !dap_hash_fast_is_blank(&l_hash_tmp) 
-                ? dap_strcmp(a_hash_out_type, "hex") ? dap_enc_base58_encode_hash_to_str_static(&l_hash_tmp) : dap_chain_hash_fast_to_str_static(&l_hash_tmp)
-                : "BLANK";
-            dap_string_append_printf(a_str_out, "\t IN:\nTx_prev_hash: %s\n"
-                                                "\t\t Tx_out_prev_idx: %u\n",
-                                        l_hash_str,
-                                        ((dap_chain_tx_in_t*)item)->header.tx_out_prev_idx);
-            break;
-        case TX_ITEM_TYPE_OUT_OLD: {
-            const char *l_value_str = dap_uint256_to_char(
-                dap_chain_uint256_from(((dap_chain_tx_out_old_t*)item)->header.value), NULL );
-            dap_string_append_printf(a_str_out, "\t OUT OLD (64):\n"
-                                                "\t\t Value: %s (%"DAP_UINT64_FORMAT_U")\n"
-                                                "\t\t Address: %s\n",
-                                        l_value_str,
-                                        ((dap_chain_tx_out_old_t*)item)->header.value,
-                                        dap_chain_addr_to_str_static(&((dap_chain_tx_out_old_t*)item)->addr));
-        } break;
-        case TX_ITEM_TYPE_OUT: { // 256
-            const char *l_coins_str,
-                    *l_value_str = dap_uint256_to_char(((dap_chain_tx_out_t*)item)->header.value, &l_coins_str),
-                    *l_addr_str = dap_chain_addr_to_str_static(&((dap_chain_tx_out_t*)item)->addr);
-            dap_string_append_printf(a_str_out, "\t OUT:\n"
-                                                "\t\t Value: %s (%s)\n"
-                                                "\t\t Address: %s\n",
-                                        l_coins_str,
-                                        l_value_str,
-                                        l_addr_str);
-        } break;
-        case TX_ITEM_TYPE_IN_EMS: {
-            l_hash_tmp = ((dap_chain_tx_in_ems_t*)item)->header.token_emission_hash;
-            l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                    ? dap_enc_base58_encode_hash_to_str_static(&l_hash_tmp)
-                    : dap_chain_hash_fast_to_str_static(&l_hash_tmp);
-            dap_string_append_printf(a_str_out, "\t IN_EMS:\n"
-                                                "\t\t ticker: %s \n"
-                                                "\t\t token_emission_hash: %s\n"
-                                                "\t\t token_emission_chain_id: 0x%016"DAP_UINT64_FORMAT_x"\n",
-                                                ((dap_chain_tx_in_ems_t*)item)->header.ticker,
-                                                l_hash_str,
-                                                ((dap_chain_tx_in_ems_t*)item)->header.token_emission_chain_id.uint64);
-        } break;
-            /*
-        case TX_ITEM_TYPE_IN_EMS_EXT: {
-            l_hash_tmp = &((dap_chain_tx_in_ems_ext_t*)item)->header.ext_tx_hash;
-            l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                    ? dap_enc_base58_encode_hash_to_str(l_hash_tmp)
-                    : dap_chain_hash_fast_to_str_new(l_hash_tmp);
-            dap_string_append_printf(a_str_out, "\t IN_EMS EXT:\n"
-                                         "\t\t Version: %u\n"
-                                         "\t\t Ticker: %s\n"
-                                         "\t\t Ext chain id: 0x%016"DAP_UINT64_FORMAT_x"\n"
-                                         "\t\t Ext net id: 0x%016"DAP_UINT64_FORMAT_x"\n"
-                                         "\t\t Ext tx hash: %s\n"
-                                         "\t\t Ext tx out idx: %u\n",
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.version,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ticker,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ext_chain_id.uint64,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ext_net_id.uint64,
-                                     l_hash_str,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ext_tx_out_idx);
-            DAP_DELETE(l_hash_str);
-        } break; */
-
-        case TX_ITEM_TYPE_IN_REWARD: {
-            l_hash_tmp = ((dap_chain_tx_in_reward_t *)item)->block_hash;
-            l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                    ? dap_enc_base58_encode_hash_to_str_static(&l_hash_tmp)
-                    : dap_chain_hash_fast_to_str_static(&l_hash_tmp);
-            dap_string_append_printf(a_str_out, "\t IN_REWARD:\n"
-                                                "\t\t block_hash: %s\n",
-                                                l_hash_str);
-        } break;
-
-        case TX_ITEM_TYPE_SIG: {
-            dap_sign_t *l_sign = dap_chain_datum_tx_item_sign_get_sig((dap_chain_tx_sig_t*)item);
-            dap_sign_get_information(l_sign, a_str_out, a_hash_out_type);
-            dap_chain_addr_t l_sender_addr;
-            dap_chain_addr_fill_from_sign(&l_sender_addr, l_sign, a_net_id);
-            dap_string_append_printf(a_str_out, "\tSender addr: %s\n", dap_chain_addr_to_str_static(&l_sender_addr));
-        } break;
-        case TX_ITEM_TYPE_RECEIPT: {
-            const char *l_coins_str, *l_value_str = dap_uint256_to_char(((dap_chain_datum_tx_receipt_t*)item)->receipt_info.value_datoshi, &l_coins_str);
-            dap_string_append_printf(a_str_out, "\t Receipt:\n"
-                                                "\t\t size: %"DAP_UINT64_FORMAT_U"\n"
-                                                "\t\t ext size: %"DAP_UINT64_FORMAT_U"\n"
-                                                "\t\t Info:"
-                                                "\t\t\t units: 0x%016"DAP_UINT64_FORMAT_x"\n"
-                                                "\t\t\t uid: 0x%016"DAP_UINT64_FORMAT_x"\n"
-                                                "\t\t\t units type: %s \n"
-                                                "\t\t\t value: %s (%s)\n",
-                                     ((dap_chain_datum_tx_receipt_t*)item)->size,
-                                     ((dap_chain_datum_tx_receipt_t*)item)->exts_size,
-                                     ((dap_chain_datum_tx_receipt_t*)item)->receipt_info.units,
-                                     ((dap_chain_datum_tx_receipt_t*)item)->receipt_info.srv_uid.uint64,
-                                     dap_chain_srv_unit_enum_to_str(((dap_chain_datum_tx_receipt_t*)item)->receipt_info.units_type.enm),
-                                     l_coins_str,
-                                     l_value_str);
-            dap_string_append_printf(a_str_out, "Exts:\n");                         
-            switch ( ((dap_chain_datum_tx_receipt_t*)item)->exts_size ) {
-            case (sizeof(dap_sign_t) * 2): {
-                dap_sign_t *l_client = DAP_CAST_PTR( dap_sign_t, ((dap_chain_datum_tx_receipt_t*)item)->exts_n_signs + sizeof(dap_sign_t) );
-                dap_string_append_printf(a_str_out, "   Client:\n");
-                dap_sign_get_information(l_client, a_str_out, a_hash_out_type);
-            }
-            case (sizeof(dap_sign_t)): {
-                dap_sign_t *l_provider = DAP_CAST_PTR( dap_sign_t, ((dap_chain_datum_tx_receipt_t*)item)->exts_n_signs );
-                dap_string_append_printf(a_str_out, "   Provider:\n");
-                dap_sign_get_information(l_provider, a_str_out, a_hash_out_type);
-                break;
-            }
-            }
-        } break;
-        case TX_ITEM_TYPE_PKEY: {
-            dap_pkey_t *l_pkey = (dap_pkey_t*)((dap_chain_tx_pkey_t*)item)->pkey;
-            dap_chain_hash_fast_t l_pkey_hash;
-            dap_hash_fast(l_pkey->pkey, l_pkey->header.size, &l_pkey_hash);
-            l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                    ? dap_enc_base58_encode_hash_to_str_static(&l_pkey_hash)
-                    : dap_chain_hash_fast_to_str_static(&l_pkey_hash);
-            dap_string_append_printf(a_str_out, "\t PKey: \n"
-                                                "\t\t SIG type: %s\n"
-                                                "\t\t SIG size: %u\n"
-                                                "\t\t Sequence number: %u \n"
-                                                "\t\t Key: \n"
-                                                "\t\t\t Type: %s\n"
-                                                "\t\t\t Size: %u\n"
-                                                "\t\t\t Hash: %s\n",
-                                     dap_sign_type_to_str(((dap_chain_tx_pkey_t*)item)->header.sig_type),
-                                     ((dap_chain_tx_pkey_t*)item)->header.sig_size,
-                                     ((dap_chain_tx_pkey_t*)item)->seq_no,
-                                     dap_pkey_type_to_str(l_pkey->header.type),
-                                     l_pkey->header.size,
-                                     l_hash_str);
-        } break;
-        case TX_ITEM_TYPE_TSD: {
-            dap_string_append_printf(a_str_out, "\t TSD data: \n"
-                                                "\t\t type: %d\n"
-                                                "\t\t size: %lu\n",
-                                     ((dap_chain_tx_tsd_t*)item)->header.type,
-                                     ((dap_chain_tx_tsd_t*)item)->header.size);
-        } break;
-        case TX_ITEM_TYPE_IN_COND:
-            l_hash_tmp = ((dap_chain_tx_in_cond_t*)item)->header.tx_prev_hash;
-            l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                    ? dap_enc_base58_encode_hash_to_str_static(&l_hash_tmp)
-                    : dap_chain_hash_fast_to_str_static(&l_hash_tmp);
-            dap_string_append_printf(a_str_out, "\t IN COND:\n\t\tReceipt_idx: %u\n"
-                                                "\t\t Tx_prev_hash: %s\n"
-                                                "\t\t Tx_out_prev_idx: %u\n",
-                                     ((dap_chain_tx_in_cond_t*)item)->header.receipt_idx,
-                                     l_hash_str,
-                                     ((dap_chain_tx_in_cond_t*)item)->header.tx_out_prev_idx);
-            break;
-        case TX_ITEM_TYPE_OUT_COND: {
-            const char *l_coins_str, *l_value_str = dap_uint256_to_char(((dap_chain_tx_out_cond_t*)item)->header.value, &l_coins_str);
-            dap_time_t l_ts_exp = ((dap_chain_tx_out_cond_t*)item)->header.ts_expires;
-            dap_time_to_str_rfc822(l_tmp_buf, DAP_TIME_STR_SIZE, l_ts_exp);
-            dap_string_append_printf(a_str_out, "\t OUT COND:\n"
-                                                "\t Header:\n"
-                                                "\t\t ts_expires: %s"
-                                                "\t\t value: %s (%s)\n"
-                                                "\t\t subtype: %s\n"
-                                                "\t\t uid: 0x%016"DAP_UINT64_FORMAT_x"\n",
-                                     l_ts_exp ? l_tmp_buf : "never\n", l_coins_str, l_value_str,
-                                     dap_chain_tx_out_cond_subtype_to_str(((dap_chain_tx_out_cond_t*)item)->header.subtype),
-                                     ((dap_chain_tx_out_cond_t*)item)->header.srv_uid.uint64);
-            switch (((dap_chain_tx_out_cond_t*)item)->header.subtype) {
-                case DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_PAY: {
-                    const char *l_coins_str, *l_value_str =
-                        dap_uint256_to_char( ((dap_chain_tx_out_cond_t*)item)->subtype.srv_pay.unit_price_max_datoshi, &l_coins_str );
-                    l_hash_tmp = ((dap_chain_tx_out_cond_t*)item)->subtype.srv_pay.pkey_hash;
-                    l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                            ? dap_enc_base58_encode_hash_to_str_static(&l_hash_tmp)
-                            : dap_chain_hash_fast_to_str_static(&l_hash_tmp);
-                    dap_string_append_printf(a_str_out, "\t\t\t unit: 0x%08x\n"
-                                                        "\t\t\t pkey: %s\n"
-                                                        "\t\t\t max price: %s (%s)\n",
-                                             ((dap_chain_tx_out_cond_t*)item)->subtype.srv_pay.unit.uint32,
-                                             l_hash_str,
-                                             l_coins_str,
-                                             l_value_str);
-                } break;
-                case DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_STAKE_POS_DELEGATE: {
-                    dap_chain_node_addr_t *l_signer_node_addr = &((dap_chain_tx_out_cond_t*)item)->subtype.srv_stake_pos_delegate.signer_node_addr;
-                    dap_chain_addr_t *l_signing_addr = &((dap_chain_tx_out_cond_t*)item)->subtype.srv_stake_pos_delegate.signing_addr;
-                    l_hash_tmp = l_signing_addr->data.hash_fast;
-                    l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                            ? dap_enc_base58_encode_hash_to_str_static(&l_hash_tmp)
-                            : dap_chain_hash_fast_to_str_static(&l_hash_tmp);
-                    dap_string_append_printf(a_str_out, "\t\t\t signing_addr: %s\n"
-                                                        "\t\t\t with pkey hash %s\n"
-                                                        "\t\t\t signer_node_addr: "NODE_ADDR_FP_STR"\n",
-                                                        dap_chain_addr_to_str_static(l_signing_addr),
-                                                        l_hash_str,
-                                                        NODE_ADDR_FP_ARGS(l_signer_node_addr));
-                } break;
-                case DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_XCHANGE: {
-                    const char *l_rate_str, *l_tmp_str =
-                        dap_uint256_to_char( (((dap_chain_tx_out_cond_t*)item)->subtype.srv_xchange.rate), &l_rate_str );
-                    dap_string_append_printf(a_str_out, "\t\t\t net id: 0x%016"DAP_UINT64_FORMAT_x"\n"
-                                                        "\t\t\t buy_token: %s\n"
-                                                        "\t\t\t rate: %s\n",
-                                             ((dap_chain_tx_out_cond_t*)item)->subtype.srv_xchange.buy_net_id.uint64,
-                                             ((dap_chain_tx_out_cond_t*)item)->subtype.srv_xchange.buy_token,
-                                             l_rate_str);
-                } break;
-                case DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_STAKE_LOCK: {
-                    dap_time_t l_ts_unlock = ((dap_chain_tx_out_cond_t*)item)->subtype.srv_stake_lock.time_unlock;
-                    dap_time_to_str_rfc822(l_tmp_buf, DAP_TIME_STR_SIZE, l_ts_unlock);
-                    dap_string_append_printf(a_str_out, "\t\t\t time_unlock %s\n", l_tmp_buf);
-                } break;
-                default: break;
-            }
-        } break;
-        case TX_ITEM_TYPE_OUT_EXT: {
-            const char *l_coins_str, *l_value_str = dap_uint256_to_char( ((dap_chain_tx_out_ext_t*)item)->header.value, &l_coins_str);
-            dap_string_append_printf(a_str_out, "\t OUT EXT:\n"
-                                                "\t\t Addr: %s\n"
-                                                "\t\t Token: %s\n"
-                                                "\t\t Value: %s (%s)\n",
-                                     dap_chain_addr_to_str_static(&((dap_chain_tx_out_ext_t*)item)->addr),
-                                     ((dap_chain_tx_out_ext_t*)item)->token,
-                                     l_coins_str,
-                                     l_value_str);
-        } break;
-        case TX_ITEM_TYPE_VOTING:{
-            size_t l_tsd_size = 0;
-            dap_chain_tx_tsd_t *l_item = (dap_chain_tx_tsd_t *)dap_chain_datum_tx_item_get(a_datum, NULL, (byte_t*)item + l_size, TX_ITEM_TYPE_TSD, &l_tsd_size);
-            if (!l_item || !l_tsd_size)
-                    break;
-            dap_chain_datum_tx_voting_params_t *l_voting_params = dap_chain_voting_parse_tsd(a_datum);
-            dap_string_append_printf(a_str_out, "\t VOTING:\n\tVoting question: %s\n\t Answer options:\n", l_voting_params->voting_question);
-            dap_list_t *l_temp = l_voting_params->answers_list;
-            uint8_t l_index = 0;
-            while (l_temp){
-                    dap_string_append_printf(a_str_out, "\t\t %i) %s\n", l_index, (char*)l_temp->data);
-                    l_index++;
-                    l_temp = l_temp->next;
-            }
-
-            if (l_voting_params->voting_expire) {
-                dap_time_to_str_rfc822(l_tmp_buf, DAP_TIME_STR_SIZE, l_voting_params->voting_expire);
-                dap_string_append_printf(a_str_out, "\t Voting expire: %s\n", l_tmp_buf);
-            }
-            if (l_voting_params->votes_max_count)
-                    dap_string_append_printf(a_str_out, "\t Votes max count: %"DAP_UINT64_FORMAT_U"\n", l_voting_params->votes_max_count);
-            dap_string_append_printf(a_str_out, "\t Changing vote is %s available.\n", l_voting_params->vote_changing_allowed ? "" : "not");
-            dap_string_append_printf(a_str_out, "\t A delegated key is%s required to participate in voting. \n",
-                                     l_voting_params->delegate_key_required ? "" : " not");
-
-            dap_list_free_full(l_voting_params->answers_list, NULL);
-            DAP_DELETE(l_voting_params->voting_question);
-            DAP_DELETE(l_voting_params);
-        } break;
-        case TX_ITEM_TYPE_VOTE:{
-            dap_chain_tx_vote_t *l_vote_item = (dap_chain_tx_vote_t *)item;
-            const char *l_hash_str = dap_chain_hash_fast_to_str_static(&l_vote_item->voting_hash);
-            dap_string_append_printf(a_str_out, "\t VOTE: \n"
-                                                "\t Voting hash: %s\n"
-                                                "\t Vote answer idx: %"DAP_UINT64_FORMAT_U"\n", l_hash_str, l_vote_item->answer_idx);
-        } break;
-        default:
-            dap_string_append_printf(a_str_out, " This transaction have unknown item type \n");
-            break;
-        }
-    }
-    dap_string_append_printf(a_str_out, "\n");
-    return true;
-}
-
 /**
  * @brief _dap_chain_datum_tx_out_data
  *
@@ -583,27 +284,6 @@ bool dap_chain_datum_dump_tx_json(dap_chain_datum_tx_t *a_datum,
             sprintf(l_tmp_buff,"0x%016"DAP_UINT64_FORMAT_x"",((dap_chain_tx_in_ems_t*)item)->header.token_emission_chain_id.uint64);
             json_object_object_add(json_obj_item,"token_emission_chain_id", json_object_new_string(l_tmp_buff));
         } break;
-            /*
-        case TX_ITEM_TYPE_IN_EMS_EXT: {
-            l_hash_tmp = &((dap_chain_tx_in_ems_ext_t*)item)->header.ext_tx_hash;
-            l_hash_str = dap_strcmp(a_hash_out_type, "hex")
-                    ? dap_enc_base58_encode_hash_to_str(l_hash_tmp)
-                    : dap_chain_hash_fast_to_str_new(l_hash_tmp);
-            dap_string_append_printf(a_str_out, "\t IN_EMS EXT:\n"
-                                         "\t\t Version: %u\n"
-                                         "\t\t Ticker: %s\n"
-                                         "\t\t Ext chain id: 0x%016"DAP_UINT64_FORMAT_x"\n"
-                                         "\t\t Ext net id: 0x%016"DAP_UINT64_FORMAT_x"\n"
-                                         "\t\t Ext tx hash: %s\n"
-                                         "\t\t Ext tx out idx: %u\n",
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.version,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ticker,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ext_chain_id.uint64,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ext_net_id.uint64,
-                                     l_hash_str,
-                                     ((dap_chain_tx_in_ems_ext_t*)item)->header.ext_tx_out_idx);
-            DAP_DELETE(l_hash_str);
-        } break; */
 
         case TX_ITEM_TYPE_IN_REWARD: {
             l_hash_tmp = ((dap_chain_tx_in_reward_t *)item)->block_hash;
@@ -678,7 +358,7 @@ bool dap_chain_datum_dump_tx_json(dap_chain_datum_tx_t *a_datum,
             l_hash_str = dap_strcmp(a_hash_out_type, "hex")
                     ? dap_enc_base58_encode_hash_to_str_static(&l_hash_tmp)
                     : dap_chain_hash_fast_to_str_static(&l_hash_tmp);
-            json_object_object_add(json_obj_item,"Receipt_idx", json_object_new_uint64(((dap_chain_tx_in_cond_t*)item)->header.receipt_idx));
+            json_object_object_add(json_obj_item,"Receipt_idx", json_object_new_int(((dap_chain_tx_in_cond_t*)item)->header.receipt_idx));
             json_object_object_add(json_obj_item,"Tx_prev_hash", json_object_new_string(l_hash_str));
             json_object_object_add(json_obj_item,"Tx_out_prev_idx", json_object_new_uint64(((dap_chain_tx_in_cond_t*)item)->header.tx_out_prev_idx));
             break;
diff --git a/modules/common/dap_chain_datum_decree.c b/modules/common/dap_chain_datum_decree.c
index 467d98c872e104cdd1e7229307f1a27e1b09600f..7a33f3351b2d08c9d6b5c9a67a1a00c5e9c1f76e 100644
--- a/modules/common/dap_chain_datum_decree.c
+++ b/modules/common/dap_chain_datum_decree.c
@@ -255,6 +255,7 @@ void dap_chain_datum_decree_dump_json(json_object *a_json_out, dap_chain_datum_d
                     ? dap_enc_base58_encode_hash_to_str_static(&l_pkey_signing)
                     : dap_chain_hash_fast_to_str_static(&l_pkey_signing);
             json_object_object_add(a_json_out, "Signing pkey fingerprint", json_object_new_string(l_pkey_signing_str));
+            break;
         case DAP_CHAIN_DATUM_DECREE_TSD_TYPE_NODE_ADDR:
             if(l_tsd->size > sizeof(dap_chain_node_addr_t)){
                 json_object_object_add(a_json_out, "Node addr", json_object_new_string("WRONG SIZE"));
diff --git a/modules/common/dap_chain_datum_tx_items.c b/modules/common/dap_chain_datum_tx_items.c
index 6bcc83c9e4325fe0750c24cbed8c92c97c725687..757c27c11f7893460efa74d3bb8fa397818f8942 100644
--- a/modules/common/dap_chain_datum_tx_items.c
+++ b/modules/common/dap_chain_datum_tx_items.c
@@ -536,6 +536,8 @@ uint8_t *dap_chain_datum_tx_item_get_nth(dap_chain_datum_tx_t *a_tx, dap_chain_t
  */
 dap_chain_tx_out_cond_t *dap_chain_datum_tx_out_cond_get(dap_chain_datum_tx_t *a_tx, dap_chain_tx_out_cond_subtype_t a_cond_subtype, int *a_out_num)
 {
+    if (!a_tx)
+        return NULL;
     int l_idx = a_out_num && *a_out_num > 0 ? -*a_out_num : 0;
     byte_t *l_item; size_t l_tx_item_size;
     TX_ITEM_ITER_TX(l_item, l_tx_item_size, a_tx) {
diff --git a/modules/common/include/dap_chain_datum.h b/modules/common/include/dap_chain_datum.h
index 8227287524f67ead3b3f73a2286552bc7da333c8..a384070e6576e76bbe71b254db267907b667bd75 100644
--- a/modules/common/include/dap_chain_datum.h
+++ b/modules/common/include/dap_chain_datum.h
@@ -159,13 +159,6 @@ DAP_STATIC_INLINE const char *dap_chain_datum_type_id_to_str(uint16_t a_type_id)
 }
 
 void dap_datum_token_dump_tsd_to_json(json_object * json_obj_out, dap_chain_datum_token_t *a_token, size_t a_token_size, const char *a_hash_out_type);
-void dap_chain_datum_dump(dap_string_t *a_str_out, dap_chain_datum_t *a_datum, const char *a_hash_out_type, dap_chain_net_id_t a_net_id);
-bool dap_chain_datum_dump_tx(dap_chain_datum_tx_t *a_datum,
-                             const char *a_ticker,
-                             dap_string_t *a_str_out,
-                             const char *a_hash_out_type,
-                             dap_hash_fast_t *a_tx_hash,
-                             dap_chain_net_id_t a_net_id);
 bool dap_chain_datum_dump_tx_json(dap_chain_datum_tx_t *a_datum,
                              const char *a_ticker,
                              json_object* json_obj_out,
diff --git a/modules/common/include/dap_chain_datum_token.h b/modules/common/include/dap_chain_datum_token.h
index 53c5ec4b30ceb0c0003cc12ba1baa598acec9364..8cbd69b20fa7d35b9a9eecc6eeabbed1c85d517a 100644
--- a/modules/common/include/dap_chain_datum_token.h
+++ b/modules/common/include/dap_chain_datum_token.h
@@ -33,6 +33,7 @@
 #include "json_object.h"
 
 
+#define DAP_CHAIN_DATUM_NONCE_SIZE                                          64
 // Token declaration
 typedef struct dap_chain_datum_token_old {
     uint16_t type;
@@ -124,8 +125,9 @@ typedef struct dap_chain_datum_token {
             uint256_t premine_supply;
             dap_chain_addr_t premine_address;
         } DAP_ALIGN_PACKED header_public;
-        byte_t header[256]; // For future changes
+        byte_t header[192]; // For future changes
     };
+    uint8_t nonce[DAP_CHAIN_DATUM_NONCE_SIZE];
     byte_t tsd_n_signs[]; // Signs and/or types-size-data sections
 } DAP_ALIGN_PACKED dap_chain_datum_token_t;
 
@@ -293,7 +295,6 @@ uint32_t dap_chain_datum_token_flag_from_str(const char *a_str);
 #define DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_REMOVE             0x0024
 #define DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_CLEAR              0x0025
 
-#define DAP_CHAIN_DATUM_NONCE_SIZE                                          64
 
 // Get delegated ticker
 DAP_STATIC_INLINE int dap_chain_datum_token_get_delegated_ticker(char *a_buf, const char *a_ticker)
diff --git a/modules/consensus/dag-poa/dap_chain_cs_dag_poa.c b/modules/consensus/dag-poa/dap_chain_cs_dag_poa.c
index c8523c0bd1a2e785214f3b5b69175514d6b28504..168f43282ce528e1927bb6039faf7d490c99367d 100644
--- a/modules/consensus/dag-poa/dap_chain_cs_dag_poa.c
+++ b/modules/consensus/dag-poa/dap_chain_cs_dag_poa.c
@@ -85,10 +85,10 @@ static dap_chain_cs_dag_event_t * s_callback_event_create(dap_chain_cs_dag_t * a
                                                           dap_chain_hash_fast_t * a_hashes, size_t a_hashes_count, size_t* a_event_size);
 static bool s_callback_round_event_to_chain(dap_chain_cs_dag_poa_round_item_t *a_arg);
 static int s_callback_event_round_sync(dap_chain_cs_dag_t * a_dag, const char a_op_code, const char *a_group,
-                                        const char *a_key, const void *a_value, const size_t a_value_size);
+                                       const char *a_key, const void *a_value, const size_t a_value_size, bool a_by_us);
 static bool s_round_event_ready_minimum_check(dap_chain_cs_dag_t *a_dag, dap_chain_cs_dag_event_t *a_event,
                                               size_t a_event_size, char *a_event_hash_hex_str);
-static void s_round_event_cs_done(dap_chain_cs_dag_poa_round_item_t *a_event_item);
+static void s_round_event_cs_done(dap_chain_cs_dag_poa_round_item_t *a_event_item, uint32_t a_timeout_s);
 
 // CLI commands
 static int s_cli_dag_poa(int argc, char ** argv, void **a_str_reply);
@@ -291,7 +291,7 @@ static int s_cli_dag_poa(int argc, char ** argv, void **a_str_reply)
                                 .datum_hash = l_round_item->round_info.datum_hash,
                                 .dag = l_dag
                             };
-                            s_round_event_cs_done(&l_event_item);
+                            s_round_event_cs_done(&l_event_item, l_poa_pvt->confirmations_timeout);
                         }
                     } else {
                         if(!dap_strcmp(l_hash_out_type, "hex")) {
@@ -604,8 +604,7 @@ static bool s_callback_round_event_to_chain_callback_get_round_item(dap_global_d
             }
         }
     } else /* !l_chosen_item */
-        log_it(L_WARNING, "No valid candidates to wrap datum %s in current round #%"DAP_UINT64_FORMAT_U"",
-                          l_datum_hash_str, l_dag->round_id);
+        log_it(L_WARNING, "No valid candidates to wrap datum %s in current round", l_datum_hash_str);
     return DAP_DELETE(l_arg), true;
 }
 
@@ -620,7 +619,7 @@ static bool s_callback_round_event_to_chain(dap_chain_cs_dag_poa_round_item_t *a
         false;
 }
 
-static void s_round_event_cs_done(dap_chain_cs_dag_poa_round_item_t *a_event_item)
+static void s_round_event_cs_done(dap_chain_cs_dag_poa_round_item_t *a_event_item, uint32_t a_timeout_s)
 {
     dap_chain_cs_dag_poa_pvt_t *l_poa_pvt = PVT( DAP_CHAIN_CS_DAG_POA(a_event_item->dag) );
     dap_chain_cs_dag_poa_round_item_t *l_event_item = NULL;
@@ -628,11 +627,11 @@ static void s_round_event_cs_done(dap_chain_cs_dag_poa_round_item_t *a_event_ite
     HASH_FIND(hh, l_poa_pvt->event_items, &a_event_item->datum_hash, sizeof(dap_hash_fast_t), l_event_item);
     if (!l_event_item) {
         l_event_item = DAP_DUP(a_event_item);
-        if ( !dap_timerfd_start(l_poa_pvt->confirmations_timeout * 1000, (dap_timerfd_callback_t)s_callback_round_event_to_chain, l_event_item) )
+        if ( !dap_timerfd_start(a_timeout_s * 1000, (dap_timerfd_callback_t)s_callback_round_event_to_chain, l_event_item) )
             return DAP_DELETE(l_event_item), pthread_rwlock_unlock(&l_poa_pvt->rounds_rwlock), log_it(L_CRITICAL, "Timer creation failed");
         HASH_ADD(hh, l_poa_pvt->event_items, datum_hash, sizeof(dap_hash_fast_t), l_event_item);
         log_it(L_INFO, "Confirmation timer for datum %s started [%d s]",
-                       dap_chain_hash_fast_to_str_static(&l_event_item->datum_hash), l_poa_pvt->confirmations_timeout);
+                       dap_chain_hash_fast_to_str_static(&l_event_item->datum_hash), a_timeout_s);
     }
     pthread_rwlock_unlock(&l_poa_pvt->rounds_rwlock);
 }
@@ -643,7 +642,7 @@ static bool s_callback_sync_all_on_start(dap_global_db_instance_t *a_dbi, int a_
 {
     for (size_t i = 0; i < a_values_count; i++)
         s_callback_event_round_sync((dap_chain_cs_dag_t *)a_arg, DAP_GLOBAL_DB_OPTYPE_ADD, a_group,
-                                    a_values[i].key, a_values[i].value, a_values[i].value_len);
+                                    a_values[i].key, a_values[i].value, a_values[i].value_len, true);
     return false;
 }
 
@@ -659,7 +658,8 @@ static void s_round_changes_notify(dap_store_obj_t *a_obj, void *a_arg)
         return;
     switch ( l_type ) {
     case DAP_GLOBAL_DB_OPTYPE_ADD:
-        s_callback_event_round_sync(l_dag, l_type, a_obj->group, a_obj->key, a_obj->value, a_obj->value_len);
+        s_callback_event_round_sync(l_dag, l_type, a_obj->group, a_obj->key, a_obj->value, a_obj->value_len,
+                                    dap_stream_node_addr_from_sign(a_obj->sign).uint64 == g_node_addr.uint64);
     default:
         break;
     }
@@ -699,7 +699,6 @@ static int s_callback_created(dap_chain_t * a_chain, dap_config_t *a_chain_net_c
     dap_global_db_cluster_add_notify_callback(l_dag_cluster, s_round_changes_notify, l_dag);
     dap_chain_net_add_auth_nodes_to_cluster(l_net, l_dag_cluster);
     dap_link_manager_add_net_associate(l_net->pub.id.uint64, l_dag_cluster->links_cluster);
-    l_dag->round_id = 0;
     PVT(l_poa)->mempool_timer = dap_interval_timer_create(15000, s_timer_process_callback, a_chain);
 
     switch ( dap_chain_net_get_role(l_net).enums ) {
@@ -762,11 +761,11 @@ static dap_chain_cs_dag_event_t * s_callback_event_create(dap_chain_cs_dag_t * a
         log_it(L_ERROR, "Can't sign event with events_sign_cert in [dag-poa] section");
     else if ( s_seed_mode || (a_hashes && a_hashes_count) ) {
         if ( !PVT(l_poa)->callback_pre_sign || !PVT(l_poa)->callback_pre_sign->callback) {
-            return dap_chain_cs_dag_event_new(a_dag->chain->id, a_dag->chain->cells->id, a_dag->round_id,
-                                                                            a_datum, PVT(l_poa)->events_sign_cert->enc_key,
-                                                                            a_hashes, a_hashes_count, a_event_size);
+            return dap_chain_cs_dag_event_new(a_dag->chain->id, a_dag->chain->cells->id, a_datum,
+                                              PVT(l_poa)->events_sign_cert->enc_key,
+                                              a_hashes, a_hashes_count, a_event_size);
         } else {
-            dap_chain_cs_dag_event_t *l_event = dap_chain_cs_dag_event_new(a_dag->chain->id, a_dag->chain->cells->id, a_dag->round_id,
+            dap_chain_cs_dag_event_t *l_event = dap_chain_cs_dag_event_new(a_dag->chain->id, a_dag->chain->cells->id,
                                                                            a_datum, NULL, a_hashes, a_hashes_count, a_event_size);
             if ( PVT(l_poa)->callback_pre_sign->callback(a_dag->chain, l_event, *a_event_size, PVT(l_poa)->callback_pre_sign->arg) )
                 return DAP_DELETE(l_event), NULL;
@@ -778,7 +777,7 @@ static dap_chain_cs_dag_event_t * s_callback_event_create(dap_chain_cs_dag_t * a
 }
 
 static int s_callback_event_round_sync(dap_chain_cs_dag_t * a_dag, const char a_op_code, const char *a_group,
-                                        const char *a_key, const void *a_value, const size_t a_value_size)
+                                       const char *a_key, const void *a_value, const size_t a_value_size, bool a_by_us)
 {
     dap_return_val_if_pass(a_op_code != DAP_GLOBAL_DB_OPTYPE_ADD || !a_key || !a_value
                            || !a_value_size || !strcmp(DAG_ROUND_CURRENT_KEY, a_key), 0);
@@ -792,39 +791,35 @@ static int s_callback_event_round_sync(dap_chain_cs_dag_t * a_dag, const char a_
     if (!l_poa_pvt->auto_confirmation)
         return 0;
 
-    dap_chain_cs_dag_event_round_item_t *l_round_item = (dap_chain_cs_dag_event_round_item_t *)a_value;
+    dap_chain_cs_dag_event_round_item_t *l_round_item = (dap_chain_cs_dag_event_round_item_t*)a_value;
+    dap_chain_cs_dag_event_t *l_event = (dap_chain_cs_dag_event_t*)l_round_item->event_n_signs;
     size_t l_event_size = l_round_item->event_size;
-    dap_chain_cs_dag_event_t *l_event = (dap_chain_cs_dag_event_t*)DAP_DUP_SIZE(l_round_item->event_n_signs, l_event_size);
-    if (!l_event)
-        return log_it(L_CRITICAL, "Memory allocation failed"), -1;
-
-    if ( dap_chain_cs_dag_event_sign_exists(l_event, l_event_size, l_poa_pvt->events_sign_cert->enc_key)
-        || dap_chain_cs_dag_event_round_sign_exists(l_round_item, l_poa_pvt->events_sign_cert->enc_key)
-        && l_poa_pvt->auto_round_complete
-        && s_round_event_ready_minimum_check(a_dag, l_event, l_event_size, (char*)a_key) )
-    {
-        dap_chain_cs_dag_poa_round_item_t l_event_item = { .datum_hash = l_round_item->round_info.datum_hash, .dag = a_dag };
-        return DAP_DELETE(l_event), s_round_event_cs_done(&l_event_item), 0;
-    }
-
-    size_t l_event_size_new = 0;
-    int ret = 0;
-    if ( !l_poa_pvt->callback_pre_sign || !l_poa_pvt->callback_pre_sign->callback
-        || !(ret = l_poa_pvt->callback_pre_sign->callback(a_dag->chain, l_event, l_event_size,
-                                                          l_poa_pvt->callback_pre_sign->arg)) )
-    {
-        l_event_size_new = dap_chain_cs_dag_event_sign_add(&l_event, l_event_size, l_poa_pvt->events_sign_cert->enc_key);
-        dap_chain_cs_dag_event_gdb_set(a_dag, (char*)a_key, l_event, l_event_size_new, l_round_item);
-    } else { // set sign for reject
-        l_round_item = DAP_DUP_SIZE(a_value, a_value_size);
-        if (dap_chain_cs_dag_event_round_sign_add(&l_round_item, a_value_size, l_poa_pvt->events_sign_cert->enc_key)) {
-            log_it(L_NOTICE,"Can't sign event %s, because sign rejected by pre_sign callback, ret code %d", a_key, ret);
-            l_round_item->round_info.reject_count++;
-            dap_chain_cs_dag_event_gdb_set(a_dag, (char*)a_key, l_event, l_event_size, l_round_item);
+    int l_ret = 0;
+    if ( dap_chain_cs_dag_event_sign_exists(l_event, l_event_size, l_poa_pvt->events_sign_cert->enc_key) ) {
+        if (l_poa_pvt->auto_round_complete && s_round_event_ready_minimum_check(a_dag, l_event, l_event_size, (char*)a_key) ) {
+            dap_chain_cs_dag_poa_round_item_t l_event_item = { .datum_hash = l_round_item->round_info.datum_hash, .dag = a_dag };
+            return s_round_event_cs_done(&l_event_item, a_by_us ? l_poa_pvt->confirmations_timeout : 2*l_poa_pvt->confirmations_timeout), l_ret;
+        }
+    } else {
+        if ( !l_poa_pvt->callback_pre_sign 
+            || !l_poa_pvt->callback_pre_sign->callback
+            || !(l_ret = l_poa_pvt->callback_pre_sign->callback(a_dag->chain, l_event, l_event_size, l_poa_pvt->callback_pre_sign->arg)) 
+        ) {
+            l_event = DAP_DUP_SIZE(l_round_item->event_n_signs, l_event_size);
+            if (( l_event_size = dap_chain_cs_dag_event_sign_add(&l_event, l_event_size, l_poa_pvt->events_sign_cert->enc_key) ))
+                dap_chain_cs_dag_event_gdb_set(a_dag, (char*)a_key, l_event, l_event_size, l_round_item);
+            DAP_DELETE(l_event);
+        } else {
+            l_round_item = DAP_DUP_SIZE(a_value, a_value_size);
+            if ( dap_chain_cs_dag_event_round_sign_add(&l_round_item, a_value_size, l_poa_pvt->events_sign_cert->enc_key) ) {
+                log_it(L_NOTICE,"Can't sign event %s, because sign rejected by pre_sign callback, ret code %d", a_key, l_ret);
+                ++l_round_item->round_info.reject_count;
+                dap_chain_cs_dag_event_gdb_set(a_dag, (char*)a_key, l_event, l_event_size, l_round_item);
+            }
+            DAP_DELETE(l_round_item);
         }
-        DAP_DELETE(l_round_item);
     }
-    return DAP_DELETE(l_event), ret;
+    return l_ret;
 }
 
 /**
diff --git a/modules/net/dap_chain_ledger.c b/modules/net/dap_chain_ledger.c
index f20e687aafcc675b94b2f1408712c1c887d8649e..9b7db963e587e3932d118cbdc5350ddcf8219c16 100644
--- a/modules/net/dap_chain_ledger.c
+++ b/modules/net/dap_chain_ledger.c
@@ -130,6 +130,7 @@ typedef struct dap_ledger_token_item {
     time_t last_update_token_time;
 
     // for auth operations
+
     dap_pkey_t ** auth_pkeys;
     dap_chain_hash_fast_t *auth_pkey_hashes;
     size_t auth_signs_total;
@@ -2145,7 +2146,39 @@ json_object *s_token_item_to_json(dap_ledger_token_item_t *a_token_item)
         json_object_object_add(l_json_obj_out, "bytes", json_object_new_int(a_token_item->auth_pkeys[i]->header.size));
         json_object_array_add(l_json_arr_pkeys, l_json_obj_out);
     }
+    json_object *l_json_arr_tx_recv_allow = json_object_new_array();
+    for (size_t i = 0; i < a_token_item->tx_recv_allow_size; i++) {
+        dap_chain_addr_t l_addr = a_token_item->tx_recv_allow[i];
+        const char *l_addr_str = dap_chain_addr_to_str_static(&l_addr);
+        json_object_array_add(l_json_arr_tx_recv_allow, json_object_new_string(l_addr_str));
+    }
+    json_object *l_json_arr_tx_recv_block = json_object_new_array();
+    for (size_t i = 0; i < a_token_item->tx_recv_block_size; i++) {
+        dap_chain_addr_t l_addr = a_token_item->tx_recv_block[i];
+        const char *l_addr_str = dap_chain_addr_to_str_static(&l_addr);
+        json_object_array_add(l_json_arr_tx_recv_block, json_object_new_string(l_addr_str));
+    }
+    json_object *l_json_arr_tx_send_allow = json_object_new_array();
+    for (size_t i = 0; i < a_token_item->tx_send_allow_size; i++) {
+        dap_chain_addr_t l_addr = a_token_item->tx_send_allow[i];
+        const char *l_addr_str = dap_chain_addr_to_str_static(&l_addr);
+        json_object_array_add(l_json_arr_tx_send_allow, json_object_new_string(l_addr_str));
+    }
+    json_object *l_json_arr_tx_send_block = json_object_new_array();
+    for (size_t i = 0; i < a_token_item->tx_send_block_size; i++) {
+        dap_chain_addr_t l_addr = a_token_item->tx_send_block[i];
+        const char *l_addr_str = dap_chain_addr_to_str_static(&l_addr);
+        json_object_array_add(l_json_arr_tx_send_block, json_object_new_string(l_addr_str));
+    }
     json_object_object_add(json_obj_datum, "Signatures public keys", l_json_arr_pkeys);
+    a_token_item->tx_recv_allow_size ? json_object_object_add(json_obj_datum, "tx_recv_allow", l_json_arr_tx_recv_allow) :
+        json_object_put(l_json_arr_tx_recv_allow);
+    a_token_item->tx_recv_block_size ? json_object_object_add(json_obj_datum, "tx_recv_block", l_json_arr_tx_recv_block) :
+        json_object_put(l_json_arr_tx_recv_block);
+    a_token_item->tx_send_allow_size ? json_object_object_add(json_obj_datum, "tx_send_allow", l_json_arr_tx_send_allow) :
+        json_object_put(l_json_arr_tx_send_allow);
+    a_token_item->tx_send_block_size ? json_object_object_add(json_obj_datum, "tx_send_block", l_json_arr_tx_send_block) :
+        json_object_put(l_json_arr_tx_send_block);
     json_object_object_add(json_obj_datum, "Total emissions", json_object_new_int(HASH_COUNT(a_token_item->token_emissions)));
     return json_obj_datum;
 }
@@ -2240,7 +2273,7 @@ static void s_threshold_txs_proc( dap_ledger_t *a_ledger)
         l_success = false;
         dap_ledger_tx_item_t *l_tx_item, *l_tx_tmp;
         HASH_ITER(hh, l_ledger_pvt->threshold_txs, l_tx_item, l_tx_tmp) {
-            int l_res = dap_ledger_tx_add(a_ledger, l_tx_item->tx, &l_tx_item->tx_hash_fast, true);
+            int l_res = dap_ledger_tx_add(a_ledger, l_tx_item->tx, &l_tx_item->tx_hash_fast, true, NULL);
             if (l_res != DAP_CHAIN_CS_VERIFY_CODE_TX_NO_EMISSION &&
                     l_res != DAP_CHAIN_CS_VERIFY_CODE_TX_NO_PREVIOUS) {
                 HASH_DEL(l_ledger_pvt->threshold_txs, l_tx_item);
@@ -2697,7 +2730,8 @@ int s_emission_add_check(dap_ledger_t *a_ledger, byte_t *a_token_emission, size_
     pthread_rwlock_unlock(&l_token_item->token_emissions_rwlock);
     if (l_token_emission_item) {
         debug_if(s_debug_more, L_WARNING, "Can't add token emission datum of %s %s ( %s ): already present in cache",
-                                    dap_uint256_to_char(l_emission->hdr.value, NULL), l_emission->hdr.ticker, dap_chain_hash_fast_to_str_static(a_emission_hash));
+                                    dap_uint256_to_char(l_emission->hdr.value, NULL), l_emission->hdr.ticker,
+                                    dap_chain_hash_fast_to_str_static(a_emission_hash));
         DAP_DELETE(l_emission);
         return DAP_LEDGER_CHECK_ALREADY_CACHED;
     }
@@ -4182,7 +4216,7 @@ static int s_tx_cache_check(dap_ledger_t *a_ledger,
     }
 
     if (a_main_ticker && !l_err_num)
-        dap_strncpy(a_main_ticker, l_main_ticker, DAP_CHAIN_TICKER_SIZE_MAX);
+        dap_strncpy(a_main_ticker, l_main_ticker, DAP_CHAIN_TICKER_SIZE_MAX);     
 
     HASH_ITER(hh, l_values_from_prev_tx, l_value_cur, l_tmp) {
         HASH_DEL(l_values_from_prev_tx, l_value_cur);
@@ -4276,7 +4310,7 @@ static int s_sort_ledger_tx_item(dap_ledger_tx_item_t *a, dap_ledger_tx_item_t *
  * @param a_from_threshold
  * @return return 1 OK, -1 error
  */
-int dap_ledger_tx_add(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_hash_fast_t *a_tx_hash, bool a_from_threshold)
+int dap_ledger_tx_add(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_hash_fast_t *a_tx_hash, bool a_from_threshold, dap_ledger_datum_iter_data_t *a_datum_index_data)
 {
     if(!a_tx) {
         debug_if(s_debug_more, L_ERROR, "NULL tx detected");
@@ -4299,7 +4333,7 @@ int dap_ledger_tx_add(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_ha
 
     if( (l_ret_check = s_tx_cache_check(a_ledger, a_tx, a_tx_hash, a_from_threshold,
                                                        &l_list_bound_items, &l_list_tx_out,
-                                                       l_main_token_ticker, &l_tag, &l_action, false))) {
+                                                       l_main_token_ticker, &l_tag, &l_action, false))) {                                                        
         if ((l_ret_check == DAP_CHAIN_CS_VERIFY_CODE_TX_NO_PREVIOUS ||
                 l_ret_check == DAP_CHAIN_CS_VERIFY_CODE_TX_NO_EMISSION) &&
                 l_ledger_pvt->threshold_enabled && !dap_chain_net_get_load_mode(a_ledger->net)) {
@@ -4312,7 +4346,7 @@ int dap_ledger_tx_add(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_ha
                 if (!l_item_tmp) {
                     if (l_threshold_txs_count >= s_threshold_txs_max) {
                         if(s_debug_more)
-                            log_it(L_WARNING, "Threshold for tranactions is overfulled (%zu max), dropping down tx %s, added nothing",
+                            log_it(L_WARNING, "Threshold for transactions is overfulled (%zu max), dropping down tx %s, added nothing",
                                        s_threshold_txs_max, l_tx_hash_str);
                     } else {
                         l_item_tmp = DAP_NEW_Z(dap_ledger_tx_item_t);
@@ -4347,7 +4381,11 @@ int dap_ledger_tx_add(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_ha
         return l_ret_check;
     }
     debug_if(s_debug_more, L_DEBUG, "dap_ledger_tx_add() check passed for tx %s", l_tx_hash_str);
-
+    if ( a_datum_index_data != NULL){
+        dap_strncpy(a_datum_index_data->token_ticker, l_main_token_ticker, DAP_CHAIN_TICKER_SIZE_MAX);
+        a_datum_index_data->action = l_action;
+        a_datum_index_data->uid = l_tag;
+    }
     // Mark 'out' items in cache if they were used & delete previous transactions from cache if it need
     // find all bound pairs 'in' and 'out'
     size_t l_outs_used = dap_list_length(l_list_bound_items);
@@ -4951,7 +4989,7 @@ FIN:
     return l_ret;
 }
 
-int dap_ledger_tx_load(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_chain_hash_fast_t *a_tx_hash)
+int dap_ledger_tx_load(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_chain_hash_fast_t *a_tx_hash, dap_ledger_datum_iter_data_t *a_datum_index_data)
 {
 #ifndef DAP_LEDGER_TEST
     if (dap_chain_net_get_load_mode(a_ledger->net)) {
@@ -4967,7 +5005,7 @@ int dap_ledger_tx_load(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_c
             return DAP_LEDGER_CHECK_ALREADY_CACHED;
     }
 #endif
-    return dap_ledger_tx_add(a_ledger, a_tx, a_tx_hash, false);
+    return dap_ledger_tx_add(a_ledger, a_tx, a_tx_hash, false, a_datum_index_data);
 }
 
 /**
diff --git a/modules/net/dap_chain_net.c b/modules/net/dap_chain_net.c
index d411a57f2a05536e9228982b9f282931849fd390..d42f9997a549033e045f6a64bdd54c96a3de5b72 100644
--- a/modules/net/dap_chain_net.c
+++ b/modules/net/dap_chain_net.c
@@ -184,17 +184,10 @@ typedef struct dap_chain_net_pvt{
     anchor_table_t *anchors;
 } dap_chain_net_pvt_t;
 
-typedef struct dap_chain_net_item{
-    char name[DAP_CHAIN_NET_NAME_MAX + 1];
-    dap_chain_net_id_t net_id;
-    dap_chain_net_t *chain_net;
-    UT_hash_handle hh, hh2;
-} dap_chain_net_item_t;
-
 #define PVT(a) ((dap_chain_net_pvt_t *)a->pvt)
 #define PVT_S(a) ((dap_chain_net_pvt_t *)a.pvt)
 
-static dap_chain_net_item_t *s_net_items = NULL, *s_net_ids = NULL;
+static dap_chain_net_t *s_nets_by_name = NULL, *s_nets_by_id = NULL;
 static pthread_mutex_t s_net_cond_lock = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t s_net_cond = PTHREAD_COND_INITIALIZER;
 static uint16_t s_net_loading_count = 0;
@@ -341,13 +334,36 @@ char *dap_chain_net_get_gdb_group_acl(dap_chain_net_t *a_net)
     return NULL;
 }
 
+DAP_STATIC_INLINE struct request_link_info *s_net_resolve_host(const char *a_addr) {
+    char l_host[DAP_HOSTADDR_STRLEN + 1] = { '\0' }; uint16_t l_port = 0;
+    struct sockaddr_storage l_saddr;
+    if ( dap_net_parse_config_address(a_addr, l_host, &l_port, NULL, NULL) < 0
+        || dap_net_resolve_host(l_host, dap_itoa(l_port), false, &l_saddr, NULL) < 0 )
+        return NULL;
+    struct request_link_info *l_ret = DAP_NEW_Z(struct request_link_info);
+    l_ret->port = l_port;
+    dap_strncpy(l_ret->addr, l_host, DAP_HOSTADDR_STRLEN);
+    return l_ret;
+}
+
 static struct request_link_info *s_balancer_link_from_cfg(dap_chain_net_t *a_net)
 {
+    uint16_t l_idx;
     switch (PVT(a_net)->seed_nodes_count) {
     case 0: return log_it(L_ERROR, "No available links in net %s! Add them in net config", a_net->pub.name), NULL;
-    case 1: return PVT(a_net)->seed_nodes_info[0];
-    default: return PVT(a_net)->seed_nodes_info[dap_random_uint16() % PVT(a_net)->seed_nodes_count];
+    case 1:
+        l_idx = 0;
+    break;
+    default:
+        l_idx = dap_random_uint16() % PVT(a_net)->seed_nodes_count;
+    break;
+    }
+    if ( !PVT(a_net)->seed_nodes_info[l_idx] ) {
+        // Unresolved before? Let's try again
+        const char **l_seed_nodes_hosts = dap_config_get_array_str(a_net->pub.config, "general", "seed_nodes_hosts", NULL);
+        PVT(a_net)->seed_nodes_info[l_idx] = s_net_resolve_host(l_seed_nodes_hosts[l_idx]);
     }
+    return PVT(a_net)->seed_nodes_info[l_idx];
 }
 
 dap_chain_node_info_t *dap_chain_net_get_my_node_info(dap_chain_net_t *a_net)
@@ -511,15 +527,15 @@ int s_link_manager_fill_net_info(dap_link_t *a_link)
 // sanity check
     dap_return_val_if_pass(!a_link, -1);
 // func work
-    dap_chain_net_item_t *l_net_item = NULL, *l_tmp = NULL;
     dap_chain_node_info_t *l_node_info = NULL;
-    HASH_ITER(hh, s_net_items, l_net_item, l_tmp)
-        if ((l_node_info = dap_chain_node_info_read(l_net_item->chain_net, &a_link->addr)))
+    for (dap_chain_net_t *net = s_nets_by_name; net; net = net->hh.next) {
+        if (( l_node_info = dap_chain_node_info_read(net, &a_link->addr) ))
             break;
+    }
     if (!l_node_info)
         return -3;
     a_link->uplink.ready = true;
-    if (dap_link_manager_link_update(&a_link->addr, l_node_info->ext_host, l_node_info->ext_port))
+    if ( dap_link_manager_link_update(&a_link->addr, l_node_info->ext_host, l_node_info->ext_port) )
         a_link->uplink.ready = true;
     DAP_DELETE(l_node_info);
     return 0;
@@ -622,18 +638,35 @@ dap_chain_node_role_t dap_chain_net_get_role(dap_chain_net_t * a_net)
  * @param a_node_role
  * @return dap_chain_net_t*
  */
-static dap_chain_net_t *s_net_new(dap_chain_net_id_t *a_id, const char *a_name,
-                                  const char *a_native_ticker, const char *a_node_role)
+static dap_chain_net_t *s_net_new(const char *a_net_name, dap_config_t *a_cfg)
 {
-// sanity check
-    dap_return_val_if_pass(!a_id || !a_name || !a_native_ticker || !a_node_role, NULL);
+    dap_return_val_if_fail(a_cfg, NULL);
     dap_chain_net_t *l_ret = NULL;
-// memory alloc
+    const char  *l_net_name_str = dap_config_get_item_str_default(a_cfg, "general", "name", a_net_name),
+                *l_net_id_str   = dap_config_get_item_str(a_cfg, "general", "id"),
+                *a_node_role    = dap_config_get_item_str(a_cfg, "general", "node-role" ),
+                *a_native_ticker= dap_config_get_item_str(a_cfg, "general", "native_ticker");
+    dap_chain_net_id_t l_net_id;
+
+    if(!l_net_name_str || !l_net_id_str || dap_chain_net_id_parse(l_net_id_str, &l_net_id))
+        return log_it(L_ERROR, "Can't create l_net, can't read name or ID config"), NULL;
+
+    dap_chain_net_t *l_net_sought = NULL;
+    HASH_FIND_STR(s_nets_by_name, l_net_name_str, l_net_sought);
+    if (!l_net_sought)
+        HASH_FIND(hh2, s_nets_by_id, &l_net_id, sizeof(l_net_id), l_net_sought);
+    if (l_net_sought) {
+        log_it(L_ERROR, "Can't create net %s ID %"DAP_UINT64_FORMAT_U", an already existent net "
+                        "%s ID %"DAP_UINT64_FORMAT_U" has the same name or ID.\n"\
+                        "Please, fix your configs and restart node",
+                        l_net_name_str, l_net_id.uint64, l_net_sought->pub.name,
+                        l_net_sought->pub.id.uint64);
+        return NULL;
+    }
     DAP_NEW_Z_SIZE_RET_VAL(l_ret, dap_chain_net_t, sizeof(dap_chain_net_t) + sizeof(dap_chain_net_pvt_t), NULL, NULL);
     DAP_NEW_Z_SIZE_RET_VAL(PVT(l_ret)->node_info, dap_chain_node_info_t, sizeof(dap_chain_node_info_t) + DAP_HOSTADDR_STRLEN + 1, NULL, l_ret);
-// func work
-    l_ret->pub.id.uint64 = a_id->uint64;
 
+    l_ret->pub.id = l_net_id;
     if (strcmp (a_node_role, "root_master")==0){
         PVT(l_ret)->node_role.enums = NODE_ROLE_ROOT_MASTER;
     } else if (strcmp( a_node_role,"root") == 0){
@@ -649,15 +682,24 @@ static dap_chain_net_t *s_net_new(dap_chain_net_id_t *a_id, const char *a_name,
     }else if (strcmp( a_node_role,"light") == 0){
         PVT(l_ret)->node_role.enums = NODE_ROLE_LIGHT;
     }else{
-        log_it(L_ERROR,"Unknown node role \"%s\" for network '%s'", a_node_role, a_name);
+        log_it(L_ERROR,"Unknown node role \"%s\" for network '%s'", a_node_role, l_net_name_str);
         DAP_DELETE(l_ret);
         return NULL;
     }
-
-    if (!(l_ret->pub.name = dap_strdup(a_name)) ||
-        !(l_ret->pub.native_ticker = dap_strdup( a_native_ticker )))
-            DAP_DEL_MULTY(l_ret->pub.name, l_ret->pub.native_ticker, l_ret);
-    log_it (L_NOTICE, "Node role \"%s\" selected for network '%s'", a_node_role, a_name);
+    if (!( l_net_name_str ))
+        return DAP_DELETE(l_ret), log_it(L_ERROR, "Invalid net name, check [general] \"name\" in netconfig"), NULL;
+    dap_strncpy(l_ret->pub.name, l_net_name_str, sizeof(l_ret->pub.name));
+    if (!( l_ret->pub.native_ticker = a_native_ticker ))
+        return DAP_DEL_MULTY(l_ret->pub.name, l_ret),
+               log_it(L_ERROR, "Invalid native ticker, check [general] \"native_ticker\" in %s.cfg",
+                                l_net_name_str),
+                NULL;
+    log_it (L_NOTICE, "Node role \"%s\" selected for network '%s'", a_node_role, l_net_name_str);
+    l_ret->pub.config = a_cfg;
+    l_ret->pub.gdb_groups_prefix
+        = dap_config_get_item_str_default( a_cfg, "general", "gdb_groups_prefix", dap_config_get_item_str(a_cfg, "general", "name") );
+    HASH_ADD_STR(s_nets_by_name, pub.name, l_ret);
+    HASH_ADD(hh2, s_nets_by_id, pub.id, sizeof(dap_chain_net_id_t), l_ret);
     return l_ret;
 }
 
@@ -668,15 +710,14 @@ static dap_chain_net_t *s_net_new(dap_chain_net_id_t *a_id, const char *a_name,
 void dap_chain_net_load_all()
 {
     pthread_mutex_lock(&s_net_cond_lock);
-    s_net_loading_count = HASH_COUNT(s_net_items);
+    s_net_loading_count = HASH_COUNT(s_nets_by_name);
     if (!s_net_loading_count) {
         log_it(L_ERROR, "Can't find any nets");
         pthread_mutex_unlock(&s_net_cond_lock);
         return;
     }
-    dap_chain_net_item_t *l_net_items_current = NULL, *l_net_items_tmp = NULL;
-    HASH_ITER(hh, s_net_items, l_net_items_current, l_net_items_tmp)
-        dap_proc_thread_callback_add(NULL, s_net_load, l_net_items_current->chain_net);
+    for (dap_chain_net_t *net = s_nets_by_name; net; net = net->hh.next)
+        dap_proc_thread_callback_add(NULL, s_net_load, net);
     while (s_net_loading_count)
         pthread_cond_wait(&s_net_cond, &s_net_cond_lock);
     pthread_mutex_unlock(&s_net_cond_lock);
@@ -684,19 +725,16 @@ void dap_chain_net_load_all()
 
 dap_string_t* dap_cli_list_net()
 {
-    dap_chain_net_item_t * l_net_item, *l_net_item_tmp;
     dap_string_t *l_string_ret = dap_string_new("");
     dap_chain_net_t * l_net = NULL;
-    int l_net_i = 0;
-    dap_string_append(l_string_ret,"Available networks and chains:\n");
-    HASH_ITER(hh, s_net_items, l_net_item, l_net_item_tmp){
-        l_net = l_net_item->chain_net;
-        dap_string_append_printf(l_string_ret, "\t%s:\n", l_net_item->name);
-        l_net_i++;
-
-        dap_chain_t * l_chain = l_net->pub.chains;
+    unsigned l_net_i = 0;
+    dap_string_append(l_string_ret, "Available networks and chains:\n");
+    for (dap_chain_net_t *net = s_nets_by_name; net; net = net->hh.next) {
+        dap_string_append_printf(l_string_ret, "\t%s:\n", l_net->pub.name);
+        ++l_net_i;
+        dap_chain_t *l_chain = l_net->pub.chains;
         while (l_chain) {
-            dap_string_append_printf(l_string_ret, "\t\t%s\n", l_chain->name );
+            dap_string_append_printf( l_string_ret, "\t\t%s\n", l_chain->name );
             l_chain = l_chain->next;
         }
     }
@@ -963,13 +1001,11 @@ static int s_cli_net(int argc, char **argv, void **reply)
                 json_object_object_add(l_jobj_return, "net", l_jobj_net_name);
                 json_object_object_add(l_jobj_return, "chains", l_jobj_chains);
             }else{
-                dap_chain_net_item_t * l_net_item, *l_net_item_tmp;
                 json_object *l_jobj_networks = json_object_new_array();
-                HASH_ITER(hh, s_net_items, l_net_item, l_net_item_tmp){
+                for (dap_chain_net_t *l_net = s_nets_by_name; l_net; l_net = l_net->hh.next) {
                     json_object *l_jobj_network = json_object_new_object();
                     json_object *l_jobj_chains = json_object_new_array();
-                    l_net = l_net_item->chain_net;
-                    json_object *l_jobj_network_name = json_object_new_string(l_net_item->name);
+                    json_object *l_jobj_network_name = json_object_new_string(l_net->pub.name);
                     if (!l_jobj_network || !l_jobj_chains || !l_jobj_network_name) {
                         json_object_put(l_jobj_return);
                         json_object_put(l_jobj_network);
@@ -1041,9 +1077,8 @@ static int s_cli_net(int argc, char **argv, void **reply)
 
             json_object *l_jobj_networks = json_object_new_array();
             // show list of nets
-            dap_chain_net_item_t * l_net_item, *l_net_item_tmp;
-            HASH_ITER(hh, s_net_items, l_net_item, l_net_item_tmp){
-                json_object *l_jobj_network_name = json_object_new_string(l_net_item->name);
+            for (dap_chain_net_t *l_net = s_nets_by_name; l_net; l_net = l_net->hh.next) {
+                json_object *l_jobj_network_name = json_object_new_string(l_net->pub.name);
                 json_object_array_add(l_jobj_networks, l_jobj_network_name);
             }
             json_object_object_add(l_jobj_return, "networks", l_jobj_networks);
@@ -1662,11 +1697,11 @@ void dap_chain_net_deinit()
 {
     dap_link_manager_deinit();
     dap_chain_net_balancer_deinit();
-    dap_chain_net_item_t *l_current_item, *l_tmp;
-    HASH_ITER(hh, s_net_ids, l_current_item, l_tmp)
-        HASH_DELETE(hh2, s_net_ids, l_current_item);
-    HASH_ITER(hh, s_net_items, l_current_item, l_tmp) {
-        dap_chain_net_delete(l_current_item->chain_net);
+    dap_chain_net_t *l_net, *l_tmp;
+    HASH_ITER(hh2, s_nets_by_id, l_net, l_tmp) {
+        HASH_DEL(s_nets_by_name, l_net);
+        HASH_DELETE(hh2, s_nets_by_id, l_net);
+        dap_chain_net_delete(l_net);
     }
     dap_http_ban_list_client_deinit();
 }
@@ -1692,15 +1727,8 @@ void dap_chain_net_delete(dap_chain_net_t *a_net)
     dap_global_db_cluster_delete(PVT(a_net)->nodes_states);
     dap_global_db_cluster_delete(PVT(a_net)->common_orders);
 
-    dap_chain_net_item_t *l_net_item = NULL;
-    HASH_FIND(hh, s_net_items, a_net->pub.name, strlen(a_net->pub.name), l_net_item);
-    if (l_net_item) {
-        HASH_DEL(s_net_items, l_net_item);
-        HASH_DELETE(hh2, s_net_ids, l_net_item);
-        DAP_DELETE(l_net_item);
-    }
-    DAP_DEL_Z(PVT(a_net)->authorized_nodes_addrs);
-    DAP_DEL_Z(PVT(a_net)->node_info);
+    DAP_DELETE(PVT(a_net)->authorized_nodes_addrs);
+    DAP_DELETE(PVT(a_net)->node_info);
     if (a_net->pub.ledger) {
         dap_ledger_purge(a_net->pub.ledger, true);
         dap_ledger_handle_free(a_net->pub.ledger);
@@ -1711,22 +1739,15 @@ void dap_chain_net_delete(dap_chain_net_t *a_net)
 #ifdef DAP_LEDGER_TEST
 int dap_chain_net_test_init()
 {
-    dap_chain_net_id_t l_iddn = {0};
-    sscanf("0xFA0", "0x%16"DAP_UINT64_FORMAT_x, &l_iddn.uint64);
-    dap_chain_net_t *l_net = s_net_new(&l_iddn, "Snet", "TestCoin", "root");
-    
-    
-    // l_net->pub.id.uint64 = l_iddn.uint64;
-    // l_net->pub.native_ticker = "TestCoin";
-    // l_net->pub.name = "Snet";
-
-    dap_chain_net_item_t *l_net_item = DAP_NEW_Z(dap_chain_net_item_t);
-    dap_strncpy(l_net_item->name, "Snet", DAP_CHAIN_NET_NAME_MAX);
-    l_net_item->chain_net = l_net;
-    l_net_item->net_id.uint64 = l_net->pub.id.uint64;
-
-    HASH_ADD(hh2, s_net_ids, net_id, sizeof(l_net_item->net_id), l_net_item);
-
+    dap_chain_net_t *l_net = DAP_NEW_Z_SIZE( dap_chain_net_t, sizeof(dap_chain_net_t) + sizeof(dap_chain_net_pvt_t) );
+    PVT(l_net)->node_info = DAP_NEW_Z_SIZE(dap_chain_net_t, sizeof(dap_chain_node_info_t) + DAP_HOSTADDR_STRLEN + 1 );
+    l_net->pub.id.uint64 = 0xFA0;
+    strcpy(l_net->pub.name, "Snet");
+    l_net->pub.gdb_groups_prefix = (const char*)l_net->pub.name;
+    l_net->pub.native_ticker = "TestCoin";
+    PVT(l_net)->node_role.enums = NODE_ROLE_ROOT;
+    HASH_ADD(hh2, s_nets_by_id, pub.id, sizeof(dap_chain_net_id_t), l_net);
+    HASH_ADD_STR(s_nets_by_name, pub.name, l_net);
     return 0;
 }
 #endif
@@ -1743,76 +1764,36 @@ int s_net_init(const char *a_net_name, uint16_t a_acl_idx)
 {
     char *l_cfg_path = dap_strdup_printf("network/%s", a_net_name);
     dap_config_t *l_cfg = dap_config_open(l_cfg_path);
-    if (!l_cfg) {
-        log_it(L_ERROR,"Can't open default network config %s", l_cfg_path);
-        DAP_DEL_Z(l_cfg_path);
-        return -1;
-    }
     DAP_DELETE(l_cfg_path);
+    if ( !l_cfg )
+        return log_it(L_ERROR,"Can't open default network config %s", l_cfg_path), -1;
 
-    const char *l_net_name_str = dap_config_get_item_str(l_cfg , "general", "name");
-    const char *l_net_id_str = dap_config_get_item_str(l_cfg , "general", "id");
-    dap_chain_net_id_t l_net_id;
-    if(!l_net_name_str || !l_net_id_str || dap_chain_net_id_parse(l_net_id_str, &l_net_id)) {
-        log_it(L_ERROR,"Can't create l_net, can't read name or ID config");
-        return -1;
-    }
+    dap_chain_net_t *l_net = s_net_new(a_net_name, l_cfg);
+    if ( !l_net ) 
+        return log_it(L_ERROR,"Can't create net \"%s\"", a_net_name), dap_config_close(l_cfg), -1;
 
-    dap_chain_net_item_t *l_net_item_finded = NULL;
-    HASH_FIND_STR(s_net_items, l_net_name_str, l_net_item_finded);
-    if (!l_net_item_finded)
-        HASH_FIND(hh2, s_net_ids, &l_net_id, sizeof(l_net_id), l_net_item_finded);
-    if (l_net_item_finded) {
-        log_it(L_ERROR,"Can't create net %s ID %"DAP_UINT64_FORMAT_U", existed net %s ID %"DAP_UINT64_FORMAT_U" has the same name or ID.\n"\
-                "Please, fix your configs and restart node",
-                l_net_name_str, l_net_id.uint64, l_net_item_finded->name,
-                l_net_item_finded->net_id.uint64);
-        dap_config_close(l_cfg);
-        return -2;
-    }
-
-    dap_chain_net_t *l_net = s_net_new(
-                                        &l_net_id,
-                                        dap_config_get_item_str(l_cfg , "general" , "name" ),
-                                        dap_config_get_item_str(l_cfg , "general" , "native_ticker"),
-                                        dap_config_get_item_str(l_cfg , "general" , "node-role" )
-                                       );
-    if(!l_net) {
-        log_it(L_ERROR,"Can't create l_net");
-        dap_config_close(l_cfg);
-        return -1;
-    }
-
-    l_net->pub.gdb_groups_prefix = dap_strdup(
-                dap_config_get_item_str_default(l_cfg, "general", "gdb_groups_prefix",
-                                                dap_config_get_item_str(l_cfg, "general", "name")));
     dap_chain_net_pvt_t *l_net_pvt = PVT(l_net);
     l_net_pvt->load_mode = true;
     l_net_pvt->acl_idx = a_acl_idx;
-    // Bridged netwoks allowed to send transactions to
+    // Transaction can be sent to bridged networks
     uint16_t l_net_ids_count = 0;
     const char **l_bridged_net_ids = dap_config_get_array_str(l_cfg, "general", "bridged_network_ids", &l_net_ids_count);
-    for (uint16_t i = 0; i < l_net_ids_count; i++) {
-        dap_chain_net_id_t l_id;
-        if (dap_chain_net_id_parse(l_bridged_net_ids[i], &l_id) != 0)
-            continue;
-        l_net->pub.bridged_networks = dap_list_append(l_net->pub.bridged_networks, DAP_DUP(&l_id));
-    }
-
-    // Add network to the list
-    dap_chain_net_item_t *l_net_item = DAP_NEW_Z(dap_chain_net_item_t);
-    if (!l_net_item) {
-        log_it(L_CRITICAL, "%s", c_error_memory_alloc);
-        dap_chain_net_delete(l_net);
-        dap_config_close(l_cfg);
-        return -4;
+    if (l_net_ids_count) {
+        l_net->pub.bridged_networks = DAP_NEW_Z_COUNT(dap_chain_net_id_t, l_net_ids_count);
+        unsigned i, j;
+        for (i = 0, j = 0; i < l_net_ids_count; ++i) {
+            if (dap_chain_net_id_parse(l_bridged_net_ids[i], &l_net->pub.bridged_networks[j]) != 0) {
+                log_it(L_ERROR, "Can't add invalid net id \"%s\" to bridged net list of \"%s\"",
+                                l_bridged_net_ids[i], a_net_name);
+                continue;
+            }   
+            ++j;
+        }
+        l_net->pub.bridged_networks = j && j < i
+            ? DAP_REALLOC_COUNT(l_net->pub.bridged_networks, j)
+            : ( DAP_DELETE(l_net->pub.bridged_networks), NULL );
+        l_net->pub.bridged_networks_count = j;
     }
-    dap_strncpy(l_net_item->name, dap_config_get_item_str(l_cfg, "general", "name"), DAP_CHAIN_NET_NAME_MAX);
-    l_net_item->chain_net = l_net;
-    l_net_item->net_id.uint64 = l_net->pub.id.uint64;
-    
-    HASH_ADD_STR(s_net_items, name, l_net_item);
-    HASH_ADD(hh2, s_net_ids, net_id, sizeof(l_net_item->net_id), l_net_item);
 
     const char **l_permanent_nodes_addrs = dap_config_get_array_str(l_cfg, "general", "permanent_nodes_addrs", &l_net_pvt->permanent_links_count);
     if (l_net_pvt->permanent_links_count) {
@@ -1842,27 +1823,25 @@ int s_net_init(const char *a_net_name, uint16_t a_acl_idx)
     uint16_t l_permalink_hosts_count = 0, i, e;
     const char **l_permanent_links_hosts = dap_config_get_array_str(l_cfg, "general", "permanent_nodes_hosts", &l_permalink_hosts_count);
     for (i = 0, e = 0; i < dap_min(l_permalink_hosts_count, l_net_pvt->permanent_links_count); ++i) {
-        char l_host[DAP_HOSTADDR_STRLEN + 1] = { '\0' }; uint16_t l_port = 0;
-        struct sockaddr_storage l_saddr;
-        if ( dap_net_parse_config_address(l_permanent_links_hosts[i], l_host, &l_port, NULL, NULL) < 0
-            || dap_net_resolve_host(l_host, dap_itoa(l_port), false, &l_saddr, NULL) < 0 )
-        {
+        struct request_link_info *l_tmp = s_net_resolve_host( l_permanent_links_hosts[i] );
+        if ( !l_tmp ) {
             log_it(L_ERROR, "Incorrect address \"%s\", fix \"%s\" network config"
                             "or check internet connection and restart node",
                             a_net_name, l_permanent_links_hosts[i]);
             ++e;
             continue;
         }
-        l_net_pvt->permanent_links[i]->uplink_port = l_port;
-        dap_strncpy(l_net_pvt->permanent_links[i]->uplink_addr, l_host, DAP_HOSTADDR_STRLEN);
+        l_net_pvt->permanent_links[i]->uplink_port = l_tmp->port;
+        dap_strncpy(l_net_pvt->permanent_links[i]->uplink_addr, l_tmp->addr, DAP_HOSTADDR_STRLEN);
+        DAP_DELETE(l_tmp);
     }
     if ( i && (e == i) ) {
         log_it(L_ERROR, "%d / %d permanent links are invalid or can't be accessed, fix \"%s\""
                         "network config or check internet connection and restart node",
                         e, i, a_net_name);
-        dap_chain_net_delete(l_net);
-        dap_config_close(l_cfg);
-        return -16;
+        //dap_chain_net_delete(l_net);
+        //dap_config_close(l_cfg);
+        //return -16;
     }
 
     const char **l_authorized_nodes_addrs = dap_config_get_array_str(l_cfg, "general", "authorized_nodes_addrs", &l_net_pvt->authorized_nodes_count);
@@ -1885,41 +1864,28 @@ int s_net_init(const char *a_net_name, uint16_t a_acl_idx)
          l_seed_nodes_hosts  = dap_config_get_array_str(l_cfg, "general", "bootstrap_hosts", &l_net_pvt->seed_nodes_count);
     if (!l_net_pvt->seed_nodes_count)
         log_it(L_WARNING, "Can't read seed nodes addresses, work with local balancer only");
-    else if (!(l_net_pvt->seed_nodes_info = DAP_NEW_Z_COUNT(struct request_link_info *, l_net_pvt->seed_nodes_count))) {
+    else if (!( l_net_pvt->seed_nodes_info = DAP_NEW_Z_COUNT(struct request_link_info*, l_net_pvt->seed_nodes_count) )) {
         log_it(L_CRITICAL, "%s", c_error_memory_alloc);
         dap_chain_net_delete(l_net);
         dap_config_close(l_cfg);
         return -4;
     }
     for (i = 0, e = 0; i < l_net_pvt->seed_nodes_count; ++i) {
-        char l_host[DAP_HOSTADDR_STRLEN + 1] = { '\0' }; uint16_t l_port = 0;
-        struct sockaddr_storage l_saddr;
-        if ( dap_net_parse_config_address(l_seed_nodes_hosts[i], l_host, &l_port, NULL, NULL) < 0
-            || dap_net_resolve_host(l_host, dap_itoa(l_port), false, &l_saddr, NULL) < 0)
-        {
+        if (!( l_net_pvt->seed_nodes_info[i] = s_net_resolve_host(l_seed_nodes_hosts[i]) )) {
             log_it(L_ERROR, "Incorrect address \"%s\", fix \"%s\" network config"
                             "or check internet connection and restart node",
                             a_net_name, l_seed_nodes_hosts[i]);
             ++e;
             continue;
         }
-        l_net_pvt->seed_nodes_info[i] = DAP_NEW_Z(struct request_link_info);
-        if (!l_net_pvt->seed_nodes_info[i]) {
-            log_it(L_CRITICAL, "%s", c_error_memory_alloc);
-            dap_chain_net_delete(l_net);
-            dap_config_close(l_cfg);
-            return -4;
-        }
-        l_net_pvt->seed_nodes_info[i]->port = l_port;
-        dap_strncpy(l_net_pvt->seed_nodes_info[i]->addr, l_host, DAP_HOSTADDR_STRLEN);
     }
     if ( i && (e == i) ) {
         log_it(L_ERROR, "%d / %d seed links are invalid or can't be accessed, fix \"%s\""
                         "network config or check internet connection and restart node",
                         e, i, a_net_name);
-        dap_chain_net_delete(l_net);
-        dap_config_close(l_cfg);
-        return -16;
+        //dap_chain_net_delete(l_net);
+        //dap_config_close(l_cfg);
+        //return -16;
     }
 
     /* *** Chains init by configs *** */
@@ -2045,7 +2011,6 @@ int s_net_init(const char *a_net_name, uint16_t a_acl_idx)
     l_net->pub.ledger = dap_ledger_create(l_net, l_ledger_flags);
     // Decrees initializing
     dap_chain_net_decree_init(l_net);
-    l_net->pub.config = l_cfg;
     return 0;
 }
 
@@ -2217,7 +2182,7 @@ bool s_net_load(void *a_arg)
                                                         DAP_CLUSTER_TYPE_EMBEDDED);
     DAP_DELETE(l_gdb_groups_mask);
     // Nodes and its aliases cluster
-    l_net->pub.gdb_nodes = dap_strdup_printf("%s.nodes.list",l_net->pub.gdb_groups_prefix);
+    snprintf(l_net->pub.gdb_nodes, sizeof(l_net->pub.gdb_nodes), "%s.%s", l_net->pub.gdb_groups_prefix, s_gdb_nodes_postfix);
     l_net_pvt->nodes_cluster = dap_global_db_cluster_add(dap_global_db_instance_get_default(),
                                                          l_net->pub.name, dap_guuid_compose(l_net->pub.id.uint64, 0),
                                                          l_net->pub.gdb_nodes, 0, true,
@@ -2373,22 +2338,15 @@ bool dap_chain_net_remove_validator_from_clusters(dap_chain_t *a_chain, dap_stre
 }
 
 size_t dap_chain_net_count() {
-    return HASH_COUNT(s_net_items);
+    return HASH_COUNT(s_nets_by_name);
 }
 
 dap_chain_net_t *dap_chain_net_iter_start() {
-    dap_return_val_if_pass(!s_net_items, NULL);
-    return s_net_items->chain_net;
+    return s_nets_by_name;
 }
 
 dap_chain_net_t *dap_chain_net_iter_next(dap_chain_net_t *a_it) {
-    if (!a_it)
-        return NULL;
-    dap_chain_net_item_t *l_net_sought = NULL;
-    HASH_FIND_STR(s_net_items, a_it->pub.name, l_net_sought);
-    return l_net_sought && l_net_sought->hh.next
-        ? ((dap_chain_net_item_t*)l_net_sought->hh.next)->chain_net 
-        : NULL;
+    return a_it ? a_it->hh.next : NULL;
 }
 
 /**
@@ -2398,10 +2356,10 @@ dap_chain_net_t *dap_chain_net_iter_next(dap_chain_net_t *a_it) {
  */
 dap_chain_net_t *dap_chain_net_by_name(const char *a_name)
 {
-    dap_chain_net_item_t *l_net_item = NULL;
+    dap_chain_net_t *l_net = NULL;
     if (a_name)
-        HASH_FIND(hh, s_net_items, a_name, strlen(a_name), l_net_item);
-    return l_net_item ? l_net_item->chain_net : NULL;
+        HASH_FIND_STR(s_nets_by_name, a_name, l_net);
+    return l_net;
 }
 
 /**
@@ -2422,9 +2380,9 @@ dap_ledger_t * dap_ledger_by_net_name( const char * a_net_name)
  */
 dap_chain_net_t *dap_chain_net_by_id(dap_chain_net_id_t a_id)
 {
-    dap_chain_net_item_t *l_net_item = NULL;
-    HASH_FIND(hh2, s_net_ids, &a_id, sizeof(a_id), l_net_item);
-    return l_net_item ? l_net_item->chain_net : NULL;
+    dap_chain_net_t *l_net = NULL;
+    HASH_FIND(hh2, s_nets_by_id, &a_id, sizeof(a_id), l_net);
+    return l_net;
 }
 
 /**
@@ -2715,14 +2673,13 @@ static bool s_net_check_acl(dap_chain_net_t *a_net, dap_chain_hash_fast_t *a_pke
  */
 static uint8_t *s_net_set_acl(dap_chain_hash_fast_t *a_pkey_hash)
 {
-    if (!HASH_COUNT(s_net_items))
+    uint16_t l_cnt = HASH_COUNT(s_nets_by_name);
+    if ( !l_cnt )
         return NULL;
-    uint8_t *l_ret = DAP_NEW_Z_SIZE(uint8_t, HASH_COUNT(s_net_items));
+    uint8_t *l_ret = DAP_NEW_Z_COUNT(uint8_t, l_cnt);
     unsigned i = 0;
-    dap_chain_net_item_t *l_net_cur = NULL, *l_net_tmp = NULL;
-    HASH_ITER(hh, s_net_items, l_net_cur, l_net_tmp) {
-        l_ret[i++] = s_net_check_acl(l_net_cur->chain_net, a_pkey_hash);
-    }
+    for (dap_chain_net_t *l_net = s_nets_by_name; l_net; l_net = l_net->hh.next)
+        l_ret[i++] = s_net_check_acl(l_net, a_pkey_hash);
     return l_ret;
 }
 
@@ -2801,7 +2758,7 @@ dap_list_t* dap_chain_datum_list(dap_chain_net_t *a_net, dap_chain_t *a_chain, d
  * @param a_datum_size
  * @return
  */
-int dap_chain_datum_add(dap_chain_t *a_chain, dap_chain_datum_t *a_datum, size_t a_datum_size, dap_hash_fast_t *a_datum_hash)
+int dap_chain_datum_add(dap_chain_t *a_chain, dap_chain_datum_t *a_datum, size_t a_datum_size, dap_hash_fast_t *a_datum_hash, void *a_datum_index_data)
 {
     size_t l_datum_data_size = a_datum->header.data_size;
     if (a_datum_size < l_datum_data_size + sizeof(a_datum->header)) {
@@ -2843,8 +2800,8 @@ int dap_chain_datum_add(dap_chain_t *a_chain, dap_chain_datum_t *a_datum, size_t
             if (l_tx_size != l_datum_data_size) {
                 log_it(L_WARNING, "Corrupted transaction, datum size %zd is not equal to size of TX %zd", l_datum_data_size, l_tx_size);
                 return -102;
-            }
-            return dap_ledger_tx_load(l_ledger, l_tx, a_datum_hash);
+            }            
+            return dap_ledger_tx_load(l_ledger, l_tx, a_datum_hash, (dap_ledger_datum_iter_data_t*)a_datum_index_data);
         }
         case DAP_CHAIN_DATUM_CA:
             return dap_cert_chain_file_save(a_datum, a_chain->net_name);
@@ -2955,8 +2912,8 @@ uint256_t dap_chain_net_get_reward(dap_chain_net_t *a_net, uint64_t a_block_num)
 
 void dap_chain_net_announce_addr_all()
 {
-    for (dap_chain_net_item_t *it = s_net_items; it; it = it->hh.next)
-        dap_chain_net_announce_addr(it->chain_net);
+    for (dap_chain_net_t *net = s_nets_by_name; net; net = net->hh.next)
+        dap_chain_net_announce_addr(net);
 }
 
 void dap_chain_net_announce_addr(dap_chain_net_t *a_net)
@@ -2964,11 +2921,12 @@ void dap_chain_net_announce_addr(dap_chain_net_t *a_net)
     dap_return_if_fail(a_net);
     dap_chain_net_pvt_t *l_net_pvt = PVT(a_net);
     if ( l_net_pvt->node_info->ext_port ) {
-        dap_chain_net_node_list_request(a_net, l_net_pvt->node_info->ext_port, false, 'a');
         log_it(L_INFO, "Announce our node address "NODE_ADDR_FP_STR" [ %s : %u ] in net %s",
                NODE_ADDR_FP_ARGS_S(g_node_addr),
                l_net_pvt->node_info->ext_host,
                l_net_pvt->node_info->ext_port, a_net->pub.name);
+        dap_chain_net_node_list_request(a_net, l_net_pvt->node_info->ext_port, true, 'a');
+        
     }
 }
 
@@ -3018,19 +2976,15 @@ static int s_net_try_online(dap_chain_net_t *a_net)
 void dap_chain_net_try_online_all() {
     int32_t l_ret = 0;
 
-    if(!HASH_COUNT(s_net_items)){
-        log_it(L_ERROR, "Can't find any nets");
-        return;
-    }
-    if (!dap_config_get_item_bool_default(g_config ,"general", "auto_online", false)) {
-        log_it(L_DEBUG, "Auto online is off in config");
-        return;
-    }
-    dap_chain_net_item_t *l_net_items_current = NULL, *l_net_items_tmp = NULL;
-    HASH_ITER(hh, s_net_items, l_net_items_current, l_net_items_tmp) {
-        if( (l_ret = s_net_try_online(l_net_items_current->chain_net)) ) {
-            log_it(L_ERROR, "Can't try online state for net %s.  Finished with (%d) error code.", l_net_items_current->name, l_ret);
-        }
+    if( !HASH_COUNT(s_nets_by_name) )
+        return log_it(L_ERROR, "Can't find any nets");
+
+    if ( !dap_config_get_item_bool_default(g_config ,"general", "auto_online", false) )
+        return log_it(L_DEBUG, "Auto online is off in config");
+
+    for (dap_chain_net_t *net = s_nets_by_name; net; net = net->hh.next) {
+        if (( l_ret = s_net_try_online(net) ))
+            log_it(L_ERROR, "Can't try online state for net %s.  Finished with (%d) error code.", net, l_ret);
     }
 }
 
@@ -3152,10 +3106,11 @@ static void s_ch_in_pkt_callback(dap_stream_ch_t *a_ch, uint8_t a_type, const vo
 
 static void s_ch_out_pkt_callback(dap_stream_ch_t *a_ch, uint8_t a_type, const void *a_data, size_t a_data_size, void *a_arg)
 {
-    debug_if(s_debug_more, L_DEBUG, "Sent OUT sync packet type %hhu size %zu to addr " NODE_ADDR_FP_STR,
-                                                           a_type, a_data_size, NODE_ADDR_FP_ARGS_S(a_ch->stream->node));
+    
     dap_chain_net_t *l_net = a_arg;
     dap_chain_net_pvt_t *l_net_pvt = PVT(l_net);
+    if (!l_net_pvt->sync_context.cur_chain)
+        return;
     switch (a_type) {
     case DAP_CHAIN_CH_PKT_TYPE_ERROR:
         l_net_pvt->sync_context.cur_chain->state = CHAIN_SYNC_STATE_ERROR;
@@ -3164,6 +3119,8 @@ static void s_ch_out_pkt_callback(dap_stream_ch_t *a_ch, uint8_t a_type, const v
         break;
     }
     l_net_pvt->sync_context.stage_last_activity = dap_time_now();
+    debug_if(s_debug_more, L_DEBUG, "Sent OUT sync packet type %hhu size %zu to addr " NODE_ADDR_FP_STR,
+                                    a_type, a_data_size, NODE_ADDR_FP_ARGS_S(a_ch->stream->node));
 }
 
 
@@ -3385,6 +3342,20 @@ int dap_chain_net_state_go_to(dap_chain_net_t *a_net, dap_chain_net_state_t a_ne
         dap_link_manager_set_net_condition(a_net->pub.id.uint64, true);
         for (uint16_t i = 0; i < PVT(a_net)->permanent_links_count; ++i) {
             dap_link_info_t *l_permalink_info = PVT(a_net)->permanent_links[i];
+            if ( !*l_permalink_info->uplink_addr ) {
+                // Unresolved before? Let's try again
+                const char **l_permanent_nodes_addrs = dap_config_get_array_str(a_net->pub.config, "general", "permanent_nodes_addrs", NULL);
+                struct request_link_info *l_tmp = s_net_resolve_host(l_permanent_nodes_addrs[i]);
+                if (l_tmp) {
+                    l_permalink_info->uplink_port = l_tmp->port;
+                    dap_strncpy(l_permalink_info->uplink_addr, l_tmp->addr, DAP_HOSTADDR_STRLEN);
+                    DAP_DELETE(l_tmp);
+                } else {
+                    log_it(L_ERROR, "Can't resolve permanent link address %s for net %s, possibly an internet connection issue",
+                                    l_permanent_nodes_addrs[i], a_net->pub.name);
+                    continue;
+                }
+            }
             if (dap_chain_net_link_add(a_net, &l_permalink_info->node_addr, l_permalink_info->uplink_addr, l_permalink_info->uplink_port)) {
                 log_it(L_ERROR, "Can't create permanent link to addr " NODE_ADDR_FP_STR, NODE_ADDR_FP_ARGS_S(l_permalink_info->node_addr));
                 continue;
diff --git a/modules/net/dap_chain_node_cli.c b/modules/net/dap_chain_node_cli.c
index 95620a0b29061ed7bdfdb3839f3a806ae19f4baa..932c7c87b92f5506d4d66c7cfae9942d2a764822 100644
--- a/modules/net/dap_chain_node_cli.c
+++ b/modules/net/dap_chain_node_cli.c
@@ -285,8 +285,9 @@ int dap_chain_node_cli_init(dap_config_t * g_config)
 
     // Transaction history
     dap_cli_server_cmd_add("tx_history", com_tx_history, "Transaction history (for address or by hash)",
-            "tx_history  {-addr <addr> | -w <wallet_name> | -tx <tx_hash>} [-net <net_name>] [-chain <chain_name>] [-limit] [-offset]\n"
-            "tx_history -all -net <net_name> [-chain <chain_name>] [-limit] [-offset]\n");
+            "tx_history  {-addr <addr> | -w <wallet_name> | -tx <tx_hash>} [-net <net_name>] [-chain <chain_name>] [-limit] [-offset] [-head]\n"
+            "tx_history -all -net <net_name> [-chain <chain_name>] [-limit] [-offset] [-head]\n"
+            "tx_history -count -net <net_name>\n");
 
 	// Ledger info
     dap_cli_server_cmd_add("ledger", com_ledger, "Ledger information",
diff --git a/modules/net/dap_chain_node_cli_cmd.c b/modules/net/dap_chain_node_cli_cmd.c
index ecd031bae9adcb64b94fa534ac6f296437413b84..1d183e5974a1c305c86177995d06bc5670e21b0b 100644
--- a/modules/net/dap_chain_node_cli_cmd.c
+++ b/modules/net/dap_chain_node_cli_cmd.c
@@ -809,8 +809,10 @@ int com_global_db(int a_argc, char ** a_argv, void **a_str_reply)
 
         if (!l_objs || !l_objs_count)
         {
-            dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_GLOBAL_DB_NO_DATA_IN_GROUP,"No data in group %s.", l_group_str);
-            return -DAP_CHAIN_NODE_CLI_COM_GLOBAL_DB_NO_DATA_IN_GROUP;
+            char *l_str_tmp = dap_strdup_printf("No data in group '%s' or group not found.", l_group_str);
+            json_object *l_jobj_msg = json_object_new_string(l_str_tmp);
+            json_object_array_add(*json_arr_reply, l_jobj_msg);
+            return DAP_CHAIN_NODE_CLI_COM_GLOBAL_DB_JSON_OK;
         }
 
         json_object* json_arr_keys = json_object_new_array();
@@ -2193,7 +2195,7 @@ int l_arg_index = 1, l_rc, cmd_num = CMD_NONE;
                                                       "sig_multi_chained. You must specify at least two more "
                                                       "signatures other than sig_multi_chained.\n"
                                                       "After sig_multi_chained, you must specify two more signatures "
-                                                      "from the list: %s", dap_cert_get_str_recommended_sign());
+                                                      "from the list:\n%s", dap_cert_get_str_recommended_sign());
                                 json_object_put(json_arr_out);
                                 return DAP_CHAIN_NODE_CLI_COM_TX_WALLET_UNKNOWN_SIGN_ERR;
                             }
@@ -3594,7 +3596,7 @@ int _cmd_mempool_proc(dap_chain_net_t *a_net, dap_chain_t *a_chain, const char *
         dap_json_rpc_allocation_error;
         return DAP_JSON_RPC_ERR_CODE_MEMORY_ALLOCATED;
     }
-    int l_verify_datum = dap_chain_net_verify_datum_for_add(a_chain, l_datum, &l_datum_hash);
+    int l_verify_datum = dap_chain_net_verify_datum_for_add(l_chain, l_datum, &l_datum_hash);
     if (l_verify_datum){
         json_object *l_jobj_verify_err = json_object_new_string(dap_chain_net_verify_datum_err_code_to_str(l_datum, l_verify_datum));
         json_object *l_jobj_verify_status = json_object_new_boolean(FALSE);
@@ -3610,8 +3612,8 @@ int _cmd_mempool_proc(dap_chain_net_t *a_net, dap_chain_t *a_chain, const char *
         json_object_object_add(l_jobj_verify, "error", l_jobj_verify_err);
         ret = DAP_COM_MEMPOOL_PROC_LIST_ERROR_FALSE_VERIFY;
     } else {
-        if (a_chain->callback_add_datums) {
-            if (a_chain->callback_add_datums(a_chain, &l_datum, 1) == 0) {
+        if (l_chain->callback_add_datums) {
+            if (l_chain->callback_add_datums(l_chain, &l_datum, 1) == 0) {
                 json_object *l_jobj_verify_status = json_object_new_boolean(FALSE);
                 if (!l_jobj_verify_status) {
                     json_object_put(l_jobj_verify_status);
@@ -4050,7 +4052,6 @@ typedef struct _dap_cli_token_additional_params {
     uint16_t    parsed_flags;
     size_t      tsd_total_size;
     byte_t      *parsed_tsd;
-    size_t      parsed_tsd_size;
 } dap_cli_token_additional_params;
 
 typedef struct _dap_sdk_cli_params {
@@ -4204,7 +4205,6 @@ static int s_parse_additional_token_decl_arg(int a_argc, char ** a_argv, void **
     size_t l_tsd_total_size = 0;
     uint16_t l_flags = 0;
     char ** l_str_flags = NULL;
-    a_params->ext.parsed_tsd_size = 0;
 
     if (!a_update_token) {
         if (a_params->ext.flags){   // Flags
@@ -4219,7 +4219,6 @@ static int s_parse_additional_token_decl_arg(int a_argc, char ** a_argv, void **
                 l_str_flags++;
             }
         }
-        a_params->ext.parsed_flags = l_flags;
     } else {
         const char *l_set_flags = NULL;
         const char *l_unset_flags = NULL;
@@ -4240,7 +4239,6 @@ static int s_parse_additional_token_decl_arg(int a_argc, char ** a_argv, void **
             l_flags = 0;
             l_tsd_list = dap_list_append(l_tsd_list, l_flag_set_tsd);
             l_tsd_total_size += dap_tsd_size(l_flag_set_tsd);
-            a_params->ext.parsed_tsd_size += dap_tsd_size(l_flag_set_tsd);
         }
         if (l_unset_flags) {
             l_str_flags = dap_strsplit(l_unset_flags,",",0xffff );
@@ -4257,10 +4255,41 @@ static int s_parse_additional_token_decl_arg(int a_argc, char ** a_argv, void **
             l_flags = 0;
             l_tsd_list = dap_list_append(l_tsd_list, l_flag_unset_tsd);
             l_tsd_total_size += dap_tsd_size(l_flag_unset_tsd);
-            a_params->ext.parsed_tsd_size += dap_tsd_size(l_flag_unset_tsd);
         }
     }
 
+    if (a_params->ext.total_signs_valid){ // Signs valid
+        uint16_t l_param_value = (uint16_t)atoi(a_params->ext.total_signs_valid);
+        dap_tsd_t * l_tsd = dap_tsd_create_scalar(
+                                                DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TOTAL_SIGNS_VALID, l_param_value);
+        l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
+        l_tsd_total_size+= dap_tsd_size(l_tsd);
+    }
+    if (a_params->ext.datum_type_allowed){
+        dap_tsd_t * l_tsd = dap_tsd_create_string(
+                                                DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DATUM_TYPE_ALLOWED_ADD, a_params->ext.datum_type_allowed);
+        l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
+        l_tsd_total_size+= dap_tsd_size(l_tsd);
+    }
+    if (a_params->ext.datum_type_blocked){
+        dap_tsd_t * l_tsd = dap_tsd_create_string(
+                                                DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DATUM_TYPE_BLOCKED_ADD, a_params->ext.datum_type_blocked);
+        l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
+        l_tsd_total_size+= dap_tsd_size(l_tsd);
+    }
+    if (a_params->ext.tx_receiver_allowed)
+        l_tsd_list = s_parse_wallet_addresses(a_params->ext.tx_receiver_allowed, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_ALLOWED_ADD);
+
+    if (a_params->ext.tx_receiver_blocked)
+        l_tsd_list = s_parse_wallet_addresses(a_params->ext.tx_receiver_blocked, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_BLOCKED_ADD);
+
+    if (a_params->ext.tx_sender_allowed)
+        l_tsd_list = s_parse_wallet_addresses(a_params->ext.tx_sender_allowed, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_ALLOWED_ADD);
+
+    if (a_params->ext.tx_sender_blocked)
+        l_tsd_list = s_parse_wallet_addresses(a_params->ext.tx_sender_blocked, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_ADD);
+
+
     const char* l_new_certs_str = NULL;
     const char* l_remove_signs = NULL;
     dap_cli_server_cmd_find_option_val(a_argv, 0, a_argc, "-new_certs", &l_new_certs_str);
@@ -4310,7 +4339,6 @@ static int s_parse_additional_token_decl_arg(int a_argc, char ** a_argv, void **
         dap_tsd_t *l_desc_token = dap_tsd_create_string(DAP_CHAIN_DATUM_TOKEN_TSD_TOKEN_DESCRIPTION, l_description);
         l_tsd_list = dap_list_append(l_tsd_list, l_desc_token);
         l_tsd_total_size += dap_tsd_size(l_desc_token);
-        a_params->ext.parsed_tsd_size += dap_tsd_size(l_desc_token);
     }
     size_t l_tsd_offset = 0;
     a_params->ext.parsed_tsd = DAP_NEW_SIZE(byte_t, l_tsd_total_size);
@@ -4487,24 +4515,9 @@ int com_token_decl(int a_argc, char ** a_argv, void **a_str_reply)
         case DAP_CHAIN_DATUM_TOKEN_SUBTYPE_NATIVE:
 		{ // 256
             dap_list_t *l_tsd_list = NULL;
-            size_t l_tsd_total_size = 0;
-            uint16_t l_flags = 0;
-            char ** l_str_flags = NULL;
-
-            if (l_params->ext.flags){   // Flags
-                 l_str_flags = dap_strsplit(l_params->ext.flags,",",0xffff );
-                 while (l_str_flags && *l_str_flags){
-                     uint16_t l_flag = dap_chain_datum_token_flag_from_str(*l_str_flags);
-                     if (l_flag == DAP_CHAIN_DATUM_TOKEN_FLAG_UNDEFINED ){
-                         dap_cli_server_cmd_set_reply_text(a_str_reply, "Flag can't be \"%s\"",*l_str_flags);
-                         DAP_DEL_Z(l_params);
-                         return -20;
-                     }
-                     l_flags |= l_flag; // if we have multiple flags
-                     l_str_flags++;
-                }
-            }
-			if (l_params->ext.delegated_token_from){
+            size_t l_tsd_local_list_size = 0;
+
+            if (l_params->ext.delegated_token_from){
 				dap_chain_datum_token_t *l_delegated_token_from;
 				if (NULL == (l_delegated_token_from = dap_ledger_token_ticker_check(l_net->pub.ledger, l_params->ext.delegated_token_from))) {
                     dap_cli_server_cmd_set_reply_text(a_str_reply,"To create a delegated token %s, can't find token by ticket %s", l_ticker, l_params->ext.delegated_token_from);
@@ -4524,42 +4537,19 @@ int com_token_decl(int a_argc, char ** a_argv, void **a_str_reply)
 				dap_tsd_t * l_tsd = dap_tsd_create_scalar(
 														DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DELEGATE_EMISSION_FROM_STAKE_LOCK, l_tsd_section);
 				l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
-				l_tsd_total_size+= dap_tsd_size(l_tsd);
+				l_tsd_local_list_size += dap_tsd_size(l_tsd);
 			}
-            if (l_params->ext.total_signs_valid){ // Signs valid
-                uint16_t l_param_value = (uint16_t)atoi(l_params->ext.total_signs_valid);
-                l_signs_total = l_param_value;
-                dap_tsd_t * l_tsd = dap_tsd_create_scalar(
-                                                        DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TOTAL_SIGNS_VALID, l_param_value);
-                l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
-                l_tsd_total_size+= dap_tsd_size(l_tsd);
-            }
-            if (l_params->ext.datum_type_allowed){
-                dap_tsd_t * l_tsd = dap_tsd_create_string(
-                                                        DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DATUM_TYPE_ALLOWED_ADD, l_params->ext.datum_type_allowed);
-                l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
-                l_tsd_total_size+= dap_tsd_size(l_tsd);
-            }
-            if (l_params->ext.datum_type_blocked){
-                dap_tsd_t * l_tsd = dap_tsd_create_string(
-                                                        DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_DATUM_TYPE_BLOCKED_ADD, l_params->ext.datum_type_blocked);
-                l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
-                l_tsd_total_size+= dap_tsd_size(l_tsd);
+
+            if (l_params->ext.total_signs_valid) {
+                l_signs_total = (uint16_t)atoi(l_params->ext.total_signs_valid);
             }
-            if (l_params->ext.tx_receiver_allowed)
-                l_tsd_list = s_parse_wallet_addresses(l_params->ext.tx_receiver_allowed, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_ALLOWED_ADD);
 
-            if (l_params->ext.tx_receiver_blocked)
-                l_tsd_list = s_parse_wallet_addresses(l_params->ext.tx_receiver_blocked, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_BLOCKED_ADD);
 
-            if (l_params->ext.tx_sender_allowed)
-                l_tsd_list = s_parse_wallet_addresses(l_params->ext.tx_sender_allowed, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_ALLOWED_ADD);
+            size_t l_tsd_total_size = l_tsd_local_list_size + l_params->ext.tsd_total_size;
 
-            if (l_params->ext.tx_sender_blocked)
-                l_tsd_list = s_parse_wallet_addresses(l_params->ext.tx_sender_blocked, l_tsd_list, &l_tsd_total_size, DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_ADD);
 
-            if (l_params->ext.parsed_tsd)
-                l_tsd_total_size += l_params->ext.parsed_tsd_size;
+            // if (l_params->ext.parsed_tsd)
+                // l_tsd_total_size += l_params->ext.parsed_tsd_size;
 
 
             // Create new datum token
@@ -4579,7 +4569,7 @@ int com_token_decl(int a_argc, char ** a_argv, void **a_str_reply)
                 l_datum_token->header_private_decl.flags = l_params->ext.parsed_flags;
                 l_datum_token->total_supply = l_total_supply;
                 l_datum_token->signs_valid = l_signs_emission;
-                l_datum_token->header_private_decl.tsd_total_size = l_tsd_total_size;
+                l_datum_token->header_private_decl.tsd_total_size = l_tsd_local_list_size + l_params->ext.tsd_total_size;
                 l_datum_token->header_private_decl.decimals = atoi(l_params->decimals_str);
             } else { //DAP_CHAIN_DATUM_TOKEN_TYPE_NATIVE_DECL
                 log_it(L_DEBUG,"Prepared TSD sections for CF20 token on %zd total size", l_tsd_total_size);
@@ -4676,6 +4666,7 @@ int com_token_decl(int a_argc, char ** a_argv, void **a_str_reply)
             DAP_DEL_Z(l_params);
             return -8;
     }
+    dap_uuid_generate_nonce(&l_datum_token->nonce, DAP_CHAIN_DATUM_NONCE_SIZE);
     // If we have more certs than we need signs - use only first part of the list
     if(l_certs_count > l_signs_total)
         l_certs_count = l_signs_total;
@@ -4856,7 +4847,7 @@ int com_token_update(int a_argc, char ** a_argv, void **a_str_reply)
             // Add TSD sections in the end
             // Add TSD sections in the end
             if (l_params->ext.tsd_total_size) {
-                memcpy(l_datum_token->tsd_n_signs, l_params->ext.parsed_tsd, l_params->ext.parsed_tsd_size);
+                memcpy(l_datum_token->tsd_n_signs, l_params->ext.parsed_tsd, l_params->ext.tsd_total_size);
                 DAP_DELETE(l_params->ext.parsed_tsd);
             }
             log_it(L_DEBUG, "%s token declaration update '%s' initialized", (	l_params->subtype == DAP_CHAIN_DATUM_TOKEN_SUBTYPE_PRIVATE)	?
@@ -4882,6 +4873,7 @@ int com_token_update(int a_argc, char ** a_argv, void **a_str_reply)
                                               "Unknown token type");
             return -8;
     }
+    dap_uuid_generate_nonce(&l_datum_token->nonce, DAP_CHAIN_DATUM_NONCE_SIZE);
     // If we have more certs than we need signs - use only first part of the list
     if(l_certs_count > l_signs_total)
         l_certs_count = l_signs_total;
@@ -7069,8 +7061,9 @@ int com_tx_create(int a_argc, char **a_argv, void **reply)
 
     if (l_addr_to->net_id.uint64 != l_net->pub.id.uint64 && !dap_chain_addr_is_blank(l_addr_to)) {
         bool l_found = false;
-        for (dap_list_t *it = l_net->pub.bridged_networks; it; it = it->next) {
-            if (((dap_chain_net_id_t *)it->data)->uint64 == l_addr_to->net_id.uint64) {
+        int i;
+        for (i = 0; i < l_net->pub.bridged_networks_count; ++i) {
+            if (l_net->pub.bridged_networks[i].uint64 == l_addr_to->net_id.uint64) {
                 l_found = true;
                 break;
             }
@@ -7078,8 +7071,8 @@ int com_tx_create(int a_argc, char **a_argv, void **reply)
         if (!l_found) {
             dap_string_t *l_allowed_list = dap_string_new("");
             dap_string_append_printf(l_allowed_list, "0x%016"DAP_UINT64_FORMAT_X, l_net->pub.id.uint64);
-            for (dap_list_t *it = l_net->pub.bridged_networks; it; it = it->next)
-                dap_string_append_printf(l_allowed_list, ", 0x%016"DAP_UINT64_FORMAT_X, ((dap_chain_net_id_t *)it->data)->uint64);
+            for (i = 0; i < l_net->pub.bridged_networks_count; ++i)
+                dap_string_append_printf(l_allowed_list, ", 0x%016"DAP_UINT64_FORMAT_X, l_net->pub.bridged_networks[i].uint64);
             dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_TX_CREATE_DESTINATION_NETWORK_IS_UNREACHEBLE,
                                    "Destination network ID=0x%"DAP_UINT64_FORMAT_x
                                    " is unreachable. List of available network IDs:\n%s"
@@ -7263,8 +7256,9 @@ int com_tx_history(int a_argc, char ** a_argv, void **a_str_reply)
     bool l_brief = (dap_cli_server_cmd_check_option(a_argv, arg_index, a_argc, "-brief") != -1) ? true : false;
 
     bool l_is_tx_all = dap_cli_server_cmd_find_option_val(a_argv, arg_index, a_argc, "-all", NULL);
+    bool l_is_tx_count = dap_cli_server_cmd_find_option_val(a_argv, arg_index, a_argc, "-count", NULL);
 
-    if (!l_addr_base58 && !l_wallet_name && !l_tx_hash_str && !l_is_tx_all) {
+    if (!l_addr_base58 && !l_wallet_name && !l_tx_hash_str && !l_is_tx_all && !l_is_tx_count) {
         dap_json_rpc_error_add(DAP_CHAIN_NODE_CLI_COM_TX_HISTORY_PARAM_ERR,
                                 "tx_history requires parameter '-addr' or '-w' or '-tx'");
         return DAP_CHAIN_NODE_CLI_COM_TX_HISTORY_PARAM_ERR;
@@ -7403,6 +7397,11 @@ int com_tx_history(int a_argc, char ** a_argv, void **a_str_reply)
         json_object_array_add(*json_arr_reply, json_arr_history_all);
         json_object_array_add(*json_arr_reply, json_obj_summary);
         return DAP_CHAIN_NODE_CLI_COM_TX_HISTORY_OK;
+    } else if (l_is_tx_count) {
+        json_object * json_count_obj= json_object_new_object();
+        json_object_object_add(json_count_obj, "Number of transaction", json_object_new_uint64(l_chain->callback_count_tx(l_chain)));
+        json_object_array_add(*json_arr_reply, json_count_obj);
+        return DAP_CHAIN_NODE_CLI_COM_TX_HISTORY_OK;
     }
 
     if (json_obj_out) {
@@ -8262,7 +8261,7 @@ static int s_signer_cmd(int a_arg_index, int a_argc, char **a_argv, void **a_str
     dap_chain_datum_t * l_datum = dap_chain_datum_create(DAP_CHAIN_DATUM_SIGNER, l_sign->pkey_n_sign, l_sign->header.sign_size);
     if (!l_datum)
         return dap_cli_server_cmd_set_reply_text(a_str_reply, "not created datum"), -1;
-    dap_cli_server_cmd_set_reply_text(a_str_reply, "hash: %s", dap_get_data_hash_str(l_datum->data, l_datum->header.data_size));
+    dap_cli_server_cmd_set_reply_text(a_str_reply, "hash: %s", dap_get_data_hash_str(l_datum->data, l_datum->header.data_size).s);
     return DAP_DELETE(l_datum), l_chain->callback_add_datums(l_chain, &l_datum, 1);
 }
 
diff --git a/modules/net/dap_chain_node_cli_cmd_tx.c b/modules/net/dap_chain_node_cli_cmd_tx.c
index 09a098ebd29497710da77f2f0bbb67c549c9b3bf..a59d2e279bc81a92b9b749a6b4ccbf2ee5b492ab 100644
--- a/modules/net/dap_chain_node_cli_cmd_tx.c
+++ b/modules/net/dap_chain_node_cli_cmd_tx.c
@@ -128,7 +128,7 @@ json_object * dap_db_tx_history_to_json(dap_chain_hash_fast_t* a_tx_hash,
                                         dap_chain_datum_tx_t * l_tx,
                                         dap_chain_t * a_chain, 
                                         const char *a_hash_out_type, 
-                                        dap_chain_net_t * l_net,
+                                        dap_chain_datum_iter_t *a_datum_iter,
                                         int l_ret_code,
                                         bool *accepted_tx,
                                         bool brief_out)
@@ -141,7 +141,8 @@ json_object * dap_db_tx_history_to_json(dap_chain_hash_fast_t* a_tx_hash,
     }
 
     dap_ledger_t *l_ledger = dap_chain_net_by_id(a_chain->net_id)->pub.ledger;
-    l_tx_token_ticker = dap_ledger_tx_get_token_ticker_by_hash(l_ledger, a_tx_hash);
+    l_tx_token_ticker = a_datum_iter ? a_datum_iter->token_ticker
+                                     : dap_ledger_tx_get_token_ticker_by_hash(l_ledger, a_tx_hash);
     if (l_tx_token_ticker) {
         json_object_object_add(json_obj_datum, "status", json_object_new_string("ACCEPTED"));
         l_tx_token_description = dap_ledger_get_description_by_ticker(l_ledger, l_tx_token_ticker);
@@ -174,15 +175,18 @@ json_object * dap_db_tx_history_to_json(dap_chain_hash_fast_t* a_tx_hash,
     dap_chain_net_srv_uid_t uid;
     char *service_name;
     dap_chain_tx_tag_action_type_t action;
+    bool srv_found = a_datum_iter ? a_datum_iter->uid.uint64 ? true : false
+                                  : dap_ledger_tx_service_info(l_ledger, a_tx_hash, &uid, &service_name, &action);
+    if (a_datum_iter)action = a_datum_iter->action;
 
-    if (dap_ledger_tx_service_info(l_ledger, a_tx_hash, &uid, &service_name, &action))
+    if (srv_found)
     {
-        json_object_object_add(json_obj_datum, "service", json_object_new_string(service_name));
+        //json_object_object_add(json_obj_datum, "service", json_object_new_string(service_name));
         json_object_object_add(json_obj_datum, "action", json_object_new_string(dap_ledger_tx_action_str(action)));
     }
     else
     {   
-        json_object_object_add(json_obj_datum, "service", json_object_new_string("UNKNOWN"));
+        //json_object_object_add(json_obj_datum, "service", json_object_new_string("UNKNOWN"));
         json_object_object_add(json_obj_datum, "action", json_object_new_string("UNKNOWN"));
     }
 
@@ -219,7 +223,7 @@ json_object * dap_db_history_tx(dap_chain_hash_fast_t* a_tx_hash,
                                  (dap_chain_datum_tx_t *)l_datum->data : NULL;
 
     if (l_tx) {
-        return dap_db_tx_history_to_json(a_tx_hash, &l_atom_hash,l_tx, a_chain, a_hash_out_type, l_net, l_ret_code, &accepted_tx, false);
+        return dap_db_tx_history_to_json(a_tx_hash, &l_atom_hash,l_tx, a_chain, a_hash_out_type, NULL, l_ret_code, &accepted_tx, false);
     } else {
         const char *l_tx_hash_str = dap_strcmp(a_hash_out_type, "hex")
                 ? dap_enc_base58_encode_hash_to_str_static(a_tx_hash)
@@ -230,9 +234,9 @@ json_object * dap_db_history_tx(dap_chain_hash_fast_t* a_tx_hash,
 }
 
 static void s_tx_header_print(json_object* json_obj_datum, dap_chain_tx_hash_processed_ht_t **a_tx_data_ht,
-                              dap_chain_datum_tx_t *a_tx, dap_hash_fast_t *a_atom_hash,
+                              dap_chain_datum_tx_t *a_tx, dap_chain_datum_iter_t *a_datum_iter,
                               const char *a_hash_out_type, dap_ledger_t *a_ledger,
-                              dap_chain_hash_fast_t *a_tx_hash, int a_ret_code)
+                              dap_chain_hash_fast_t *a_tx_hash)
 {
     bool l_declined = false;
     // transaction time
@@ -251,37 +255,40 @@ static void s_tx_header_print(json_object* json_obj_datum, dap_chain_tx_hash_pro
         }
         l_tx_data->hash = *a_tx_hash;
         HASH_ADD(hh, *a_tx_data_ht, hash, sizeof(*a_tx_hash), l_tx_data);
-        const char *l_token_ticker = dap_ledger_tx_get_token_ticker_by_hash(a_ledger, a_tx_hash);
+        const char *l_token_ticker = a_datum_iter->token_ticker;        
         if (!l_token_ticker)
             l_declined = true;
     }
     char *l_tx_hash_str, *l_atom_hash_str;
     if (!dap_strcmp(a_hash_out_type, "hex")) {
         l_tx_hash_str = dap_chain_hash_fast_to_str_new(a_tx_hash);
-        l_atom_hash_str = dap_chain_hash_fast_to_str_new(a_atom_hash);
+        l_atom_hash_str = dap_chain_hash_fast_to_str_new(a_datum_iter->cur_atom_hash);
     } else {
         l_tx_hash_str = dap_enc_base58_encode_hash_to_str(a_tx_hash);
-        l_atom_hash_str = dap_enc_base58_encode_hash_to_str(a_atom_hash);
+        l_atom_hash_str = dap_enc_base58_encode_hash_to_str(a_datum_iter->cur_atom_hash);
     }
     json_object_object_add(json_obj_datum, "status", json_object_new_string(l_declined ? "DECLINED" : "ACCEPTED"));
     json_object_object_add(json_obj_datum, "hash", json_object_new_string(l_tx_hash_str));
     json_object_object_add(json_obj_datum, "atom_hash", json_object_new_string(l_atom_hash_str));
-    json_object_object_add(json_obj_datum, "ret_code", json_object_new_int(a_ret_code));
-    json_object_object_add(json_obj_datum, "ret_code_str", json_object_new_string(dap_ledger_check_error_str(a_ret_code)));
+    json_object_object_add(json_obj_datum, "ret_code", json_object_new_int(a_datum_iter->ret_code));
+    json_object_object_add(json_obj_datum, "ret_code_str", json_object_new_string(dap_ledger_check_error_str(a_datum_iter->ret_code)));
 
 
     dap_chain_net_srv_uid_t uid;
     char *service_name;
     dap_chain_tx_tag_action_type_t action;
+    bool srv_found = a_datum_iter->uid.uint64 ? true : false;
+    action = a_datum_iter->action;
     
-    if (dap_ledger_tx_service_info(a_ledger, a_tx_hash, &uid, &service_name, &action))
+    //if (dap_ledger_tx_service_info(a_ledger, a_tx_hash, &uid, &service_name, &action))
+    if (srv_found)
     {
-        json_object_object_add(json_obj_datum, "service", json_object_new_string(service_name));
+        //json_object_object_add(json_obj_datum, "service", json_object_new_string(service_name));
         json_object_object_add(json_obj_datum, "action", json_object_new_string(dap_ledger_tx_action_str(action)));
     }
     else
     {
-        json_object_object_add(json_obj_datum, "service", json_object_new_string("UNKNOWN"));
+        //json_object_object_add(json_obj_datum, "service", json_object_new_string("UNKNOWN"));
         json_object_object_add(json_obj_datum, "action", json_object_new_string("UNKNOWN"));
     }
 
@@ -336,13 +343,10 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
 
     dap_chain_addr_t  l_net_fee_addr = {};
     bool l_net_fee_used = dap_chain_net_tx_get_fee(l_net->pub.id, NULL, &l_net_fee_addr);
-    bool l_is_need_correction = false;
-    bool l_continue = false;
-    uint256_t l_corr_value = {}, l_unstake_value = {};    
     bool look_for_unknown_service = (a_srv && strcmp(a_srv,"unknown") == 0);
     size_t l_arr_start = 0;
     size_t l_arr_end = 0;
-    s_set_offset_limit_json(json_obj_datum, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_atom(a_chain));
+    s_set_offset_limit_json(json_obj_datum, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_tx(a_chain));
     
     size_t i_tmp = 0;
     size_t
@@ -365,12 +369,15 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
     {
         if (i_tmp >= l_arr_end)
             break;
-        json_object *l_corr_object = NULL;
         if (l_datum->header.type_id != DAP_CHAIN_DATUM_TX)
             // go to next datum
             continue;        
         // it's a transaction        
-        bool l_is_unstake = false;
+        bool l_is_need_correction = false;
+        bool l_continue = false;
+        uint256_t l_corr_value = {}, l_cond_value = {};
+        bool l_recv_from_cond = false, l_send_to_same_cond = false;
+        json_object *l_corr_object = NULL, *l_cond_recv_object = NULL, *l_cond_send_object = NULL;
         dap_chain_datum_tx_t *l_tx = (dap_chain_datum_tx_t *)l_datum->data;
         dap_list_t *l_list_in_items = dap_chain_datum_tx_items_get(l_tx, TX_ITEM_TYPE_IN_ALL, NULL);
         if (!l_list_in_items) // a bad tx
@@ -382,7 +389,8 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
         const char *l_noaddr_token = NULL;
 
         dap_hash_fast_t l_tx_hash = *l_datum_iter->cur_hash;
-        const char *l_src_token = dap_ledger_tx_get_token_ticker_by_hash(l_ledger, &l_tx_hash);
+        const char *l_src_token = l_datum_iter->token_ticker;
+        //const char *l_src_token = dap_ledger_tx_get_token_ticker_by_hash(l_ledger, &l_tx_hash);
 
         int l_src_subtype = DAP_CHAIN_TX_OUT_COND_SUBTYPE_UNDEFINED;
         for (dap_list_t *it = l_list_in_items; it; it = it->next) {
@@ -433,10 +441,8 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
                     if (l_cond_prev->header.subtype == DAP_CHAIN_TX_OUT_COND_SUBTYPE_FEE)
                         l_noaddr_token = l_native_ticker;
                     else {
-                        if (l_cond_prev->header.subtype == DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_STAKE_LOCK) {
-                            l_is_unstake = true;
-                            l_unstake_value = l_cond_prev->header.value;
-                        }
+                        l_recv_from_cond = true;
+                        l_cond_value = l_cond_prev->header.value;
                         l_noaddr_token = l_src_token;
                     }
                 } break;
@@ -484,6 +490,7 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
             if (!l_dst_addr_present)
             {
                 json_object_put(j_arr_data);
+                j_arr_data = NULL;
                 json_object_put(j_obj_tx);
                 dap_list_free(l_list_out_items);
                 continue;
@@ -526,25 +533,20 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
                 SUM_256_256(l_fee_sum, l_value, &l_fee_sum);
             
             //tag
-            char *service_name = NULL;
+            const char *l_service_name = NULL;
             dap_chain_tx_tag_action_type_t l_action;
-            bool srv_found = dap_ledger_tx_service_info(l_ledger, &l_tx_hash, NULL, &service_name, &l_action);
+            bool srv_found = l_datum_iter->uid.uint64 ? true : false;
+            l_action = l_datum_iter->action;
+            l_service_name = dap_ledger_tx_action_str(l_action);
             if (!(l_action & a_action))
                 continue;
-
-            if (a_srv)
-            {
-              
+            if (a_srv) {
                 //skip if looking for UNKNOWN + it is known
-                if (look_for_unknown_service && srv_found) {
-                    continue;
-                }
-                            
+                if (look_for_unknown_service && srv_found)
+                    continue;                    
                 //skip if search condition provided, it not UNKNOWN and found name not match
-                if (!look_for_unknown_service && (!srv_found || strcmp(service_name, a_srv) != 0))
-                {
+                if (!look_for_unknown_service && (!srv_found || strcmp(l_service_name, a_srv) != 0))
                     continue;
-                }
             }
 
             if (l_dst_addr && dap_chain_addr_compare(l_dst_addr, a_addr)) {  
@@ -554,8 +556,8 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
                     break;
                 }             
                 if (!l_header_printed) {               
-                    s_tx_header_print(j_obj_tx, &l_tx_data_ht, l_tx, l_datum_iter->cur_atom_hash,
-                                      a_hash_out_type, l_ledger, &l_tx_hash, l_datum_iter->ret_code);
+                    s_tx_header_print(j_obj_tx, &l_tx_data_ht, l_tx, l_datum_iter,
+                                      a_hash_out_type, l_ledger, &l_tx_hash);
                     l_header_printed = true;
                     l_count++;
                     i_tmp++;
@@ -568,8 +570,8 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
                     l_src_str = dap_chain_addr_to_str_static(l_src_addr);
                 else
                     l_src_str = dap_chain_tx_out_cond_subtype_to_str(l_src_subtype);
-                if (l_is_unstake)
-                    l_value = l_unstake_value;
+                if (l_recv_from_cond)
+                    l_value = l_cond_value;
                 else if (!dap_strcmp(l_native_ticker, l_noaddr_token)) {
                     l_is_need_correction = true;
                     l_corr_value = l_value;
@@ -589,10 +591,12 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
                 json_object_object_add(j_obj_data, "token", l_dst_token ? json_object_new_string(l_dst_token)
                                                                             : json_object_new_string("UNKNOWN"));
                 json_object_object_add(j_obj_data, "source_address", json_object_new_string(l_src_str));
-                if (l_is_need_correction)
-                    l_corr_object = j_obj_data;
+                if (l_recv_from_cond && !l_cond_recv_object)
+                    l_cond_recv_object = j_obj_data;
                 else
                     json_object_array_add(j_arr_data, j_obj_data);
+                if (l_is_need_correction)
+                    l_corr_object = j_obj_data;
                 
             } else if (!l_src_addr || dap_chain_addr_compare(l_src_addr, a_addr)) {
                 if (!l_dst_addr && ((dap_chain_tx_out_cond_t *)it->data)->header.subtype == l_src_subtype && l_src_subtype == DAP_CHAIN_TX_OUT_COND_SUBTYPE_FEE)
@@ -605,17 +609,23 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
                     break;
                 }                                
                 if (!l_header_printed) {                    
-                    s_tx_header_print(j_obj_tx, &l_tx_data_ht, l_tx, l_datum_iter->cur_atom_hash,
-                                      a_hash_out_type, l_ledger, &l_tx_hash, l_datum_iter->ret_code);
+                    s_tx_header_print(j_obj_tx, &l_tx_data_ht, l_tx, l_datum_iter,
+                                      a_hash_out_type, l_ledger, &l_tx_hash);
                     l_header_printed = true;
                     l_count++;
                     i_tmp++;
                     l_src_token ? l_tx_ledger_accepted++ : l_tx_ledger_rejected++;
                 }
 
-                const char *l_dst_addr_str = l_dst_addr ? dap_chain_addr_to_str_static(l_dst_addr)
-                                                        : dap_chain_tx_out_cond_subtype_to_str(
-                                                              ((dap_chain_tx_out_cond_t *)it->data)->header.subtype);
+                const char *l_dst_addr_str = NULL;
+                if (l_dst_addr)
+                    l_dst_addr_str = dap_chain_addr_to_str_static(l_dst_addr);
+                else {
+                    dap_chain_tx_out_cond_subtype_t l_dst_subtype = ((dap_chain_tx_out_cond_t *)it->data)->header.subtype;
+                    l_dst_addr_str = dap_chain_tx_out_cond_subtype_to_str(l_dst_subtype);
+                    if (l_recv_from_cond && l_dst_subtype != DAP_CHAIN_TX_OUT_COND_SUBTYPE_FEE && l_dst_subtype == l_src_subtype)
+                        l_send_to_same_cond = true;
+                }
                 const char *l_coins_str, *l_value_str = dap_uint256_to_char(l_value, &l_coins_str);
                                 
                 json_object * j_obj_data = json_object_new_object();
@@ -631,13 +641,45 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
                 json_object_object_add(j_obj_data, "token", l_dst_token ? json_object_new_string(l_dst_token)
                                                                         : json_object_new_string("UNKNOWN"));
                 json_object_object_add(j_obj_data, "destination_address", json_object_new_string(l_dst_addr_str));
-                json_object_array_add(j_arr_data, j_obj_data);                
+                if (l_send_to_same_cond && !l_cond_send_object)
+                    l_cond_send_object = j_obj_data;
+                else
+                    json_object_array_add(j_arr_data, j_obj_data);
             }
         }  
-        if (l_continue){
-            l_continue = false;
+        if (l_continue)
             continue;
+
+        if (l_is_need_correction) {
+            SUM_256_256(l_corr_value, l_fee_sum, &l_corr_value);
+            const char *l_coins_str, *l_value_str = dap_uint256_to_char(l_corr_value, &l_coins_str);
+            json_object_object_add(l_corr_object, "recv_coins", json_object_new_string(l_coins_str));
+            json_object_object_add(l_corr_object, "recv_datoshi", json_object_new_string(l_value_str));
         }
+        if (l_send_to_same_cond) {
+            json_object *l_cond_recv_value_obj = json_object_object_get(l_cond_recv_object, "recv_datoshi");
+            const char *l_cond_recv_value_str = json_object_get_string(l_cond_recv_value_obj);
+            uint256_t l_cond_recv_value = dap_uint256_scan_uninteger(l_cond_recv_value_str);
+            json_object *l_cond_send_value_obj = json_object_object_get(l_cond_send_object, "send_datoshi");
+            const char *l_cond_send_value_str = json_object_get_string(l_cond_send_value_obj);
+            uint256_t l_cond_send_value = dap_uint256_scan_uninteger(l_cond_send_value_str);
+            assert(!IS_ZERO_256(l_cond_recv_value) && !IS_ZERO_256(l_cond_send_value));
+            int l_direction = compare256(l_cond_recv_value, l_cond_send_value);
+            if (l_direction > 0) {
+                SUBTRACT_256_256(l_cond_recv_value, l_cond_send_value, &l_cond_recv_value);
+                const char *l_coins_str, *l_value_str = dap_uint256_to_char(l_cond_recv_value, &l_coins_str);
+                json_object_object_add(l_cond_recv_object, "recv_coins", json_object_new_string(l_coins_str));
+                json_object_object_add(l_cond_recv_object, "recv_datoshi", json_object_new_string(l_value_str));
+                json_object_array_add(j_arr_data, l_cond_recv_object);
+            } else if (l_direction < 0) {
+                SUBTRACT_256_256(l_cond_send_value, l_cond_recv_value, &l_cond_send_value);
+                const char *l_coins_str, *l_value_str = dap_uint256_to_char(l_cond_send_value, &l_coins_str);
+                json_object_object_add(l_cond_send_object, "send_coins", json_object_new_string(l_coins_str));
+                json_object_object_add(l_cond_send_object, "send_datoshi", json_object_new_string(l_value_str));
+                json_object_array_add(j_arr_data, l_cond_send_object);
+            }
+        } else if (l_recv_from_cond)
+            json_object_array_add(j_arr_data, l_cond_recv_object);
 
         if (json_object_array_length(j_arr_data) > 0) {
             json_object_object_add(j_obj_tx, "data", j_arr_data);
@@ -648,16 +690,6 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
             json_object_put(j_obj_tx);
         }
         dap_list_free(l_list_out_items);
-        if (l_is_need_correction && l_corr_object) {
-            SUM_256_256(l_corr_value, l_fee_sum, &l_corr_value);
-            const char *l_coins_str, *l_value_str = dap_uint256_to_char(l_corr_value, &l_coins_str);
-            json_object_object_add(l_corr_object, "recv_coins", json_object_new_string(l_coins_str));
-            json_object_object_add(l_corr_object, "recv_datoshi", json_object_new_string(l_value_str));
-            json_object * j_arr_correct = json_object_new_object();            
-            json_object_object_add(j_arr_correct, "correction", l_corr_object);
-            json_object_array_add(json_obj_datum, j_arr_correct);
-            l_is_need_correction = false;
-        }
     }
     a_chain->callback_datum_iter_delete(l_datum_iter);
     // delete hashes
@@ -682,7 +714,8 @@ json_object* dap_db_history_addr(dap_chain_addr_t *a_addr, dap_chain_t *a_chain,
     return json_obj_datum;
 }
 
-static int s_json_tx_history_pack(json_object** a_json_obj_datum, dap_chain_datum_t * a_datum,  dap_chain_net_t *a_net,
+static int s_json_tx_history_pack(json_object** a_json_obj_datum, dap_chain_datum_iter_t *a_datum_iter,
+                                  dap_chain_datum_t * a_datum,
                                   dap_chain_t *a_chain, dap_chain_tx_tag_action_type_t a_action,
                                   const char *a_hash_out_type, bool a_out_brief, size_t* a_accepted,
                                   size_t* a_rejected, bool a_look_for_unknown_service, const char *a_srv)
@@ -691,19 +724,18 @@ static int s_json_tx_history_pack(json_object** a_json_obj_datum, dap_chain_datu
     dap_hash_fast_t l_ttx_hash = {0};
     dap_hash_fast(l_tx, a_datum->header.data_size, &l_ttx_hash);
 
-    char *service_name = NULL;
+    const char *service_name = NULL;
     dap_chain_tx_tag_action_type_t l_action = DAP_CHAIN_TX_TAG_ACTION_UNKNOWN;
-
-    dap_ledger_t *l_ledger = a_net->pub.ledger;
-    bool srv_found = dap_ledger_tx_service_info(l_ledger, &l_ttx_hash, NULL, &service_name, &l_action);
+    //bool srv_found = a_datum_iter->uid.uint64 ? true : false;
+    l_action = a_datum_iter->action;
+    service_name = dap_ledger_tx_action_str(l_action);
 
     if (!(l_action & a_action))
         return 1;
 
     if (a_srv)
     {
-        char *service_name = NULL;
-        bool srv_found = dap_ledger_tx_service_info(l_ledger, &l_ttx_hash, NULL, &service_name, NULL);
+        bool srv_found = a_datum_iter->uid.uint64 ? true : false;
         //skip if looking for UNKNOWN + it is known
         if (a_look_for_unknown_service && srv_found) {
             return 1;
@@ -717,7 +749,7 @@ static int s_json_tx_history_pack(json_object** a_json_obj_datum, dap_chain_datu
     }
 
     bool accepted_tx;
-    *a_json_obj_datum = dap_db_tx_history_to_json(&l_ttx_hash, NULL, l_tx, a_chain, a_hash_out_type, a_net, 0, &accepted_tx, a_out_brief);
+    *a_json_obj_datum = dap_db_tx_history_to_json(&l_ttx_hash, NULL, l_tx, a_chain, a_hash_out_type, a_datum_iter, 0, &accepted_tx, a_out_brief);
     if (!*a_json_obj_datum) {
         log_it(L_CRITICAL, "%s", c_error_memory_alloc);
         return 2;
@@ -741,94 +773,55 @@ json_object *dap_db_history_tx_all(dap_chain_t *a_chain, dap_chain_net_t *a_net,
             l_tx_ledger_accepted = 0,
             l_tx_ledger_rejected = 0,
             l_count = 0,
-            l_count_tx = 0;
-        int res = 0;
-        dap_chain_cell_t    *l_cell = NULL,
-                            *l_cell_tmp = NULL;
-        dap_chain_atom_iter_t *l_iter = NULL;
+            i_tmp = 0;
+        int res = 0;        
         json_object * json_arr_out = json_object_new_array();
         json_object * json_tx_history = NULL;        
         size_t l_arr_start = 0;
         size_t l_arr_end = 0;
-        s_set_offset_limit_json(json_arr_out, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_atom(a_chain));
+        s_set_offset_limit_json(json_arr_out, &l_arr_start, &l_arr_end, a_limit, a_offset, a_chain->callback_count_tx(a_chain));
         
         bool look_for_unknown_service = (a_srv && strcmp(a_srv,"unknown") == 0);
-        if(a_head)
-            HASH_ITER(hh, a_chain->cells, l_cell, l_cell_tmp) {            
-                if ((l_count_tx >= l_arr_end)&&(l_arr_end))
-                    break;
-                l_iter = a_chain->callback_atom_iter_create(a_chain, l_cell->id, NULL);
-                size_t l_atom_size = 0;
-                dap_chain_atom_ptr_t l_ptr = a_chain->callback_atom_iter_get(l_iter, DAP_CHAIN_ITER_OP_FIRST, &l_atom_size);
-                while (l_ptr && l_atom_size && ((l_count_tx < l_arr_end)||(!l_arr_end))) {
-                    size_t l_datums_count = 0;
-                    dap_chain_datum_t **l_datums = l_cell->chain->callback_atom_get_datums(l_ptr, l_atom_size, &l_datums_count);
-                    for (size_t i = 0; i < l_datums_count && ((l_count_tx < l_arr_end)||(!l_arr_end)); i++) {
-                        if (l_datums[i]->header.type_id == DAP_CHAIN_DATUM_TX) { 
-                            if (l_count_tx < l_arr_start) {
-                                l_count_tx++;
-                                continue;
-                            }
-                            res = s_json_tx_history_pack(&json_tx_history, l_datums[i], a_net, a_chain, a_action, a_hash_out_type, out_brief, 
-                                                        &l_tx_ledger_accepted, &l_tx_ledger_rejected, look_for_unknown_service, a_srv); 
-                            if (res == 1)
-                                continue;
-                            else if (res == 2)
-                            {
-                                json_object_put(json_arr_out);
-                                return NULL;
-                            }
-                            json_object_object_add(json_tx_history, "tx number", json_object_new_uint64(l_count+1));                     
-                            json_object_array_add(json_arr_out, json_tx_history);
-                            ++l_count_tx;
-                            l_count++;
-                        }
-                    }
-                    DAP_DEL_Z(l_datums);
-                    l_ptr = a_chain->callback_atom_iter_get(l_iter, DAP_CHAIN_ITER_OP_NEXT, &l_atom_size);
-                }
-                l_cell->chain->callback_atom_iter_delete(l_iter);
-            }
-        else 
+        // load transactions
+        dap_chain_datum_iter_t *l_datum_iter = a_chain->callback_datum_iter_create(a_chain);
+        
+        dap_chain_datum_callback_iters  iter_begin;
+        dap_chain_datum_callback_iters  iter_direc;
+        iter_begin = a_head ? a_chain->callback_datum_iter_get_first
+                            : a_chain->callback_datum_iter_get_last;
+        iter_direc = a_head ? a_chain->callback_datum_iter_get_next
+                            : a_chain->callback_datum_iter_get_prev;
+        
+        for (dap_chain_datum_t *l_datum = iter_begin(l_datum_iter);
+                                l_datum;
+                                l_datum = iter_direc(l_datum_iter))
         {
-            l_cell_tmp = HASH_LAST(a_chain->cells);
-            for(; l_cell_tmp; l_cell_tmp = l_cell_tmp->hh.prev){
-                if ((l_count_tx >= l_arr_end)&&(l_arr_end))
-                    break;
-                l_iter = a_chain->callback_atom_iter_create(a_chain, l_cell_tmp->id, NULL);
-                size_t l_atom_size = 0;
-                dap_chain_atom_ptr_t l_ptr = a_chain->callback_atom_iter_get(l_iter, DAP_CHAIN_ITER_OP_LAST, &l_atom_size);
-                while (l_ptr && l_atom_size && ((l_count_tx < l_arr_end)||(!l_arr_end))) {
-                    size_t l_datums_count = 0;
-                    dap_chain_datum_t **l_datums = l_cell_tmp->chain->callback_atom_get_datums(l_ptr, l_atom_size, &l_datums_count);
-                    for (size_t i = l_datums_count; i && ((l_count_tx < l_arr_end)||(!l_arr_end)); i--) {
-                        if (l_datums[i-1]->header.type_id == DAP_CHAIN_DATUM_TX) {
-                            if (l_count_tx < l_arr_start) {
-                                l_count_tx++;
-                                continue;
-                            }
-                            res = s_json_tx_history_pack(&json_tx_history, l_datums[i-1], a_net, a_chain, a_action, a_hash_out_type, out_brief, 
-                                                        &l_tx_ledger_accepted, &l_tx_ledger_rejected, look_for_unknown_service, a_srv); 
-                            if (res == 1)
-                                continue;
-                            else if (res == 2)
-                            {
-                                json_object_put(json_arr_out);
-                                return NULL;
-                            }
-                            json_object_object_add(json_tx_history, "tx number", json_object_new_uint64(l_count+1));                     
-                            json_object_array_add(json_arr_out, json_tx_history);
-                            ++l_count_tx;
-                            l_count++;
-                        }
-                    }
-                    DAP_DEL_Z(l_datums);
-                    l_ptr = a_chain->callback_atom_iter_get(l_iter, DAP_CHAIN_ITER_OP_PREV, &l_atom_size);
-                }
-                l_cell_tmp->chain->callback_atom_iter_delete(l_iter);
+            if (i_tmp >= l_arr_end)
+                break;
+            if (l_datum->header.type_id != DAP_CHAIN_DATUM_TX)
+                // go to next datum
+                continue;
+            
+            if (i_tmp < l_arr_start) {
+                i_tmp++;
+                continue;
             }
-        }
+            res = s_json_tx_history_pack(&json_tx_history, l_datum_iter, l_datum, a_chain, a_action, a_hash_out_type, out_brief,
+                                        &l_tx_ledger_accepted, &l_tx_ledger_rejected, look_for_unknown_service, a_srv);
+            if (res == 1)
+                continue;
+            else if (res == 2)
+            {
+                json_object_put(json_arr_out);
+                return NULL;
+            }
+            json_object_object_add(json_tx_history, "tx number", json_object_new_uint64(l_count+1));                     
+            json_object_array_add(json_arr_out, json_tx_history);
+            ++i_tmp;
+            l_count++;            
+        }        
         log_it(L_DEBUG, "END getting tx from chain");
+        a_chain->callback_datum_iter_delete(l_datum_iter);
 
         json_object_object_add(json_obj_summary, "network", json_object_new_string(a_net->pub.name));
         json_object_object_add(json_obj_summary, "chain", json_object_new_string(a_chain->name));
diff --git a/modules/net/include/dap_chain_ledger.h b/modules/net/include/dap_chain_ledger.h
index f4c28609100125802617db44e4e26717520edcdf..88bde9717b40dbe9cad1153e0ca45228882317da 100644
--- a/modules/net/include/dap_chain_ledger.h
+++ b/modules/net/include/dap_chain_ledger.h
@@ -200,6 +200,12 @@ typedef struct dap_ledger_datum_iter {
     void *cur_ledger_tx_item;
 } dap_ledger_datum_iter_t;
 
+typedef struct dap_ledger_datum_iter_data {
+    char token_ticker[DAP_CHAIN_TICKER_SIZE_MAX];
+    uint32_t action;
+    dap_chain_net_srv_uid_t uid;
+} dap_ledger_datum_iter_data_t;
+
 typedef int (*dap_ledger_verificator_callback_t)(dap_ledger_t *a_ledger, dap_chain_tx_out_cond_t *a_tx_out_cond, dap_chain_datum_tx_t *a_tx_in, bool a_owner);
 typedef void (*dap_ledger_updater_callback_t)(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx_in, dap_hash_fast_t *a_tx_in_hash, dap_chain_tx_out_cond_t *a_prev_cond);
 typedef void (*dap_ledger_delete_callback_t)(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx_in, dap_chain_tx_out_cond_t *a_prev_cond);
@@ -271,8 +277,8 @@ DAP_STATIC_INLINE char *dap_ledger_get_gdb_group(dap_ledger_t *a_ledger, const c
  *
  * return 1 OK, -1 error
  */
-int dap_ledger_tx_add(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_hash_fast_t *a_tx_hash, bool a_from_threshold);
-int dap_ledger_tx_load(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_chain_hash_fast_t *a_tx_hash);
+int dap_ledger_tx_add(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_hash_fast_t *a_tx_hash, bool a_from_threshold, dap_ledger_datum_iter_data_t *a_datum_index_data);
+int dap_ledger_tx_load(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_chain_hash_fast_t *a_tx_hash, dap_ledger_datum_iter_data_t *a_datum_index_data);
 int dap_ledger_tx_remove(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, dap_hash_fast_t *a_tx_hash);
 
 int dap_ledger_tx_add_check(dap_ledger_t *a_ledger, dap_chain_datum_tx_t *a_tx, size_t a_datum_size, dap_hash_fast_t *a_datum_hash);
diff --git a/modules/net/include/dap_chain_net.h b/modules/net/include/dap_chain_net.h
index 74cff108864d8dd81e5f7d1390e8a9a0f5fd162f..ca991e0d43c20462f6612cb9fa81b5448055e3d1 100644
--- a/modules/net/include/dap_chain_net.h
+++ b/modules/net/include/dap_chain_net.h
@@ -54,26 +54,24 @@ typedef enum dap_chain_net_state {
     NET_STATE_ONLINE
 } dap_chain_net_state_t;
 
+static const char s_gdb_nodes_postfix[] = ".nodes.list";
+
 typedef struct dap_chain_net {
     struct {
         dap_chain_net_id_t id;
-        char * name;
-        char * gdb_groups_prefix;
-        char * gdb_nodes;
-
+        char name[DAP_CHAIN_NET_NAME_MAX + 1], gdb_nodes[DAP_CHAIN_NET_NAME_MAX + sizeof(s_gdb_nodes_postfix) + 1];
+        const char *gdb_groups_prefix, *native_ticker;
         dap_list_t *keys;               // List of PoA certs for net
-
-        bool mempool_autoproc;
-
-        dap_chain_t *chains; // double-linked list of chains
-        const char *native_ticker;
+        dap_chain_t *chains;            // double-linked list of chains
         dap_ledger_t *ledger;
-        // Net fee
-        uint256_t fee_value;
+        uint256_t fee_value;            // Net fee
         dap_chain_addr_t fee_addr;
-        dap_list_t *bridged_networks;   // List of bridged network ID's allowed to cross-network TX
+        dap_chain_net_id_t *bridged_networks;   // List of bridged network ID's allowed to cross-network TX
+        uint16_t bridged_networks_count;
         dap_config_t *config;
+        bool mempool_autoproc;
     } pub;
+    UT_hash_handle hh, hh2;
     uint8_t pvt[];
 } dap_chain_net_t;
 
@@ -196,7 +194,7 @@ void dap_chain_net_srv_order_add_notify_callback(dap_chain_net_t *a_net, dap_sto
  */
 dap_list_t *dap_chain_datum_list(dap_chain_net_t *a_net, dap_chain_t *a_chain, dap_chain_datum_filter_func_t *a_filter_func, void *a_filter_func_param);
 
-int dap_chain_datum_add(dap_chain_t * a_chain, dap_chain_datum_t *a_datum, size_t a_datum_size, dap_hash_fast_t *a_datum_hash);
+int dap_chain_datum_add(dap_chain_t * a_chain, dap_chain_datum_t *a_datum, size_t a_datum_size, dap_hash_fast_t *a_datum_hash, void *a_datum_index_data);
 int dap_chain_datum_remove(dap_chain_t *a_chain, dap_chain_datum_t *a_datum, size_t a_datum_size, dap_hash_fast_t *a_datum_hash);
 
 bool dap_chain_net_get_load_mode(dap_chain_net_t * a_net);
diff --git a/modules/net/include/dap_chain_node_cli_cmd_tx.h b/modules/net/include/dap_chain_node_cli_cmd_tx.h
index be6bb5f251298dcc803e00ba26fad4233f23be79..375f1f34f2474baf60f60e02f6916f11028c1834 100644
--- a/modules/net/include/dap_chain_node_cli_cmd_tx.h
+++ b/modules/net/include/dap_chain_node_cli_cmd_tx.h
@@ -50,7 +50,7 @@ json_object * dap_db_tx_history_to_json(dap_chain_hash_fast_t* a_tx_hash,
                                         dap_chain_datum_tx_t * l_tx,
                                         dap_chain_t * a_chain, 
                                         const char *a_hash_out_type, 
-                                        dap_chain_net_t * l_net,
+                                        dap_chain_datum_iter_t *a_datum_iter,
                                         int l_ret_code,
                                         bool *accepted_tx,
                                         bool out_brief);
diff --git a/modules/net/srv/dap_chain_net_srv.c b/modules/net/srv/dap_chain_net_srv.c
index 88ca4c3c6e5f89a51e53659adb7875bd82ce1804..4ebb5f9c613db910b18c3c5f0132a26b77f52539 100644
--- a/modules/net/srv/dap_chain_net_srv.c
+++ b/modules/net/srv/dap_chain_net_srv.c
@@ -775,6 +775,10 @@ static int s_pay_verificator_callback(dap_ledger_t * a_ledger, dap_chain_tx_out_
     dap_chain_tx_in_cond_t *l_tx_in_cond = (dap_chain_tx_in_cond_t*)dap_chain_datum_tx_item_get(a_tx_in, NULL, NULL, TX_ITEM_TYPE_IN_COND, NULL);
     dap_chain_datum_tx_t *l_tx_prev = dap_ledger_tx_find_by_hash(a_ledger , &l_tx_in_cond->header.tx_prev_hash);
     dap_chain_tx_out_cond_t *l_prev_out_cond = dap_chain_datum_tx_out_cond_get(l_tx_prev, DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_PAY, NULL);
+    if (!l_prev_out_cond) {
+        log_it(L_ERROR, "Can't find datum tx");
+        return -15;
+    }
 
     uint256_t l_unit_price = {};
     if (!l_receipt->receipt_info.units) {
diff --git a/modules/service/stake/dap_chain_net_srv_stake_lock.c b/modules/service/stake/dap_chain_net_srv_stake_lock.c
index 7a5d72bcd9cf9762641eb2dd54eb296efec5856c..84ee2e167286c8cbfe14bdbe29dce38215cf5351 100644
--- a/modules/service/stake/dap_chain_net_srv_stake_lock.c
+++ b/modules/service/stake/dap_chain_net_srv_stake_lock.c
@@ -1109,6 +1109,8 @@ static void s_stake_lock_callback_updater(dap_ledger_t *a_ledger, dap_chain_datu
         return;
     int l_out_num = 0;
     dap_chain_tx_out_cond_t *l_cond = dap_chain_datum_tx_out_cond_get(a_tx_in, DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_STAKE_LOCK, &l_out_num);
+    if (!l_cond)
+        return;
     if (l_cond->subtype.srv_stake_lock.flags & DAP_CHAIN_NET_SRV_STAKE_LOCK_FLAG_CREATE_BASE_TX)
         dap_ledger_emission_for_stake_lock_item_add(a_ledger, a_tx_in_hash);
 }
diff --git a/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c b/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c
index 6ae42e529b82481abac1dc6d1753efeff1f19e62..52be033cad1ff4caa897d29d92d3edc187003e85 100644
--- a/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c
+++ b/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c
@@ -464,10 +464,10 @@ void dap_chain_net_srv_stake_key_update(dap_chain_addr_t *a_signing_addr, uint25
     if (!l_stake)
         return; // It's update for non delegated key, it's OK
     HASH_DELETE(ht, l_srv_stake->tx_itemlist, l_stake);
+    char *l_old_value_str = dap_chain_balance_to_coins(l_stake->locked_value);
     l_stake->locked_value = l_stake->value = a_new_value;
     l_stake->tx_hash = *a_new_tx_hash;
     HASH_ADD(ht, l_srv_stake->tx_itemlist, tx_hash, sizeof(dap_hash_fast_t), l_stake);
-    char *l_old_value_str = dap_chain_balance_to_coins(l_stake->locked_value);
     const char *l_new_value_str; dap_uint256_to_char(a_new_value, &l_new_value_str);
     log_it(L_NOTICE, "Updated key with fingerprint %s and locked value %s to new locked value %s for node " NODE_ADDR_FP_STR,
                             dap_chain_hash_fast_to_str_static(&a_signing_addr->data.hash_fast), l_old_value_str,
@@ -1263,7 +1263,7 @@ static dap_chain_datum_decree_t *s_stake_decree_invalidate(dap_chain_net_t *a_ne
     dap_tsd_t *l_tsd = NULL;
 
     l_total_tsd_size += sizeof(dap_tsd_t) + sizeof(dap_chain_addr_t);
-    l_tsd = DAP_NEW_Z_SIZE(dap_tsd_t, l_total_tsd_size);
+    l_tsd = DAP_NEW_Z_SIZE(dap_tsd_t, sizeof(dap_tsd_t) + sizeof(dap_chain_addr_t));
     if (!l_tsd) {
         log_it(L_CRITICAL, "%s", c_error_memory_alloc);
         return NULL;
@@ -1273,6 +1273,17 @@ static dap_chain_datum_decree_t *s_stake_decree_invalidate(dap_chain_net_t *a_ne
     *(dap_chain_addr_t*)(l_tsd->data) = l_tx_out_cond->subtype.srv_stake_pos_delegate.signing_addr;
     l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
 
+    l_total_tsd_size += sizeof(dap_tsd_t) + sizeof(dap_chain_node_addr_t);
+    l_tsd = DAP_NEW_Z_SIZE(dap_tsd_t, sizeof(dap_tsd_t) + sizeof(dap_chain_node_addr_t));
+    if (!l_tsd) {
+        log_it(L_CRITICAL, "%s", c_error_memory_alloc);
+        return NULL;
+    }
+    l_tsd->type = DAP_CHAIN_DATUM_DECREE_TSD_TYPE_NODE_ADDR;
+    l_tsd->size = sizeof(dap_chain_node_addr_t);
+    *(dap_chain_node_addr_t*)(l_tsd->data) = l_tx_out_cond->subtype.srv_stake_pos_delegate.signer_node_addr;
+    l_tsd_list = dap_list_append(l_tsd_list, l_tsd);
+
     l_decree = DAP_NEW_Z_SIZE(dap_chain_datum_decree_t, sizeof(dap_chain_datum_decree_t) + l_total_tsd_size);
     if (!l_decree) {
         log_it(L_CRITICAL, "%s", c_error_memory_alloc);
@@ -1434,10 +1445,20 @@ char *s_staker_order_create(dap_chain_net_t *a_net, uint256_t a_value, dap_hash_
     return l_order_hash_str;
 }
 
+static int time_compare_orders(const void *a, const void *b) {
+    dap_global_db_obj_t *obj_a = (dap_global_db_obj_t*)a;
+    dap_global_db_obj_t *obj_b = (dap_global_db_obj_t*)b;
+
+    if (obj_a->timestamp < obj_b->timestamp) return -1;
+    if (obj_a->timestamp > obj_b->timestamp) return 1;
+    return 0;
+}
+
 static int s_cli_srv_stake_order(int a_argc, char **a_argv, int a_arg_index, void **a_str_reply, const char *a_hash_out_type)
 {
     enum {
-        CMD_NONE, CMD_CREATE_FEE, CMD_CREATE_VALIDATOR, CMD_CREATE_STAKER, CMD_UPDATE, CMD_LIST, CMD_REMOVE
+        CMD_NONE, CMD_CREATE_FEE, CMD_CREATE_VALIDATOR, CMD_CREATE_STAKER, CMD_UPDATE, CMD_LIST,
+        CMD_LIST_STAKER, CMD_LIST_VALIDATOR, CMD_LIST_FEE, CMD_REMOVE
     };
     int l_cmd_num = CMD_NONE;
     const char *l_create_type = NULL;
@@ -1762,6 +1783,15 @@ static int s_cli_srv_stake_order(int a_argc, char **a_argv, int a_arg_index, voi
             dap_cli_server_cmd_set_reply_text(a_str_reply, "Command 'order list' requires parameter -net");
             return -3;
         }
+        const char * l_list_type = NULL;
+        int l_list_filter = 0;
+        if (dap_cli_server_cmd_check_option(a_argv, l_arg_index, dap_min(a_argc, l_arg_index + 1), "staker") >= 0)
+            l_list_filter = CMD_LIST_STAKER;
+        else if (dap_cli_server_cmd_check_option(a_argv, l_arg_index, dap_min(a_argc, l_arg_index + 1), "validator") >= 0)
+            l_list_filter = CMD_LIST_VALIDATOR;
+        else if (dap_cli_server_cmd_check_option(a_argv, l_arg_index, dap_min(a_argc, l_arg_index + 1), "fee") >= 0)
+            l_list_filter = CMD_LIST_FEE;
+
         dap_chain_net_t *l_net = dap_chain_net_by_name(l_net_str);
         if (!l_net) {
             dap_cli_server_cmd_set_reply_text(a_str_reply, "Network %s not found", l_net_str);
@@ -1773,6 +1803,7 @@ static int s_cli_srv_stake_order(int a_argc, char **a_argv, int a_arg_index, voi
                                         dap_chain_net_srv_order_get_common_group(l_net);
             size_t l_orders_count = 0;
             dap_global_db_obj_t * l_orders = dap_global_db_get_all_sync(l_gdb_group_str, &l_orders_count);
+            qsort(l_orders, l_orders_count, sizeof(dap_global_db_obj_t), time_compare_orders);
             for (size_t i = 0; i < l_orders_count; i++) {
                 const dap_chain_net_srv_order_t *l_order = dap_chain_net_srv_order_check(l_orders[i].key, l_orders[i].value, l_orders[i].value_len);
                 if (!l_order) {
@@ -1782,6 +1813,23 @@ static int s_cli_srv_stake_order(int a_argc, char **a_argv, int a_arg_index, voi
                 if (l_order->srv_uid.uint64 != DAP_CHAIN_NET_SRV_STAKE_POS_DELEGATE_ID &&
                         l_order->srv_uid.uint64 != DAP_CHAIN_NET_SRV_STAKE_POS_DELEGATE_ORDERS)
                     continue;
+
+                switch (l_list_filter) {
+                    case CMD_LIST_STAKER:
+                        if (l_order->srv_uid.uint64 != DAP_CHAIN_NET_SRV_STAKE_POS_DELEGATE_ORDERS || l_order->direction != SERV_DIR_BUY )
+                            continue;
+                        break;
+                    case CMD_LIST_VALIDATOR:
+                        if (l_order->srv_uid.uint64 != DAP_CHAIN_NET_SRV_STAKE_POS_DELEGATE_ORDERS || l_order->direction != SERV_DIR_SELL)
+                            continue;
+                        break;
+                    case CMD_LIST_FEE:
+                        if (l_order->srv_uid.uint64 != DAP_CHAIN_NET_SRV_STAKE_POS_DELEGATE_ID)
+                            continue;
+                        break;
+                    default:
+                        break;
+                }
                 // TODO add filters to list (token, address, etc.)
                 dap_string_append(l_reply_str, "\n");
                 dap_chain_net_srv_order_dump_to_string(l_order, l_reply_str, a_hash_out_type, l_net->pub.native_ticker);
diff --git a/modules/service/xchange/dap_chain_net_srv_xchange.c b/modules/service/xchange/dap_chain_net_srv_xchange.c
index 7e8c19c190c14370b73f1ad8b1a185f8ffa95cd0..bd3fb71ccbde0dae3e710a756d36264af3a8aac8 100644
--- a/modules/service/xchange/dap_chain_net_srv_xchange.c
+++ b/modules/service/xchange/dap_chain_net_srv_xchange.c
@@ -1146,6 +1146,8 @@ dap_chain_net_srv_xchange_price_t *s_xchange_price_from_order(dap_chain_net_t *a
     }
     l_price->creation_date = a_order->header.ts_created;
     dap_chain_tx_out_cond_t *l_out_cond = dap_chain_datum_tx_out_cond_get(a_order, DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_XCHANGE , NULL);
+    if (!l_out_cond)
+        return NULL;
     strcpy(l_price->token_buy, l_out_cond->subtype.srv_xchange.buy_token);
     MULT_256_COIN(l_out_cond->header.value, l_out_cond->subtype.srv_xchange.rate, &l_price->datoshi_buy);
 
@@ -1773,7 +1775,6 @@ static bool s_string_append_tx_cond_info( dap_string_t * a_reply_str,
                                          tx_opt_status_t a_filter_by_status,
                                          bool a_print_prev_hash, bool a_print_status, bool a_print_ts)
 {
-    enum{TX_TYPE_NONE, TX_TYPE_ORDER, TX_TYPE_EXCHANGE, TX_TYPE_INVALIDATE};
     size_t l_tx_size = dap_chain_datum_tx_get_size(a_tx);
 
     dap_hash_fast_t l_tx_hash = {0};
@@ -1891,6 +1892,10 @@ static bool s_string_append_tx_cond_info( dap_string_t * a_reply_str,
 
             int l_out_num = l_in_cond->header.tx_out_prev_idx;
             dap_chain_tx_out_cond_t *l_out_cond = dap_chain_datum_tx_out_cond_get(l_prev_tx, DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_XCHANGE, &l_out_num);
+            if (!l_out_cond) {
+                log_it(L_ERROR, "Can't find datum tx");
+                return false;
+            }
             dap_hash_fast_t l_order_hash = dap_ledger_get_first_chain_tx_hash(a_net->pub.ledger, a_tx, l_out_cond);
             if ( dap_hash_fast_is_blank(&l_order_hash) )
                 l_order_hash = l_in_cond->header.tx_prev_hash;
diff --git a/modules/type/blocks/dap_chain_cs_blocks.c b/modules/type/blocks/dap_chain_cs_blocks.c
index a0feca9322aeb6f880bc3fb2371735949987a467..9361327d54e2fabb7e6277dd4fc4cd1450615bb6 100644
--- a/modules/type/blocks/dap_chain_cs_blocks.c
+++ b/modules/type/blocks/dap_chain_cs_blocks.c
@@ -42,6 +42,9 @@ typedef struct dap_chain_block_datum_index {
     time_t ts_added;
     dap_chain_block_cache_t *block_cache;
     size_t datum_index;
+    char token_ticker[DAP_CHAIN_TICKER_SIZE_MAX];
+    dap_chain_net_srv_uid_t service_uid;
+    dap_chain_tx_tag_action_type_t action;
     UT_hash_handle hh;
 } dap_chain_block_datum_index_t;
 
@@ -189,7 +192,7 @@ int dap_chain_cs_blocks_init()
             "block -net <net_name> [-chain <chain_name>] dump <block_hash>\n"
                 "\t\tDump block info\n\n"
 
-            "block -net <net_name> [-chain <chain_name>] list [{signed | first_signed}] [-limit] [-offset]"
+            "block -net <net_name> [-chain <chain_name>] list [{signed | first_signed}] [-limit] [-offset] [-head]"
             " [-from_hash <block_hash>] [-to_hash <block_hash>] [-from_date <YYMMDD>] [-to_date <YYMMDD>]"
             " [{-cert <signing_cert_name> | -pkey_hash <signing_cert_pkey_hash>}] [-unspent]]\n"
                 "\t\t List blocks\n\n"
@@ -210,11 +213,10 @@ int dap_chain_cs_blocks_init()
 
         "Reward for block signs:\n"
             "block -net <net_name> [-chain <chain_name>] reward set"
-            " -cert <poa_cert_name> -value <value>\n"
+            " -poa_cert <poa_cert_name> -value <value>\n"
                 "\t\t Set base reward for sign for one block at one minute\n\n"
 
-            "block -net <net_name> [-chain <chain_name>] reward show"
-            " -cert <poa_cert_name> -value <value>\n"
+            "block -net <net_name> [-chain <chain_name>] reward show\n"
                 "\t\t Show base reward for sign for one block at one minute\n\n"
 
             "block -net <net_name> [-chain <chain_name>] reward collect"
@@ -473,7 +475,7 @@ static void s_cli_meta_hex_print(json_object* a_json_obj_out, const char * a_met
 {
     int l_len = a_meta->hdr.data_size * 2 + 5;
     char *l_str = DAP_NEW_STACK_SIZE(char, l_len);
-    snprintf(l_str, 2, "0x");
+    strcpy(l_str, "0x");
     dap_bin2hex(l_str + 2, a_meta->data, a_meta->hdr.data_size);
     json_object_object_add(a_json_obj_out, a_meta_title, json_object_new_string(l_str));
 }
@@ -756,7 +758,7 @@ static int s_cli_blocks(int a_argc, char ** a_argv, void **a_str_reply)
                     json_object_object_add(json_obj_meta, "# -", json_object_new_string(l_hexbuf));
                     int l_len = l_meta->hdr.data_size * 2 + 5;
                     char *l_data_hex = DAP_NEW_STACK_SIZE(char, l_len);
-                    snprintf(l_data_hex, 2, "0x");
+                    strcpy(l_data_hex, "0x");
                     dap_bin2hex(l_data_hex + 2, l_meta->data, l_meta->hdr.data_size);
                     json_object_object_add(json_obj_meta, "Data hex - ", json_object_new_string(l_data_hex)); }
                 }
@@ -976,7 +978,8 @@ static int s_cli_blocks(int a_argc, char ** a_argv, void **a_str_reply)
                 char l_buf[DAP_TIME_STR_SIZE];
                 json_object* json_obj_bl_cache = json_object_new_object();
                 dap_time_to_str_rfc822(l_buf, DAP_TIME_STR_SIZE, l_ts);
-                json_object_object_add(json_obj_bl_cache, "block",json_object_new_uint64(i_tmp));
+                json_object_object_add(json_obj_bl_cache, "#",json_object_new_uint64(i_tmp));
+                json_object_object_add(json_obj_bl_cache, "block number",json_object_new_uint64(l_block_cache->block_number));
                 json_object_object_add(json_obj_bl_cache, "hash",json_object_new_string(l_block_cache->block_hash_str));
                 json_object_object_add(json_obj_bl_cache, "ts_create",json_object_new_string(l_buf));
                 json_object_array_add(json_arr_bl_cache_out, json_obj_bl_cache);
@@ -1181,9 +1184,9 @@ static int s_cli_blocks(int a_argc, char ** a_argv, void **a_str_reply)
                 : dap_chain_mempool_tx_reward_create(l_blocks, l_cert->enc_key, l_addr, l_block_list, l_fee_value, l_hash_out_type);
             if (l_hash_tx) {
                 json_object* json_obj_out = json_object_new_object();
-                char *l_val = dap_strdup_printf(l_val, "TX for %s collection created successfully, hash = %s\n", l_subcmd_str, l_hash_tx);
-                json_object_object_add(json_obj_out, "status", json_object_new_string(l_val));
-                DAP_DELETE(l_val);
+                char *l_val = dap_strdup_printf("TX for %s collection created successfully, hash = %s\n", l_subcmd_str, l_hash_tx);
+                json_object_object_add(json_obj_out, "status", json_object_new_string(l_val ? l_val : "(null)"));
+                DAP_DEL_Z(l_val);
                 json_object_array_add(*json_arr_reply, json_obj_out);
                 DAP_DELETE(l_hash_tx);
             } else {
@@ -1478,10 +1481,12 @@ static int s_add_atom_datums(dap_chain_cs_blocks_t *a_blocks, dap_chain_block_ca
             break;
         }
         dap_hash_fast_t *l_datum_hash = a_block_cache->datum_hash + i;
-        int l_res = dap_chain_datum_add(a_blocks->chain, l_datum, l_datum_size, l_datum_hash);
+        dap_ledger_datum_iter_data_t l_datum_index_data = { .token_ticker = "0", .action = DAP_CHAIN_TX_TAG_ACTION_UNKNOWN , .uid.uint64 = 0 };
+
+        int l_res = dap_chain_datum_add(a_blocks->chain, l_datum, l_datum_size, l_datum_hash, &l_datum_index_data);
         l_ret++;
         if (l_datum->header.type_id == DAP_CHAIN_DATUM_TX)
-            PVT(a_blocks)->tx_count++;
+            PVT(a_blocks)->tx_count++;  
         // Save datum hash -> block_hash link in hash table
         dap_chain_block_datum_index_t *l_datum_index = DAP_NEW_Z(dap_chain_block_datum_index_t);
         if (!l_datum_index) {
@@ -1493,6 +1498,9 @@ static int s_add_atom_datums(dap_chain_cs_blocks_t *a_blocks, dap_chain_block_ca
         l_datum_index->datum_hash = *l_datum_hash;
         l_datum_index->ret_code = l_res;
         l_datum_index->datum_index = i;
+        l_datum_index->action = l_datum_index_data.action;
+        l_datum_index->service_uid = l_datum_index_data.uid;
+        dap_strncpy(l_datum_index->token_ticker, l_datum_index_data.token_ticker, DAP_CHAIN_TICKER_SIZE_MAX);
         pthread_rwlock_wrlock(&PVT(a_blocks)->datums_rwlock);
         HASH_ADD(hh, PVT(a_blocks)->datum_index, datum_hash, sizeof(*l_datum_hash), l_datum_index);
         pthread_rwlock_unlock(&PVT(a_blocks)->datums_rwlock);
@@ -2212,12 +2220,18 @@ static void s_datum_iter_fill(dap_chain_datum_iter_t *a_datum_iter, dap_chain_bl
         a_datum_iter->cur_hash = &a_datum_index->datum_hash;
         a_datum_iter->cur_atom_hash = &a_datum_index->block_cache->block_hash;
         a_datum_iter->ret_code = a_datum_index->ret_code;
+        a_datum_iter->action = a_datum_index->action;
+        a_datum_iter->uid = a_datum_index->service_uid;    
+        a_datum_iter->token_ticker = dap_strcmp(a_datum_index->token_ticker, "0") ? a_datum_index->token_ticker : NULL;
     } else {
         a_datum_iter->cur = NULL;
         a_datum_iter->cur_hash = NULL;
         a_datum_iter->cur_atom_hash = NULL;
         a_datum_iter->cur_size = 0;
         a_datum_iter->ret_code = 0;
+        a_datum_iter->token_ticker = NULL;
+        a_datum_iter->action = 0;
+        a_datum_iter->uid.uint64 = 0;
     }
     debug_if(a_datum_index && !a_datum_index->block_cache->datum, L_ERROR, "Chains was deleted with errors");
 }
diff --git a/modules/type/dag/dap_chain_cs_dag.c b/modules/type/dag/dap_chain_cs_dag.c
index b8d6b9cddb7ded3eb9d4013a45bc17f05572fb6c..f81527ebc8f6906e4f61ca7c40e46ac24502da41 100644
--- a/modules/type/dag/dap_chain_cs_dag.c
+++ b/modules/type/dag/dap_chain_cs_dag.c
@@ -407,7 +407,7 @@ static int s_dap_chain_add_atom_to_events_table(dap_chain_cs_dag_t *a_dag, dap_c
     }
     dap_hash_fast_t l_datum_hash;
     dap_chain_datum_calc_hash(l_datum, &l_datum_hash);
-    int l_ret = dap_chain_datum_add(a_dag->chain, l_datum, l_datum_size, &l_datum_hash);
+    int l_ret = dap_chain_datum_add(a_dag->chain, l_datum, l_datum_size, &l_datum_hash, NULL);
     if (l_datum->header.type_id == DAP_CHAIN_DATUM_TX)  // && l_ret == 0
         PVT(a_dag)->tx_count++;
     a_event_item->datum_hash = l_datum_hash;
@@ -458,11 +458,7 @@ static dap_chain_atom_verify_res_t s_chain_callback_atom_add(dap_chain_t * a_cha
     dap_chain_cs_dag_event_t * l_event = (dap_chain_cs_dag_event_t *) a_atom;
 
     dap_chain_hash_fast_t l_event_hash = *a_atom_hash;
-    if(s_debug_more) {
-        char l_event_hash_str[DAP_CHAIN_HASH_FAST_STR_SIZE] = { '\0' };
-        dap_chain_hash_fast_to_str(&l_event_hash, l_event_hash_str, sizeof(l_event_hash_str));
-        log_it(L_DEBUG, "Processing event: %s ... (size %zd)", l_event_hash_str,a_atom_size);
-    }
+    debug_if(s_debug_more, L_DEBUG, "Processing event: %s ... (size %zd)",  dap_chain_hash_fast_to_str_static(&l_event_hash), a_atom_size);
     pthread_mutex_lock(&PVT(l_dag)->events_mutex);
     // check if we already have this event
     dap_chain_atom_verify_res_t ret = s_dap_chain_check_if_event_is_present(PVT(l_dag)->events, &l_event_hash) ||
@@ -683,7 +679,6 @@ static bool s_chain_callback_datums_pool_proc(dap_chain_t *a_chain, dap_chain_da
      * or we have successfully chosen the hash(es) to link with.
      * No additional conditions required.
     */
-    ++l_dag->round_id;
     uint64_t l_event_size = 0;
     dap_chain_cs_dag_event_t * l_event = l_dag->callback_cs_event_create
             ? l_dag->callback_cs_event_create(l_dag, a_datum, l_hashes, l_hashes_linked, &l_event_size)
@@ -710,9 +705,9 @@ static bool s_chain_callback_datums_pool_proc(dap_chain_t *a_chain, dap_chain_da
     l_res = dap_chain_cs_dag_event_gdb_set(l_dag, l_event_hash_hex_str, l_event, l_event_size, &l_round_item);
     DAP_DELETE(l_event);
     log_it(l_res ? L_INFO : L_ERROR,
-           l_res ? "Event %s placed into new forming round [id %"DAP_UINT64_FORMAT_U"]"
-                 : "Can't add new event %s to new events round [id %"DAP_UINT64_FORMAT_U"]",
-           l_event_hash_hex_str, l_dag->round_id);
+           l_res ? "Event %s placed into new forming round"
+                 : "Can't add new event %s to new events round",
+           l_event_hash_hex_str);
     return l_res;
 }
 
@@ -808,12 +803,8 @@ static dap_chain_atom_verify_res_t s_chain_callback_atom_verify(dap_chain_t *a_c
         HASH_FIND(hh, PVT(l_dag)->events ,l_hash ,sizeof (*l_hash),  l_event_search);
         pthread_mutex_unlock(l_events_mutex);
         if (l_event_search == NULL) {
-            if(s_debug_more) {
-                char l_hash_str[DAP_CHAIN_HASH_FAST_STR_SIZE];
-                dap_chain_hash_fast_to_str(l_hash, l_hash_str, sizeof(l_hash_str));
-                log_it(L_WARNING, "Hash %s wasn't in hashtable of previously parsed, event %s goes to threshold",
-                                        l_hash_str, dap_hash_fast_to_str_static(a_atom_hash));
-            }
+            debug_if(s_debug_more, L_WARNING, "Hash %s wasn't in hashtable of previously parsed, event %s goes to threshold",
+                                              dap_hash_fast_to_str_static(l_hash), dap_hash_fast_to_str_static(a_atom_hash));
             res = ATOM_MOVE_TO_THRESHOLD;
             break;
         }
@@ -1297,7 +1288,8 @@ static void s_json_dag_pack_event(json_object * a_json_out, dap_chain_cs_dag_eve
     json_object * json_obj_event_i = json_object_new_object();                            
     char buf[DAP_TIME_STR_SIZE];
     dap_time_to_str_rfc822(buf, DAP_TIME_STR_SIZE, a_event_item->event->header.ts_created);
-    json_object_object_add(json_obj_event_i, "event", json_object_new_string(dap_itoa(i)));
+    json_object_object_add(json_obj_event_i, "#", json_object_new_string(dap_itoa(i)));
+    json_object_object_add(json_obj_event_i, "event number", json_object_new_uint64(a_event_item->event_number));
     json_object_object_add(json_obj_event_i, "hash", json_object_new_string(dap_chain_hash_fast_to_str_static(&a_event_item->hash)));
     json_object_object_add(json_obj_event_i, "ts_create", json_object_new_string(buf));
     json_object_array_add(a_json_out, json_obj_event_i);
diff --git a/modules/type/dag/dap_chain_cs_dag_event.c b/modules/type/dag/dap_chain_cs_dag_event.c
index f89726a8330a77a48eb7ff8b83812c22ea743670..c9d769f044cff34697e19f80266e5d095de84779 100644
--- a/modules/type/dag/dap_chain_cs_dag_event.c
+++ b/modules/type/dag/dap_chain_cs_dag_event.c
@@ -43,9 +43,9 @@
  * @param a_hashes_count
  * @return
  */
-dap_chain_cs_dag_event_t *dap_chain_cs_dag_event_new(dap_chain_id_t a_chain_id, dap_chain_cell_id_t a_cell_id, uint64_t a_round_id,
-                                                     dap_chain_datum_t *a_datum, dap_enc_key_t *a_key,
-                                                     dap_chain_hash_fast_t *a_hashes, size_t a_hashes_count, size_t *a_event_size)
+dap_chain_cs_dag_event_t *dap_chain_cs_dag_event_new(dap_chain_id_t a_chain_id, dap_chain_cell_id_t a_cell_id,
+                                                     dap_chain_datum_t *a_datum, dap_enc_key_t *a_key, dap_chain_hash_fast_t *a_hashes,
+                                                     size_t a_hashes_count, size_t *a_event_size)
 {
     assert(a_event_size);
     size_t l_hashes_size = sizeof(*a_hashes) * a_hashes_count,
@@ -53,7 +53,7 @@ dap_chain_cs_dag_event_t *dap_chain_cs_dag_event_new(dap_chain_id_t a_chain_id,
         l_event_size = sizeof(dap_chain_class_dag_event_hdr_t) + l_hashes_size + l_datum_size;
     dap_chain_cs_dag_event_t *l_event_new = DAP_NEW_Z_SIZE(dap_chain_cs_dag_event_t, l_event_size);
     *l_event_new = (dap_chain_cs_dag_event_t) {
-        { // .round_id = a_round_id,
+        {
             .ts_created = dap_time_now(),
             .chain_id = a_chain_id,
             .cell_id = a_cell_id,
@@ -149,22 +149,18 @@ size_t dap_chain_cs_dag_event_sign_add(dap_chain_cs_dag_event_t **a_event_ptr, s
     if (dap_chain_cs_dag_event_sign_exists(l_event, a_event_size, a_key)) {
         size_t l_pub_key_size = 0;
         uint8_t *l_pub_key = dap_enc_key_serialize_pub_key(a_key, &l_pub_key_size);
-        dap_hash_fast_t l_pkey_hash = {};
-        dap_hash_fast(l_pub_key, l_pub_key_size, &l_pkey_hash);
-        DAP_DELETE(l_pub_key);
-        char l_hash_str[DAP_CHAIN_HASH_FAST_STR_SIZE];
-        dap_hash_fast_to_str(&l_pkey_hash, l_hash_str, DAP_CHAIN_HASH_FAST_STR_SIZE);
-        log_it(L_DEBUG, "Sign from this key exists: %s", l_hash_str);
-        return 0;
+        return log_it(L_DEBUG, "Already signed with pkey %s", dap_get_data_hash_str(l_pub_key, l_pub_key_size).s), DAP_DELETE(l_pub_key), 0;
     }
     size_t l_event_size_excl_sign = dap_chain_cs_dag_event_calc_size_excl_signs(l_event, a_event_size);
     dap_sign_t *l_sign = dap_sign_create(a_key, l_event, l_event_size_excl_sign, 0);
     size_t l_sign_size = dap_sign_get_size(l_sign);
-    *a_event_ptr = l_event = DAP_REALLOC(l_event, a_event_size + l_sign_size);
+    if (! (l_event = DAP_REALLOC(*a_event_ptr, a_event_size + l_sign_size) ))
+        return log_it(L_CRITICAL, "Memory allocation error"), DAP_DELETE(l_sign), a_event_size;
     size_t l_event_size = a_event_size - sizeof(l_event->header);
     memcpy(l_event->hashes_n_datum_n_signs + l_event_size, l_sign, l_sign_size);
     l_event->header.signs_count++;
     DAP_DELETE(l_sign);
+    *a_event_ptr = l_event;
     return a_event_size + l_sign_size;
 }
 
@@ -192,18 +188,18 @@ static bool s_sign_exists(uint8_t *a_pos, size_t a_len, dap_enc_key_t *a_key)
 
 bool dap_chain_cs_dag_event_sign_exists(dap_chain_cs_dag_event_t *a_event, size_t a_event_size, dap_enc_key_t *a_key)
 {
-    size_t l_hashes_size = a_event->header.hash_count*sizeof(dap_chain_hash_fast_t);
-    dap_chain_datum_t * l_datum = (dap_chain_datum_t*)(a_event->hashes_n_datum_n_signs + l_hashes_size);
-    size_t l_datum_size =  dap_chain_datum_size(l_datum);
-    uint8_t *l_offset = a_event->hashes_n_datum_n_signs + l_hashes_size + l_datum_size;
-    size_t l_signs_size = a_event_size - sizeof(a_event->header) - l_hashes_size - l_datum_size;
-    return s_sign_exists(l_offset, l_signs_size, a_key);
+    size_t l_hashes_size = a_event->header.hash_count * sizeof(dap_chain_hash_fast_t);
+    dap_chain_datum_t *l_datum = (dap_chain_datum_t*)(a_event->hashes_n_datum_n_signs + l_hashes_size);
+    size_t l_datum_size = dap_chain_datum_size(l_datum);
+    return s_sign_exists(a_event->hashes_n_datum_n_signs + l_hashes_size + l_datum_size,
+                        a_event_size - sizeof(a_event->header) - l_hashes_size - l_datum_size,
+                        a_key);
 }
 
 bool dap_chain_cs_dag_event_round_sign_exists(dap_chain_cs_dag_event_round_item_t *a_round_item, dap_enc_key_t *a_key) {
-    uint8_t *l_offset = a_round_item->event_n_signs + (size_t)a_round_item->event_size;
-    size_t l_signs_size = (size_t)a_round_item->data_size - (size_t)a_round_item->event_size;
-    return s_sign_exists(l_offset, l_signs_size, a_key);
+    return s_sign_exists(a_round_item->event_n_signs + a_round_item->event_size,
+                        (size_t)(a_round_item->data_size - a_round_item->event_size),
+                        a_key); 
 }
 
 /**
@@ -243,12 +239,14 @@ size_t dap_chain_cs_dag_event_round_sign_add(dap_chain_cs_dag_event_round_item_t
         return 0;
     dap_sign_t * l_sign = dap_sign_create(a_key, &l_round_item->round_info.datum_hash, sizeof(dap_chain_hash_fast_t), 0);
     size_t l_sign_size = dap_sign_get_size(l_sign);
-    size_t l_offset = (size_t)l_round_item->data_size;
-    *a_round_item_ptr = l_round_item = DAP_REALLOC(l_round_item, a_round_item_size+l_sign_size);
-    memcpy(l_round_item->event_n_signs+l_offset, l_sign, l_sign_size);
+    size_t l_offset = l_round_item->data_size;
+    if (! (l_round_item = DAP_REALLOC(*a_round_item_ptr, a_round_item_size + l_sign_size)) )
+        return log_it(L_CRITICAL, "Memory allocaton error"), DAP_DELETE(l_sign), a_round_item_size;
+    memcpy(l_round_item->event_n_signs + l_offset, l_sign, l_sign_size);
     DAP_DELETE(l_sign);
     l_round_item->data_size += (uint32_t)l_sign_size;
-    return a_round_item_size+l_sign_size;
+    *a_round_item_ptr = l_round_item;
+    return a_round_item_size + l_sign_size;
 }
 
 /**
diff --git a/modules/type/dag/include/dap_chain_cs_dag.h b/modules/type/dag/include/dap_chain_cs_dag.h
index 42fc9e30ddd3f523e484e0626216b18493da7934..f28f7baf3c6e91287fe49be29591cd1d4a99bde8 100644
--- a/modules/type/dag/include/dap_chain_cs_dag.h
+++ b/modules/type/dag/include/dap_chain_cs_dag.h
@@ -61,8 +61,6 @@ typedef struct dap_chain_cs_dag
     dap_chain_hash_fast_t static_genesis_event_hash;
     dap_chain_cs_dag_hal_item_t *hal;
 
-    atomic_uint_fast64_t round_id;
-
     uint16_t datum_add_hashes_count;
     char * gdb_group_events_round_new;
 
diff --git a/modules/type/dag/include/dap_chain_cs_dag_event.h b/modules/type/dag/include/dap_chain_cs_dag_event.h
index 4de1d9055b8eca61d05ca961d6fd6cfcd5a003cc..b56f5ae9b36aa274a0989c0377fb276051cabb9d 100644
--- a/modules/type/dag/include/dap_chain_cs_dag_event.h
+++ b/modules/type/dag/include/dap_chain_cs_dag_event.h
@@ -60,9 +60,8 @@ typedef struct dap_chain_cs_dag_event_round_item {
     uint8_t event_n_signs[]; // event // dap_chain_cs_dag_event_t
 } DAP_ALIGN_PACKED dap_chain_cs_dag_event_round_item_t;
 
-dap_chain_cs_dag_event_t *dap_chain_cs_dag_event_new(dap_chain_id_t a_chain_id, dap_chain_cell_id_t a_cell_id, uint64_t a_round_id,
-                                                     dap_chain_datum_t *a_datum, dap_enc_key_t *a_key,
-                                                     dap_chain_hash_fast_t *a_hashes, size_t a_hashes_count, size_t *a_event_size);
+dap_chain_cs_dag_event_t *dap_chain_cs_dag_event_new(dap_chain_id_t a_chain_id, dap_chain_cell_id_t a_cell_id, dap_chain_datum_t *a_datum,
+                                                     dap_enc_key_t *a_key, dap_chain_hash_fast_t *a_hashes, size_t a_hashes_count, size_t *a_event_size);
 
 /**
  * @brief dap_chain_cs_dag_event_get_datum
diff --git a/modules/type/none/dap_chain_cs_none.c b/modules/type/none/dap_chain_cs_none.c
index 25124d12a4636f168a753953f34e0700ae9dbd40..046eeef125ac5167411d904dd0247bb6f8d23145 100644
--- a/modules/type/none/dap_chain_cs_none.c
+++ b/modules/type/none/dap_chain_cs_none.c
@@ -318,7 +318,7 @@ static dap_chain_atom_verify_res_t s_nonconsensus_callback_atom_add(dap_chain_t
     dap_nonconsensus_private_t *l_nochain_priv = PVT(l_nochain);
     dap_chain_datum_t *l_datum = (dap_chain_datum_t*) a_atom;
     dap_hash_fast_t l_datum_hash = *a_atom_hash;
-    if(dap_chain_datum_add(a_chain, l_datum, a_atom_size, &l_datum_hash))
+    if(dap_chain_datum_add(a_chain, l_datum, a_atom_size, &l_datum_hash, NULL))
         return ATOM_REJECT;
 
     dap_nonconsensus_datum_hash_item_t * l_hash_item = DAP_NEW_Z(dap_nonconsensus_datum_hash_item_t);