Wording changes.

This commit is contained in:
ravinsp
2022-08-12 11:40:08 +05:30
parent 7d9dda7971
commit e282484c60
7 changed files with 16 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
# Hot Pocket developer toolkit
Developer toolkit for Hot Pocket smart contract development. This toolkit makes use of Docker to provide a cross-platform development tools for developers. Using the toolkit, developers can spin-up local Hot Pocket clusters on their developer machines and test Hot Pocket smart contracts.
# HotPocket developer toolkit
Developer toolkit for HotPocket smart contract development. This toolkit makes use of Docker to provide a cross-platform development tools for developers. Using the toolkit, developers can spin-up local HotPocket clusters on their developer machines and test HotPocket smart contracts.
We use Docker containers to run Hot Pocket and smart contracts in a Linux environment. We also use Docker containers to distribute developer tools so developers can use the tools on any platform as long as they install Docker.
We use Docker containers to run HotPocket and smart contracts in a Linux environment. We also use Docker containers to distribute developer tools so developers can use the tools on any platform as long as they install Docker.
<img width="829" alt="image" src="https://user-images.githubusercontent.com/33562092/174513691-4700f356-09c5-47f9-ad5c-550abaefc1b1.png">
@@ -93,4 +93,4 @@ The executable can be distributed to be run as a CLI tool on developer machine.
| HP_CLUSTER_SIZE | Number of nodes in the cluster. Applied with 'deploy' command. | `1` |
| HP_DEFAULT_NODE | The node the 'deploy' command uses to display logs. | `1` |
| HP_DEVKIT_IMAGE | Docker image to be used for devkit cluster management. | `evernodedev/hpdevkit` |
| HP_INSTANCE_IMAGE | Docker image to be used for Hot Pocket instances. | `evernodedev/hotpocket:latest-ubt.20.04-njs.16` |
| HP_INSTANCE_IMAGE | Docker image to be used for HotPocket instances. | `evernodedev/hotpocket:latest-ubt.20.04-njs.16` |

View File

@@ -1,4 +1,4 @@
# This image contains scripts for creating Hot Pocket contract clusters
# This image contains scripts for creating HotPocket contract clusters
# on the developer machine for local development testing.
# docker build -t evernodedev/hpdevkit .
# docker push evernodedev/hpdevkit
@@ -16,7 +16,7 @@ RUN dpkg -x docker.deb docker-extracted
RUN wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
RUN chmod +x jq
# Set permissions for hot pocket devkit scripts.
# Set permissions for hotpocket devkit scripts.
COPY scripts /build/scripts
RUN chmod -R +x /build/scripts/*.sh

View File

@@ -7,7 +7,7 @@
"start": "npm run build && hpdevkit deploy dist"
},
"dependencies": {
"hotpocket-nodejs-contract": "0.5.4",
"hotpocket-nodejs-contract": "0.5.6",
"@vercel/ncc": "0.34.0"
}
}

View File

@@ -44,7 +44,7 @@ export class _projname_ {
}
async setData(data) {
// Hot Pocket subjects data on-disk to consensus.
// HotPocket subjects data-on-disk to consensus.
await fs.writeFile(dataFile, data);
}

View File

@@ -1,21 +1,21 @@
const HotPocket = require('hotpocket-nodejs-contract');
const { _projname_ } = require('./_projname_');
// Hot Pocket smart contract is defined as a function which takes the Hot Pocket ExecutionContext as an argument.
// HotPocket smart contract is defined as a function which takes the HotPocket contract context as an argument.
// This function gets invoked every consensus round and whenever a user sends a out-of-concensus read-request.
async function contract(ctx) {
// Create our application logic component.
// This pattern allows us to test the application logic independently of Hot Pocket.
// This pattern allows us to test the application logic independently of HotPocket.
const app = new _projname_();
// Wire-up output emissions from the application before we pass user inputs to it.
app.sendOutput = async (userPublicKey, output) => {
// In Hot Pocket, each user is represented by their Ed25519 public key.
// In HotPocket, each user is represented by their Ed25519 public key.
const user = ctx.users.find(userPublicKey);
await user.send(output)
}
// In 'readonly' mode, nothing our contract does will get persisted on the ledger. The benefit is
// readonly messages gets processed much faster due to not being subjected to consensus.
// We should only use readonly mode for returning/replying data for the requesting user.

View File

@@ -75,7 +75,7 @@ function create_instance {
let peer_port=22860+$node
let user_port=8080+$node
# Create container for hot pocket instance.
# Create container for hotpocket instance.
local container_name="${container_prefix}_$node"
docker container create --name $container_name --privileged \
-p $user_port:$user_port --network $network --network-alias node$node \
@@ -116,7 +116,7 @@ function joinarr {
echo $str
}
# Update all instances hot pocket configs so they connect to each other as a cluster.
# Update all instances hotpocket configs so they connect to each other as a cluster.
function bind_mesh {
local instance_count=$(get_container_count)

View File

@@ -31,7 +31,7 @@ function DevKitContainer([string]$Mode, [string]$Name, [switch]$Detached, [switc
}
if ($MountSock) {
# We mount the host docker socket into the container so we can use it to issue commands to the docker host.
# We use this ability to spin up other containers (Hot Pocket nodes) on the host.
# We use this ability to spin up other containers (HotPocket nodes) on the host.
$Command += " --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock"
}
if ($MountVolume) {
@@ -142,7 +142,7 @@ Function CodeGenerator() {
docker rm "$($CodegenContainerName)" 2>&1 | Out-Null
}
Write-Host "Hot Pocket devkit launcher ($($Version))"
Write-Host "HotPocket devkit launcher ($($Version))"
$Command = $args[0]
$CommandError = "Invalid command. Expected: deploy | clean | start | stop | logs | gen"