From 3c9b0e96f16e0ae45b33c675f88688388d25d156 Mon Sep 17 00:00:00 2001 From: Bruno Skvorc Date: Wed, 10 Oct 2018 06:21:44 +0200 Subject: [PATCH 1/8] Basic changes, testing workflow --- .gitignore | 49 +++++++++++++++++++++++++ source/_data/sidebar.yml | 2 +- source/docs/faq.md | 19 ++++++++++ source/docs/ideas_for_implementation.md | 14 ------- 4 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 source/docs/faq.md delete mode 100644 source/docs/ideas_for_implementation.md diff --git a/.gitignore b/.gitignore index 6891517..6684837 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,52 @@ db.json .deploy*/ package-lock.json public/ + +# Composer +/vendor +composer.phar + +# IntelliJ - PhpStorm and PyCharm +*.ipr +*.iws + +# Eclipse +/.project +/.settings +/.classpath + +# Logs +logs +error.log +access.log + +# Netbeans +nbproject +.nbproject +.nbproject/* +nbproject/* +nbproject/private/ +/nbbuild/ +/nbdist/ +nbactions.xml +nb-configuration.xml + +# Thumbnails +._* +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# SublimeText project files +/*.sublime-project +*.sublime-workspace + +# Dart +packages +packages/* + +# Vagrant +.vagrant +.vagrant/* + +.env \ No newline at end of file diff --git a/source/_data/sidebar.yml b/source/_data/sidebar.yml index 9d4b4e6..64e2a29 100644 --- a/source/_data/sidebar.yml +++ b/source/_data/sidebar.yml @@ -3,8 +3,8 @@ docs: introduction: index.html milestones: milestones.html design: design.html - ideas_for_implementation: ideas_for_implementation.html resources: resources.html team: team.html + faq: faq.html contributor_guide: contributor_guide.html \ No newline at end of file diff --git a/source/docs/faq.md b/source/docs/faq.md new file mode 100644 index 0000000..bdd8ec1 --- /dev/null +++ b/source/docs/faq.md @@ -0,0 +1,19 @@ +--- +id: faq +title: Frequently Asked Questions +--- + +In talking to people both familiar and complete strangers to Ethereum clients, these questions were asked more than once. + + +### Q: When do you expect to have it production-ready? + +Not for a while. Sharding is a long ways off, and until then we'll be focusing on getting Ethereum v1 tests to pass in our full node mode. The full node will be ready in 2019, but the super-light implementation might take longer. + +### Q: How is a super-light node different from just calling Infura through Web3js? + +A Web3js or any similar JavaScript package for communicating with the blockchain is basically a more advanced XMLHttpRequest / Fetch wrapper. What we mean by this is that these packages retrieve information from another node and trust it implicitly. They ask "has this transaction been confirmed?" and get a response that's either "yes" or "that transaction is unknown". With light nodes, they ask "give me the data to check if this transaction has been confirmed" and then check on their own. This is a trust-minimized setup which combines the best of both worlds - very little storage and processing power required while allowing for cryptographic verification of the full node's claims. + +### Q: What's the plan for mobile? You speak of deploying to mobile devices, but Nimbus only compiles to C, C++ and JavaScript and iOS and Android don't support C natively. Will you be compiling to JS and deploying with a web wrapper? That doesn't sound performant! + +Native compiles with Nim work for both Android and iOS, just like geth written in go works. It's all NDK/C API. We'll soon have published specific instructions on how to compile it for all manner of devices. \ No newline at end of file diff --git a/source/docs/ideas_for_implementation.md b/source/docs/ideas_for_implementation.md deleted file mode 100644 index 38080ac..0000000 --- a/source/docs/ideas_for_implementation.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -id: ideas_for_implementation -title: Ideas for Implementation ---- - -1. Create [devp2p](https://github.com/ethereum/wiki/wiki/%C3%90%CE%9EVp2p-Wire-Protocol) and an abstraction to allow for [libp2p](https://github.com/Agorise/c-libp2p), [Node Discovery](https://github.com/ethereum/wiki/wiki/Node-discovery-protocol), [RLP encoding](https://github.com/ethereum/wiki/wiki/RLP), [Modified Patricia Merkle Tree](https://easythereentropy.wordpress.com/2014/06/04/understanding-the-ethereum-trie/), [bigint's](https://github.com/def-/nim-bigints), [keccak256](https://github.com/ethereum/eth-hash), and [secp256k1](https://en.bitcoin.it/wiki/Secp256k1). -1. Create an abstraction that would allow sub-protocols: ETH, [SHH](https://gist.github.com/gluk256/9812e59ed0481050350a11308ada4096), [PSS](https://gist.github.com/zelig/d52dab6a4509125f842bbd0dce1e9440), [Swarm](https://github.com/ethersphere/swarm), [LES](https://github.com/ethereum/wiki/wiki/Light-client-protocol), [Stateless Clients](https://nordicapis.com/defining-stateful-vs-stateless-web-services/), Sharding, [Plasma](https://plasma.io/), [State Channels](https://blog.stephantual.com/what-are-state-channels-32a81f7accab). For now, we can ignore all but LES and Sharding. -1. DB: Most implementations of Ethereum use [LevelDB](https://github.com/google/leveldb). Parity has a DB abstraction and uses [HashDB](https://github.com/NPS-DEEP/hashdb/wiki) and [RocksDB](https://rocksdb.org/docs/getting-started.html). -1. RocksDB is an interesting choice, because it solves the issues that have troubled leveldb. Rocksdb also has a [light version](https://github.com/facebook/rocksdb/blob/master/ROCKSDB_LITE.md) for mobile usage; it's in C++, which would be an issue only if we go for pure C. -1. [EVM](https://github.com/pirapira/awesome-ethereum-virtual-machine): basic VM, [eWASM](https://github.com/ewasm/design) ([Hera](https://github.com/ewasm/hera) is also in C++) -1. IPC/RPC abstraction, [external API methods](https://github.com/ethereum/wiki/wiki/JSON-RPC) that can be consumed by application bindings: react-native module, IPC, RPC HTTP server, or web sockets -1. Encryption library is a little unclear. [Libgcrypt](https://www.gnupg.org/software/libgcrypt/index.html) has everything we need but might be problematic from the standpoint of LGPL licensing. If we have an abstraction for Libgcrypt, we could use it now and swap it out later for something more permissive. -1. Alternatively, we could roll out our own library. However, implementing our own encryption would not be a great idea, and our version would have to be audited and tested. Suggestions are welcome. -1. Monitor [ethereum/py-evm](https://github.com/ethereum/py-evm/tree/sharding). Connect with Chang-Wu Chen, Hsiao-Wei Wang, and anyone else working on sharding. From 0fff4711d0dba7c6ca555c65ab42bece9076e305 Mon Sep 17 00:00:00 2001 From: Bruno Skvorc Date: Wed, 10 Oct 2018 07:21:12 +0200 Subject: [PATCH 2/8] Added building section --- source/_data/sidebar.yml | 2 +- source/docs/building.md | 37 ++++++++++++++++++++++++++ themes/navy/languages/en.yml | 3 ++- themes/navy/layout/partial/header.swig | 10 +++---- 4 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 source/docs/building.md diff --git a/source/_data/sidebar.yml b/source/_data/sidebar.yml index 64e2a29..237886b 100644 --- a/source/_data/sidebar.yml +++ b/source/_data/sidebar.yml @@ -1,9 +1,9 @@ docs: Nimbus: introduction: index.html + building: building.html milestones: milestones.html design: design.html - resources: resources.html team: team.html faq: faq.html contributor_guide: contributor_guide.html diff --git a/source/docs/building.md b/source/docs/building.md new file mode 100644 index 0000000..932081f --- /dev/null +++ b/source/docs/building.md @@ -0,0 +1,37 @@ +--- +id: building +title: Getting Started with Nimbus +--- + +This document will explain how to install, test, and run Nimbus on your local machine. For a full guide, see the [Nimbus for Newbies](https://our.status.im/nimbus-for-newbies/) post. + +## Getting Started + +- [install Nim](https://bitfalls.com/nim1) +- be on a command-line friendly system (i.e. access to Terminal / Console / Git Bash / Powershell) + +## Prerequisites + +- install [RocksDB](https://rocksdb.org/) via official instructions or by running the below commands: + + - on OS X: + ```bash + brew install rocksdb + curl https://nim-lang.org/choosenim/init.sh -sSf | sh + ``` + - on Linux + ```bash + sudo apt-get install rocksdb # or your own Linux distribution's equivalent + curl https://nim-lang.org/choosenim/init.sh -sSf | sh + ``` + +## Install Nimbus + +```bash +git clone https://github.com/status-im/nimbus +cd nimbus +nimble install +nimble test +``` + +Run Nimbus with `nimbus` or look at flags and options with `nimbus --help`. \ No newline at end of file diff --git a/themes/navy/languages/en.yml b/themes/navy/languages/en.yml index 4da9fef..0eae9b0 100644 --- a/themes/navy/languages/en.yml +++ b/themes/navy/languages/en.yml @@ -23,7 +23,8 @@ sidebar: introduction: What Is Nimbus? milestones: Milestones design: Design - ideas_for_implementation: Ideas For Implementation + faq : FAQ + building: Getting Started resources: Resources team: Team contributor_guide: Contributor Guide diff --git a/themes/navy/layout/partial/header.swig b/themes/navy/layout/partial/header.swig index 9f1b644..e223a5a 100644 --- a/themes/navy/layout/partial/header.swig +++ b/themes/navy/layout/partial/header.swig @@ -8,7 +8,7 @@ From 3b3b93583d8f132c3ccc10958684868556aee5c3 Mon Sep 17 00:00:00 2001 From: Bruno Skvorc Date: Wed, 10 Oct 2018 10:37:56 +0200 Subject: [PATCH 6/8] Fixed github icon link --- themes/navy/layout/partial/header.swig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/navy/layout/partial/header.swig b/themes/navy/layout/partial/header.swig index e834bf4..f5fba8f 100644 --- a/themes/navy/layout/partial/header.swig +++ b/themes/navy/layout/partial/header.swig @@ -68,7 +68,7 @@ Nimbus Status Chat - + From 0d3ce9f59d66a6f1618b0d30f95d09c45ba97ccb Mon Sep 17 00:00:00 2001 From: Nistor Cristian Date: Wed, 10 Oct 2018 12:22:43 +0300 Subject: [PATCH 7/8] Improved blog posts. --- themes/navy/layout/index.swig | 18 +----------------- themes/navy/source/css/_partial/main.styl | 11 +++++++++++ themes/navy/source/js/fetch_blog_posts.js | 10 ++++++---- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/themes/navy/layout/index.swig b/themes/navy/layout/index.swig index 94d21f3..6577c59 100644 --- a/themes/navy/layout/index.swig +++ b/themes/navy/layout/index.swig @@ -148,23 +148,7 @@

