Skip to content

Commit

Permalink
Add SERF node
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Apr 24, 2021
1 parent ba446e2 commit f3803f5
Show file tree
Hide file tree
Showing 11 changed files with 166 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
chain: ['MULTI', 'AMS', 'BTC', 'CITY', 'EXOS', 'IMPL', 'RUTA', 'STRAT', 'XDS', 'XLR', 'X42', 'X1', 'XRC', 'HOMECOIN']
chain: ['MULTI', 'AMS', 'BTC', 'CITY', 'EXOS', 'IMPL', 'RUTA', 'STRAT', 'XDS', 'XLR', 'X42', 'X1', 'XRC', 'HOMECOIN', 'SERF']
include:
- chain: MULTI
name: "MULTI"
Expand Down Expand Up @@ -72,6 +72,10 @@ jobs:
name: "HOMECOIN"
solution: "HOME/HomeCoin.sln"
project: "HOME/src/HomeCoin.Node/HomeCoin.Node.csproj"
- chain: SERF
name: "SERF"
solution: "SERF/SERF.sln"
project: "SERF/src/SERF.Node/SERF.Node.csproj"

- os: windows-latest
extension: ".zip"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
chain: ['MULTI', 'AMS', 'BTC', 'CITY', 'EXOS', 'IMPL', 'RUTA', 'STRAT', 'XDS', 'XLR', 'X42', 'X1', 'XRC', 'HOMECOIN']
chain: ['MULTI', 'AMS', 'BTC', 'CITY', 'EXOS', 'IMPL', 'RUTA', 'STRAT', 'XDS', 'XLR', 'X42', 'X1', 'XRC', 'HOMECOIN', 'SERF']
include:
- chain: MULTI
name: "multi"
Expand Down Expand Up @@ -70,6 +70,10 @@ jobs:
name: "homecoin"
assembly: "HomeCoin.Node.dll"
ports: "33331 33332 33333"
- chain: SERF
name: "serf"
assembly: "SERF.Node.dll"
ports: "15111 15112 15113"

fail-fast: false

