@gxchain2/core

The core logic of blockchain node, including:
-
BlockchainMonitor
: Contains several events
logs
: Emit when a new transaction's log is generatedremovedLogs
: Emit when the transaction has been rolled backnewHeads
: Emit when canonical chain changes
-
Indexer
and BloomBitsFilter
: Create bloom bits index for section
-
Miner
: Generate blocks
-
Protocols
: Used for communication and data transmission between nodes
-
Txpool
: Manage pending and queued transactions
-
Sync
: Synchronize blocks
-
Txsync
: Synchronize transactions
-
Tracer
: Tracer provides an implementation of tracing blocks or transactions
-
Staking
: An implementation of staking logic
-
Contracts
: Some classes are used to interact with the smart contract
INSTALL
npm install @gxchain2/core
USAGE
const node = new Node({
databasePath: '/root/.gxchain2',
chain: 'gxc2-testnet',
mine: {
enable: false
},
p2p: {
enable: false
},
account: {
keyStorePath: '/root/.gxchain2/keystore'),
unlock: []
}
});
await node.init();
await node.abort();
License
GNU General Public License v3.0