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

Set the default genesis parameters to match the BEOS mainnet #1

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,19 @@ endif()
message( STATUS "Using '${CORE_SYMBOL_NAME}' as CORE symbol name" )

if ("${EOSIO_ROOT_KEY}" STREQUAL "")
set(EOSIO_ROOT_KEY "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV")
set(EOSIO_ROOT_KEY "EOS7dZz5ZM1GRRvpZisYV5dDp7LnmzeBooXrtHWgm6RD1YQP1YDJS")
endif()

message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" )

if ("${GATEWAY_ROOT_KEY}" STREQUAL "")
message(FATAL_ERROR "GATEWAY_ROOT_KEY must be specified")
set(GATEWAY_ROOT_KEY "EOS7XNXYgECD7ewQ2xdL1DSsgLZiXf5DcisU24VukPK5iR5zSJV7B")
endif()

message( STATUS "Using '${GATEWAY_ROOT_KEY}' as public key for 'beos.gateway' account" )

if ("${DISTRIBUTION_ROOT_KEY}" STREQUAL "")
message(FATAL_ERROR "DISTRIBUTION_ROOT_KEY must be specified")
set(DISTRIBUTION_ROOT_KEY "EOS6rBAw2VNCi3tP5GfpZm1Bp1xtT2jeY5pzpRNCTfLS4x16eGVo1")
endif()

message( STATUS "Using '${DISTRIBUTION_ROOT_KEY}' as public key for 'beos.distrib' account" )
Expand Down Expand Up @@ -259,19 +259,19 @@ install(FILES ${CMAKE_BINARY_DIR}/modules/eosio-config.cmake DESTINATION ${CMAKE
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTester.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/eosio)

configure_file(${CMAKE_SOURCE_DIR}/LICENSE
configure_file(${CMAKE_SOURCE_DIR}/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/wabt/LICENSE
configure_file(${CMAKE_SOURCE_DIR}/libraries/wabt/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.wabt COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/softfloat/COPYING.txt
configure_file(${CMAKE_SOURCE_DIR}/libraries/softfloat/COPYING.txt
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.softfloat COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/wasm-jit/LICENSE
configure_file(${CMAKE_SOURCE_DIR}/libraries/wasm-jit/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.wavm COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/secp256k1/upstream/COPYING
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/secp256k1/upstream/COPYING
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.secp256k1 COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/src/network/LICENSE.go
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/src/network/LICENSE.go
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.go COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/externals/binaryen/LICENSE
configure_file(${CMAKE_SOURCE_DIR}/externals/binaryen/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.binaryen COPYONLY)

install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/)
Expand All @@ -290,11 +290,11 @@ if ("${STARTING_BLOCK_FOR_INITIAL_WITNESS_ELECTION}" STREQUAL "")
endif()

if ("${DISTRIBUTION_PARAMS}" STREQUAL "")
message(FATAL_ERROR "missing distribution parameter settings - define DISTRIBUTION_PARAMS json argument for changeparams")
#message(FATAL_ERROR "missing distribution parameter settings - define DISTRIBUTION_PARAMS json argument for changeparams")
endif()

if ("${GATEWAY_PARAMS}" STREQUAL "")
message(FATAL_ERROR "missing gateway parameter settings - define GATEWAY_PARAMS json argument for changeparams")
#message(FATAL_ERROR "missing gateway parameter settings - define GATEWAY_PARAMS json argument for changeparams")
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/contracts/eosio.init/eosio.init.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/contracts/eosio.init/eosio.init.hpp)
Expand Down
17 changes: 8 additions & 9 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
FROM eosio/builder as builder
ARG branch=master
ARG symbol=SYS
FROM beos/builder as builder
ARG branch=beos-initial-release
ARG symbol=BEOS

RUN git clone -b $branch https://github.com/EOSIO/eos.git --recursive \
&& cd eos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \
RUN git clone -b $branch https://github.com/terradacs/beos-core.git --recursive \
&& cd beos-core && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \
&& cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/tmp/build -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
&& cmake --build /tmp/build --target install && rm /tmp/build/bin/eosiocpp

&& cmake --build /tmp/build --target install && rm -f /tmp/build/bin/eosiocpp

FROM ubuntu:18.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/lib/* /usr/local/lib/
COPY --from=builder /tmp/build/bin /opt/eosio/bin
COPY --from=builder /tmp/build/contracts /contracts
COPY --from=builder /eos/Docker/config.ini /
COPY --from=builder /beos-core/Docker/config.ini /
COPY --from=builder /etc/eosio-version /etc
COPY --from=builder /eos/Docker/nodeosd.sh /opt/eosio/bin/nodeosd.sh
COPY --from=builder /beos-core/Docker/nodeosd.sh /opt/eosio/bin/nodeosd.sh
ENV EOSIO_ROOT=/opt/eosio
RUN chmod +x /opt/eosio/bin/nodeosd.sh
ENV LD_LIBRARY_PATH /usr/local/lib
Expand Down
6 changes: 3 additions & 3 deletions libraries/chain/genesis_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
namespace eosio { namespace chain {

genesis_state::genesis_state() {
initial_timestamp = fc::time_point::from_iso_string( "2018-06-01T12:00:00" );
initial_timestamp = fc::time_point::from_iso_string( "2019-03-15T12:00:00" );
initial_key = fc::variant(eosio_root_key).as<public_key_type>();
initial_key_gateway = fc::variant(gateway_root_key).as<public_key_type>();
initial_key_distribution = fc::variant(distribution_root_key).as<public_key_type>();
initial_key_gateway = fc::variant(gateway_root_key).as<public_key_type>();
initial_key_distribution = fc::variant(distribution_root_key).as<public_key_type>();
}

chain::chain_id_type genesis_state::compute_chain_id() const {
Expand Down
4 changes: 2 additions & 2 deletions libraries/chain/include/eosio/chain/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ const static uint32_t default_context_free_discount_net_usage_num = 20; // TO
const static uint32_t default_context_free_discount_net_usage_den = 100;
const static uint32_t transaction_id_net_usage = 32; // 32 bytes for the size of a transaction id

const static uint32_t default_max_block_cpu_usage = 200'000; /// max block cpu usage in microseconds
const static uint32_t default_target_block_cpu_usage_pct = 10 * percent_1;
const static uint32_t default_max_block_cpu_usage = 400'000; /// max block cpu usage in microseconds
const static uint32_t default_target_block_cpu_usage_pct = 5 * percent_1;
const static uint32_t default_max_transaction_cpu_usage = 3*default_max_block_cpu_usage/4; /// max trx cpu usage in microseconds
const static uint32_t default_min_transaction_cpu_usage = 100; /// min trx cpu usage in microseconds (10000 TPS equiv)

Expand Down