Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleNode Setup
linenumberstrue
# Docker only: If you are using docker to setup your nodes you must make sure the EE and Node containers are on the same network.
# For this demo, I created a network called "casperlabs"
bootstrapnode:~$ docker network create casperlabs

# Create the .casperlabs directory you plan to use for your node. Here I created it in my home directory.
bootstrapnode:~$ mkdir -p ~/node2/.casperlabs

# We must start the execution-engine container before we start the node container.
# Note: You can name the container anything you wish, here I refer to it as cl-engine2.
bootstrapnode:~$ docker run --rm --name cl-engine2 -dit -v ~/node2/.casperlabs/:/root/.casperlabs/ --network casperlabs casperlabs/execution-engine:latest /root/.casperlabs/.caspernode.sock

# Next we can start our node. Here we will need the bootstrap address and the key pair we used in the bonds.txt file.
node:~$ docker run --rm --name cl-node -dit --network casperlabs -p 40400-40405:40400-40405 -v ~/node2/.casperlabs/:/root/.casperlabs/ casperlabs/node:latest run --server-data-dir /root/.casperlabs --grpc-socket /root/.casperlabs/.caspernode.sock --casper-validator-private-key-path /root/.casperlabs/validator-private.pem --casper-validator-public-key-path /root/.casperlabs/validator-public.pem --casper-auto-propose-enabled -b "casperlabs://<ADDRESS HERE>"

