Permalink
Browse files

Initial Checkin

  • Loading branch information...
revflash committed Mar 23, 2016
0 parents commit a3c349ae5b1206de84f8d86699ded94e2d7ba784
Showing with 80,452 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +201 −0 CMakeLists.txt
  3. +43 −0 README.md
  4. +11 −0 libraries/CMakeLists.txt
  5. +27 −0 libraries/app/CMakeLists.txt
  6. +235 −0 libraries/app/api.cpp
  7. +868 −0 libraries/app/application.cpp
  8. +95 −0 libraries/app/comment_api.cpp
  9. +1,027 −0 libraries/app/database_api.cpp
  10. +183 −0 libraries/app/impacted.cpp
  11. +208 −0 libraries/app/include/steemit/app/api.hpp
  12. +56 −0 libraries/app/include/steemit/app/api_access.hpp
  13. +100 −0 libraries/app/include/steemit/app/application.hpp
  14. +249 −0 libraries/app/include/steemit/app/comment_api.hpp
  15. +341 −0 libraries/app/include/steemit/app/database_api.hpp
  16. +46 −0 libraries/app/include/steemit/app/impacted.hpp
  17. +137 −0 libraries/app/include/steemit/app/plugin.hpp
  18. +134 −0 libraries/app/include/steemit/app/state.hpp
  19. +74 −0 libraries/app/plugin.cpp
  20. +52 −0 libraries/chain/CMakeLists.txt
  21. +257 −0 libraries/chain/block_database.cpp
  22. +2,276 −0 libraries/chain/database.cpp
  23. +21 −0 libraries/chain/evaluator.cpp
  24. +228 −0 libraries/chain/fork_database.cpp
  25. +40 −0 libraries/chain/get_config.cpp
  26. +10 −0 libraries/chain/hardfork.d/000-200-preamble.hf
  27. +126 −0 libraries/chain/include/steemit/chain/account_object.hpp
  28. +17 −0 libraries/chain/include/steemit/chain/assert_evaluator.hpp
  29. +27 −0 libraries/chain/include/steemit/chain/block_database.hpp
  30. +18 −0 libraries/chain/include/steemit/chain/block_summary_object.hpp
  31. +299 −0 libraries/chain/include/steemit/chain/comment_object.hpp
  32. +150 −0 libraries/chain/include/steemit/chain/config.hpp
  33. +16 −0 libraries/chain/include/steemit/chain/custom_evaluator.hpp
  34. +372 −0 libraries/chain/include/steemit/chain/database.hpp
  35. +127 −0 libraries/chain/include/steemit/chain/db_with.hpp
  36. +73 −0 libraries/chain/include/steemit/chain/evaluator.hpp
  37. +84 −0 libraries/chain/include/steemit/chain/exceptions.hpp
  38. +101 −0 libraries/chain/include/steemit/chain/fork_database.hpp
  39. +9 −0 libraries/chain/include/steemit/chain/get_config.hpp
  40. +86 −0 libraries/chain/include/steemit/chain/global_property_object.hpp
  41. +85 −0 libraries/chain/include/steemit/chain/history_object.hpp
  42. +26 −0 libraries/chain/include/steemit/chain/immutable_chain_parameters.hpp
  43. +21 −0 libraries/chain/include/steemit/chain/internal_exceptions.hpp
  44. +24 −0 libraries/chain/include/steemit/chain/node_property_object.hpp
  45. +10 −0 libraries/chain/include/steemit/chain/protocol/README.md
  46. +128 −0 libraries/chain/include/steemit/chain/protocol/asset.hpp
  47. +117 −0 libraries/chain/include/steemit/chain/protocol/authority.hpp
  48. +22 −0 libraries/chain/include/steemit/chain/protocol/base.hpp
  49. +15 −0 libraries/chain/include/steemit/chain/protocol/block.hpp
  50. +33 −0 libraries/chain/include/steemit/chain/protocol/block_header.hpp
  51. +70 −0 libraries/chain/include/steemit/chain/protocol/operations.hpp
  52. +2 −0 libraries/chain/include/steemit/chain/protocol/protocol.hpp
  53. +457 −0 libraries/chain/include/steemit/chain/protocol/steem_operations.hpp
  54. +109 −0 libraries/chain/include/steemit/chain/protocol/transaction.hpp
  55. +289 −0 libraries/chain/include/steemit/chain/protocol/types.hpp
  56. +32 −0 libraries/chain/include/steemit/chain/steem_evaluator.hpp
  57. +169 −0 libraries/chain/include/steemit/chain/steem_objects.hpp
  58. +20 −0 libraries/chain/include/steemit/chain/transaction_evaluation_state.hpp
  59. +47 −0 libraries/chain/include/steemit/chain/transaction_object.hpp
  60. +134 −0 libraries/chain/include/steemit/chain/witness_objects.hpp
  61. +20 −0 libraries/chain/index.cpp
  62. +162 −0 libraries/chain/protocol/asset.cpp
  63. +87 −0 libraries/chain/protocol/authority.cpp
  64. +69 −0 libraries/chain/protocol/block.cpp
  65. +133 −0 libraries/chain/protocol/operations.cpp
  66. +212 −0 libraries/chain/protocol/steem_operations.cpp
  67. +384 −0 libraries/chain/protocol/transaction.cpp
  68. +257 −0 libraries/chain/protocol/types.cpp
  69. +492 −0 libraries/chain/steem_evaluator.cpp
  70. +120 −0 libraries/chain/steem_objects.cpp
  71. +72 −0 libraries/chain/transaction_object.cpp
  72. +17 −0 libraries/chain/transfer_evaluator.cpp
  73. +53 −0 libraries/chain/witness_evaluator.cpp
  74. +12 −0 libraries/db/CMakeLists.txt
  75. +132 −0 libraries/db/include/graphene/db/flat_index.hpp
  76. +35 −0 libraries/db/include/graphene/db/fwd.hpp
  77. +129 −0 libraries/db/include/graphene/db/generic_index.hpp
  78. +305 −0 libraries/db/include/graphene/db/index.hpp
  79. +142 −0 libraries/db/include/graphene/db/object.hpp
  80. +174 −0 libraries/db/include/graphene/db/object_database.hpp
  81. +222 −0 libraries/db/include/graphene/db/object_id.hpp
  82. +149 −0 libraries/db/include/graphene/db/simple_index.hpp
  83. +147 −0 libraries/db/include/graphene/db/undo_database.hpp
  84. +43 −0 libraries/db/index.cpp
  85. +125 −0 libraries/db/object_database.cpp
  86. +290 −0 libraries/db/undo_database.cpp
  87. +27 −0 libraries/deterministic_openssl_rand/CMakeLists.txt
  88. +104 −0 libraries/deterministic_openssl_rand/deterministic_openssl_rand.cpp
  89. +31 −0 libraries/deterministic_openssl_rand/include/graphene/utilities/deterministic_openssl_rand.hpp
  90. +1 −0 libraries/fc
  91. +34 −0 libraries/net/CMakeLists.txt
  92. +50 −0 libraries/net/core_messages.cpp
  93. +105 −0 libraries/net/include/graphene/net/config.hpp
  94. +521 −0 libraries/net/include/graphene/net/core_messages.hpp
  95. +38 −0 libraries/net/include/graphene/net/exceptions.hpp
  96. +117 −0 libraries/net/include/graphene/net/message.hpp
  97. +69 −0 libraries/net/include/graphene/net/message_oriented_connection.hpp
  98. +328 −0 libraries/net/include/graphene/net/node.hpp
  99. +342 −0 libraries/net/include/graphene/net/peer_connection.hpp
  100. +122 −0 libraries/net/include/graphene/net/peer_database.hpp
  101. +79 −0 libraries/net/include/graphene/net/stcp_socket.hpp
  102. +412 −0 libraries/net/message_oriented_connection.cpp
  103. +5,442 −0 libraries/net/node.cpp
  104. +516 −0 libraries/net/peer_connection.cpp
  105. +278 −0 libraries/net/peer_database.cpp
  106. +187 −0 libraries/net/stcp_socket.cpp
  107. +3 −0 libraries/plugins/CMakeLists.txt
  108. +17 −0 libraries/plugins/account_history/CMakeLists.txt
  109. +149 −0 libraries/plugins/account_history/account_history_plugin.cpp
  110. +85 −0 libraries/plugins/account_history/include/steemit/account_history/account_history_plugin.hpp
  111. +21 −0 libraries/plugins/delayed_node/CMakeLists.txt
  112. +163 −0 libraries/plugins/delayed_node/delayed_node_plugin.cpp
  113. +53 −0 libraries/plugins/delayed_node/include/steemit/delayed_node/delayed_node_plugin.hpp
  114. +17 −0 libraries/plugins/witness/CMakeLists.txt
  115. +107 −0 libraries/plugins/witness/include/steemit/witness/witness.hpp
  116. +434 −0 libraries/plugins/witness/witness.cpp
  117. +17 −0 libraries/time/CMakeLists.txt
  118. +46 −0 libraries/time/include/graphene/time/time.hpp
  119. +126 −0 libraries/time/time.cpp
  120. +39 −0 libraries/utilities/CMakeLists.txt
  121. +14 −0 libraries/utilities/git_revision.cpp.in
  122. +33 −0 libraries/utilities/include/graphene/utilities/git_revision.hpp
  123. +36 −0 libraries/utilities/include/graphene/utilities/key_conversion.hpp
  124. +58 −0 libraries/utilities/include/graphene/utilities/padding_ostream.hpp
  125. +32 −0 libraries/utilities/include/graphene/utilities/string_escape.hpp
  126. +34 −0 libraries/utilities/include/graphene/utilities/tempdir.hpp
  127. +32 −0 libraries/utilities/include/graphene/utilities/words.hpp
  128. +72 −0 libraries/utilities/key_conversion.cpp
  129. +73 −0 libraries/utilities/string_escape.cpp
  130. +39 −0 libraries/utilities/tempdir.cpp
  131. +49,783 −0 libraries/utilities/words.cpp
  132. +39 −0 libraries/wallet/CMakeLists.txt
  133. +2,362 −0 libraries/wallet/Doxyfile.in
  134. +91 −0 libraries/wallet/api_documentation_standin.cpp
  135. +179 −0 libraries/wallet/generate_api_documentation.pl
  136. +77 −0 libraries/wallet/include/steemit/wallet/api_documentation.hpp
  137. +122 −0 libraries/wallet/include/steemit/wallet/reflect_util.hpp
  138. +549 −0 libraries/wallet/include/steemit/wallet/wallet.hpp
  139. +1,329 −0 libraries/wallet/wallet.cpp
  140. +6 −0 programs/CMakeLists.txt
  141. +25 −0 programs/cli_wallet/CMakeLists.txt
  142. +283 −0 programs/cli_wallet/main.cpp
  143. +15 −0 programs/js_operation_serializer/CMakeLists.txt
  144. +386 −0 programs/js_operation_serializer/main.cpp
  145. +15 −0 programs/size_checker/CMakeLists.txt
  146. +114 −0 programs/size_checker/main.cpp
  147. +21 −0 programs/steemd/CMakeLists.txt
  148. +310 −0 programs/steemd/main.cpp
  149. +23 −0 programs/steemd/saltpass.py
