Skip to content

Commit

Permalink
Merge pull request #36 from AxLabs/feature/neo-node-3.7.4
Browse files Browse the repository at this point in the history
update to neo 3.7.4
  • Loading branch information
mialbu authored May 27, 2024
2 parents 6458103 + 9978d6e commit 5a2b560
Show file tree
Hide file tree
Showing 18 changed files with 180 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
IMAGE_TAG=neo-node-3.6.2
IMAGE_TAG=neo-node-3.7.4
9 changes: 3 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "neo-node"]
path = neo-node
url = https://github.com/neo-project/neo-node.git
[submodule "neo-modules"]
path = neo-modules
url = https://github.com/neo-project/neo-modules.git
[submodule "neo"]
path = neo
url = https://github.com/neo-project/neo
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ docker-compose build --no-cache
curl http://127.0.0.1:10332 -d '{"jsonrpc":"2.0","method":"getblockcount","params":[],"id":1}'
```

* Open the wallet of the `neo-consesus` through JSON-RPC (**only for test purposes!**):
* Open the wallet of the `neo-consensus` through JSON-RPC (**only for test purposes!**):

```
curl http://127.0.0.1:40332 -d '{"jsonrpc":"2.0","method":"openwallet","params":["wallet.json","neo"],"id":1}'
Expand All @@ -71,16 +71,16 @@ curl http://127.0.0.1:40332 -d '{"jsonrpc":"2.0","method":"openwallet","params":
curl http://127.0.0.1:40332 -d '{"jsonrpc":"2.0","method":"listaddress","params":[],"id":1}'
```

* Get all NEP-17 balance of `neo-consensus`' address `NKvR5WeczCQMcVWQD9aaMqegfEoCBXGWpW`, specifically:
* Get all NEP-17 balance of `neo-consensus`' address `NXXazKH39yNFWWZF5MJ8tEN98VYHwzn7g3`, specifically:

```
curl http://127.0.0.1:40332 -d '{"jsonrpc":"2.0","method":"getnep17balances","params":["NKvR5WeczCQMcVWQD9aaMqegfEoCBXGWpW"],"id":1}'
curl http://127.0.0.1:40332 -d '{"jsonrpc":"2.0","method":"getnep17balances","params":["NXXazKH39yNFWWZF5MJ8tEN98VYHwzn7g3"],"id":1}'
```

* Send 100 NEO from `neo-consensus`' address `NKvR5WeczCQMcVWQD9aaMqegfEoCBXGWpW` to `neo-client1`'s address `NdihqSLYTf1B1WYuzhM52MNqvCNPJKLZaz`:
* Send 100 NEO from `neo-consensus`' address `NXXazKH39yNFWWZF5MJ8tEN98VYHwzn7g3` to `neo-client1`'s address `NdihqSLYTf1B1WYuzhM52MNqvCNPJKLZaz`:

```
curl http://127.0.0.1:40332 -d '{"jsonrpc":"2.0","method":"sendfrom","params":["0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5","NKvR5WeczCQMcVWQD9aaMqegfEoCBXGWpW", "NdihqSLYTf1B1WYuzhM52MNqvCNPJKLZaz",100],"id":1}'
curl http://127.0.0.1:40332 -d '{"jsonrpc":"2.0","method":"sendfrom","params":["0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5","NXXazKH39yNFWWZF5MJ8tEN98VYHwzn7g3", "NdihqSLYTf1B1WYuzhM52MNqvCNPJKLZaz",100],"id":1}'
```

* Open the wallet of the `neo-client1` through JSON-RPC (**only for test purposes!**):
Expand Down
3 changes: 2 additions & 1 deletion config/applicationlogs.config-client1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"PluginConfiguration": {
"Path": "ApplicationLogs_{0}",
"Network": 5195086,
"MaxStackSize": 65535
"MaxStackSize": 65535,
"Debug": false
},
"Dependency": [
"RpcServer"
Expand Down
3 changes: 2 additions & 1 deletion config/applicationlogs.config-client2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"PluginConfiguration": {
"Path": "ApplicationLogs_{0}",
"Network": 5195086,
"MaxStackSize": 65535
"MaxStackSize": 65535,
"Debug": false
},
"Dependency": [
"RpcServer"
Expand Down
3 changes: 2 additions & 1 deletion config/applicationlogs.config-consensus.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"PluginConfiguration": {
"Path": "ApplicationLogs_{0}",
"Network": 5195086,
"MaxStackSize": 65535
"MaxStackSize": 65535,
"Debug": false
},
"Dependency": [
"RpcServer"
Expand Down
5 changes: 3 additions & 2 deletions config/config-client1.privatenet3.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"P2P": {
"Port": 10333,
"WsPort": 10334,
"MinDesiredConnections": 10,
"MaxConnections": 40,
"MaxConnectionsPerAddress": 3
Expand All @@ -21,7 +20,9 @@
"Password": "neo",
"IsActive": true
},
"PluginURL": "https://github.com/neo-project/neo-modules/releases/download/v{1}/{0}.zip"
"Plugins": {
"DownloadUrl": "https://api.github.com/repos/neo-project/neo-modules/releases"
}
},
"ProtocolConfiguration": {
"Network": 5195086,
Expand Down
5 changes: 3 additions & 2 deletions config/config-client2.privatenet3.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"P2P": {
"Port": 20333,
"WsPort": 20334,
"MinDesiredConnections": 10,
"MaxConnections": 40,
"MaxConnectionsPerAddress": 3
Expand All @@ -21,7 +20,9 @@
"Password": "neo",
"IsActive": true
},
"PluginURL": "https://github.com/neo-project/neo-modules/releases/download/v{1}/{0}.zip"
"Plugins": {
"DownloadUrl": "https://api.github.com/repos/neo-project/neo-modules/releases"
}
},
"ProtocolConfiguration": {
"Network": 5195086,
Expand Down
5 changes: 3 additions & 2 deletions config/config-consensus.privatenet3.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"P2P": {
"Port": 40333,
"WsPort": 40334,
"MinDesiredConnections": 10,
"MaxConnections": 40,
"MaxConnectionsPerAddress": 3
Expand All @@ -21,7 +20,9 @@
"Password": "neo",
"IsActive": true
},
"PluginURL": "https://github.com/neo-project/neo-modules/releases/download/v{1}/{0}.zip"
"Plugins": {
"DownloadUrl": "https://api.github.com/repos/neo-project/neo-modules/releases"
}
},
"ProtocolConfiguration": {
"Network": 5195086,
Expand Down
6 changes: 5 additions & 1 deletion config/rpcserver.config-client1.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
"TrustedAuthorities": [],
"RpcUser": "",
"RpcPass": "",
"EnableCors": false,
"AllowOrigins": [],
"KeepAliveTimeout": 60,
"RequestHeadersTimeout": 15,
"MaxGasInvoke": 100000,
"MaxFee": 0.1,
"MaxConcurrentConnections": 40,
"MaxRequestBodySize": 5242880,
"MaxIteratorResultItems": 100,
"MaxRequestBodySize": 5242880,
"MaxStackSize": 65535,
"DisabledMethods": [ ],
"SessionEnabled": true,
Expand Down
4 changes: 4 additions & 0 deletions config/rpcserver.config-client2.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"TrustedAuthorities": [],
"RpcUser": "",
"RpcPass": "",
"EnableCors": false,
"AllowOrigins": [],
"KeepAliveTimeout": 60,
"RequestHeadersTimeout": 15,
"MaxGasInvoke": 100000,
"MaxFee": 0.1,
"MaxConcurrentConnections": 40,
Expand Down
4 changes: 4 additions & 0 deletions config/rpcserver.config-consensus.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"TrustedAuthorities": [],
"RpcUser": "",
"RpcPass": "",
"EnableCors": false,
"AllowOrigins": [],
"KeepAliveTimeout": 60,
"RequestHeadersTimeout": 15,
"MaxGasInvoke": 100000,
"MaxFee": 0.1,
"MaxConcurrentConnections": 40,
Expand Down
38 changes: 19 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ services:
volumes:
- ./config/config-consensus.privatenet3.json:/neo-cli/config.json:ro
- ./config/wallet-consensus.privatenet3.json:/neo-cli/wallet.json:rw
- ./config/rpcserver.config-consensus.json:/neo-cli/Plugins/RpcServer/config.json:ro
- ./config/dbft.config-consensus.json:/neo-cli/Plugins/DBFTPlugin/config.json:ro
- ./config/applicationlogs.config-consensus.json:/neo-cli/Plugins/ApplicationLogs/config.json:ro
- ./config/oracle.config-consensus.json:/neo-cli/Plugins/OracleService/config.json:ro
- ./config/tokentracker.config-consensus.json:/neo-cli/Plugins/TokensTracker/config.json:ro
- ./config/stateservice.config-consensus.json:/neo-cli/Plugins/StateService/config.json:ro
- ./config/storagedumper.config-consensus.json:/neo-cli/Plugins/StorageDumper/config.json:ro
- ./config/rpcserver.config-consensus.json:/neo-cli/Plugins/RpcServer/RpcServer.json:ro
- ./config/dbft.config-consensus.json:/neo-cli/Plugins/DBFTPlugin/DBFTPlugin.json:ro
- ./config/applicationlogs.config-consensus.json:/neo-cli/Plugins/ApplicationLogs/ApplicationLogs.json:ro
- ./config/oracle.config-consensus.json:/neo-cli/Plugins/OracleService/OracleService.json:ro
- ./config/tokentracker.config-consensus.json:/neo-cli/Plugins/TokensTracker/TokensTracker.json:ro
- ./config/stateservice.config-consensus.json:/neo-cli/Plugins/StateService/StateService.json:ro
- ./config/storagedumper.config-consensus.json:/neo-cli/Plugins/StorageDumper/StorageDumper.json:ro
ports:
- "40332:40332"

Expand All @@ -34,12 +34,12 @@ services:
volumes:
- ./config/config-client1.privatenet3.json:/neo-cli/config.json:ro
- ./config/wallet-client1.privatenet3.json:/neo-cli/wallet.json:rw
- ./config/rpcserver.config-client1.json:/neo-cli/Plugins/RpcServer/config.json:ro
- ./config/applicationlogs.config-client1.json:/neo-cli/Plugins/ApplicationLogs/config.json:ro
- ./config/oracle.config-client1.json:/neo-cli/Plugins/OracleService/config.json:ro
- ./config/tokentracker.config-client1.json:/neo-cli/Plugins/TokensTracker/config.json:ro
- ./config/stateservice.config-client1.json:/neo-cli/Plugins/StateService/config.json:ro
- ./config/storagedumper.config-client1.json:/neo-cli/Plugins/StorageDumper/config.json:ro
- ./config/rpcserver.config-client1.json:/neo-cli/Plugins/RpcServer/RpcServer.json:ro
- ./config/applicationlogs.config-client1.json:/neo-cli/Plugins/ApplicationLogs/ApplicationLogs.json:ro
- ./config/oracle.config-client1.json:/neo-cli/Plugins/OracleService/OracleService.json:ro
- ./config/tokentracker.config-client1.json:/neo-cli/Plugins/TokensTracker/TokensTracker.json:ro
- ./config/stateservice.config-client1.json:/neo-cli/Plugins/StateService/StateService.json:ro
- ./config/storagedumper.config-client1.json:/neo-cli/Plugins/StorageDumper/StorageDumper.json:ro
ports:
- "10332:10332"

Expand All @@ -52,11 +52,11 @@ services:
volumes:
- ./config/config-client2.privatenet3.json:/neo-cli/config.json:ro
- ./config/wallet-client2.privatenet3.json:/neo-cli/wallet.json:rw
- ./config/rpcserver.config-client2.json:/neo-cli/Plugins/RpcServer/config.json:ro
- ./config/applicationlogs.config-client2.json:/neo-cli/Plugins/ApplicationLogs/config.json:ro
- ./config/oracle.config-client2.json:/neo-cli/Plugins/OracleService/config.json:ro
- ./config/tokentracker.config-client2.json:/neo-cli/Plugins/TokensTracker/config.json:ro
- ./config/stateservice.config-client2.json:/neo-cli/Plugins/StateService/config.json:ro
- ./config/storagedumper.config-client2.json:/neo-cli/Plugins/StorageDumper/config.json:ro
- ./config/rpcserver.config-client2.json:/neo-cli/Plugins/RpcServer/RpcServer.json:ro
- ./config/applicationlogs.config-client2.json:/neo-cli/Plugins/ApplicationLogs/ApplicationLogs.json:ro
- ./config/oracle.config-client2.json:/neo-cli/Plugins/OracleService/OracleService.json:ro
- ./config/tokentracker.config-client2.json:/neo-cli/Plugins/TokensTracker/TokensTracker.json:ro
- ./config/stateservice.config-client2.json:/neo-cli/Plugins/StateService/StateService.json:ro
- ./config/storagedumper.config-client2.json:/neo-cli/Plugins/StorageDumper/StorageDumper.json:ro
ports:
- "20332:20332"
32 changes: 17 additions & 15 deletions docker/Dockerfile.neo-node-with-plugins
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Build the plugins
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS PluginBuild
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS PluginBuild

COPY ./neo-modules /neo-modules
WORKDIR /neo-modules
COPY ./neo /neo
WORKDIR /neo

# If any plugin should be excluded from the build, just set
# to a regex including the names of dirs.
# Example:
# REGEX_EXCLUDE_PLUGINS=".*(SystemLog|RpcNep5Tracker)"
ARG REGEX_EXCLUDE_PLUGINS=".*(SystemLog|RpcNep5Tracker)"

# Target framework for the plugins
# ATTENTION: if dotnet version changes, this should be updated!
ENV TARGET_FRAMEWORK="net8.0"

#
# Some magic here. Time for the kids to leave. Adults only.
#
Expand All @@ -21,7 +25,7 @@ ARG REGEX_EXCLUDE_PLUGINS=".*(SystemLog|RpcNep5Tracker)"
# and other nasty problems. *smile*
#
RUN mkdir -p /plugins && \
find ./src/ \
find ./src/Plugins \
-regextype posix-extended \
-maxdepth 1 \
-mindepth 1 \
Expand All @@ -30,20 +34,18 @@ RUN mkdir -p /plugins && \
-and -not -regex "${REGEX_EXCLUDE_PLUGINS}" -print0 \
| xargs -0 -L1 sh -c 'basename $0' \
| sed 's/ //g' \
| xargs -I {} sh -c 'echo {} && dotnet publish ./src/{} -c Release /p:ErrorOnDuplicatePublishOutputFiles=false -o /plugins && mkdir -p /plugins/{} && cp /plugins/{}.* /plugins/{}/ && if [ -e ./src/{}/config.json ]; then cp ./src/{}/config.json /plugins/{}/config.json; fi'
| xargs -I {} sh -c 'echo Building {} && dotnet publish ./src/Plugins/{} -f $TARGET_FRAMEWORK -c Release /p:ErrorOnDuplicatePublishOutputFiles=false -o /plugins && mkdir -p /plugins/{} && mv /plugins/{}.* /plugins/{}/'

# Build the neo-cli
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS NeoCliBuild
# Build the Neo.CLI
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS NeoCliBuild

COPY ./neo-node/neo-cli /neo-cli
COPY ./neo-node/Neo.ConsoleService /Neo.ConsoleService
COPY ./neo-node/NuGet.Config /neo-cli
COPY ./neo /neo

WORKDIR /neo-cli
RUN dotnet restore && dotnet publish -c Release -o /app
WORKDIR /neo
RUN dotnet restore && dotnet publish ./src/Neo.CLI -c Release -o /cli

# Final image: neo-node-with-plugins :-)
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS NeoCliFinal
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS NeoCliFinal

LABEL org.opencontainers.image.source https://github.com/axlabs/neo3-privatenet-docker

Expand All @@ -53,7 +55,7 @@ RUN apt-get -y update && \

WORKDIR /neo-cli

COPY --from=NeoCliBuild /app .
COPY --from=NeoCliBuild /cli .
COPY --from=PluginBuild /plugins ./Plugins

ENTRYPOINT ["screen","-DmS","node","dotnet","neo-cli.dll","-r"]
ENTRYPOINT ["screen","-DmS","node","dotnet","neo-cli.dll"]
Loading

0 comments on commit 5a2b560

Please sign in to comment.