Giter Site home page Giter Site logo

unigrid-project / hedgehog Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 6.27 MB

Hedgehog is a high-performant, QUIC-based, concurrent peer-to-peer treechain (blockchain) network built on top of Netty and Java NIO. It is the backbone for the next generation UNIGRID platform.

Home Page: https://www.unigrid.org

License: GNU Affero General Public License v3.0

Java 99.80% FreeMarker 0.20%
blockchain cloud-computing cloud-platform java p2p treechain unigrid

hedgehog's Introduction

The Sharded Unigrid Treechain Network

Hedgehog

Hedgehog is a high-performant, concurrent peer-to-peer treechain (blockchain) network built on top of Netty and Java NIO.

Currently published features:

  • Gridnode sporks and configurable network properties
  • Peer to peer distriubution
  • REST interface

Upcoming features currently in development:

  • Shard group and network storage (accesible via Janus and virtual desktop drives)
  • Built in SOCKS5 Proxy for VPN-like functionality
  • Amazon S3 REST API to access storage on the network

Features slated for 2023:

  • Web Assembly support
  • Compute workloads
  • Duality consensus
  • GPU workloads

Secondary goals:

  • Replacement of the network and consensus chain in the legacy daemon, including complete or partial migration to Hedgehog. We are currently investigating different options for the network and what direction makes the most sense for the Unigrid network out of a go-to-market perspective.

For developers that want to build Hedgehog

Hedgehog requires Java 17+. To run and build the distribution you need Maven. To execute a build you need to run the following command from within the Hedgehog directory:

mvn clean install

This will create an archive in target/hedgehog-<version>-SNAPSHOT-jar-with-dependencies.jar. This can then be started with java -jar hedgehog-<version>-SNAPSHOT-jar-with-dependencies.jar.

Running Hedgehog

While most people will not run Hedgehog manually, it is certainly possible. For documentation on all the features in the distribution please run the Hedgehog jar with java -jar hedgehog-<version>-SNAPSHOT-jar-with-dependencies.jar --help. This will display all the options available when executing the application.

Depending on the options passed, Hedgehog will act as a network daemon, client or stand-alone application.

Native Image Support

Native image support is available via the native-image sub-project. Because of problems with CDI and dependencies being reliant on a full CDI implementation, the native image is not really native, but wraps a JVM and the hedgehog jar into a native version for execution.

To build the native image, execute mvn package inside the native-image module/project. Depending on the operating system, this will generate an executable hedgehog.exe or hedgehog.bin fille inside the native-image/target/.

hedgehog's People

Contributors

adam-waldenberg avatar dekm avatar fim-84 avatar pvlsport avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

hedgehog's Issues

Test suite fails on windows class StorageObjectClass.

On windows 10 StorageObjectTest fails with

Results:

Failures:
StorageObjectTest.shouldExist:144
Expected: a string containing "404 Not Found"
but: was "500 Internal Server Error (Internal Server Error)"
Errors:
StorageObjectTest.shouldCopyAndReturnXML:107 » ResponseOddity 500 Internal Server Error (Internal Server Error)
StorageObjectTest.shouldCreateObject:67 » ResponseOddity 500 Internal Server Error (Internal Server Error)
StorageObjectTest.shouldListObjects:93 » InternalServerError HTTP 500 Internal Server Error
StorageObjectTest.shouldReturnData:130 » ResponseOddity 500 Internal Server Error (Internal Server Error)
StorageObjectTest.shouldReturnNoContent:151 » ResponseOddity 500 Internal Server Error (Internal Server Error)

Attatching shureFire report
org.unigrid.hedgehog.server.rest.StorageObjectTest.txt

Let hedgehog cleanup old installs.

Let hedgehog cleanup old hash folders in graal install library. rigth now the old ones are still their and take up space when they are not needed

add double key sign to hedgehog

mainnet cannot go live with only one key responsible to mint tokens or set the vesting schedules. We will need to integrate some sort of double signing method requiring a minimum of two keys.

Exception running node-list CLI command

Happened once and then was gone. Probably has to do with the fact that a node might actually be part of the list before all it's details are filled in. So this would only happen if we catch it at the right time.

Can we make a test to trigger this one?

/usr/local/bin/hedgehog-0.0.7-x86_64-linux-gnu.bin cli node-list  | grep addr | wc -l
jakarta.ws.rs.ProcessingException: Error reading entity from input stream.
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:934)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:879)
	at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:340)
	at org.glassfish.jersey.client.InboundJaxrsResponse$2.call(InboundJaxrsResponse.java:104)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:205)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:365)
	at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:244)
	at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:101)
	at org.unigrid.hedgehog.command.cli.NodeList.execute(NodeList.java:41)
	at org.unigrid.hedgehog.command.util.RestClientCommand$MethodCallback.get(RestClientCommand.java:62)
	at org.unigrid.hedgehog.command.util.RestClientCommand.run(RestClientCommand.java:101)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at org.unigrid.hedgehog.Hedgehog.main(Hedgehog.java:67)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Cannot invoke "java.net.InetAddress.getHostAddress()" because the return value of "java.net.InetSocketAddress.getAddress()" is null (through reference chain: java.util.HashSet[214])
	at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:402)
	at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:373)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:375)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:2079)
	at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1229)
	at org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:831)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:233)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:212)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:132)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1072)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:919)
	... 21 more
Caused by: java.lang.NullPointerException: Cannot invoke "java.net.InetAddress.getHostAddress()" because the return value of "java.net.InetSocketAddress.getAddress()" is null
	at org.unigrid.hedgehog.model.network.Node.getURI(Node.java:125)
	at org.unigrid.hedgehog.model.network.Node.hashCode(Node.java:140)
	at java.base/java.util.HashMap.hash(Unknown Source)
	at java.base/java.util.HashMap.put(Unknown Source)
	at java.base/java.util.HashSet.add(Unknown Source)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:363)
	... 32 more
0

add gridnode to cli

Open gridnode calls that return the list to the cli. Also add an argument that can be passed to only return a specific key.

thread leak

There is a thread leak in hedgehog somewhere. After running for some time it will start eating 100% of all 20 threads on a server.

strange bug using node-add to dockerized seed

If running the seed node in a docker container an outside node can connect using node-add then drops off after 1 minute. If the same daemon bin is run as a service it works fine.

Compile a v0.0.8 for testnet

We will need to place this somewhere that the janus installer can pull from for testnet and also a docker container.

add a call to populate gridnode list

In janus we need a call that populates the gridnode list. This can be used on startup so that when a user starts their wallet their nodes appear in the list right away.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.