Skip to content

Instantly share code, notes, and snippets.

@skydogch
skydogch / 001
Created September 21, 2015 16:08
versionsj
$ mvn -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.19.0-28-generic", arch: "amd64", family: "unix"
@skydogch
skydogch / IllegalArgumentException
Last active October 7, 2015 04:34
IllegalArgumentException
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
06:28:42.400 INFO general - Running frontier.json, core version: 1.0.0-SNAPSHOT
06:28:42.405 INFO general - git.hash: [f389f28]
06:28:42.405 INFO general - build.time: [GMT]-[04/Oct/2015]-[20:58]
06:28:42.405 INFO general -
06:28:42.406 INFO general - Database reset done
06:28:42.407 INFO general - capability eth version: [60, 61]
06:28:42.407 INFO general - capability shh version: [2]
06:28:42.408 INFO general - capability bzz version: [0]
06:28:42.509 INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@64f6106c: startup date [Wed Oct 07 06:28:42 CEST 2015]; root of context hierarchy
@skydogch
skydogch / frontier-custom.json
Created October 7, 2015 04:57
frontier-custom.json
{
"nonce": "0x0000000000000042",
"difficulty": "0x4",
"alloc": {
"a354a8bee6b828b88ce9dab0b2ca45c7b51508d3": {
"balance": "5000000000000000000000000"
}
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
@skydogch
skydogch / Genesis block configuration is corrupted - Line 40
Created October 7, 2015 05:00
Genesis block configuration is corrupted - Line 40
[sts] -----------------------------------------------------
[sts] Starting Gradle build for the following tasks:
[sts] build
[sts] bootRun
[sts] -----------------------------------------------------
:compileJava UP-TO-DATE
:processResources
:classes
:jar
:bootRepackage
@skydogch
skydogch / IllegalArgumentException
Created October 7, 2015 05:06
IllegalArgumentException
[sts] -----------------------------------------------------
[sts] Starting Gradle build for the following tasks:
[sts] clean
[sts] build
[sts] buildDependents
[sts] bootRun
[sts] -----------------------------------------------------
:clean
:compileJava
:processResources
@skydogch
skydogch / ListenerHandle
Last active October 13, 2015 03:54
Exception processing listener: org.ethereum.net.rlpx.discover.NodeManager$ListenerHandle
05:44:14.546 INFO general - Running frontier-custom.json, core version: 1.0.0-SNAPSHOT
05:44:14.563 INFO general - git.hash: [f389f28]
05:44:14.563 INFO general - build.time: [GMT]-[04/Oct/2015]-[20:58]
05:44:14.564 INFO general -
05:44:14.569 INFO general - Database reset done
05:44:14.572 INFO general - capability eth version: [60, 61]
05:44:14.574 INFO general - capability shh version: [2]
05:44:14.575 INFO general - capability bzz version: [0]
05:44:15.067 INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@b6dcd37: startup date [Tue Oct 13 05:44:15 CEST 2015]; root of context hierarchy
05:44:18.466 INFO o.s.b.f.s.DefaultListableBeanFactory - Overriding bean definition for bean 'blockStore': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=remoteConfig; factoryMethodName=blockStore; initMethodName
peer.discovery = {
# if peer discovery is off
# the peer window will show
# only what retrieved by active
# peer [true/false]
enabled = true
#enabled = false
@skydogch
skydogch / frontier-custom.json - 13.10.2015
Created October 13, 2015 04:32
frontier-custom.json - 13.10.2015
{
"alloc": {
"a354a8bee6b828b88ce9dab0b2ca45c7b51508d3": {
"balance": "5000000000000000000000000"
}
},
"nonce": "0x0000000000000042",
"difficulty": "0x40",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
package test.ethereum.dht;
import org.ethereum.net.dht.Bucket;
import org.ethereum.net.dht.Peer;
import org.junit.Test;
import org.spongycastle.util.encoders.Hex;
import java.util.List;
import static org.ethereum.net.dht.DHTUtils.getAllLeafs;
private static byte[] decrypt(byte[] data, byte[] key)
{
// 16 bytes is the IV size for AES256
try
{
PaddedBufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESFastEngine()));
byte[] ivBytes = new byte[16];
System.arraycopy(data, 0, ivBytes, 0, ivBytes.length); // Get iv from data
byte[] dataonly = new byte[data.length - ivBytes.length];
System.arraycopy(data, ivBytes.length, dataonly, 0, data.length - ivBytes.length);