How secblockchain/core-blockchain works
Project type and purpose
• This is a distributed blockchain node implementation (“Smart Energy Coin Validator Node”) based on Go-Ethereum.
• It provides CLI scripts for installation (node-setup.sh), node lifecycle (node-start.sh, node-stop.sh), and runs a customized geth‐style binary under the hood.
File structure
Top‐level:
• .env, README.md, genesis.json, chaindata/ (on-disk chain DB)
• node-setup.sh, node-start.sh, node-stop.sh (shell orchestration)
• node_src/ – Go source of a full Ethereum‐compatible node (p2p, consensus, RPC, core, crypto, etc.)
Key patterns:
• accounts/, keystore/ modules handle wallet & validators
• consensus/ implements DPoS and variants (clique, ethash)
• p2p/, devp2p/ manage peer discovery & networking
• rpc/, graphql/ expose JSON-RPC and GraphQL APIs
• core/, state/, trie/, rlp/, eth/ process blocks, state transitions, VM execution
• cmd/ contains CLI entry points (geth, bootnode, evm, clef, puppeth, faucet, etc.)
Extract insights from README
• This repository bundles multiple release candidates of an SEC DPoS chain.
• Installation: runs node-setup.sh to compile/configure a validator or RPC node.
• Usage: node-start.sh/node-stop.sh to run or halt validator/RPC instance.
• Interactive console via tmux for on-chain management (staking, monitoring).
Elements
• Shell scripts (oval/green)
• Node binary modules (rectangles/blue)
Final advice
• On-chain and off-chain interactions (staking UI, system contracts).
• Configuration files (genesis.json, node.toml) feeding into the node at startup.