Read our Blog

Check out the latest Nimbus news and blog posts:

-
- -
-

Status Partners with the Team Behind the Programming Language Nim

-

We want the best of the best to build the new Ethereum client. It only makes sense to go to the "source" to get them.

- Read More -
-
-

Introducing Nimbus

-

The original announcement post - the official birth of the Nimbus project

- Read More -
- +
\ No newline at end of file diff --git a/themes/navy/source/css/_partial/main.styl b/themes/navy/source/css/_partial/main.styl index f9d9f50..ec6d123 100644 --- a/themes/navy/source/css/_partial/main.styl +++ b/themes/navy/source/css/_partial/main.styl @@ -1229,6 +1229,17 @@ pre { margin-bottom: 8px; } +.contribute h3 a{ + color: #000; +} + +.contribute.blog + .feature-image + margin: -30px 0 24px -24px + img + border-radius: 5px 5px 0 0; + width: calc(100% + 24px); + .contribute p font-style: normal; font-weight: normal; diff --git a/themes/navy/source/js/fetch_blog_posts.js b/themes/navy/source/js/fetch_blog_posts.js index 07e7f61..68cfd8e 100644 --- a/themes/navy/source/js/fetch_blog_posts.js +++ b/themes/navy/source/js/fetch_blog_posts.js @@ -1,16 +1,18 @@ $(document).ready(function () { - let url = 'https://our-status.ghost.io/ghost/api/v0.1/posts/?limit=3&formats=plaintext&client_id=ghost-frontend&client_secret=1c5590b47eb4'; + var url = 'https://our-status.ghost.io/ghost/api/v0.1/posts/?limit=3&include=tags&filter=tags:nimbus&formats=plaintext&client_id=ghost-frontend&client_secret=1c5590b47eb4'; + var urlBase = [location.protocol, '//', location.host, location.pathname].join(''); $.ajax({ type: "get", url: url, success: function (response) { $.each(response.posts, function (index, val) { - $('.contribute.blog:nth-child('+ (index+1) +') h3').text(val.title); + var excerpt = ''; if(val.custom_excerpt != null) { - $('.contribute.blog:nth-child('+ (index+1) +') p').text(val.custom_excerpt); + excerpt = val.custom_excerpt; }else{ - $('.contribute.blog:nth-child('+ (index+1) +') p').text(getWords(val.plaintext)); + excerpt = getWords(val.plaintext); } + $('.contribute-wrap-blog').prepend(''); }); } }); From 0d92d1ac7141f496b1949207bbf5c8319c01775b Mon Sep 17 00:00:00 2001 From: Nistor Cristian Date: Thu, 11 Oct 2018 00:24:57 +0300 Subject: [PATCH 8/8] Update fetch_blog_posts.js --- themes/navy/source/js/fetch_blog_posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/navy/source/js/fetch_blog_posts.js b/themes/navy/source/js/fetch_blog_posts.js index 68cfd8e..94715c4 100644 --- a/themes/navy/source/js/fetch_blog_posts.js +++ b/themes/navy/source/js/fetch_blog_posts.js @@ -1,5 +1,5 @@ $(document).ready(function () { - var url = 'https://our-status.ghost.io/ghost/api/v0.1/posts/?limit=3&include=tags&filter=tags:nimbus&formats=plaintext&client_id=ghost-frontend&client_secret=1c5590b47eb4'; + var url = 'https://our.status.im/ghost/api/v0.1/posts/?limit=3&formats=plaintext&client_id=ghost-frontend&client_secret=2b055fcd57ba'; var urlBase = [location.protocol, '//', location.host, location.pathname].join(''); $.ajax({ type: "get",