@@ -0,0 +1,3 @@
[submodule "libraries/fc"]
path = libraries/fc
url = https://github.com/steemit/fc.git
@@ -0,0 +1,201 @@
# Defines Steem library target.
project( Steem )
cmake_minimum_required( VERSION 2.8.12 )
set( BLOCKCHAIN_NAME "Steem" )
set( GUI_CLIENT_EXECUTABLE_NAME Steem )
set( CUSTOM_URL_SCHEME "gcs" )
set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" )
# http://stackoverflow.com/a/18369825
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
message(FATAL_ERROR "GCC version must DB at least 4.8!")
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3)
message(FATAL_ERROR "Clang version must be at least 3.3!")
endif()
endif()
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
#set (ENABLE_INSTALLER 1)
#set (USE_PCH 1)
if (USE_PCH)
include (cotire)
endif(USE_PCH)
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/CMakeModules" )
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/GitVersionGen" )
include( GetGitRevisionDescription )
get_git_head_revision( GIT_REFSPEC GIT_SHA2 )
SET(BOOST_COMPONENTS)
LIST(APPEND BOOST_COMPONENTS thread
date_time
system
filesystem
program_options
signals
serialization
chrono
unit_test_framework
context
locale)
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
IF( WIN32 )
SET(BOOST_ROOT $ENV{BOOST_ROOT})
set(Boost_USE_MULTITHREADED ON)
set(BOOST_ALL_DYN_LINK OFF) # force dynamic linking for all libraries
ENDIF(WIN32)
FIND_PACKAGE(Boost 1.57 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
# For Boost 1.53 on windows, coroutine was not in BOOST_LIBRARYDIR and do not need it to build, but if boost versin >= 1.54, find coroutine otherwise will cause link errors
IF(NOT "${Boost_VERSION}" MATCHES "1.53(.*)")
SET(BOOST_LIBRARIES_TEMP ${Boost_LIBRARIES})
FIND_PACKAGE(Boost 1.54 REQUIRED COMPONENTS coroutine)
LIST(APPEND BOOST_COMPONENTS coroutine)
SET(Boost_LIBRARIES ${BOOST_LIBRARIES_TEMP} ${Boost_LIBRARIES})
ENDIF()
if( WIN32 )
message( STATUS "Configuring Steem on WIN32")
set( DB_VERSION 60 )
set( BDB_STATIC_LIBS 1 )
set( ZLIB_LIBRARIES "" )
SET( DEFAULT_EXECUTABLE_INSTALL_DIR bin/ )
set(CRYPTO_LIB)
#looks like this flag can have different default on some machines.
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
# Probably cmake has a bug and vcxproj generated for executable in Debug conf. has disabled debug info
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")
# On windows tcl should be installed to the directory pointed by setenv.bat script
SET(TCL_INCLUDE_PATH $ENV{TCL_ROOT}/include)
MESSAGE(STATUS "tcl INCLUDE PATH: ${TCL_INCLUDE_PATH}")
FIND_PACKAGE(TCL)
MESSAGE(STATUS "tcl_library: ${TCL_LIBRARY}")
SET(TCL_LIBS "optimized;${TCL_LIBRARY};debug;")
get_filename_component(TCL_LIB_PATH "${TCL_LIBRARY}" PATH)
get_filename_component(TCL_LIB_NAME "${TCL_LIBRARY}" NAME_WE)
get_filename_component(TCL_LIB_EXT "${TCL_LIBRARY}" EXT)
SET(TCL_LIBS "${TCL_LIBS}${TCL_LIB_PATH}/${TCL_LIB_NAME}g${TCL_LIB_EXT}")
SET(TCL_LIBRARY ${TCL_LIBS})
else( WIN32 ) # Apple AND Linux
find_library(READLINE_LIBRARIES NAMES readline)
find_path(READLINE_INCLUDE_DIR readline/readline.h)
#if(NOT READLINE_INCLUDE_DIR OR NOT READLINE_LIBRARIES)
# MESSAGE(FATAL_ERROR "Could not find lib readline.")
#endif()
if( APPLE )
# Apple Specific Options Here
message( STATUS "Configuring Steem on OS X" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -stdlib=libc++ -Wall" )
else( APPLE )
# Linux Specific Options Here
message( STATUS "Configuring Steem on Linux" )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -Wall" )
set( rt_library rt )
set( pthread_library pthread)
if ( NOT DEFINED crypto_library )
# I'm not sure why this is here, I guess someone has openssl and can't detect it with find_package()?
# if you have a normal install, you can define crypto_library to the empty string to avoid a build error
set( crypto_library crypto)
endif ()
if ( FULL_STATIC_BUILD )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
endif ( FULL_STATIC_BUILD )
endif( APPLE )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-memcmp" )
endif()
if( "${CMAKE_GENERATOR}" STREQUAL "Ninja" )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics" )
endif()
endif()
# based on http://www.delorie.com/gnu/docs/gdb/gdb_70.html
# uncomment this line to tell GDB about macros (slows compile times)
# set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -gdwarf-2 -g3" )
endif( WIN32 )
set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build Steem for code coverage analysis")
if(ENABLE_COVERAGE_TESTING)
SET(CMAKE_CXX_FLAGS "--coverage ${CMAKE_CXX_FLAGS}")
endif()
add_subdirectory( libraries )
add_subdirectory( programs )
if (ENABLE_INSTALLER)
set(VERSION_MAJOR 0)
set(VERSION_MINOR 1)
set(VERSION_PATCH 0)
include(InstallRequiredSystemLibraries)
set(CPACK_OUTPUT_FILE_PREFIX ${CMAKE_BINARY_DIR}/packages)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
SET(CPACK_PACKAGE_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
set(CPACK_PACKAGE_NAME "steem")
set(CPACK_PACKAGE_VENDOR "Steemit, Inc.")
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_DESCRIPTION "A client for the Steem network")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A client for the Steem network")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Steem ${CPACK_PACKAGE_VERSION}")
if(WIN32)
SET(CPACK_GENERATOR "ZIP;NSIS")
set(CPACK_PACKAGE_NAME "Steem") # override above
set(CPACK_NSIS_EXECUTABLES_DIRECTORY .)
set(CPACK_NSIS_PACKAGE_NAME "Steem v${CPACK_PACKAGE_VERSION}")
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
set(CPACK_NSIS_DEFINES " !define MUI_STARTMENUPAGE_DEFAULTFOLDER \\\"Steem\\\"")
# it seems like windows zip files usually don't have a single directory inside them, unix tgz frequently do
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
endif(WIN32)
if(APPLE)
set(CPACK_GENERATOR "DragNDrop")
endif()
if(LINUX)
# Linux gets a .tgz
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
endif(LINUX)
include(CPack)
endif(ENABLE_INSTALLER)
@@ -0,0 +1,43 @@
Introducing Steem (beta)
-----------------
Steem is an experimental Proof of Work blockchain with an unproven consensus
algorithm.
- **No Pre-mine, No ICO, No IPO**
- Currency Symbol STEEM
- 1.000 STEEM block reward at launch
- Approximately 112% APR long term inflation rate
Public Announcement & Discussion
--------------------------------
Steem was announced on [Bitcointalk](https://bitcointalk.org/index.php?board=159.0) prior to
any the start of any mining.
No Support & No Warenty
------------------------
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Code is Documentation
---------------------
Rather than attempt to describe the rules of the blockchain, it is up to
each individual to inspect the code to understand the rules consensus rules.
How to Mine
-----------
The mining algorithm used by Steem requires the owner to have access to the private key
used by the account. This means it does not favor mining pools.
./steemd --miner=["accountname","${WIFPRIVATEKEY}"] --witness="accountname" --seed-node="52.38.66.234:1984"
Make sure that your accountname is unique and not already used by someone else or your proof of work
might not be accepted by the blockchain.
@@ -0,0 +1,11 @@
add_subdirectory( fc )
add_subdirectory( db )
add_subdirectory( deterministic_openssl_rand )
add_subdirectory( chain )
add_subdirectory( net )
#add_subdirectory( p2p )
add_subdirectory( time )
add_subdirectory( utilities )
add_subdirectory( app )
add_subdirectory( plugins )
add_subdirectory( wallet )
@@ -0,0 +1,27 @@
file(GLOB HEADERS "include/steemit/app/*.hpp")
add_library( steemit_app
database_api.cpp
api.cpp
application.cpp
comment_api.cpp
impacted.cpp
plugin.cpp
${HEADERS}
)
target_link_libraries( steemit_app steemit_chain fc graphene_db graphene_net graphene_time graphene_utilities )
target_include_directories( steemit_app
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
if(MSVC)
set_source_files_properties( application.cpp api.cpp database_api.cpp PROPERTIES COMPILE_FLAGS "/bigobj" )
endif(MSVC)
INSTALL( TARGETS
steemit_app
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
Oops, something went wrong.

0 comments on commit a3c349a

Please sign in to comment.