Sign inSign up

inertia/tintoy

By inertia

•Updated over 5 years ago

Tin Toy - A tiny Hive testnet based on tinman.

Image
0

1.5K

inertia/tintoy repository overview

⁠Tin Toy

Tin Toy - A tiny Hive testnet based on tinman⁠

⁠Quickstart

docker run -d -p 8090:8090 inertia/tintoy:latest

Using -p 8090:8090 will expose json-rpc.

... or ...

docker run -d -P inertia/tintoy:latest

Using -P will expose all of the ports, ephemerally (see below).

⁠As Seen from Kitematic⁠

kitematic

⁠From the Gist⁠

If you want to modify the scripts before deploying:

git clone https://gist.github.com/b88e7bfff8862858e54c59392e2bce20.git tintoy
cd tintoy
docker build -t myname/tintoy:mybranch .
docker run -d -P myname/tintoy:mybranch

For example, you can modify the first line of Dockerfile to switch versions of hived.

Tin Toy uses:

FROM hiveio/hive:latest

But you can switch to any branch and try it out. Suggested branches to try can be found in hive/activity⁠.

Say we want to take a look at a branch like v0.23.0-mira. Change the first line of the Dockerfile to:

FROM hiveio/hive:v0.23.0-mira

Then build and run. At the time of writing, tag v0.23.0⁠ was the only other tagged docker image available.

⁠Shell In

  • Use docker ps to get the name of the existing container.
  • Use the command docker exec -it <container name> /bin/bash to get a bash shell in the container.

⁠How to Use

Once the docker container has fully deployed, you'll have access to various port. Internally, the docker container responds to:

PortPurpose
2001p2p
8080condenser
8090jussi json-rpc
8091hived json-rpc
8092hivemind json-rpc
5000tinman server (if enabled)

If you launched with -P (ephemeral ports enabled), you can get a list of ports:

docker ps

Which might return something like:

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                                                                                                NAMES
290810dba18e        inertia/tintoy:latest   "/bin/sh -c /app/boo…"   5 minutes ago       Up 5 minutes        0.0.0.0:32832->2001/tcp, 0.0.0.0:32831->8080/tcp, 0.0.0.0:32830->8090/tcp, 0.0.0.0:32829->8091/tcp   tintoy

⁠Embedded Condenser

From the port list we can determine the external port for condenser. For port 8080, this example uses port 32831. Therefore, the URL to access condenser is:

http://localhost:32831

Remember, this changes whenever you execute with -P.

⁠Default Secret Key

Normally, the secret key for a testnet is kept secret. But for a local testnet, there's no reason to keep it a secret. For tintoy, the default secret key is set in the Dockerfile:

ENV SHARED_SECRET tintoy

Which means, if you want to derive the private keys for tnman, you could use the following command:

get_dev_key tintoy owner-tnman active-tnman posting-tnman memo-tnman | jq
[
  {
    "private_key": "5K5kjWq8pY23YptZaiEkiiaKi1wafufj63nzAtaDu1epVXw9fvz",
    "public_key": "TST7uubH7SpknapasQTzW1rFho3LUn1pFmdR7X4f1cHmK22aTJYm3",
    "account_name": "owner-tnman"
  },
  {
    "private_key": "5K3NwkFwCnsSfJNACw1qm3zzojWBtP8k4rTb2kbLQ4DDR6TgGnw",
    "public_key": "TST4w9GXogQtqPprzPhp7WKZPPKWXv4KvqqMMgd5agJQCDtYLBJwA",
    "account_name": "active-tnman"
  },
  {
    "private_key": "5Jrdrbt5xfjVeHfHd5JMiJy1FfrGtuieRvzr9WFYhcdHpjgfwPY",
    "public_key": "TST883nSqJL5KbVgfdV44snPPDTStQQxfR7vj8XttsZo25sXvHAnQ",
    "account_name": "posting-tnman"
  },
  {
    "private_key": "5KB3ddeh5o3WghSM3qQaUthxVt7QZWfNYCoiAW3XYfeDki1oH9z",
    "public_key": "TST56jtUgZrajuBUgdECYaew6cebjSbKWVdtCKkc4xxLAFZQ9f8A9",
    "account_name": "memo-tnman"
  }
]

Every account on the testnet uses tnman as their account authority. Using this account, you can sign any transaction for any account.

⁠Snapshot Refresh

Occasionally, it's a good idea to refresh the sample-snapshot.json file. This process is usually only required to be performed by the repo maintainer, but if you want to do it yourself, here are the steps:

  1. Install tinman by following that product's README.md⁠.
  2. Next, generate a new snapshot⁠.
  • Example: tinman snapshot -s https://anyx.io -o - | pv > snapshot.json
  1. Once we have our new snapshot, create a sample, overwriting the previous one.
  • Example: tinman sample -i snapshot.json -o sample-snapshot.json
  1. Delete (or move) snapshot.json (we don't need it anymore now that we have sample-snapshot.json).

Tin Toy

Tag summary

Content type

Image

Digest

Size

1000.1 MB

Last updated

over 5 years ago

docker pull inertia/tintoy