This project has been incorporated into the main NethermindEth repository and is deprecated.
See the Beacon Node Host, and related Core2 libraries at:
https://github.com/NethermindEth/nethermind/tree/master/src/Nethermind/Nethermind.BeaconNode.Host
Original Cortex Readme
.NET Core Ethereum 2.0
- .NET Core 3.0 development tools
To run with default Development settings (minimal config):
dotnet run --project src/Cortex.BeaconNode.Host --QuickStart:GenesisTime ([DateTimeOffset]::Now.ToUnixTimeSeconds()) --QuickStart:ValidatorCount 3
To run with Production settings (mainnet config):
dotnet run --project src/Cortex.BeaconNode.Host --environment Production
Open a browser to https://localhost:5001/node/version
and it should respond with the name and version.
Other GET queries:
- genesis time:
https://localhost:5001/node/genesis_time
- get an unsigned block, ready for signing:
https://localhost:5001/validator/block?slot=10&randao_reveal=0x0102030405060708090a0b0c0d0e0f100102030405060708090a0b0c0d0e0f100102030405060708090a0b0c0d0e0f100102030405060708090a0b0c0d0e0f100102030405060708090a0b0c0d0e0f100102030405060708090a0b0c0d0e0f10
- PowerShell Core, to run build scripts
- An editor, e.g. VS Code, if you want to contribute
To build a release version, with a gitversion based version number:
./build.ps1
Then run the DLL that was created (still the Development version):
dotnet ./src/Cortex.BeaconNode.Host/bin/Release/netcoreapp3.0/publish/Cortex.BeaconNode.Host.dll
The files are also copied to a release directory, configured with default host settings as Production:
dotnet ./release/latest/Cortex.BeaconNode.Host.dll
The published version also includes a published Windows platform executable.
Controller code:
dotnet tools/nswag/dotnet-nswag.dll openapi2cscontroller /input:docs/beacon-node-oapi.yaml /classname:BeaconNodeApi /namespace:Cortex.BeaconNode.Api /output:src/Cortex.BeaconNode.Api/BeaconNodeApi-generated.cs /UseLiquidTemplates:true /AspNetNamespace:"Microsoft.AspNetCore.Mvc" /ControllerBaseClass:"Microsoft.AspNetCore.Mvc.Controller"
Client code:
dotnet tools/nswag/dotnet-nswag.dll openapi2csclient /input:docs/beacon-node-oapi.yaml /classname:BeaconNodeClient /namespace:Cortex.BeaconNode.ApiClient /ContractsNamespace:Cortex.BeaconNode.ApiClient.Contracts /output:src/Cortex.BeaconNode.ApiClient/BeaconNodeClient-generated.cs
Impelmented so far:
Phase 0:
- The Beacon Chain
- Fork Choice -- main spec implemented, alternate algorithms are not
Supporting components:
- SimpleSerialize (SSZ) spec -- sufficient to support the beacon chain, no deserialisation yet, see the separate Cortex.Ssz project, https://github.com/sgryphon/cortex-ssz
- BLS signature verification -- sufficient to support the beacon chain, currently only Windows support, based on the Herumi library, see the separate Cortex.Cryptography.Bls project, https://github.com/sgryphon/cortex-cryptography-bls
- Honest Validator
- Eth2 APIs
- Interop Standards in Eth2 PM -- QuickStart
Phase 0:
- Deposit Contract
Phase 1:
- Custody Game
- Shard Data Chains
- Misc beacon chain updates
Supporting:
- General test format
- Merkle proof formats
- Light client syncing protocol
Other:
- Eth2 Metrics
Project-specific:
- Peer to peer
- Installation, e.g.Windows Service
Copyright (C) 2019 Demerzel Solutions Limited
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License and GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License and GNU General Public License along with this library. If not, see https://www.gnu.org/licenses/.