
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
DDN development script tool for managing multi-node development environments in the examples directory. This tool implements all the functionality of the original shell scripts with several improvements.
Compared to the original shell scripts, this tool offers the following improvements:
$ npm install @ddn/bin --save
# or
$ yarn add @ddn/bin -D
development:
$ cd scripts/ddn-bin
$ npm install --save @oclif/core @oclif/plugin-help oclif
$ npm run build
$ npm link
Run unit tests:
$ yarn test
Run tests with file watching:
$ yarn run test:watch
Generate test coverage report:
$ yarn run test:coverage
All commands support the -t
parameter to specify project type:
fun-tests
: Entertainment test network (default)main-tests
: Mainnet test networkThe tool uses two sets of ports:
Each node has one HTTP port and one P2P port. For example, the first node's HTTP port is 8001 and P2P port is 9001.
examples/
├── fun-tests/
│ ├── config/
│ │ └── ...
│ └── app.js
├── main-tests/
│ ├── config/
│ │ └── ...
│ └── app.js
├── peer-8001/
│ ├── logs/
│ ├── db/
│ ├── public/
│ ├── ssl/
│ └── .ddnrc.js
├── peer-8002/
│ └── ...
└── ...
# Start 5 nodes (default)
$ ddn-bin peers:start
# Start 3 nodes
$ ddn-bin peers:start -n 3
# Force start (even if ports are in use)
$ ddn-bin peers:start -f
# Start a specific single node
$ ddn-bin peers:start -p 8001
# Start nodes in mainnet test project
$ ddn-bin peers:start -t main-tests
# Stop all nodes
$ ddn-bin peers:stop
# Stop 3 nodes
$ ddn-bin peers:stop -n 3
# Force stop (using SIGKILL)
$ ddn-bin peers:stop -f
# Stop a specific single node
$ ddn-bin peers:stop -p 8001
# Stop nodes in mainnet test project
$ ddn-bin peers:stop -t main-tests
# Clean all data for all nodes
$ ddn-bin peers:clean
# Clean only databases
$ ddn-bin peers:clean -c db
# Clean only logs
$ ddn-bin peers:clean -c log
# Clean specific files
$ ddn-bin peers:clean -f blockchain
# Clean specific node
$ ddn-bin peers:clean -p 8001
# Clean node data in mainnet test project
$ ddn-bin peers:clean -t main-tests
# Monitor all nodes
$ ddn-bin peers:monitor
# Set monitoring interval (seconds)
$ ddn-bin peers:monitor -i 30
# Enable auto-restart
$ ddn-bin peers:monitor -r
# Monitor nodes in mainnet test project
$ ddn-bin peers:monitor -t main-tests
To verify the above information, you can check the node log files or use ddn to view node status.
# View node logs
$ tail -f ./logs/main.log
$ tail -f ./logs/debug.log
$ tail -f ./logs/dvm.log
# View node status
$ ddn d peerStat -H 127.0.0.1 -P 8001
$ ddn d peerStat -H 117.78.45.44 -P 8000 -M
View in browser: http://127.0.0.1:8001/api/blocks/getHeight
# Build
$ yarn run build
# Run tests
$ yarn test
Error: listen EADDRINUSE: address already in use :::8001
, it means the port is already in use and you need to change the port number.MIT
FAQs
DDN development tools for DDN Blockchain
We found that @ddn/bin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.