# You can view the logs for the node while it is starting up. Once fully started we should see it transition states and peer up to our bootstrap.
node:~$ docker logs -f cl-node
19:45:42.165 [main] INFO  io.casperlabs.node.Main$ - CasperLabs node 0.6.0 (260e9c292a40c90ceb94609b5b12cff2f5d69777)
19:45:42.183 [main] INFO  io.casperlabs.node.NodeEnvironment$ - Using data dir: /root/.casperlabs
19:45:42.534 [main] INFO  io.casperlabs.comm.UPnP$ - trying to open ports using UPnP....
19:45:51.609 [main] INFO  io.casperlabs.comm.UPnP$ - INFO - No gateway devices found
19:45:51.610 [main] INFO  io.casperlabs.comm.UPnP$ - No need to open any port
19:45:51.614 [main] INFO  io.casperlabs.comm.WhoAmI$ - flag --host was not provided, guessing your external IP address
19:45:51.732 [main] INFO  io.casperlabs.comm.WhoAmI$ - guessed <ip> from source: AmazonAWS service
19:45:55.050 [main] INFO  o.f.c.i.license.VersionPrinter - Flyway Community Edition 5.2.4 by Boxfuse
19:45:55.316 [main] INFO  o.f.c.i.database.DatabaseFactory - Database: jdbc:sqlite:/root/.casperlabs/sqlite.db (SQLite 3.28)
19:45:55.453 [main] INFO  o.f.core.internal.command.DbValidate - Successfully validated 1 migration (execution time 00:00.046s)
19:45:55.462 [main] INFO  o.f.c.i.s.JdbcTableSchemaHistory - Creating Schema History table: "main"."flyway_schema_history"
19:45:55.507 [main] INFO  o.f.core.internal.command.DbMigrate - Current version of schema "main": << Empty Schema >>
19:45:55.512 [main] INFO  o.f.core.internal.command.DbMigrate - Migrating schema "main" to version 20190731.665 - Create deploy tables
19:45:55.537 [main] INFO  o.f.core.internal.command.DbMigrate - Successfully applied 1 migration to schema "main" (execution time 00:00.068s)
19:45:56.423 [main] WARN  i.c.blockstorage.FileDagStorage$ - CRC file /root/.casperlabs/dagstorage/latest-messages-crc did not contain a valid CRC value
19:45:56.464 [main] WARN  i.c.blockstorage.FileDagStorage$ - CRC file /root/.casperlabs/dagstorage/block-metadata-crc did not contain a valid CRC value
19:45:56.688 [blocking-io-26] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
19:45:56.764 [blocking-io-26] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
19:45:56.975 [main] INFO  io.casperlabs.node.api.Servers$ - Internal gRPC services started on port 40402.
19:45:57.051 [main] INFO  io.casperlabs.node.api.Servers$ - External gRPC services started on port 40401.
19:45:57.163 [main] INFO  io.casperlabs.node.MetricsRuntime - No Influx configuration found
19:45:57.190 [main] INFO  io.casperlabs.node.MetricsRuntime - Reporting metrics to InfluxDB disabled.
19:45:57.197 [main] INFO  io.casperlabs.node.MetricsRuntime - Reporting metrics to Prometheus disabled.
19:45:57.203 [main] INFO  io.casperlabs.node.MetricsRuntime - Reporting metrics to Zipkin disabled.
19:45:57.207 [main] INFO  io.casperlabs.node.MetricsRuntime - Reporting metrics to JMX.
19:45:57.230 [main] INFO  kamon.metrics.SystemMetrics - Starting the Kamon(SystemMetrics) module
19:45:57.910 [main] INFO  io.casperlabs.node.api.Servers$ - HTTP server started on port 40403.
19:45:59.328 [main] INFO  i.c.casper.ValidatorIdentity$ - Validator identity: 1KzamFTtaBw9Or1VypuruBvjeLIy3oBSSfw75Sj3ZVw=
19:45:59.459 [main] INFO  i.c.casper.ValidatorIdentity$ - Validator identity: 1KzamFTtaBw9Or1VypuruBvjeLIy3oBSSfw75Sj3ZVw=
19:45:59.468 [main] INFO  i.c.node.casper.gossiping.package$ - Starting with validator identity d4acda9854ed681c3d3abd55ca9babb81be378b232de805249fc3be528f7655c
19:45:59.475 [main] INFO  i.c.node.casper.gossiping.package$ - Starting in default mode
19:45:59.709 [main] INFO  io.casperlabs.node.NodeRuntime - Starting node that will bootstrap from casperlabs://f8f4729cc394c26048e4c5c10c74f3e179a4741d@<IP>?protocol=40400&discovery=40404
19:45:59.727 [main] INFO  io.casperlabs.node.NodeRuntime - Listening for traffic on casperlabs://be468708898a626cc714b78d4d7897cc686e5c3a@<IP>?protocol=40400&discovery=40404.
19:46:01.664 [node-runner-17] INFO  i.c.node.casper.gossiping.package$ - Validating genesis-like block 0a54be59fa......
19:46:01.701 [node-runner-17] INFO  i.c.c.MultiParentCasperImpl$StatelessExecutor - Attempting to add Block with missing elements (0a54be59fa...) to the DAG.
19:46:02.575 [grpc-default-executor-1] WARN  i.c.blockstorage.FileDagStorage$ - Block 0a54be59fa3d2f112a459e0d3708822f46f7ae6820cf8df31274741ce8b80d4a validator is empty
19:46:02.651 [grpc-default-executor-1] INFO  i.c.c.MultiParentCasperImpl$StatelessExecutor - Added 0a54be59fa...
19:46:02.661 [node-runner-16] INFO  i.c.c.gossiping.GenesisApproverImpl - Downloaded Genesis candidate 0a54be59fa3d2f112a459e0d3708822f46f7ae6820cf8df31274741ce8b80d4a from bootstrap.
19:46:02.744 [node-runner-16] INFO  i.c.c.gossiping.GenesisApproverImpl - Added new approval; got 1 in total.
19:46:02.765 [node-runner-16] INFO  i.c.c.gossiping.GenesisApproverImpl - Transitioned to approved genesis state.
19:46:02.829 [node-runner-17] INFO  i.c.casper.ValidatorIdentity$ - Validator identity: 1KzamFTtaBw9Or1VypuruBvjeLIy3oBSSfw75Sj3ZVw=
19:46:02.916 [grpc-default-executor-1] INFO  i.c.node.casper.gossiping.package$ - Making the transition to block processing.
19:46:03.037 [node-runner-16] INFO  i.c.c.gossiping.GossipServiceServer - Received notification about 1 new blocks from casperlabs://f8f4729cc394c26048e4c5c10c74f3e179a4741d@<IP>?protocol=40400&discovery=40404.
19:46:04.695 [node-runner-17] INFO  i.c.node.casper.gossiping.package$ - Peers: 1
19:46:04.700 [node-runner-17] INFO  i.c.node.casper.gossiping.package$ - Connected to casperlabs://f8f4729cc394c26048e4c5c10c74f3e179a4741d@<IP>?protocol=40400&discovery=40404

# Note: -f flag will follow the log.  CTRL+C will exit or we can open a new terminal an continue to monitor the log.

...