Skip to content

Commit

Permalink
Merge #2132
Browse files Browse the repository at this point in the history
2132: RCHAIN-2840 Release RNode v0.8.3 r=woky a=woky



Co-authored-by: Pawel Szulc <paul.szulc@gmail.com>
Co-authored-by: zscole <zak@whiteblock.io>
Co-authored-by: Sebastian Bach <sebastian.bach@rchain.coop>
Co-authored-by: Artur Gajowy <artur.gajowy@gmail.com>
Co-authored-by: bors[bot] <bors[bot]@users.noreply.github.com>
Co-authored-by: Adam Szkoda <adaszko@gmail.com>
Co-authored-by: Kelly Foster <kelly.foster@rchain.coop>
Co-authored-by: JosDenmark <josephrileydenman@gmail.com>
Co-authored-by: Łukasz Gołębiewski <lukasz.golebiewski@gmail.com>
  • Loading branch information
9 people committed Jan 22, 2019
2 parents 9430de7 + 0f23fca commit 7ec0abc
Show file tree
Hide file tree
Showing 218 changed files with 4,534 additions and 2,484 deletions.
8 changes: 0 additions & 8 deletions DEVELOPER.md
Expand Up @@ -194,14 +194,6 @@ The [comm](comm) subproject contains code for network related operations for RCh

The [rholang](rholang) subproject contains compiler related code for the Rholang language.

### Roscala

The [roscala](roscala) subproject contains a Scala translation of the Rosette VM.

### Rosette

The [rosette](rosette) subproject contains code for a low level virtual machine for RChain.

### Rspace

The [rspace](rspace) subproject contains code related to the key-value storage of the RChain blockchain.
56 changes: 55 additions & 1 deletion README.md
Expand Up @@ -166,9 +166,13 @@ sig-algorithm = "ed25519"
# private-key = ""
```
### Running from the tar-ball
### Configuration flags
TBD
### Installing and running on Docker
TBD
### Installing and running on Debian from DEB package
TBD
Expand All @@ -186,6 +190,52 @@ TBD
```bash
> brew install rchain/rchain/rnode
```
### Running from the tar-ball
TBD
### Starting node as a validator
TBD
## Monitor performance
## Monitor resource consumption
* Node is considered up and running if and only if it listens on the port 40400 (the port number can be overriden with the `--port` option)
* rnode publishes metrics to InfluxDB
* COMM events per second
* CPU usage
* Current memory usage
* JVM heap size
* CPU usage across the entire OS
* Memory usage across the entire OS
* Total machine's memory size
* Amount of free disk space left
* Total machine's disk space
* `rnode.toml` allows for configuring the address of the InfluxDB instance
```
[kamon]
influx-db = true
[influx-db]
hostname = "localhost"
port = 8086
database = "rnode"
```
* If the address or the InfluxDB instance isn't configured, metrics are NOT available to the node operator
* Metrics published to InfluxDB are available for charting in Chronograf
* Chronograf instance address is determined by the configuration of the InfluxDB instance, not the node
## Validation
### Identities
TBD (node identity, validator identity, wallet identity)
## External and internal API
## Deverloper guide
For getting started with development of RChain please refer to the [Developer guide](DEVELOPER.md)
Expand All @@ -205,3 +255,7 @@ YourKit supports open source projects with its full-featured Java Profiler.
YourKit, LLC is the creator of <a href="https://www.yourkit.com/java/profiler/">YourKit Java Profiler</a>
and <a href="https://www.yourkit.com/.net/profiler/">YourKit .NET Profiler</a>,
innovative and intelligent tools for profiling Java and .NET applications.
## Licence information
To get summery of licenses being used by the RChain's dependencies, simply run `sbt node/dumpLicenseReport`. The report will be available under `node/target/license-reports/rnode-licenses.html`
Expand Up @@ -13,7 +13,6 @@ import com.google.protobuf.ByteString
import coop.rchain.blockstorage.BlockDagFileStorage.{Checkpoint, CheckpointedDagInfo}
import coop.rchain.blockstorage.BlockDagRepresentation.Validator
import coop.rchain.blockstorage.BlockStore.BlockHash
import coop.rchain.blockstorage.errors._
import coop.rchain.blockstorage.util.BlockMessageUtil.{blockNumber, bonds, parentHashes}
import coop.rchain.blockstorage.util.{BlockMessageUtil, Crc32, TopologicalSortUtil}
import coop.rchain.blockstorage.util.byteOps._
Expand Down Expand Up @@ -637,10 +636,10 @@ object BlockDagFileStorage {
}) {
sortedCheckpoints.pure[F]
} else {
Sync[F].raiseError(CheckpointsAreNotConsecutive(sortedCheckpoints))
Sync[F].raiseError(CheckpointsAreNotConsecutive(sortedCheckpoints.map(_.path)))
}
} else {
Sync[F].raiseError(CheckpointsDoNotStartFromZero(sortedCheckpoints))
Sync[F].raiseError(CheckpointsDoNotStartFromZero(sortedCheckpoints.map(_.path)))
}
} yield result

Expand Down
Expand Up @@ -3,33 +3,34 @@ package coop.rchain.blockstorage
import cats.Applicative
import cats.implicits._
import com.google.protobuf.ByteString
import coop.rchain.blockstorage.StorageError.StorageIOErr
import coop.rchain.casper.protocol.BlockMessage

import scala.language.higherKinds

trait BlockStore[F[_]] {
import BlockStore.BlockHash

def put(blockHash: BlockHash, blockMessage: BlockMessage): F[Unit] =
def put(blockHash: BlockHash, blockMessage: BlockMessage): F[StorageIOErr[Unit]] =
put((blockHash, blockMessage))

def get(blockHash: BlockHash): F[Option[BlockMessage]]

def find(p: BlockHash => Boolean): F[Seq[(BlockHash, BlockMessage)]]

def put(f: => (BlockHash, BlockMessage)): F[Unit]
def put(f: => (BlockHash, BlockMessage)): F[StorageIOErr[Unit]]

def apply(blockHash: BlockHash)(implicit applicativeF: Applicative[F]): F[BlockMessage] =
get(blockHash).map(_.get)

def contains(blockHash: BlockHash)(implicit applicativeF: Applicative[F]): F[Boolean] =
get(blockHash).map(_.isDefined)

def asMap(): F[Map[BlockHash, BlockMessage]]
def checkpoint(): F[Unit]

def clear(): F[Unit]
def clear(): F[StorageIOErr[Unit]]

def close(): F[Unit]
def close(): F[StorageIOErr[Unit]]
}

object BlockStore {
Expand Down

0 comments on commit 7ec0abc

Please sign in to comment.