Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract map storage & Scilla IPC #1743

Merged
merged 155 commits into from Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from 144 commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
bd23a81
Add proto3 dependency
kaikawaliu May 28, 2019
1e4d242
first draft of redesigning contract storage layer
kaikawaliu Jun 20, 2019
53c7ba8
Merge branch 'master' of github.com:zilliqa/zilliqa into feature/cont…
kaikawaliu Jun 20, 2019
b167fe4
Intermediate draft for new smart contract storage
kaikawaliu Jul 9, 2019
698a8aa
Add basic server code
advaypal Jul 9, 2019
afc58d8
Add contract address and connect to BC methods
advaypal Jul 9, 2019
6e4379d
Invoke CommitStateDB in FinalBlock Processing
kaikawaliu Jul 10, 2019
7e8535d
Fix most bugs
advaypal Jul 11, 2019
d10300e
Fix unit tests
kaikawaliu Jul 12, 2019
a0621e4
Fix bugs
advaypal Jul 15, 2019
e3c3de6
Fix test
advaypal Jul 16, 2019
830ed61
Fix test
advaypal Jul 17, 2019
156c161
Linter + Style changes
advaypal Jul 17, 2019
0834768
Fix errors
advaypal Jul 24, 2019
7cc187c
Fix tests
advaypal Jul 24, 2019
9462e32
Fix bug
advaypal Jul 24, 2019
b0cddec
Add bool& to fetchStateValues
kaikawaliu Jul 29, 2019
c1275ea
Implement GetValue for indices size equals to mapdepth
kaikawaliu Jul 29, 2019
c316d9f
First draft for data migration
kaikawaliu Jul 29, 2019
131f155
Merge branch 'feature/contractmap' into feature/scilla-ipc
vaivaswatha Jul 29, 2019
7ae9516
Merge branch 'feature/contractmap' into feature/scilla-ipc
vaivaswatha Jul 29, 2019
b273346
Modify ScillaIPCServer to reflect the toy-version (standalone tested)
vaivaswatha Jul 29, 2019
dc94b8b
Remove unnecessary diffs with contractmap branch
vaivaswatha Jul 29, 2019
65c8675
Enrich drafting of datamigration
kaikawaliu Jul 30, 2019
bcaec84
SCILLA_INDEX_SEPARATOR
kaikawaliu Jul 30, 2019
4e4aec1
Fixes for review comments and linter error
vaivaswatha Jul 30, 2019
6016aa2
Add setContractAddress method for changing address later
vaivaswatha Jul 30, 2019
1cf4cbc
Use only JSONRPC_SERVER_V2
vaivaswatha Jul 30, 2019
ba27980
Merge pull request #1725 from Zilliqa/feature/scilla-ipc
vaivaswatha Jul 30, 2019
d4d4f90
Change deletemapkey to ignoreval
kaikawaliu Jul 30, 2019
537d4e8
Update unit test for contract
kaikawaliu Jul 30, 2019
47d3733
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Jul 30, 2019
3e5873c
Resolve conflicts
kaikawaliu Jul 30, 2019
0604d4e
Rename foundMapKey to foundVal
kaikawaliu Jul 30, 2019
c117918
Add test queries. Nested map currently fails.
vaivaswatha Jul 31, 2019
7b07531
SCILLA_IPC_SOCKET_PATH
kaikawaliu Jul 31, 2019
f0ae827
Set ScillaIPCServer for AccountStore
kaikawaliu Jul 31, 2019
8fc9626
Add scillaipcserver member in AccountStoreSC
kaikawaliu Jul 31, 2019
1cdb0c7
Add ScillaIPCServer to Zilliqa.h
kaikawaliu Jul 31, 2019
ccd7f07
Modify ScillaIPCServer to pass compilation
kaikawaliu Jul 31, 2019
6961a42
Use a macro for the db key separator.
vaivaswatha Jul 31, 2019
4f4cabe
Return of updateStateValue must be null, not empty string
vaivaswatha Jul 31, 2019
4e431f1
Minor fix to syntax of ScillaIPCServer
kaikawaliu Aug 1, 2019
d9335fe
Replace with scilla_ipc_socket_file
kaikawaliu Aug 1, 2019
3c61860
Fix bug with not-found
kaikawaliu Aug 1, 2019
3e7be97
Update ContAddr while UpdateAccounts
kaikawaliu Aug 1, 2019
26f8283
Fix typo in defining SCILLA_IPC_SOCKET_PATH
vaivaswatha Aug 1, 2019
5c1d8ae
Fix fetchStateValue bug in buiding full map values for result.
vaivaswatha Aug 1, 2019
a0ae4f2
style fixes
vaivaswatha Aug 1, 2019
3d41eab
Clean some of the old ContractStorage functions in Account
kaikawaliu Aug 1, 2019
0f80c54
Enable Test_ScillaIPCServer and disable Test_Account
kaikawaliu Aug 1, 2019
8f383f8
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Aug 1, 2019
7b507b5
Add (currently failing) tests for map key deletion(s).
vaivaswatha Aug 1, 2019
b1bb5f0
Check deleted before fetching value
kaikawaliu Aug 5, 2019
89acd23
Fix bug in test_query_map_2
vaivaswatha Aug 5, 2019
740e847
Return false when fetching non-existing map var
kaikawaliu Aug 5, 2019
72e1617
Add test to re-inserted deleted map keys and fetch it back
vaivaswatha Aug 5, 2019
2f29816
JsonMapWrapper
kaikawaliu Aug 6, 2019
684fd85
Apply path constant for scilla ipc in unit test
kaikawaliu Aug 6, 2019
46ba19d
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Aug 6, 2019
5f51798
Fix bugs in handling empty map values. Add tests.
vaivaswatha Aug 6, 2019
e8b20aa
FIELDS_MAP_DEPTH_INDICATOR
kaikawaliu Aug 7, 2019
5aaaea6
FetchContractFieldsMapDepth
kaikawaliu Aug 7, 2019
7a57462
Skip entry of FIELDS_MAP_DEPTH_INDICATOR
kaikawaliu Aug 7, 2019
327eb07
Re-do earlier bugfix lost in merging. Test now passes
vaivaswatha Aug 7, 2019
e892e57
Add fields_map_depth during deployment
kaikawaliu Aug 7, 2019
cbae5c5
Resolve conflicts
kaikawaliu Aug 7, 2019
b89dfbc
Fix missing old functions for data migration
kaikawaliu Aug 7, 2019
fcd1426
Merge branch 'master' of github.com:zilliqa/zilliqa into feature/cont…
kaikawaliu Aug 7, 2019
5c10e76
Fine control of map depth entries when fetching json value
kaikawaliu Aug 7, 2019
ef6cf79
Resolve conflicts
kaikawaliu Aug 8, 2019
a786efa
migrating init data
kaikawaliu Aug 8, 2019
f2d0568
call account.SetImmutable during migration
kaikawaliu Aug 8, 2019
cba14f6
Call MoveUpdatesToDisk at the end of migration
kaikawaliu Aug 8, 2019
684a9fc
Add rm -rf SCILLA_IPC_SOCKET_PATH in command to execute
kaikawaliu Aug 8, 2019
da7e42b
Add test to replace an empty map (by value) and query. Fails
vaivaswatha Aug 8, 2019
39995d6
Intermediate commit for enabling contract execution
kaikawaliu Aug 14, 2019
6d3b298
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Aug 14, 2019
d6dcd38
Fix error fetching after updating empty map
kaikawaliu Aug 15, 2019
fb5caf3
Add a test that deletes the last key in a map and fetches the full ma…
vaivaswatha Aug 15, 2019
b38c4dd
Populate empty bytes if map delete to empty
kaikawaliu Aug 15, 2019
f0068a2
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Aug 15, 2019
e1e32fb
Minor fix to previous empty map populating fix
kaikawaliu Aug 15, 2019
4b548d3
Use Get() instead of [] for value.indices()
vaivaswatha Aug 15, 2019
99c4f87
Bugfix in inserting multiple nested entries. Test for it.
vaivaswatha Aug 15, 2019
621c19b
Replace DB_KEY_SEPARATOR with SCILLA_INDEX_SEPARATOR
vaivaswatha Aug 15, 2019
9475425
Use SCILLA_INDEX_SEPARATOR as an index terminator rather than separator.
vaivaswatha Aug 15, 2019
25ca997
Fixes for enabling Test_AccountStore
kaikawaliu Aug 19, 2019
4e0c214
Renable Test_AccountStore
kaikawaliu Aug 19, 2019
a29e960
Reformatting
kaikawaliu Aug 19, 2019
6e32f29
Minor update to Datamigration
kaikawaliu Aug 19, 2019
0ef5557
data_migrate.cpp
kaikawaliu Aug 20, 2019
0972e15
Append _balance into state json
kaikawaliu Aug 20, 2019
6ecd8b7
Modify RPC API for fetching state and init data
kaikawaliu Aug 20, 2019
e43deab
Minor fixes
kaikawaliu Aug 20, 2019
b31f947
minor syntax change
kaikawaliu Aug 20, 2019
3266da0
try catch _balance append
kaikawaliu Aug 21, 2019
b465c44
minor clean
kaikawaliu Aug 21, 2019
42644d0
try call operator[] explicitly
kaikawaliu Aug 21, 2019
fb22708
try call operator[] explicitly
kaikawaliu Aug 21, 2019
d387a7d
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Aug 22, 2019
d8e4e5a
revert local changes
kaikawaliu Aug 22, 2019
19bfbe6
Fixes for separator and remove _balance
kaikawaliu Aug 22, 2019
517d2d1
Separator x1B -> x16
kaikawaliu Aug 22, 2019
5adffa8
Fix retrieving empty map json
kaikawaliu Aug 23, 2019
00060a1
Minor changing Test_AccountStore
kaikawaliu Aug 23, 2019
b4dff3e
Intermediate changes for data migration
kaikawaliu Aug 23, 2019
5a4377e
Fixes for data_migrate
kaikawaliu Aug 23, 2019
465d099
Remove address param in data_migrate
kaikawaliu Aug 23, 2019
d0d9139
Log init data
kaikawaliu Aug 26, 2019
1d6cb87
minor fix on key deletion
kaikawaliu Aug 26, 2019
5208736
Check against level DB when delete key
kaikawaliu Aug 26, 2019
401b0d3
Fix wrong usage of find end
kaikawaliu Aug 26, 2019
d231b50
includes key when hashing storage root
kaikawaliu Aug 27, 2019
df47a32
Chain call reset IPC server with recipient address
kaikawaliu Aug 28, 2019
7394164
Remove check on call depth for revert state
kaikawaliu Aug 28, 2019
184b340
add flag in constants to toggle log for smart contract & remove GETEP…
kaikawaliu Aug 28, 2019
124cbf1
fix corner case for data migration
kaikawaliu Aug 28, 2019
123628e
Skip Retriever::ValidateState if data migrated by constants
kaikawaliu Aug 29, 2019
5f7ba7d
Add a test to run scilla testsuite using external state IPC server
vaivaswatha Aug 29, 2019
a709444
Merge pull request #1786 from Zilliqa/feature/contractmap_scillatestuite
kaikawaliu Aug 29, 2019
3e10ed9
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Aug 30, 2019
b39f0a4
Merge branch 'cmakeproto3' of github.com:zilliqa/zilliqa into cmake3c…
kaikawaliu Aug 30, 2019
cccb451
add return check for chdir
kaikawaliu Aug 30, 2019
163c821
Resolve conflicts
kaikawaliu Aug 30, 2019
bc73705
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Aug 30, 2019
b98ce68
Add one more (failing) sub-map deletion unit test
vaivaswatha Aug 30, 2019
953a430
Two more minor variants of previous sub-map deletion test
vaivaswatha Aug 30, 2019
63319b6
Fix bug of found deleted nested map
kaikawaliu Sep 2, 2019
8d91870
remove dockerfile for download_proto3
kaikawaliu Sep 2, 2019
fb71811
Support gas mechanics for scilla-checker
vaivaswatha Sep 2, 2019
d024a97
Resolve issue of ugly printing for json fetch contract state api
kaikawaliu Sep 3, 2019
f8b0163
Merge pull request #1790 from Zilliqa/feature/scilla_checker_gas
kaikawaliu Sep 4, 2019
9a1b7e3
Merge branch 'master' of github.com:zilliqa/zilliqa into feature/cont…
kaikawaliu Sep 5, 2019
27cdde6
Merge branch 'feature/contractmap' of github.com:zilliqa/zilliqa into…
kaikawaliu Sep 5, 2019
cc0f52b
Reformatting
kaikawaliu Sep 5, 2019
2396ff6
Minor fix for escapes removal
kaikawaliu Sep 5, 2019
1f70480
minor refactoring
kaikawaliu Sep 5, 2019
e845746
Bug fix for AccountStore serialize/deserialize
kaikawaliu Sep 5, 2019
f08d6a0
minor changes to left tests
kaikawaliu Sep 5, 2019
1358d58
Remove download_proto3.sh in .travis.yml
kaikawaliu Sep 5, 2019
eee6ee4
Remove deprecated texts in README.md
kaikawaliu Sep 5, 2019
50c8e04
Clean commented code
kaikawaliu Sep 5, 2019
5e0a43f
Fix wrong log
kaikawaliu Sep 5, 2019
9ec3704
Protect for nullptr
kaikawaliu Sep 5, 2019
aab35a3
Initialize uint32_t max with numeric_limit
kaikawaliu Sep 5, 2019
6cfba7a
Change SILLA_IPC_SOCKET_PATH
kaikawaliu Sep 5, 2019
8ab60a4
Remove extra parameter for Dockerfile.cuda
kaikawaliu Sep 5, 2019
53e8612
Address comments
kaikawaliu Sep 5, 2019
cea217f
Check query name not be FIELDS_MAP_DEPTH_INDICATOR
kaikawaliu Sep 5, 2019
0b01d78
Retag scilla image in Dockerfile to v0.4.0-alpha.0
kaikawaliu Sep 5, 2019
1561891
Reformat Test_AccountStore
kaikawaliu Sep 5, 2019
ab88065
Fix query name check for map depth
kaikawaliu Sep 5, 2019
d63f09a
use if(!m_address) for efficiency
kaikawaliu Sep 5, 2019
178038c
Fixed formatting
ansnunez Sep 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/InstallJsonrpccpp.cmake
Expand Up @@ -23,8 +23,8 @@ set(CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_POSITION_INDEPENDENT_CODE=On
-DBUILD_STATIC_LIBS=On
-DBUILD_SHARED_LIBS=Off
-DUNIX_DOMAIN_SOCKET_SERVER=Off
-DUNIX_DOMAIN_SOCKET_CLIENT=Off
-DUNIX_DOMAIN_SOCKET_SERVER=On
-DUNIX_DOMAIN_SOCKET_CLIENT=On
-DHTTP_SERVER=On
-DHTTP_CLIENT=On
-DCOMPILE_TESTS=Off
Expand Down
4 changes: 4 additions & 0 deletions constants.xml
Expand Up @@ -146,6 +146,7 @@
<STATUS_RPC_PORT>4301</STATUS_RPC_PORT>
<IP_TO_BIND>127.0.0.1</IP_TO_BIND>
<ENABLE_STATUS_RPC>true</ENABLE_STATUS_RPC>
<SCILLA_IPC_SOCKET_PATH>/tmp/scillaipcsocket</SCILLA_IPC_SOCKET_PATH>
kaikawaliu marked this conversation as resolved.
Show resolved Hide resolved
</jsonrpc>
<network_composition>
<!-- Shard size will be automatically calculated if COMM_SIZE = 0 -->
Expand Down Expand Up @@ -223,6 +224,7 @@
<REJOIN_NODE_NOT_IN_NETWORK>true</REJOIN_NODE_NOT_IN_NETWORK>
<RESUME_BLACKLIST_DELAY_IN_SECONDS>30</RESUME_BLACKLIST_DELAY_IN_SECONDS>
<INCRDB_DSNUMS_WITH_STATEDELTAS>10</INCRDB_DSNUMS_WITH_STATEDELTAS>
<CONTRACT_STATES_MIGRATED>false</CONTRACT_STATES_MIGRATED>
</recovery>
<smart_contract>
<ENABLE_SC>false</ENABLE_SC>
Expand All @@ -239,6 +241,8 @@
<OUTPUT_JSON>output.json</OUTPUT_JSON>
<INPUT_CODE>input.scilla</INPUT_CODE>
<ENABLE_SCILLA_MULTI_VERSION>true</ENABLE_SCILLA_MULTI_VERSION>
<FIELDS_MAP_DEPTH_INDICATOR>_fields_map_depth</FIELDS_MAP_DEPTH_INDICATOR>
<LOG_SC>true</LOG_SC>
kaikawaliu marked this conversation as resolved.
Show resolved Hide resolved
</smart_contract>
<tests>
<ENABLE_CHECK_PERFORMANCE_LOG>false</ENABLE_CHECK_PERFORMANCE_LOG>
Expand Down
4 changes: 4 additions & 0 deletions constants_local.xml
Expand Up @@ -145,6 +145,7 @@
<STATUS_RPC_PORT>4301</STATUS_RPC_PORT>
<IP_TO_BIND>127.0.0.1</IP_TO_BIND>
<ENABLE_STATUS_RPC>true</ENABLE_STATUS_RPC>
<SCILLA_IPC_SOCKET_PATH>/tmp/scillaipcsocket</SCILLA_IPC_SOCKET_PATH>
</jsonrpc>
<network_composition>
<!-- Shard size will be automatically calculated if COMM_SIZE = 0 -->
Expand Down Expand Up @@ -222,6 +223,7 @@
<REJOIN_NODE_NOT_IN_NETWORK>true</REJOIN_NODE_NOT_IN_NETWORK>
<RESUME_BLACKLIST_DELAY_IN_SECONDS>30</RESUME_BLACKLIST_DELAY_IN_SECONDS>
<INCRDB_DSNUMS_WITH_STATEDELTAS>10</INCRDB_DSNUMS_WITH_STATEDELTAS>
<CONTRACT_STATES_MIGRATED>false</CONTRACT_STATES_MIGRATED>
</recovery>
<smart_contract>
<ENABLE_SC>false</ENABLE_SC>
Expand All @@ -238,6 +240,8 @@
<OUTPUT_JSON>output.json</OUTPUT_JSON>
<INPUT_CODE>input.scilla</INPUT_CODE>
<ENABLE_SCILLA_MULTI_VERSION>true</ENABLE_SCILLA_MULTI_VERSION>
<FIELDS_MAP_DEPTH_INDICATOR>_fields_map_depth</FIELDS_MAP_DEPTH_INDICATOR>
<LOG_SC>true</LOG_SC>
</smart_contract>
<tests>
<ENABLE_CHECK_PERFORMANCE_LOG>false</ENABLE_CHECK_PERFORMANCE_LOG>
Expand Down
2 changes: 0 additions & 2 deletions docker/dev/Dockerfile
Expand Up @@ -40,13 +40,11 @@ RUN apt-get update \
libleveldb-dev \
libmicrohttpd-dev \
libminiupnpc-dev \
libprotobuf-dev \
kaikawaliu marked this conversation as resolved.
Show resolved Hide resolved
libsnappy-dev \
libssl-dev \
libtool \
ocl-icd-opencl-dev \
pkg-config \
protobuf-compiler \
python \
python-pip \
libsecp256k1-dev \
Expand Down
10 changes: 9 additions & 1 deletion src/cmd/CMakeLists.txt
Expand Up @@ -82,11 +82,19 @@ add_custom_command(TARGET zilliqa
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:restore> ${CMAKE_BINARY_DIR}/tests/Zilliqa)
target_include_directories(restore PUBLIC ${CMAKE_SOURCE_DIR}/src)

target_link_libraries(restore PUBLIC Node Mediator Validator)

add_executable(genTxnBodiesFromS3 genTxnBodiesFromS3.cpp)
add_custom_command(TARGET zilliqa
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:genTxnBodiesFromS3> ${CMAKE_BINARY_DIR}/tests/Zilliqa)
target_include_directories(genTxnBodiesFromS3 PUBLIC ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(genTxnBodiesFromS3 PUBLIC AccountData Utils Persistence Server)
target_link_libraries(genTxnBodiesFromS3 PUBLIC AccountData Utils Persistence Server)

add_executable(data_migrate data_migrate.cpp)
add_custom_command(TARGET zilliqa
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:data_migrate> ${CMAKE_BINARY_DIR}/tests/Zilliqa)
target_include_directories(data_migrate PUBLIC ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(data_migrate PUBLIC Mediator Utils Persistence AccountData)
54 changes: 54 additions & 0 deletions src/cmd/data_migrate.cpp
@@ -0,0 +1,54 @@
/*
* Copyright (C) 2019 Zilliqa
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "libData/AccountData/AccountStore.h"
#include "libMediator/Mediator.h"
#include "libPersistence/BlockStorage.h"
#include "libPersistence/Retriever.h"
#include "libUtils/DataConversion.h"
#include "libUtils/JsonUtils.h"

/// Should be run from a folder named "persistence" consisting of the
/// persistence

using namespace std;
int main() {
PairOfKey key; // Dummy to initate mediator
Peer peer;

LOG_GENERAL(INFO, "Begin");

Mediator mediator(key, peer);
Retriever retriever(mediator);

LOG_GENERAL(INFO, "Start Retrieving States");

if (!retriever.RetrieveStates()) {
LOG_GENERAL(FATAL, "RetrieveStates failed");
return 0;
}

LOG_GENERAL(INFO, "finished RetrieveStates");

if (!retriever.MigrateContractStates()) {
LOG_GENERAL(WARNING, "MigrateContractStates failed");
} else {
LOG_GENERAL(INFO, "Migrate contract data finished");
}

return 0;
}
9 changes: 9 additions & 0 deletions src/common/Constants.cpp
Expand Up @@ -15,6 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "Constants.h"
#include "libUtils/DataConversion.h"
#include "libUtils/SafeMath.h"

#include <boost/property_tree/ptree.hpp>
Expand Down Expand Up @@ -301,6 +302,8 @@ const bool ENABLE_STATUS_RPC{
ReadConstantString("ENABLE_STATUS_RPC", "node.jsonrpc.") == "true"};
const unsigned int NUM_SHARD_PEER_TO_REVEAL{
ReadConstantNumeric("NUM_SHARD_PEER_TO_REVEAL", "node.jsonrpc.")};
const std::string SCILLA_IPC_SOCKET_PATH{
ReadConstantString("SCILLA_IPC_SOCKET_PATH", "node.jsonrpc.")};

// Network composition constants
const unsigned int COMM_SIZE{
Expand Down Expand Up @@ -424,6 +427,8 @@ const unsigned int RESUME_BLACKLIST_DELAY_IN_SECONDS{
ReadConstantNumeric("RESUME_BLACKLIST_DELAY_IN_SECONDS", "node.recovery.")};
const unsigned int INCRDB_DSNUMS_WITH_STATEDELTAS{
ReadConstantNumeric("INCRDB_DSNUMS_WITH_STATEDELTAS", "node.recovery.")};
const bool CONTRACT_STATES_MIGRATED{
ReadConstantString("CONTRACT_STATES_MIGRATED", "node.recovery.") == "true"};

// Smart contract constants
const bool ENABLE_SC{ReadConstantString("ENABLE_SC", "node.smart_contract.") ==
Expand Down Expand Up @@ -464,6 +469,10 @@ const string INPUT_CODE{
const bool ENABLE_SCILLA_MULTI_VERSION{
ReadConstantString("ENABLE_SCILLA_MULTI_VERSION", "node.smart_contract.") ==
"true"};
const string FIELDS_MAP_DEPTH_INDICATOR{
ReadConstantString("FIELDS_MAP_DEPTH_INDICATOR", "node.smart_contract.")};
const bool LOG_SC{ReadConstantString("LOG_SC", "node.smart_contract.") ==
"true"};

// Test constants
const bool ENABLE_CHECK_PERFORMANCE_LOG{
Expand Down
6 changes: 6 additions & 0 deletions src/common/Constants.h
Expand Up @@ -122,6 +122,8 @@ const std::string DS_BACKUP_MSG = "DS BACKUP NOW";

const std::string dsNodeFile = "dsnodes.xml";

const char SCILLA_INDEX_SEPARATOR = 0x16;

const float ONE_HUNDRED_PERCENT = 100.f;

// General constants
Expand Down Expand Up @@ -258,6 +260,7 @@ extern const unsigned int STATUS_RPC_PORT;
extern const std::string IP_TO_BIND; // Only for non-lookup nodes
extern const bool ENABLE_STATUS_RPC; //
extern const unsigned int NUM_SHARD_PEER_TO_REVEAL;
extern const std::string SCILLA_IPC_SOCKET_PATH;

// Network composition constants
extern const unsigned int COMM_SIZE;
Expand Down Expand Up @@ -323,6 +326,7 @@ extern const bool RECOVERY_TRIM_INCOMPLETED_BLOCK;
extern const bool REJOIN_NODE_NOT_IN_NETWORK;
extern const unsigned int RESUME_BLACKLIST_DELAY_IN_SECONDS;
extern const unsigned int INCRDB_DSNUMS_WITH_STATEDELTAS;
extern const bool CONTRACT_STATES_MIGRATED;

// Smart contract constants
extern const bool ENABLE_SC;
Expand All @@ -339,6 +343,8 @@ extern const std::string INPUT_MESSAGE_JSON;
extern const std::string OUTPUT_JSON;
extern const std::string INPUT_CODE;
extern const bool ENABLE_SCILLA_MULTI_VERSION;
extern const std::string FIELDS_MAP_DEPTH_INDICATOR;
extern const bool LOG_SC;

// Test constants
extern const bool ENABLE_CHECK_PERFORMANCE_LOG;
Expand Down