Skip to content

Commit

Permalink
Merge pull request #113 from aionnetwork/dev
Browse files Browse the repository at this point in the history
Last week updates
  • Loading branch information
aion-jin authored Mar 5, 2018
2 parents a856aeb + 7da2314 commit 971e5fd
Show file tree
Hide file tree
Showing 77 changed files with 2,205 additions and 1,550 deletions.
29 changes: 29 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="modRlp/src"/>
<classpathentry kind="src" path="modCrypto/src_native"/>
<classpathentry kind="src" path="modTxPoolImpl/src"/>
<classpathentry kind="src" path="modCrypto/src"/>
<classpathentry kind="src" path="modP2p/src"/>
<classpathentry kind="src" path="modLogger/src"/>
<classpathentry kind="src" path="modBoot/src"/>
<classpathentry kind="src" path="modP2pImpl/src"/>
<classpathentry kind="src" path="modEvtMgrImpl/src"/>
<classpathentry kind="src" path="modMcf/src"/>
<classpathentry kind="src" path="modEvtMgr/src"/>
<classpathentry kind="src" path="modAionImpl/src"/>
<classpathentry kind="src" path="modDbImpl/src"/>
<classpathentry kind="src" path="modAion/src"/>
<classpathentry kind="src" path="modAionBase/src"/>
<classpathentry kind="src" path="modApiServer/src"/>
<classpathentry kind="src" path="modTxPool/src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/aion-lib"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/test-lib"/>
<classpathentry kind="output" path="bin"/>
</classpath>
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ native/linux/blake2b/libblake2b.so

# ci
*/report

