Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Superpeer
This minimalist RM superpeer provides one very simple function right
This minimalist RM superpeer provides one very simple function right
now, which is to enable the forwarding of data packets from one
geographically separate mesh to another. The only call required from the
developer is during construction of the JavaMeshManager. Rather than
Expand All @@ -23,16 +23,17 @@ function, however, developers will be able to determine the MeshID of
their superpeer(s) and use those to let the Mesh determine the best way
to reach the superpeer(s).

Don't forget when you clone the repo to update your credentials from
[https://developer.rightmesh.io] in the [build.gradle](build.gradle)
Don't forget when you clone the repo to update your credentials from
[https://developer.rightmesh.io] in the [build.gradle](build.gradle)
file.

# Setting up
If you want to run the parity client directly, run the `configure.sh`
script. This will install parity from .deb (along with all dependencies)
and start it up.
script. This will install parity from .deb (on Linux) or Homebrew on MacOS
and start it up. If it is running on mac and Homebrew is not installed then it
will be installed.

Otherwise you can uncomment the last few lines in the
Otherwise you can uncomment the last few lines in the
build.gradle script to run parity in vagrant. If you wish to run it
in vagrant, you'll need to install vagrant and virtualbox. This will
install the parity wallet within the vm so you don't accidentally
Expand All @@ -42,7 +43,7 @@ Todo: detect in gradle or use a set variable to specify whether we are
running on a local machine or AWS instance. Also add an option to set
a remote parity machine (if the superpeer wants to separate funciton).

# Steps to run on AWS
# Steps to run
Install and get parity running
`./configure.sh`

Expand All @@ -58,6 +59,6 @@ Create the binary to run the superpeer
Run the superpeer
`./build/install/Superpeer/bin/Superpeer`

In your app, make sure you set the superpeer to the IP address of the AWS
instance:
In your app, make sure you set the superpeer to the IP address:

`mm.setSuperPeer("IP");`
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* Gradle build file for the RM Superpeer. Generated initially with
* gradle 4.1 and the init command.
*
*
* Uses a git plugin to checkout the Ethereum Parity Client vagrant
* setup. Uses a plugin to execute the ethereum parity vagrant using
* vagrant up. Parity client will be setup to listen on
* vagrant up. Parity client will be setup to listen on
* http://localhost:8545 so that the Superpeer can relay ethereum
* remote signed transaction into it to be executed on the ethereum
* blockchain. Should be configured to use either the Kovan testnet
Expand All @@ -30,9 +30,9 @@ applicationDefaultJvmArgs = ["-noverify"]
buildscript {
ext {
//virtualBoxDir = file('build/parity')
artifactory_app_username = "username"
artifactory_app_password = "password"
artifactory_app_key = "app_key"
artifactory_app_username = "marshallasch"
artifactory_app_password = "04a972ab0170538841a501bb36a64586"
artifactory_app_key = "0xa67d48cef4faaba71ce55435e389f5fdf4bb6419"
}
repositories {
mavenCentral()
Expand Down Expand Up @@ -79,7 +79,7 @@ dependencies {
// This dependency is found on compile classpath of this component and consumers.
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.4'
implementation 'com.google.guava:guava:23.0'
implementation ('io.left.rightmesh:rightmesh-java-library:0.7.0')
implementation ('io.left.rightmesh:rightmesh-java-library:0.8.0')
// Use JUnit test framework
testCompile 'junit:junit:4.12'

Expand Down
45 changes: 40 additions & 5 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,60 @@
#!/bin/bash
if ! type parity > /dev/null;
then

# Install parity if this is a linux system
#
installLinux() {
PARITY_DEB_URL=https://parity-downloads-mirror.parity.io/v1.8.6/x86_64-unknown-linux-gnu/parity_1.8.6_amd64.deb
if ! type curl > /dev/null;
if ! type curl > /dev/null;
then
echo "Installing curl."
sudo apt-get update -qq
sudo apt-get install -y -qq curl
else
else
echo "Curl is already installed."
fi
echo "Installing parity"
file=/tmp/parity.deb
curl -Lk $PARITY_DEB_URL > $file
sudo dpkg -i $file
rm $file
else
}

# Install parity if this is a Darwin system (macOS)
#
installMac() {

if !type brew > /dev/null;
then

echo "This requires Brew."
echo "Installing Homebew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

fi

echo "Installing parity"

brew tap paritytech/paritytech
brew install parity
}


# OS check and run correct installation
if ! type parity > /dev/null;
then
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
installMac;
else
installLinux
fi

else
echo "Parity is already installed."
fi


# Launch parity if it is not running already
if ! ps ax | grep parity | grep -v grep > /dev/null;
then
echo "Launching parity ..."
Expand Down