npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

perses-cli

v1.0.1-beta.2

Published

CLI for Perses - Centrality Blockchain test harness

Downloads

1

Readme


title: 'Centrality Blockchain - Perses CLI'

Perses CLI

A cli tool helps controlling Perses without writing js files!

Installation

  1. run script sh ./install.sh
  2. check installation successful by execute perses -v
> perses -v
v1.0.0

Uninstallation

Run sh ./uninstall.sh

Getting started

Perses capabilities:

Below is highlighting 5 most common usecases that perses cli could help

Run help for more instructions per command.

  • Init blockchain formation:

There are some default parameters: names, forwarding ports which results created 5 nodes above as validators.

> perses blockchain init --image cennznet/cennznet:1.1.0-rc1 --chain dev
631565dee2756d66d8c054e03a49f7a9ee4b203a39b05792ee4d288d75818e71 : Eve
3762d9e14e5e7688a55d4456de911b83114b7638aca7433d29190292e618a20e : Charlie
08442b163f00856fe853df4d8c5c936d240192057773bebcf677d43d92c04b29 : Dave
aa10654b063823fdc0ea5a3e141e24c1297fa5f677beab3601deabc598674b9f : Bob
ba495020d3e48d6d85a17b8456e711ee9764d1a7de910d7637b6ec85798bbb28 : Alice
  • Network partitioning

The following command will create a subnet for 2 nodes and isolate the 1st one to the entire 4 remaining node, 2nd node will join 2 both clusters and may acts as a bridge to connect the whole chaining nodes

> perses network createSubnet --SubnetContainers "ba495020d3e48d6d85a17b8456e711ee9764d1a7de910d7637b6ec85798bbb28, 11.20.10.1,true" "aa10654b063823fdc0ea5a3e141e24c1297fa5f677beab3601deabc598674b9f, 11.20.10.2, false"

> docker inspect Alice | jq '.[].NetworkSettings.Networks'
{
  "Blockchain": {
    "IPAMConfig": {
      "IPv4Address": "11.20.10.1"
    },
    "Links": null,
    "Aliases": [
      "ba495020d3e4"
    ],
    "NetworkID": "116ba07a97d8aad8fe4478b9517c3ccee7f5b7b7089a3069a6ef8e2bb1c26cc9",
    "EndpointID": "20c78c7bc441788ab95cb8d35ba487709ec27df11733a2c0e448c0ac68ad8544",
    "Gateway": "11.20.10.200",
    "IPAddress": "11.20.10.1",
    "IPPrefixLen": 16,
    "IPv6Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "MacAddress": "02:42:0b:14:0a:01",
    "DriverOpts": null
  }
}

> docker inspect Eve | jq '.[].NetworkSettings.Networks'
{
  "bridge": {
    "IPAMConfig": null,
    "Links": null,
    "Aliases": null,
    "NetworkID": "d9e1ab514e341dda2f4aaab595d85083bbd7f94804b979b57f18f5f24d5f7275",
    "EndpointID": "42b183600e858e0d38a69b0c11f2a7a4f7f6b0388237dcb9eee39bddd9ea8a76",
    "Gateway": "172.17.0.1",
    "IPAddress": "172.17.0.5",
    "IPPrefixLen": 16,
    "IPv6Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "MacAddress": "02:42:ac:11:00:05",
    "DriverOpts": null
  }
}
  • Staking setup for authority node

If the chain's config already bond controller with stash accounts, we can use staking module insertKey command to insert sessions keys to the node's storage

perses staking insertKey --node e0b5c19de9045ffa24f967e8342ec6668c36ea9da844d39e74d79fd0e8b2ed33 -s //Alice
  • Network emulation

Perses can even tolerate network packets conditions like delay, loss ... Following command would cause node Alice unable to communicate with any other nodes because packet loss rate is 100%

perses network loss -p 100 -t Alice
  • Teardown

Remove all running containers with image tag cennznet | plug and prune unused docker networks.

What else comming up?

  • Support P^werChain node
  • More robust commands for different usecases
  • Utilities commands

Remember Perses CLI is just cli for actual Perses testing framework, with Perses you can script the tests

STAY TUNED!