Expand Down
6 changes: 6 additions & 0 deletions Blockcore.Reference.Nodes.sln
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SERF.Node", "SERF\src\SERF.Node\SERF.Node.csproj", "{706EDF09-4A2D-4DDE-B7D4-7705F16E732D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -110,6 +112,10 @@ Global
{A7D27276-A402-43D1-8799-4D08895AA12B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7D27276-A402-43D1-8799-4D08895AA12B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7D27276-A402-43D1-8799-4D08895AA12B}.Release|Any CPU.Build.0 = Release|Any CPU
{706EDF09-4A2D-4DDE-B7D4-7705F16E732D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{706EDF09-4A2D-4DDE-B7D4-7705F16E732D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{706EDF09-4A2D-4DDE-B7D4-7705F16E732D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{706EDF09-4A2D-4DDE-B7D4-7705F16E732D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 4 additions & 0 deletions CITY/src/City.Node/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"CITY (MAIN)": {
"commandName": "Project"
},
"CITY (MAIN/ROCKSDB)": {
"commandName": "Project",
"commandLineArgs": "-dbtype=rocksdb"
},
"CITY (TEST)": {
"commandName": "Project",
"commandLineArgs": "-testnet"
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>1.0.23</Version>
<Version>1.0.24</Version>
<RuntimeFrameworkVersion>3.1.11</RuntimeFrameworkVersion>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Blockcore
Copyright (c) 2020-2021 Blockcore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
25 changes: 25 additions & 0 deletions SERF/SERF.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SERF.Node", "src\SERF.Node\SERF.Node.csproj", "{C851E18F-D508-4CC1-A9B5-FB8C5DBE2D51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C851E18F-D508-4CC1-A9B5-FB8C5DBE2D51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C851E18F-D508-4CC1-A9B5-FB8C5DBE2D51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C851E18F-D508-4CC1-A9B5-FB8C5DBE2D51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C851E18F-D508-4CC1-A9B5-FB8C5DBE2D51}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4C0C09E9-A7E7-4F43-81A5-1FE5686BA11F}
EndGlobalSection
EndGlobal
49 changes: 49 additions & 0 deletions SERF/src/SERF.Node/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Threading.Tasks;
using Blockcore;
using Blockcore.Builder;
using Blockcore.Configuration;
using Blockcore.Features.BlockStore;
using Blockcore.Features.ColdStaking;
using Blockcore.Features.Consensus;
using Blockcore.Features.Diagnostic;
using Blockcore.Features.MemoryPool;
using Blockcore.Features.Miner;
using Blockcore.Features.NodeHost;
using Blockcore.Features.RPC;
using Blockcore.Networks.SERF;
using Blockcore.Utilities;

namespace SERF.Daemon
{
public class Program
{
public static async Task Main(string[] args)
{
try
{
var nodeSettings = new NodeSettings(networksSelector: Networks.SERF, args: args);

IFullNodeBuilder nodeBuilder = new FullNodeBuilder()
.UseNodeSettings(nodeSettings)
.UseBlockStore()
.UsePosConsensus()
.UseMempool()
.UseColdStakingWallet()
.AddPowPosMining()
.UseNodeHost()
.AddRPC()
.UseDiagnosticFeature();

IFullNode node = nodeBuilder.Build();

if (node != null)
await node.RunAsync();
}
catch (Exception ex)
{
Console.WriteLine("There was a problem initializing the node. Details: '{0}'", ex);
}
}
}
}
39 changes: 39 additions & 0 deletions SERF/src/SERF.Node/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"profiles": {
"SERF (MAIN)": {
"commandName": "Project"
},
"SERF (TEST)": {
"commandName": "Project",
"commandLineArgs": "-testnet"
},
"SERF (MAIN/RPC)": {
"commandName": "Project",
"commandLineArgs": "-server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser"
},
"SERF (TEST/RPC)": {
"commandName": "Project",
"commandLineArgs": "-server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser -testnet"
},
"SERF (MAIN/LOCAL/RPC)": {
"commandName": "Project",
"commandLineArgs": "-server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser -datadir=nodedata"
},
"SERF (TEST/LOCAL/RPC)": {
"commandName": "Project",
"commandLineArgs": "-server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser -datadir=nodedata -testnet"
},
"SERF (MAIN/LOCAL/RPC/DEFAULT)": {
"commandName": "Project",
"commandLineArgs": "-server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser -datadir=nodedata -defaultwalletname=default -defaultwalletpassword=default -unlockdefaultwallet -server"
},
"SERF (TEST/LOCAL/RPC/DEFAULT)": {
"commandName": "Project",
"commandLineArgs": "-server -rpcallowip=127.0.0.1 -rpcbind=127.0.0.1 -rpcpassword=rpcpassword -rpcuser=rpcuser -datadir=nodedata -defaultwalletname=default -defaultwalletpassword=default -unlockdefaultwallet -server -testnet"
},
"SERF (TEST/NO ASSUME VALID)": {
"commandName": "Project",
"commandLineArgs": "-testnet -assumevalid=0 -checkpoints=false"
}
}
}
30 changes: 30 additions & 0 deletions SERF/src/SERF.Node/SERF.Node.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyName>SERF.Node</AssemblyName>
<OutputType>Exe</OutputType>
</PropertyGroup>

<PropertyGroup>
<LangVersion>latest</LangVersion>
<ServerGarbageCollection>false</ServerGarbageCollection>
<ConcurrentGarbageCollection>false</ConcurrentGarbageCollection>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blockcore.Features.BlockStore" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.ColdStaking" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.Consensus" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.MemoryPool" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.Miner" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.NodeHost" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.RPC" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.Wallet" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.Diagnostic" Version="1.0.*" />
<PackageReference Include="Blockcore.Core" Version="1.0.*" />
<PackageReference Include="Blockcore.Networks.SERF" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.Persistence.LevelDb.CorePackage" Version="1.0.*" />
<PackageReference Include="Blockcore.Features.Persistence.Rocksdb.CorePackage" Version="1.0.*" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockcorenodes",
"version": "1.0.23",
"version": "1.0.24",
"license": "MIT",
"author": {
"name": "Blockcore",
Expand Down

0 comments on commit f3803f5

Please sign in to comment.