This is a Streamlined CLI-Based Hydra Core Management Tool.
$ git clone https://github.com/Internet-of-People/core-control -b master
IMPORTANT NOTES
- We only support Ubuntu LTS. If you need more flexibility, use our Docker tools.
- Do not run as root!
- Installs fail2ban for ssh, and ufw allowing only port 22(ssh) and the cores ports.
- If you already use this tool, please review the changelog section.
$ cd core-control
$ NETWORK=[devnet|mainnet] ./ccontrol.sh arg1 [arg2]
For some sub-commands you can leave out the 2nd argument and the bold one will be the default.
arg1 | arg2 | Description |
---|---|---|
install |
core | Install Core |
update |
core /self /check |
Update Core / Core-Control / Check |
remove |
core/self |
Remove Core / Core-Control |
secret |
set /clear |
Delegate Secret Set / Clear |
start |
relay /forger /all |
Start Core Services |
restart |
relay /forger /all/safe |
Restart Core Services |
stop |
relay /forger /all |
Stop Core Services |
status |
relay /forger /all |
Show Core Services Status |
logs |
relay /forger /all |
Show Core Logs |
snapshot |
create /restore |
Snapshot Create / Restore |
system |
info/update |
System Info / Update |
config |
reset |
Reset Config Files to Defaults |
database |
clear |
Clear the Database |
rollback |
Rollback to Specified Height | |
plugin |
list/add /remove /update |
Manage Core Plugins |
- Using the 'restart safe' arguments requires the round-monitor core plugin and restarts the core services when safe to do so in order to avoid missing a block.
- When setting a delegate secret just type your secret after the 'set' argument without quotes, like below:
$ NETWORK=[devnet|mainnet] ./ccontrol.sh secret set one two three four five six seven eight nine ten eleven twelve
- When doing a rollback just type the desired height after the
rollback
argument. - Rollback will stop the running processes, do the rollback and start the processes that were online.
- The script adds an alias named
ccontrol
on first run. On your next shell login you'll be able to call the script from anywhere using:ccontrol arg1 [arg2]
. It also has autocomplete functionality for all possible arguments. - Using the
config reset
arguments will stop the core processes, delete your existing configs and replace them with the defaults. If you're running a forger and/or have custom settings, you should add them again. - Using the
database clear
arguments will stop the core processes, wipe the database clean, and start the processes that were online before. The end result is that your node will start syncing from 0. - For plugin management just type the name of the plugin after
plugin add/remove/update
as it appears in the list. - On first run the tool exposes the core-cli with the project name, e.g. hydra for project Hydra. It will be accessible after logout.
In addition to this changelog, please also review Hydra Core's changelog.
- Update
hydraledger.io
tohydraledger.tech
- Remove transaction asset's size limit
- Add transaction length limit
- Upgraded SSI/DNS plugin to 5.0.4
- Upgraded SSI/DNS plugin to 5.0.1
- Upgraded SSI/DNS plugin to 5.0.0
- Upgraded to 4.0.4 SSI (project Morpheus, previously called DAC)
- Added DNS (project Coeus)
- Fixed: snapshot restore
- Upgrade to 3.1.1 DAC (project Morpheus)
- DAC transactions are more cheap now.
- Upgrade to 2.0.6 DAC (project Morpheus).
- API rate limit increased.
- BUGFIX: you may saw a lot of
MORPHEUS Trying to attach Morpheus HTTP API...
in the forger's log. That's now fixed.
$ NETWORK=[devnet|mainnet] ./ccontrol.sh update self
$ NETWORK=[devnet|mainnet] ./ccontrol.sh update core
$ NETWORK=[devnet|mainnet] ./ccontrol.sh stop all
$ NETWORK=[devnet|mainnet] ./ccontrol.sh start [relay|forger|all]
- reverted back forger handling. Most of you complaint about how this 3rd party tool handles forger starting, so we reverted it back to the original flow. With this release you can start your forger separately again.
- Upgrade to 2.6.31 Hydra Core
- Upgrade to 2.0.5 DAC (project Morpheus)
$ NETWORK=[devnet|mainnet] ./ccontrol.sh update self
$ NETWORK=[devnet|mainnet] ./ccontrol.sh update core
$ NETWORK=[devnet|mainnet] ./ccontrol.sh stop all
$ NETWORK=[devnet|mainnet] ./ccontrol.sh start [relay|forger|all]
- updated for core 2.6.10
ccontrol.sh
now requires aNETWORK
environment variable set to be eitherdevnet
ormainnet
. See the installation guide.
Breaking Changes
- You only have to use the
master
branch from now. Thedevelop
branch is for development only and contains changes that might ruin your live production. - You need to prepend the
ccontrol
with aNETWORK
environment set. See in the next section.
To be able to use the latest core-control and Hydra Core, follow these steps:
cd core-control
git checkout master
NETWORK=[devnet|mainnet] ./ccontrol update core
- added restart safe option
- use restart safe on update if all requirements are met
- added plugin manager
- snapshot now uses the core-snapshot interface
- updated for core 2.5
- fixed a bug in config reset
- added log level file
- renamed json rpc
- added wallet api
- updated for core 2.4
- added database clear functionality
- expose the core-cli as the project name
- added rollback functionality
- updated for core 2.3
- updated for core 2.2
- made 'update core' a lot smarter
- bump version to match core major version
- added status argument to show process status
- added a splash of color
- added update check to show update availability
- the ccontrol alias now has autocomplete for all arguments
- refactored some operations for consistency
- core remove is now done with 'remove core'
- added self-remove as an otion with 'remove self'
- moved miscellaneous variables and checks to misc.sh
- core update is now done with 'update core'
- added self-update as an otion with 'update self'
- removed automatic self-update
- added delegate secret management
- added local snapshot management
- added process restart capability
- automatically adds alias 'ccontrol' on first run
- standardize the script name and alias to 'ccontrol'
- added hostname and IP data to system info
- Made error messages easier to understand
- added config reset capability
- added system update
- added logs display
- network name is now pulled from .env for simpler commands
- renamed main script to cc.sh
- added devbranch variable to project.conf
- added automatic tool update from git
- renamed uninstall to remove
- added fail2ban (with default ssh protection)
- added ufw with configuration for ssh and the core ports in use
- reconfigure sshd_config with PermitRootLogin prohibit-password
- added pm2 logrotate module
- pm2 now starts on boot and saves process state after start/stop
- added system information
- added mainnet and devnet update procedures
- refactored code with a config file for easy migration to core v2 bridgechains
- initial release
If you discover a security vulnerability within this package, please open an issue. All security vulnerabilities will be promptly addressed.