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

cudo-compute

v1.5.0

Published

## Contract

Downloads

18

Readme

Cudo Compute PoC

Contract

Building & deploying

To build and deploy on the default network

$ sh scripts/deploy-contracts.sh

CLI tool

Install

To install from NPM

$ npm install -g cudo-compute
$ cudo-compute ...

To install as a package from source

$ npm run build
$ npm pack
$ npm install -g cudo-compute-1.0.0.tgz
$ cudo-compute ...

To use from source without installing

$ npm run build
$ ./bin/cudo-compute.js ...

Contract

Building & deploying

Building and deploying is mostly managed by the CUDOS blast tool.

$ sh contract/deploy.sh

If boxchain_contract_address does not exist in the project root, this will upload and instantiate the contract and store the address in that file.

If it does exist, it will upload the new code and migrate the existing contract to it.

Off-chain

Preparation

Make sure you have deployed the contract.

Install needed packages.

$ cd offchain
$ npm install
$ sh build.sh

If you are developing, use the watch mode to rebuild main.js automatically

$ sh watch.sh

Use

$ ./boxchain <command...>

Localnet

Unless you are using testnet (or mainnet!), you'll have to start the localnet

$ cd contract
$ blast node start

Client

# List machines
$ ./boxchain -aaccount2 demand list

# Create a machine
$ ./boxchain -aaccount2 demand add [size] [amount]|[duration] [ssh-key]

# Show the status of machine ID
$ ./boxchain -aaccount2 demand get ID

# Delete machine ID (TODO)
$ ./boxchain -aaccount2 demand rm ID

Executor

# Run the server for one supply operation
$ ./boxchain -aaccount3 supply one

# Run the server until manually stopped
$ ./boxchain -aaccount3 supply run

Notes

Amounts and durations

The demand add command accepts an amount in cudos, or a duration. Cudo amounts are simply converted directly to acudos, and durations are converted to acudos via the currently configured rate.

| format | unit | in cudos | |---|---|---| | NNNs | seconds | config rate | NNNm | minutes | 60 * config rate | NNNh | hours | 3,600 * config rate | NNNd | days | 43,200 * config rate | NNNy | years | 15,768,000 * config rate | NNNacudos | attocudos | 1e-18 cudos | NNNfcudos | femtocudos | 1e-16 cudos | NNNpcudos | picocudos | 1e-12 cudos | NNNncudos | nanocudos | 1e-9 cudos | NNNucudos | microcudos | 1e-6 cudos | NNNmcudos | millicudos | 1e-3 cudos | NNNcudos | cudos | 1 cudo exactly | NNNkcudos | kilocudos | 1e+3 cudos

TODO

  • A web-based UI for the requester

  • Run on testnet

  • Run the executor on the cloud

  • Run the executor on cloud compute resources provisioned by this system :)