-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nimbus initial commit #3036
Open
pedromiguelmiranda
wants to merge
7
commits into
master
Choose a base branch
from
dev/pedro/kikof
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
nimbus initial commit #3036
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5c59c96
Added Makefile and nimble support
6e21214
Added README file
44bc293
added version file
ff014a9
minimal functional project structure:
edd8f93
added tests
febbbe4
nph formatting and correct typos
709bf4b
copyright year fix
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2018-2024 Status Research & Development GmbH. Licensed under | ||
# Copyright (c) 2018-2025 Status Research & Development GmbH. Licensed under | ||
# either of: | ||
# - Apache License, version 2.0 | ||
# - MIT license | ||
|
@@ -104,6 +104,7 @@ VERIF_PROXY_OUT_PATH ?= build/libverifproxy/ | |
update \ | ||
nimbus \ | ||
nimbus_execution_client \ | ||
nimbus_unified \ | ||
fluffy \ | ||
nimbus_verified_proxy \ | ||
libverifproxy \ | ||
|
@@ -359,13 +360,24 @@ txparse: | build deps | |
|
||
# usual cleaning | ||
clean: | clean-common | ||
rm -rf build/{nimbus,nimbus_execution_client,fluffy,libverifproxy,nimbus_verified_proxy,$(TOOLS_CSV),$(FLUFFY_TOOLS_CSV),all_tests,test_kvstore_rocksdb,test_rpc,all_fluffy_tests,all_history_network_custom_chain_tests,test_portal_testnet,utp_test_app,utp_test,*.dSYM} | ||
rm -rf build/{nimbus_unified,nimbus,nimbus_execution_client,fluffy,libverifproxy,nimbus_verified_proxy,$(TOOLS_CSV),$(FLUFFY_TOOLS_CSV),all_tests,test_kvstore_rocksdb,test_rpc,all_fluffy_tests,all_history_network_custom_chain_tests,test_portal_testnet,utp_test_app,utp_test,nimbus_unified_test,*.dSYM} | ||
rm -rf tools/t8n/{t8n,t8n_test} | ||
rm -rf tools/evmstate/{evmstate,evmstate_test} | ||
ifneq ($(USE_LIBBACKTRACE), 0) | ||
+ $(MAKE) -C vendor/nim-libbacktrace clean $(HANDLE_OUTPUT) | ||
endif | ||
|
||
# Nimbus unified related targets | ||
|
||
# builds the unified client | ||
nimbus_unified: | build deps | ||
echo -e $(BUILD_MSG) "build/$@" && \ | ||
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:release --parallelBuild:1 -d:libp2p_pki_schemes=secp256k1 -u:metrics -o:build/$@ "nimbus_unified/[email protected]" | ||
|
||
all_tests_unified: | build deps | ||
echo -e $(BUILD_MSG) "build/$@" && \ | ||
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) --threads:on -d:chronicles_log_level=ERROR -o:build/$@ "nimbus_unified/tests/[email protected]" | ||
|
||
# Note about building Nimbus as a library: | ||
# | ||
# There were `wrappers`, `wrappers-static`, `libnimbus.so` and `libnimbus.a` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Nimbus Unified | ||
|
||
<!-- [![Github Actions CI](tbd) --> | ||
[![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
|
||
[![Discord: Nimbus](https://img.shields.io/badge/discord-nimbus-orange.svg)](https://discord.gg/XRxWahP) | ||
[![Status: #nimbus-general](https://img.shields.io/badge/status-nimbus--general-orange.svg)](https://join.status.im/nimbus-general) | ||
|
||
|
||
# description | ||
tbd | ||
For in-depth configuration and functionality of Nimbus execution and consensus layer refer to: | ||
- [Nimbus-eth1 - Execution layer client](https://github.com/status-im/nimbus-eth1) Documentation | ||
- [Nimbus-eth2 - Consensus layer client](https://github.com/status-im/nimbus-eth2) Documentation | ||
|
||
tbc | ||
# dependencies | ||
tbd | ||
# how to | ||
## configuration | ||
todo | ||
## commands | ||
todo | ||
## compile | ||
tbd | ||
- mac os, windows, and linux | ||
|
||
]$ make nimbus_unified | ||
## colaborate | ||
We welcome contributions to Nimbus Unified! Please adhere to the following guidelines: | ||
|
||
- Use the [Status Nim style guide](https://status-im.github.io/nim-style-guide/) to maintain code consistency. | ||
- Format your code using the [Nim Pretty Printer (nph)](https://github.com/nim-lang/nimpretty) to ensure consistency across the codebase. Run it as part of your pull request process. | ||
## License | ||
|
||
Licensed and distributed under either of | ||
|
||
* MIT license: [LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT | ||
|
||
or | ||
|
||
* Apache License, Version 2.0: [LICENSE-APACHEv2](LICENSE-APACHEv2) or https://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
at your option. These files may not be copied, modified, or distributed except according to those terms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# nimbus_unified | ||
# Copyright (c) 2025 Status Research & Development GmbH | ||
# Licensed and distributed under either of | ||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). | ||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). | ||
# at your option. This file may not be copied, modified, or distributed except according to those terms. | ||
|
||
import | ||
std/[os, atomics], | ||
chronicles, | ||
options, | ||
#eth2-configs | ||
beacon_chain/nimbus_binary_common, | ||
#eth1-configs | ||
../../nimbus/nimbus_desc | ||
|
||
export BeaconNodeConf, NimbusConf | ||
|
||
## Exceptions | ||
type NimbusServiceError* = object of CatchableError | ||
|
||
## Constants | ||
## TODO: evaluate the proposed timeouts | ||
const cNimbusMaxServices* = 2 | ||
const cNimbusServiceTimeoutMs* = 3000 | ||
|
||
## log | ||
logScope: | ||
topics = "Service manager" | ||
|
||
## Nimbus service arguments | ||
type | ||
ConfigKind* = enum | ||
Execution | ||
Consensus | ||
|
||
LayerConfig* = object | ||
case kind*: ConfigKind | ||
of Consensus: | ||
consensusConfig*: BeaconNodeConf | ||
of Execution: | ||
executionConfig*: NimbusConf | ||
|
||
ServiceParameters* = object | ||
name*: string | ||
layerConfig*: LayerConfig | ||
|
||
NimbusService* = ref object | ||
name*: string | ||
timeoutMs*: uint32 | ||
serviceHandler*: Thread[ServiceParameters] | ||
|
||
Nimbus* = ref object | ||
serviceList*: array[cNimbusMaxServices, Option[NimbusService]] | ||
|
||
## Service shutdown | ||
var isShutDownRequired*: Atomic[bool] | ||
isShutDownRequired.store(false) | ||
|
||
# filesystem specs | ||
proc defaultDataDir*(): string = | ||
let dataDir = | ||
when defined(windows): | ||
"AppData" / "Roaming" / "Nimbus_unified" | ||
elif defined(macosx): | ||
"Library" / "Application Support" / "Nimbus_unified" | ||
else: | ||
".cache" / "nimbus_unified" | ||
|
||
getHomeDir() / dataDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# nimbus_unified | ||
# Copyright (c) 2025 Status Research & Development GmbH | ||
# Licensed and distributed under either of | ||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). | ||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). | ||
# at your option. This file may not be copied, modified, or distributed except according to those terms. | ||
|
||
import std/[atomics, os], chronicles, ../configs/nimbus_configs | ||
|
||
export nimbus_configs | ||
|
||
logScope: | ||
topics = "Consensus layer" | ||
|
||
proc consensusLayer*(params: ServiceParameters) {.raises: [CatchableError].} = | ||
var config = params.layerConfig | ||
|
||
doAssert config.kind == Consensus | ||
|
||
try: | ||
while isShutDownRequired.load() == false: | ||
info "consensus ..." | ||
sleep(cNimbusServiceTimeoutMs + 1000) | ||
|
||
isShutDownRequired.store(true) | ||
except CatchableError as e: | ||
fatal "error", message = e.msg | ||
isShutDownRequired.store(true) | ||
|
||
isShutDownRequired.store(true) | ||
warn "\tExiting consensus layer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# nimbus_unified | ||
# Copyright (c) 2025 Status Research & Development GmbH | ||
# Licensed and distributed under either of | ||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). | ||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). | ||
# at your option. This file may not be copied, modified, or distributed except according to those terms. | ||
|
||
import std/[atomics, os], chronicles, ../configs/nimbus_configs | ||
|
||
export nimbus_configs | ||
|
||
logScope: | ||
topics = "Execution layer" | ||
|
||
proc executionLayer*(params: ServiceParameters) {.raises: [CatchableError].} = | ||
var config = params.layerConfig | ||
|
||
doAssert config.kind == Execution | ||
|
||
try: | ||
while isShutDownRequired.load() == false: | ||
info "execution ..." | ||
sleep(cNimbusServiceTimeoutMs) | ||
|
||
isShutDownRequired.store(true) | ||
except CatchableError as e: | ||
fatal "error", message = e.msg | ||
isShutDownRequired.store(true) | ||
|
||
isShutDownRequired.store(true) | ||
warn "\tExiting execution layer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# nimbus_unified | ||
# Copyright (c) 2025 Status Research & Development GmbH | ||
# Licensed and distributed under either of | ||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). | ||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). | ||
# at your option. This file may not be copied, modified, or distributed except according to those terms. | ||
|
||
-d:"libp2p_pki_schemes=secp256k1" | ||
|
||
-d:"chronicles_sinks=textlines[dynamic],json[dynamic]" | ||
-d:"chronicles_runtime_filtering=on" | ||
-d:"chronicles_disable_thread_id" | ||
|
||
@if release: | ||
-d:"chronicles_line_numbers:0" | ||
@end | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not name it nimbus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the target
![image](https://private-user-images.githubusercontent.com/32689555/409943494-7025d183-ca08-415c-9097-d730518e8ae3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDc4NTEsIm5iZiI6MTczOTE0NzU1MSwicGF0aCI6Ii8zMjY4OTU1NS80MDk5NDM0OTQtNzAyNWQxODMtY2EwOC00MTVjLTkwOTctZDczMDUxOGU4YWUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAwMzIzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc5MDZmODQyNzA3ZjAxOTM1Yzc0OWI5NmVhOGE2ZjVmYjc5YzgyYjEwMGQ3YThkMDYxMjZkMTcyNmU3ZWZjY2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.U5gSC1sBMxYKmqyaWtwyrZQHrPSBb4tbgOny2RHTMZU)
nimbus
is on rampdown:https://github.com/status-im/nimbus-eth1/blob/dev/pedro/kikof/Makefile#L217
and we need to solve issue #2738 and update some README
make
commands refsGiven that this is a project in development yet to be released (https://nimbus.guide/execution-client.html), how much time should we wait for the rampdown period?
Agree that it would be nice to get the renaming before starting landing this.