.ant-targets-build.xml
modTxPoolImpl/native/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "aion_fastvm"]
path = aion_fastvm
url = https://github.com/aionnetwork/aion_fastvm
[submodule "aion_api"]
path = aion_api
url = https://github.com/aionnetwork/aion_api
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>aion0</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pipeline {

stage('Archive build output') {
when {
expression { GIT_BRANCH == 'master' }
expression { GIT_BRANCH == 'master' || GIT_BRANCH == 'dev' }
}
steps {
archiveArtifacts artifacts: 'aion-v*.tar.bz2'
Expand Down
103 changes: 9 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,116 +8,31 @@ The [Aion White Papers](https://aion.network/whitepapers.html) provides more det

This repository contains the main kernel implementation and releases for the Aion network.

## System Requirements
### System Requirements

* **Ubuntu 16.04** or a later version

## Build the Aion network
### Documentation

Please see the details in this wiki page [Build your Aion network](https://github.com/aionnetwork/aion/wiki/Build-your-Aion-network).
Please refer to the details in the [Build Your Aion Network](https://github.com/aionnetwork/aion/wiki/Build-your-Aion-network) wiki to determine how to start setting up and building your Aion Network.

## Aion Installation
Please refer to the [Installation](https://github.com/aionnetwork/aion/wiki/Installation) wiki for the guide on installing the kernel prior to configuration and launching the kernel.

1. Download the latest Aion kernel release from the [releases page](https://github.com/aionnetwork/aion/releases).
Please refer to [Aion Network Configuration](https://github.com/aionnetwork/aion/wiki/Aion-Network-Configuration) wiki to set up your desired network configuration for the kernel as well as how to launch the kernel.

2. Unarchive the downloaded file by right clicking on it and selecting `Extract Here` from the drop-down menu.
The `aion` folder will be generated in the current folder.

Alternatively, to extract the file contents, run in a terminal:

```
tar xvjf aion-{@version}.tar.bz2
```
The [Owner's Manual](https://github.com/aionnetwork/aion/wiki/Aion-Owner's-Manual) wiki will include further instructions and details on working with the kernel.

3. Navigate to the `aion` folder and continue by configuring the network:

```
cd aion
```
Please refer to the [wiki pages](https://github.com/aionnetwork/aion/wiki) for further documentation on mining, using the Web3 API, command line options, etc.

## Aion Network Configuration

<!--In a terminal, run the command below to generate a default configuration: `./aion.sh -c`-->

To receive tokens for mining blocks, you first need to create an account using:

```
./aion.sh -a create
```

The [mining wiki](https://github.com/aionnetwork/aion/wiki/Internal-Miner) illustrates how to set this account to be able to receive tokens for mining.

Now you are ready to start the kernel.

**Optional:**

Your kernel will have access to the seed nodes by default. Do not remove these nodes from the configuration. To include additional peers (e.g. friends that are also connected to the network) or get added by peers, update the `config.xml` by adding nodes using the **permanent peer id** (generated as shown below), IP and port of the computers you wish to connect to:

```
<net>
<p2p>
<ip>0.0.0.0</ip>
<port>30303</port>
</p2p>
<nodes>
<node>p2p://PEER_ID@IP:PORT</node>
</nodes>
</net>
```

**Note:** To allow peers to connect to you, you must also change your configuration IP from **127.0.0.1** to a public IP on your machine. If you are unsure about having a public IP, set it to **0.0.0.0**.

To get a permanent peer id create a new configuration:

```
./aion.sh -c
```

This newly made configuration will not have access to seed nodes by default. In order to connect to seed nodes, you will need to edit the `config.xml` file by adding nodes as listed from [here](https://github.com/aionnetwork/aion/wiki/Aion-Seed-nodes):

```
<nodes>
<node>p2p://[email protected]:30303</node>
<node>p2p://[email protected]:30303</node>
<node>p2p://[email protected]:30303</node>
<node>p2p://[email protected]:30303</node>
<node>p2p://[email protected]:30303</node>
</nodes>
```

You are welcome to add other seed nodes (not solely restricted to what is shown above).

## Launch Kernel

In a terminal, from the aion directory, run:

```
./aion.sh
```

When the kernel starts up, you should see it trying to sync with the latest block.

**Optional:** To check which peers you are connected to, open another terminal and run the command below:

```
netstat -antp | grep java
```

Please check the [owner's manual wiki](https://github.com/aionnetwork/aion/wiki/Aion-Owner's-Manual) for further instructions on working with the kernel.

## Documentation

Please check the [wiki pages](https://github.com/aionnetwork/aion/wiki) for further documentation on mining, using the Web3 API, command line options, etc.

## Contact
### Contact

[Aion Forum](https://forum.aion.network/)

[Aion Gitter](https://gitter.im/aionnetwork)

[Aion Reddit](https://www.reddit.com/r/AionNetwork/)

## License
### License

Aion is released under the [LGPL-V3 license](https://github.com/aionnetwork/aion/blob/dev/LICENSE)

Expand Down
2 changes: 1 addition & 1 deletion aion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ ARG=$@
chmod +x ./rt/bin/*

env EVMJIT="-cache=1" ./rt/bin/java -Xms2g \
-cp "./lib/*:./mod/*" org.aion.Aion "$@"
-cp "./lib/*:./lib/libminiupnp/*:./mod/*" org.aion.Aion "$@"
1 change: 1 addition & 0 deletions aion_api
Submodule aion_api added at 5472e5
2 changes: 1 addition & 1 deletion aion_fastvm
Submodule aion_fastvm updated 58 files
+0 −106 java/build.xml
+118 −0 modFastVM/build.xml
+24 −0 modFastVM/modFastVM.iml
+11 −0 modFastVM/module-info.java
+2 −0 modFastVM/src/org/aion/fastvm/Callback.java
+3 −1 modFastVM/src/org/aion/fastvm/Decompiler.java
+1 −1 modFastVM/src/org/aion/fastvm/FastVM.java
+2 −2 modFastVM/src/org/aion/fastvm/Instruction.java
+0 −0 modFastVM/src/org/aion/solidity/Abi.java
+0 −0 modFastVM/src/org/aion/solidity/CompilationResult.java
+3 −3 modFastVM/src/org/aion/solidity/Compiler.java
+0 −0 modFastVM/src/org/aion/solidity/SolidityType.java
+1 −0 modFastVM/src/org/aion/vm/ExecutionContext.java
+0 −0 modFastVM/src/org/aion/vm/ExecutionResult.java
+0 −0 modFastVM/src/org/aion/vm/PrecompiledContracts.java
+1 −1 modFastVM/src/org/aion/vm/TransactionExecutor.java
+0 −0 modFastVM/src/org/aion/vm/TransactionResult.java
+0 −0 modFastVM/src/org/aion/vm/VirtualMachine.java
+0 −0 modFastVM/src/org/aion/vm/precompiled/TotalCurrencyContract.java
+0 −0 modFastVM/test/org/aion/contract/BenchmarkERC20.sol
+0 −0 modFastVM/test/org/aion/contract/BlockGasLimit.sol
+0 −0 modFastVM/test/org/aion/contract/ByteArrayMap.sol
+0 −0 modFastVM/test/org/aion/contract/Call.sol
+0 −0 modFastVM/test/org/aion/contract/ContractUtils.java
+0 −0 modFastVM/test/org/aion/contract/Create.sol
+0 −0 modFastVM/test/org/aion/contract/CrossFunction.sol
+0 −0 modFastVM/test/org/aion/contract/DynamicArray.sol
+0 −0 modFastVM/test/org/aion/contract/FailedRefund.sol
+0 −0 modFastVM/test/org/aion/contract/Fibonacci.sol
+0 −0 modFastVM/test/org/aion/contract/Long.sol
+0 −0 modFastVM/test/org/aion/contract/Recursive.sol
+0 −0 modFastVM/test/org/aion/contract/Short.sol
+0 −0 modFastVM/test/org/aion/contract/Simple.sol
+0 −0 modFastVM/test/org/aion/contract/SolidityType.sol
+0 −0 modFastVM/test/org/aion/contract/Ticker.sol
+0 −0 modFastVM/test/org/aion/contract/Wallet.sol
+5 −5 modFastVM/test/org/aion/fastvm/Benchmark.java
+2 −0 modFastVM/test/org/aion/fastvm/CacheTest.java
+1 −1 modFastVM/test/org/aion/fastvm/ContractTest.java
+0 −0 modFastVM/test/org/aion/fastvm/DoSBlockGasLimitTest.java
+0 −0 modFastVM/test/org/aion/fastvm/DoSUnexpectedThrowTest.java
+0 −0 modFastVM/test/org/aion/fastvm/DummyRepository.java
+0 −0 modFastVM/test/org/aion/fastvm/FastVMTest.java
+0 −0 modFastVM/test/org/aion/fastvm/MultiThreadTest.java
+2 −3 modFastVM/test/org/aion/fastvm/NrgCostTest.java
+2 −2 modFastVM/test/org/aion/fastvm/TestUtils.java
+0 −0 modFastVM/test/org/aion/solidity/AbiTest.java
+0 −0 modFastVM/test/org/aion/solidity/CompilationResultTest.java
+0 −0 modFastVM/test/org/aion/solidity/CompilerTest.java
+3 −3 modFastVM/test/org/aion/solidity/SolidityTypeTest.java
+0 −0 modFastVM/test/org/aion/solidity/WalletTest.java
+0 −0 modFastVM/test/org/aion/vm/ExecutionContextTest.java
+0 −0 modFastVM/test/org/aion/vm/ExecutionResultTest.java
+3 −3 modFastVM/test/org/aion/vm/TransactionExecutorTest.java
+0 −0 modFastVM/test/org/aion/vm/precompiled/TotalCurrencyContractTest.java
+0 −0 modFastVM/test/org/aion/vm/types/DataWordTest.java
+0 −0 modFastVM/test/org/aion/vm/types/LogTest.java
+3 −3 solidity/tests/contracts/testAionToken.sol
19 changes: 12 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<pathelement location="${dir.libfile}/libJson.jar" />
<pathelement location="${dir.libfile}/logback-classic-1.2.3.jar" />
<pathelement location="${dir.libfile}/logback-core-1.2.3.jar" />
<pathelement location="${dir.libfile}/libminiupnp/miniupnpc_linux.jar" />
<pathelement location="${dir.modfile}/modEvtMgr.jar" />
<pathelement location="${dir.modfile}/modEvtMgrImpl.jar" />
<pathelement location="${dir.modfile}/modLogger.jar" />
Expand All @@ -44,7 +45,7 @@
<pathelement location="${dir.modfile}/modTxPoolImpl.jar" />
<pathelement location="${dir.modfile}/modDbImpl.jar" />
<pathelement location="${dir.modfile}/modRlp.jar" />
<pathelement location="${dir.modfile}/modCrypto.jar" />
<pathelement location="${dir.modfile}/modCrypto.jar" />
<pathelement location="${dir.modfile}/modAion.jar" />
<pathelement location="${dir.modfile}/modAionImpl.jar" />
<pathelement location="${dir.modfile}/modApiServer.jar" />
Expand Down Expand Up @@ -76,6 +77,7 @@
<ant inheritAll="false" antfile="${dir.workspace}/modAion/build.xml" target="test" />
<ant inheritAll="false" antfile="${dir.workspace}/modAionImpl/build.xml" target="test" />
<ant inheritAll="false" antfile="${dir.workspace}/modMcf/build.xml" target="test" />
<ant inheritAll="false" antfile="${dir.workspace}/aion_fastvm/modFastVM/build.xml" target="test" />
</target>

<!--<target name="test_build" depends="build">
Expand Down Expand Up @@ -223,6 +225,11 @@
<property name="compile.debug" value="${compile.debug}" />
</ant>

<echo message="building modFastVM" />
<ant inheritAll="false" antfile="${dir.workspace}/aion_fastvm/modFastVM/build.xml" target="clean_build">
<property name="compile.debug" value="${compile.debug}" />
</ant>

<echo message="building modAionImpl" />
<ant inheritAll="false" antfile="${dir.workspace}/modAionImpl/build.xml" target="clean_build">
<property name="compile.debug" value="${compile.debug}" />
Expand All @@ -237,11 +244,6 @@
<ant inheritAll="false" antfile="${dir.workspace}/modBoot/build.xml" target="clean_build">
<property name="compile.debug" value="${compile.debug}" />
</ant>

<!-- echo message="building fastvm" />
<ant inheritAll="false" antfile="${dir.workspace}/modFastVM/build.xml" target="clean_build">
<property name="compile.debug" value="${compile.debug}" />
</ant -->
</target>

<target name="build_fatjar" depends="mod_build">
Expand Down Expand Up @@ -296,6 +298,7 @@
<zipfileset excludes="META-INF/*.SF" src="${dir.libfile}/libnmapdb.jar" />
<zipfileset excludes="META-INF/*.SF" src="${dir.libfile}/libnsc.jar" />
<zipfileset excludes="META-INF/*.SF" src="${dir.libfile}/libnzmq.jar" />
<zipfileset excludes="META-INF/*.SF" src="${dir.libfile}/libminiupnp/miniupnpc_linux.jar" />
<zipfileset excludes="META-INF/*.SF" src="${dir.libfile}/protobuf-java-3.5.0.jar" />
<zipfileset excludes="META-INF/*.SF" src="${dir.libfile}/libJson.jar" />
<zipfileset excludes="META-INF/*.SF" src="${dir.modfile}/modEvtMgr.jar" />
Expand Down Expand Up @@ -331,7 +334,7 @@

</target>

<target name="build" depends="mod_build">
<target name="build" depends="mod_build">
<mkdir dir="${dir.buildfile}" />
<mkdir dir="${dir.native}/linux/equihash" />
<mkdir dir="${dir.build.native}/linux/equihash" />
Expand Down Expand Up @@ -391,6 +394,8 @@
<tar destfile="${dir.pack}/aion.tar.bz2" compression="bzip2" longfile="gnu">
<tarfileset dir="${dir.libfile}" filemode="755" prefix="${project.name}/lib">
<include name="*.jar" />
<include name="libminiupnp/*.jar" />
<include name="libminiupnp/*.so" />
<exclude name="byte-buddy-*.jar" />
<exclude name="JUnitParams-*.jar" />
<exclude name="mockito-*.jar" />
Expand Down
23 changes: 23 additions & 0 deletions eclipse/aion.userlibraries
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<eclipse-userlibraries version="2">
<library name="aion-lib" systemlibrary="false">
<archive path="/aion0/lib/commons-codec-1.10.jar"/>
<archive path="/aion0/lib/commons-collections4-4.0.jar" source="/home/jin/dev/lib/commons-collections4-4.1-src.zip"/>
<archive path="/aion0/lib/commons-lang3-3.4.jar"/>
<archive path="/aion0/lib/guava-19.0.jar"/>
<archive path="/aion0/lib/h2-mvstore-1.4.196.jar"/>
<archive path="/aion0/lib/jctools-core-1.2.1.jar"/>
<archive path="/aion0/lib/leveldb-api-0.9.jar"/>
<archive path="/aion0/lib/leveldbjni-all-1.18.3.jar"/>
<archive path="/aion0/lib/libnmapdb.jar"/>
<archive path="/aion0/lib/libnsc.jar"/>
<archive path="/aion0/lib/netlib-java-0.9.3.jar"/>
<archive path="/aion0/lib/libnzmq.jar"/>
<archive path="/aion0/lib/protobuf-java-3.5.0.jar"/>
<archive path="/aion0/lib/libJson.jar"/>
<archive path="/aion0/lib/logback-classic-1.2.3.jar"/>
<archive path="/aion0/lib/logback-core-1.2.3.jar"/>
<archive path="/aion0/lib/slf4j-api-1.7.25.jar"/>
<archive path="/aion0/lib/libminiupnp/miniupnpc_linux.jar"/>
</library>
</eclipse-userlibraries>
Binary file added lib/libminiupnp/libminiupnpc.so
Binary file not shown.
Binary file added lib/libminiupnp/miniupnpc_linux.jar
Binary file not shown.
Loading

0 comments on commit 971e5fd

Please sign in to comment.