diff --git a/CMakeLists.txt b/CMakeLists.txt index f9dcd79ee4d..5a237b8a792 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,3 +284,33 @@ install(FILES libraries/fc/src/network/LICENSE.go DESTINATION ${CMAKE_INSTALL_FU include(package) include(doxygen) + +set(PROXY_ASSET_NAME "PXBTS") +set(PROXY_ASSET_PRECISION 4) +set(PROXY_INITIAL_AMOUNT "100000.0000") +set(BEOS_SYMBOL_PRECISION 10000) +set(CORE_INITIAL_AMOUNT "100000.0000") +set(INIT_RAM "1000000") +set(STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION "100") +set(STARTING_BLOCK_FOR_BEOS_DISTRIBUTION "days(7).to_seconds() * 2") +set(ENDING_BLOCK_FOR_BEOS_DISTRIBUTION "days(98).to_seconds() * 2") +set(DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_BEOS_DISTRIBUTION "hours(1).to_seconds() * 2") +set(AMOUNT_OF_REWARD_BEOS "asset().symbol.precision()") +set(STARTING_BLOCK_FOR_RAM_DISTRIBUTION "days(7).to_seconds() * 2") +set(ENDING_BLOCK_FOR_RAM_DISTRIBUTION "days(280).to_seconds() * 2") +set(DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_RAM_DISTRIBUTION "hours(1).to_seconds() * 2") +set(AMOUNT_OF_REWARD_RAM "5000000") +set(STARTING_BLOCK_FOR_TRUSTEE_DISTRIBUTION "days(7).to_seconds() * 2") +set(ENDING_BLOCK_FOR_TRUSTEE_DISTRIBUTION "days(98).to_seconds() * 2") +set(DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_TRUSTEE_DISTRIBUTION "hours(1).to_seconds() * 2") +set(AMOUNT_OF_REWARD_TRUSTEE "asset().symbol.precision()") +set(STAKE_NET_QUANTITY "10000.0000") +set(STAKE_CPU_QUANTITY "10000.0000") +configure_file(${CMAKE_SOURCE_DIR}/contracts/eosio.init/eosio.init.hpp.in ${CMAKE_SOURCE_DIR}/contracts/eosio.init/eosio.init.hpp) + +set(NODEOS_HTTP_SERVER_PORT "http://127.0.0.1:8888") +set(SIGNATURE_PROVIDER "${EOSIO_ROOT_KEY}=KEOSD:http://127.0.0.1:8900/v1/wallet/sign_digest") +set(WALLET_DIR "$ENV{HOME}/eosio-wallet") +configure_file(${CMAKE_SOURCE_DIR}/cd-scripts/resources/config.ini.in ${CMAKE_SOURCE_DIR}/cd-scripts/resources/config.ini @ONLY) + +configure_file(${CMAKE_SOURCE_DIR}/cd-scripts/resources/genesis.json.in ${CMAKE_SOURCE_DIR}/cd-scripts/resources/genesis.json) \ No newline at end of file diff --git a/cd-scripts/config-example.py b/cd-scripts/config-example.py index 5cd29639b0b..a5a2814d916 100644 --- a/cd-scripts/config-example.py +++ b/cd-scripts/config-example.py @@ -136,9 +136,9 @@ COMMON_SYSTEM_ACCOUNT_ACTIVE_PRIVATE_KEY ] # source file for beos config -BEOS_CONFIG_FILE_SRC = os.path.dirname(os.path.abspath(__file__)) + "/resources/beos.config.ini" +BEOS_CONFIG_FILE_SRC = os.path.dirname(os.path.abspath(__file__)) + "/resources/config.ini" # beos config file name -BEOS_CONFIG_FILE = "beos.config.ini" +BEOS_CONFIG_FILE = "config.ini" # source file for genesis file GENESIS_JSON_FILE_SRC = os.path.dirname(os.path.abspath(__file__)) + "/resources/genesis.json" # genesis json file name diff --git a/cd-scripts/deploy.py b/cd-scripts/deploy.py index d936f00d675..bc1c45f2bff 100755 --- a/cd-scripts/deploy.py +++ b/cd-scripts/deploy.py @@ -49,8 +49,8 @@ logger.addHandler(ch) logger.addHandler(fh) -def run_command(parameters, working_dir): - ret = subprocess.run(parameters, cwd = working_dir, stdout=config.log_main, stderr=config.log_main) +def run_command(parameters, working_dir, run_shell = False): + ret = subprocess.run(parameters, cwd = working_dir, shell = run_shell, stdout=config.log_main, stderr=config.log_main) retcode = ret.returncode if retcode == 0: logger.debug("Executed with ret: {0}".format(ret)) @@ -274,7 +274,7 @@ def build_eosio(c_compiler, cxx_compiler): "-DWASM_ROOT={0}".format(config.WASM_INSTALL_DIR), "-DCORE_SYMBOL_NAME={0}".format(config.CORE_SYMBOL_NAME), "-DOPENSSL_ROOT_DIR={0}".format(config.OPENSSL_ROOT_DIR), - "-DBOOST_ROOT={0}".format(config.BOOST_INSTALL_DIR), + "-DBOOST_ROOT={0}".format(config.BOOST_INSTALL_PREFIX), "-DBUILD_MONGO_DB_PLUGIN={0}".format(config.BUILD_MONGO_DB_PLUGIN), "-DENABLE_COVERAGE_TESTING={0}".format(config.ENABLE_COVERAGE_TESTING), "-DBUILD_DOXYGEN={0}".format(config.DOXYGEN), @@ -282,6 +282,24 @@ def build_eosio(c_compiler, cxx_compiler): "-DEOSIO_ROOT_KEY={0}".format(config.EOSIO_PUBLIC_KEY), "-DGATEWAY_ROOT_KEY={0}".format(config.BEOS_GATEWAY_PUBLIC_KEY), "-DDISTRIBUTION_ROOT_KEY={0}".format(config.BEOS_DISTRIB_PUBLIC_KEY), + "-DPROXY_ASSET_PRECISION={0}".format(config.PROXY_ASSET_PRECISION), + "-DPROXY_ASSET_NAME={0}".format(config.PROXY_ASSET_NAME), + "-DSTARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION={0}".format(config.STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION), + "-DSTARTING_BLOCK_FOR_BEOS_DISTRIBUTION={0}".format(config.STARTING_BLOCK_FOR_BEOS_DISTRIBUTION), + "-DENDING_BLOCK_FOR_BEOS_DISTRIBUTION={0}".format(config.ENDING_BLOCK_FOR_BEOS_DISTRIBUTION), + "-DDISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_BEOS_DISTRIBUTION={0}".format(config.DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_BEOS_DISTRIBUTION), + "-DAMOUNT_OF_REWARD_BEOS={0}".format(config.AMOUNT_OF_REWARD_BEOS), + "-DSTARTING_BLOCK_FOR_RAM_DISTRIBUTION={0}".format(config.STARTING_BLOCK_FOR_RAM_DISTRIBUTION), + "-DENDING_BLOCK_FOR_RAM_DISTRIBUTION={0}".format(config.ENDING_BLOCK_FOR_RAM_DISTRIBUTION), + "-DDISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_RAM_DISTRIBUTION={0}".format(config.DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_RAM_DISTRIBUTION), + "-DAMOUNT_OF_REWARD_RAM={0}".format(config.AMOUNT_OF_REWARD_RAM), + "-DSTARTING_BLOCK_FOR_TRUSTEE_DISTRIBUTION={0}".format(config.STARTING_BLOCK_FOR_TRUSTEE_DISTRIBUTION), + "-DENDING_BLOCK_FOR_TRUSTEE_DISTRIBUTION={0}".format(config.ENDING_BLOCK_FOR_TRUSTEE_DISTRIBUTION), + "-DDISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_TRUSTEE_DISTRIBUTION={0}".format(config.DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_TRUSTEE_DISTRIBUTION), + "-DAMOUNT_OF_REWARD_TRUSTEE={0}".format(config.AMOUNT_OF_REWARD_TRUSTEE), + "-DNODEOS_HTTP_SERVER_PORT={0}".format("http://{0}:{1}".format(config.NODEOS_IP_ADDRESS, config.NODEOS_PORT)), + "-DSIGNATURE_PROVIDER={0}".format("{0}=KEOSD:http://{1}:{2}/v1/wallet/sign_digest".format(config.EOSIO_PUBLIC_KEY, config.KEOSD_IP_ADDRESS, config.KEOSD_PORT)), + "-DWALLET_DIR={0}".format(config.DEFAULT_WALLET_DIR), config.BEOS_DIR ] logger.info("Running cmake with params {0}".format(" ".join(params))) @@ -295,69 +313,11 @@ def build_eosio(c_compiler, cxx_compiler): run_command(params, config.BEOS_BUILD_DIR) def install_beos(c_compiler, cxx_compiler): - configure_eosio_init() install_eosio(c_compiler, cxx_compiler) def build_beos(c_compiler, cxx_compiler): - configure_eosio_init() - # - configure_config_ini() - # - configure_genesis_json() - # build_eosio(c_compiler, cxx_compiler) -def create_file_from_template(template_src, file_dst, template_dict): - dst = None - with open(template_src, "r", encoding = "utf-8") as in_f: - from string import Template - src = Template(in_f.read()) - dst = src.substitute(template_dict) - with open(file_dst, "w", encoding = "utf-8") as out_f: - out_f.write(dst) - -def configure_eosio_init(): - eosio_init_opt = { - "PROXY_ASSET_PRECISION" : config.PROXY_ASSET_PRECISION, - "PROXY_ASSET_NAME" : config.PROXY_ASSET_NAME, - "STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION" : config.STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION, - "STARTING_BLOCK_FOR_BEOS_DISTRIBUTION" : config.STARTING_BLOCK_FOR_BEOS_DISTRIBUTION, - "ENDING_BLOCK_FOR_BEOS_DISTRIBUTION" : config.ENDING_BLOCK_FOR_BEOS_DISTRIBUTION, - "DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_BEOS_DISTRIBUTION" : config.DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_BEOS_DISTRIBUTION, - "AMOUNT_OF_REWARD_BEOS" : config.AMOUNT_OF_REWARD_BEOS, - "STARTING_BLOCK_FOR_RAM_DISTRIBUTION" : config.STARTING_BLOCK_FOR_RAM_DISTRIBUTION, - "ENDING_BLOCK_FOR_RAM_DISTRIBUTION" : config.ENDING_BLOCK_FOR_RAM_DISTRIBUTION, - "DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_RAM_DISTRIBUTION" : config.DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_RAM_DISTRIBUTION, - "AMOUNT_OF_REWARD_RAM" : config.AMOUNT_OF_REWARD_RAM, - "STARTING_BLOCK_FOR_TRUSTEE_DISTRIBUTION" : config.STARTING_BLOCK_FOR_TRUSTEE_DISTRIBUTION, - "ENDING_BLOCK_FOR_TRUSTEE_DISTRIBUTION" : config.ENDING_BLOCK_FOR_TRUSTEE_DISTRIBUTION, - "DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_TRUSTEE_DISTRIBUTION" : config.DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_TRUSTEE_DISTRIBUTION, - "AMOUNT_OF_REWARD_TRUSTEE" : config.AMOUNT_OF_REWARD_TRUSTEE - } - - eosio_init_src = config.BEOS_DIR + "/contracts/eosio.init/eosio.init.hpp.in" - eosio_init_dst = config.BEOS_DIR + "/contracts/eosio.init/eosio.init.hpp" - create_file_from_template(eosio_init_src, eosio_init_dst, eosio_init_opt) - -def configure_config_ini(): - ini_opt = { - "HTTP_SERVER_PORT" : "http://{0}:{1}".format(config.NODEOS_IP_ADDRESS, config.NODEOS_PORT), - "EOSIO_PUBLIC_KEY" : config.EOSIO_PUBLIC_KEY, - "SIGNATURE_PROVIDER" : "{0}=KEOSD:https://{1}:{2}/v1/wallet/sign_digest".format(config.EOSIO_PUBLIC_KEY, config.KEOSD_IP_ADDRESS, config.KEOSD_PORT), - "WALLET_DIR" : config.DEFAULT_WALLET_DIR - } - ini_src = os.path.dirname(os.path.abspath(__file__)) + "/resources/config.ini.in" - ini_dst = os.path.dirname(os.path.abspath(__file__)) + "/resources/config.ini" - create_file_from_template(ini_src, ini_dst, ini_opt) - -def configure_genesis_json(): - json_opt = { - "INITIAL_KEY" : "{0}".format(config.EOSIO_PUBLIC_KEY) - } - json_src = os.path.dirname(os.path.abspath(__file__)) + "/resources/genesis.json.in" - json_dst = os.path.dirname(os.path.abspath(__file__)) + "/resources/genesis.json" - create_file_from_template(json_src, json_dst, json_opt) - def initialize_beos(): import eosio try: @@ -554,16 +514,10 @@ def make_beos_plugin_test(): if options.make_beos_plugin_test: make_beos_plugin_test() - if options.create_genesis_and_config: - configure_config_ini() - configure_genesis_json() - if options.clear_init_data: clear_initialization_data(config.START_NODE_INDEX, "eosio") if options.initialize_beos: - configure_config_ini() - configure_genesis_json() initialize_beos() # close loggers diff --git a/cd-scripts/eosio.py b/cd-scripts/eosio.py index 8883df3cf40..3bdb80f3ca3 100644 --- a/cd-scripts/eosio.py +++ b/cd-scripts/eosio.py @@ -243,6 +243,7 @@ def run_nodeos(node_index, name, public_key, use_https = False): rmtree(working_dir) os.makedirs(working_dir) copy(config.GENESIS_JSON_FILE_SRC, working_dir + config.GENESIS_JSON_FILE) + copy(config.BEOS_CONFIG_FILE_SRC, working_dir + config.BEOS_CONFIG_FILE) https_opts = [ "--signature-provider", "{0}=KEOSD:http://{1}:{2}/v1/wallet/sign_digest".format(public_key, config.KEOSD_IP_ADDRESS, config.KEOSD_PORT), diff --git a/cd-scripts/resources/config.ini.bw b/cd-scripts/resources/config.ini.bw deleted file mode 100644 index 457b2bad5d0..00000000000 --- a/cd-scripts/resources/config.ini.bw +++ /dev/null @@ -1,318 +0,0 @@ -# Configuration file for BEOS (eosio::beos_plugin) -beos-config-file = beos.config.ini - -# the endpoint upon which to listen for incoming connections (eosio::bnet_plugin) -bnet-endpoint = 0.0.0.0:4321 - -# this peer will request only irreversible blocks from other nodes (eosio::bnet_plugin) -bnet-follow-irreversible = 0 - -# the number of threads to use to process network messages (eosio::bnet_plugin) -# bnet-threads = - -# remote endpoint of other node to connect to; Use multiple bnet-connect options as needed to compose a network (eosio::bnet_plugin) -# bnet-connect = - -# this peer will request no pending transactions from other nodes (eosio::bnet_plugin) -bnet-no-trx = false - -# The string used to format peers when logging messages about them. Variables are escaped with ${}. -# Available Variables: -# _name self-reported name -# -# _id self-reported ID (Public Key) -# -# _ip remote IP address of peer -# -# _port remote port number of peer -# -# _lip local IP address connected to peer -# -# _lport local port number connected to peer -# -# (eosio::bnet_plugin) -bnet-peer-log-format = ["${_name}" ${_ip}:${_port}] - -# the location of the blocks directory (absolute path or relative to application data dir) (eosio::chain_plugin) -blocks-dir = "blocks" - -# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. (eosio::chain_plugin) -# checkpoint = - -# Override default WASM runtime (eosio::chain_plugin) -# wasm-runtime = - -# Override default maximum ABI serialization time allowed in ms (eosio::chain_plugin) -abi-serializer-max-time-ms = 15000 - -# Maximum size (in MiB) of the chain state database (eosio::chain_plugin) -chain-state-db-size-mb = 1024 - -# Safely shut down node when free space remaining in the chain state database drops below this size (in MiB). (eosio::chain_plugin) -chain-state-db-guard-size-mb = 128 - -# Maximum size (in MiB) of the reversible blocks database (eosio::chain_plugin) -reversible-blocks-db-size-mb = 340 - -# Safely shut down node when free space remaining in the reverseible blocks database drops below this size (in MiB). (eosio::chain_plugin) -reversible-blocks-db-guard-size-mb = 2 - -# print contract's output to console (eosio::chain_plugin) -contracts-console = false - -# Account added to actor whitelist (may specify multiple times) (eosio::chain_plugin) -# actor-whitelist = - -# Account added to actor blacklist (may specify multiple times) (eosio::chain_plugin) -# actor-blacklist = - -# Contract account added to contract whitelist (may specify multiple times) (eosio::chain_plugin) -# contract-whitelist = - -# Contract account added to contract blacklist (may specify multiple times) (eosio::chain_plugin) -# contract-blacklist = - -# Action (in the form code::action) added to action blacklist (may specify multiple times) (eosio::chain_plugin) -# action-blacklist = - -# Public key added to blacklist of keys that should not be included in authorities (may specify multiple times) (eosio::chain_plugin) -# key-blacklist = - -# Database read mode ("speculative", "head", or "read-only"). -# In "speculative" mode database contains changes done up to the head block plus changes made by transactions not yet included to the blockchain. -# In "head" mode database contains changes done up to the current head block. -# In "read-only" mode database contains incoming block changes but no speculative transaction processing. -# (eosio::chain_plugin) -read-mode = speculative - -# Chain validation mode ("full" or "light"). -# In "full" mode all incoming blocks will be fully validated. -# In "light" mode all incoming blocks headers will be fully validated; transactions in those validated blocks will be trusted -# (eosio::chain_plugin) -validation-mode = full - -# Disable the check which subjectively fails a transaction if a contract bills more RAM to another account within the context of a notification handler (i.e. when the receiver is not the code of the action). (eosio::chain_plugin) -disable-ram-billing-notify-checks = false - -# Track actions which match receiver:action:actor. Actor may be blank to include all. Action and Actor both blank allows all from Recieiver. Receiver may not be blank. (eosio::history_plugin) -# filter-on = - -# Do not track actions which match receiver:action:actor. Action and Actor both blank excludes all from Reciever. Actor blank excludes all from reciever:action. Receiver may not be blank. (eosio::history_plugin) -# filter-out = - -# PEM encoded trusted root certificate (or path to file containing one) used to validate any TLS connections made. (may specify multiple times) -# (eosio::http_client_plugin) -# https-client-root-cert = - -# true: validate that the peer certificates are valid and trusted, false: ignore cert errors (eosio::http_client_plugin) -https-client-validate-peers = 1 - -# The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin) -http-server-address = 127.0.0.1:8888 - -# The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin) -# https-server-address = - -# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin) -# https-certificate-chain-file = - -# Filename with https private key in PEM format. Required for https (eosio::http_plugin) -# https-private-key-file = - -# Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin) -# access-control-allow-origin = - -# Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin) -# access-control-allow-headers = - -# Specify the Access-Control-Max-Age to be returned on each request. (eosio::http_plugin) -# access-control-max-age = - -# Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin) -access-control-allow-credentials = false - -# The maximum body size in bytes allowed for incoming RPC requests (eosio::http_plugin) -max-body-size = 1048576 - -# Append the error log to HTTP responses (eosio::http_plugin) -verbose-http-errors = false - -# If set to false, then any incoming "Host" header is considered valid (eosio::http_plugin) -http-validate-host = 1 - -# Additionaly acceptable values for the "Host" header of incoming HTTP requests, can be specified multiple times. Includes http/s_server_address by default. (eosio::http_plugin) -# http-alias = - -# The maximum number of pending login requests (eosio::login_plugin) -max-login-requests = 1000000 - -# The maximum timeout for pending login requests (in seconds) (eosio::login_plugin) -max-login-timeout = 60 - -# The target queue size between nodeos and MongoDB plugin thread. (eosio::mongo_db_plugin) -mongodb-queue-size = 1024 - -# The maximum size of the abi cache for serializing data. (eosio::mongo_db_plugin) -mongodb-abi-cache-size = 2048 - -# Required with --replay-blockchain, --hard-replay-blockchain, or --delete-all-blocks to wipe mongo db.This option required to prevent accidental wipe of mongo db. (eosio::mongo_db_plugin) -mongodb-wipe = false - -# If specified then only abi data pushed to mongodb until specified block is reached. (eosio::mongo_db_plugin) -mongodb-block-start = 0 - -# MongoDB URI connection string, see: https://docs.mongodb.com/master/reference/connection-string/. If not specified then plugin is disabled. Default database 'EOS' is used if not specified in URI. Example: mongodb://127.0.0.1:27017/EOS (eosio::mongo_db_plugin) -# mongodb-uri = - -# Enables storing blocks in mongodb. (eosio::mongo_db_plugin) -mongodb-store-blocks = 1 - -# Enables storing block state in mongodb. (eosio::mongo_db_plugin) -mongodb-store-block-states = 1 - -# Enables storing transactions in mongodb. (eosio::mongo_db_plugin) -mongodb-store-transactions = 1 - -# Enables storing transaction traces in mongodb. (eosio::mongo_db_plugin) -mongodb-store-transaction-traces = 1 - -# Enables storing action traces in mongodb. (eosio::mongo_db_plugin) -mongodb-store-action-traces = 1 - -# Track actions which match receiver:action:actor. Receiver, Action, & Actor may be blank to include all. i.e. eosio:: or :transfer: Use * or leave unspecified to include all. (eosio::mongo_db_plugin) -# mongodb-filter-on = - -# Do not track actions which match receiver:action:actor. Receiver, Action, & Actor may be blank to exclude all. (eosio::mongo_db_plugin) -# mongodb-filter-out = - -# The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin) -p2p-listen-endpoint = 0.0.0.0:9876 - -# An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin) -# p2p-server-address = - -# The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin) -# p2p-peer-address = - -# Maximum number of client nodes from any single IP address (eosio::net_plugin) -p2p-max-nodes-per-host = 1 - -# The name supplied to identify this node amongst the peers. (eosio::net_plugin) -agent-name = "EOS Test Agent" - -# Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. (eosio::net_plugin) -allowed-connection = any - -# Optional public key of peer allowed to connect. May be used multiple times. (eosio::net_plugin) -# peer-key = - -# Tuple of [PublicKey, WIF private key] (may specify multiple times) (eosio::net_plugin) -# peer-private-key = - -# Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin) -max-clients = 25 - -# number of seconds to wait before cleaning up dead connections (eosio::net_plugin) -connection-cleanup-period = 30 - -# max connection cleanup time per cleanup call in millisec (eosio::net_plugin) -max-cleanup-time-msec = 10 - -# True to require exact match of peer network version. (eosio::net_plugin) -network-version-match = 0 - -# number of blocks to retrieve in a chunk from any individual peer during synchronization (eosio::net_plugin) -sync-fetch-span = 100 - -# maximum sizes of transaction or block messages that are sent without first sending a notice (eosio::net_plugin) -max-implicit-request = 1500 - -# Enable expirimental socket read watermark optimization (eosio::net_plugin) -use-socket-read-watermark = 0 - -# The string used to format peers when logging messages about them. Variables are escaped with ${}. -# Available Variables: -# _name self-reported name -# -# _id self-reported ID (64 hex characters) -# -# _sid first 8 characters of _peer.id -# -# _ip remote IP address of peer -# -# _port remote port number of peer -# -# _lip local IP address connected to peer -# -# _lport local port number connected to peer -# -# (eosio::net_plugin) -peer-log-format = ["${_name}" ${_ip}:${_port}] - -# Enable block production, even if the chain is stale. (eosio::producer_plugin) -enable-stale-production = false - -# Start this node in a state where production is paused (eosio::producer_plugin) -pause-on-startup = false - -# Limits the maximum time (in milliseconds) that is allowed a pushed transaction's code to execute before being considered invalid (eosio::producer_plugin) -max-transaction-time = 30 - -# Limits the maximum age (in seconds) of the DPOS Irreversible Block for a chain this node will produce blocks on (use negative value to indicate unlimited) (eosio::producer_plugin) -max-irreversible-block-age = -1 - -# ID of producer controlled by this node (e.g. inita; may specify multiple times) (eosio::producer_plugin) -# producer-name = - -# (DEPRECATED - Use signature-provider instead) Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin) -# private-key = - -# Key=Value pairs in the form = -# Where: -# is a string form of a vaild EOSIO public key -# -# is a string in the form : -# -# is KEY, or KEOSD -# -# KEY: is a string form of a valid EOSIO private key which maps to the provided public key -# -# KEOSD: is the URL where keosd is available and the approptiate wallet(s) are unlocked (eosio::producer_plugin) -#signature-provider = EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 -signature-provider = EOS7BSs5hWnEMxxoVRNgAwT1qz57PPoBV2jacZE3VhEEz1xdeVTZd=KEY:5KPR3ETzJwAxtLNFjxj3SbLMy8BCCZKNP484FhiYyDWDjoAJG8L - -# Limits the maximum time (in milliseconds) that is allowd for sending blocks to a keosd provider for signing (eosio::producer_plugin) -keosd-provider-timeout = 5 - -# account that can not access to extended CPU/NET virtual resources (eosio::producer_plugin) -# greylist-account = - -# offset of non last block producing time in micro second. Negative number results in blocks to go out sooner, and positive number results in blocks to go out later (eosio::producer_plugin) -produce-time-offset-us = 0 - -# offset of last block producing time in micro second. Negative number results in blocks to go out sooner, and positive number results in blocks to go out later (eosio::producer_plugin) -last-block-time-offset-us = 0 - -# ratio between incoming transations and deferred transactions when both are exhausted (eosio::producer_plugin) -incoming-defer-ratio = 1 - -# Lag in number of blocks from the head block when selecting the reference block for transactions (-1 means Last Irreversible Block) (eosio::txn_test_gen_plugin) -txn-reference-block-lag = 0 - -# The path of the wallet files (absolute path or relative to application data dir) (eosio::wallet_plugin) -wallet-dir = "." - -# Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin) -unlock-timeout = 900 - -# Override default URL of http://localhost:12345 for connecting to yubihsm-connector (eosio::wallet_plugin) -# yubihsm-url = - -# Enables YubiHSM support using given Authkey (eosio::wallet_plugin) -# yubihsm-authkey = - -# Plugin(s) to enable, may be specified multiple times -# plugin = - -beos-config-file = beos.config.ini - diff --git a/cd-scripts/resources/config.ini.in b/cd-scripts/resources/config.ini.in index 42d87265eac..ba9d3f2d976 100644 --- a/cd-scripts/resources/config.ini.in +++ b/cd-scripts/resources/config.ini.in @@ -16,7 +16,7 @@ bnet-follow-irreversible = 0 # this peer will request no pending transactions from other nodes (eosio::bnet_plugin) bnet-no-trx = false -# The string used to format peers when logging messages about them. Variables are escaped with $${}. + # Available Variables: # _name self-reported name # @@ -31,7 +31,7 @@ bnet-no-trx = false # _lport local port number connected to peer # # (eosio::bnet_plugin) -bnet-peer-log-format = ["$${_name}" $${_ip}:$${_port}] +bnet-peer-log-format = ["${_name}" ${_ip}:${_port}] # the location of the blocks directory (absolute path or relative to application data dir) (eosio::chain_plugin) blocks-dir = "blocks" @@ -108,7 +108,7 @@ disable-ram-billing-notify-checks = false https-client-validate-peers = 1 # The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin) -http-server-address = $HTTP_SERVER_PORT +http-server-address = @NODEOS_HTTP_SERVER_PORT@ # The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin) # https-server-address = @@ -230,7 +230,6 @@ max-implicit-request = 1500 # Enable expirimental socket read watermark optimization (eosio::net_plugin) use-socket-read-watermark = 0 -# The string used to format peers when logging messages about them. Variables are escaped with $${}. # Available Variables: # _name self-reported name # @@ -247,7 +246,7 @@ use-socket-read-watermark = 0 # _lport local port number connected to peer # # (eosio::net_plugin) -peer-log-format = ["$${_name}" $${_ip}:$${_port}] +peer-log-format = ["${_name}" ${_ip}:${_port}] # Enable block production, even if the chain is stale. (eosio::producer_plugin) enable-stale-production = false @@ -278,7 +277,7 @@ max-irreversible-block-age = -1 # KEY: is a string form of a valid EOSIO private key which maps to the provided public key # # KEOSD: is the URL where keosd is available and the approptiate wallet(s) are unlocked (eosio::producer_plugin) -signature-provider = $SIGNATURE_PROVIDER +signature-provider = @SIGNATURE_PROVIDER@ # Limits the maximum time (in milliseconds) that is allowd for sending blocks to a keosd provider for signing (eosio::producer_plugin) keosd-provider-timeout = 5 @@ -299,7 +298,7 @@ incoming-defer-ratio = 1 txn-reference-block-lag = 0 # The path of the wallet files (absolute path or relative to application data dir) (eosio::wallet_plugin) -wallet-dir = $WALLET_DIR +wallet-dir = @WALLET_DIR@ # Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin) unlock-timeout = 900 diff --git a/cd-scripts/resources/genesis.json.bw b/cd-scripts/resources/genesis.json.bw deleted file mode 100644 index 192e15eb2bb..00000000000 --- a/cd-scripts/resources/genesis.json.bw +++ /dev/null @@ -1,24 +0,0 @@ -{ - "initial_timestamp": "2018-03-02T12:00:00.000", - "initial_key": "EOS7BSs5hWnEMxxoVRNgAwT1qz57PPoBV2jacZE3VhEEz1xdeVTZd", - "initial_configuration": { - "max_block_net_usage": 1048576, - "target_block_net_usage_pct": 1000, - "max_transaction_net_usage": 524288, - "base_per_transaction_net_usage": 12, - "net_usage_leeway": 500, - "context_free_discount_net_usage_num": 20, - "context_free_discount_net_usage_den": 100, - "max_block_cpu_usage": 400000, - "target_block_cpu_usage_pct": 500, - "max_transaction_cpu_usage": 50000, - "min_transaction_cpu_usage": 100, - "max_transaction_lifetime": 3600, - "deferred_trx_expiration_window": 600, - "max_transaction_delay": 3888000, - "max_inline_action_size": 4096, - "max_inline_action_depth": 4, - "max_authority_depth": 6 - }, - "initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000" -} diff --git a/cd-scripts/resources/genesis.json.in b/cd-scripts/resources/genesis.json.in index 3087cf4e8c7..bd62f924115 100644 --- a/cd-scripts/resources/genesis.json.in +++ b/cd-scripts/resources/genesis.json.in @@ -1,6 +1,6 @@ { "initial_timestamp": "2018-03-02T12:00:00.000", - "initial_key": "$INITIAL_KEY", + "initial_key": "${EOSIO_ROOT_KEY}", "initial_configuration": { "max_block_net_usage": 1048576, "target_block_net_usage_pct": 1000, diff --git a/contracts/CMakeLists.txt b/contracts/CMakeLists.txt index dc9b88017ba..044e7e5fe6d 100644 --- a/contracts/CMakeLists.txt +++ b/contracts/CMakeLists.txt @@ -5,6 +5,7 @@ set(DEFAULT_SYSTEM_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts/libc++/upstream set(STANDARD_INCLUDE_FOLDERS ${CMAKE_SOURCE_DIR}/contracts ${CMAKE_BINARY_DIR}/contracts ${CMAKE_SOURCE_DIR}/externals/magic_get/include) add_subdirectory(eosiolib) +add_subdirectory(beoslib) add_subdirectory(musl) add_subdirectory(libc++) add_subdirectory(simple.token) @@ -34,7 +35,6 @@ add_subdirectory(noop) add_subdirectory(tic_tac_toe) add_subdirectory(payloadless) add_subdirectory(integration_test) -add_subdirectory(beoslib) add_subdirectory(eosio.init) add_subdirectory(eosio.gateway) add_subdirectory(eosio.distribution) diff --git a/contracts/eosio.init/eosio.init.hpp.in b/contracts/eosio.init/eosio.init.hpp.in index 8b0b30d9e9a..c145c9d72b4 100644 --- a/contracts/eosio.init/eosio.init.hpp.in +++ b/contracts/eosio.init/eosio.init.hpp.in @@ -76,7 +76,7 @@ namespace eosio { { beos_global_state dp; - dp.proxy_asset = asset( 0, S( $PROXY_ASSET_PRECISION, $PROXY_ASSET_NAME ) ); + dp.proxy_asset = asset( 0, S( ${PROXY_ASSET_PRECISION}, ${PROXY_ASSET_NAME} ) ); /* STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION @@ -85,14 +85,14 @@ namespace eosio { After this block, ABP witnesses can be voted out and replaced by elected witnesses. Set this to 14 days worth of blocks */ - dp.starting_block_for_initial_witness_election = $STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION; + dp.starting_block_for_initial_witness_election = ${STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION}; /* STARTING_BLOCK_FOR_BEOS_DISTRIBUTION This is the block where the blockchain begins awarding staked BEOS to accounts holding proxyBTS. Set this to 7 days/1 week worth of blocks. */ - dp.beos.starting_block_for_distribution = $STARTING_BLOCK_FOR_BEOS_DISTRIBUTION; + dp.beos.starting_block_for_distribution = ${STARTING_BLOCK_FOR_BEOS_DISTRIBUTION}; /* ENDING_BLOCK_FOR_BEOS_DISTRIBUTION @@ -103,26 +103,26 @@ namespace eosio { IMPORTANT NOTE: Staked BEOS will only be “unstakeable” after this period is over. */ - dp.beos.ending_block_for_distribution = $ENDING_BLOCK_FOR_BEOS_DISTRIBUTION; + dp.beos.ending_block_for_distribution = ${ENDING_BLOCK_FOR_BEOS_DISTRIBUTION}; /* distribution_payment_block_interval_for_beos_distribution */ - dp.beos.distribution_payment_block_interval_for_distribution = $DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_BEOS_DISTRIBUTION; + dp.beos.distribution_payment_block_interval_for_distribution = ${DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_BEOS_DISTRIBUTION}; /* AMOUNT_OF_REWARD_BEOS This is the total amount of staked BEOS to be awarded over the BEOS distribution period. TODO: This value needs to be set by Terradacs. */ - dp.beos.amount_of_reward = $AMOUNT_OF_REWARD_BEOS; + dp.beos.amount_of_reward = ${AMOUNT_OF_REWARD_BEOS}; /* STARTING_BLOCK_FOR_RAM_DISTRIBUTION This is the block where the blockchain begins awarding RAM to accounts holding proxyBTS. Set this to 7 days worth of blocks. */ - dp.ram.starting_block_for_distribution = $STARTING_BLOCK_FOR_RAM_DISTRIBUTION; + dp.ram.starting_block_for_distribution = ${STARTING_BLOCK_FOR_RAM_DISTRIBUTION}; /* ENDING_BLOCK_FOR_RAM_DISTRIBUTION @@ -134,24 +134,24 @@ namespace eosio { but it can be spent on fees for actions. This prevents a market from forming for RAM until the end of the distribution period. This means that anyone needing RAM during distribution period must lock up BTS to get it. */ - dp.ram.ending_block_for_distribution = $ENDING_BLOCK_FOR_RAM_DISTRIBUTION; + dp.ram.ending_block_for_distribution = ${ENDING_BLOCK_FOR_RAM_DISTRIBUTION}; /* get_distribution_payment_block_interval_for_ram_distribution */ - dp.ram.distribution_payment_block_interval_for_distribution = $DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_RAM_DISTRIBUTION; + dp.ram.distribution_payment_block_interval_for_distribution = ${DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_RAM_DISTRIBUTION}; /* AMOUNT_OF_REWARD_RAM This is the total amount of RAM to be awarded over the RAM distribution period. TODO: Some analysis is needed to determine a reasonable value for this amount based on RAM resources. */ - dp.ram.amount_of_reward = $AMOUNT_OF_REWARD_RAM; + dp.ram.amount_of_reward = ${AMOUNT_OF_REWARD_RAM}; - dp.trustee.starting_block_for_distribution = $STARTING_BLOCK_FOR_TRUSTEE_DISTRIBUTION; - dp.trustee.ending_block_for_distribution = $ENDING_BLOCK_FOR_TRUSTEE_DISTRIBUTION; - dp.trustee.distribution_payment_block_interval_for_distribution = $DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_TRUSTEE_DISTRIBUTION; - dp.trustee.amount_of_reward = $AMOUNT_OF_REWARD_TRUSTEE; + dp.trustee.starting_block_for_distribution = ${STARTING_BLOCK_FOR_TRUSTEE_DISTRIBUTION}; + dp.trustee.ending_block_for_distribution = ${ENDING_BLOCK_FOR_TRUSTEE_DISTRIBUTION}; + dp.trustee.distribution_payment_block_interval_for_distribution = ${DISTRIBUTION_PAYMENT_BLOCK_INTERVAL_FOR_TRUSTEE_DISTRIBUTION}; + dp.trustee.amount_of_reward = ${AMOUNT_OF_REWARD_TRUSTEE}; checker( dp );