Skip to content

Commit

Permalink
Merge pull request #416 from gnosischain/main
Browse files Browse the repository at this point in the history
Merge from main
  • Loading branch information
zengzengzenghuy authored Mar 31, 2023
2 parents 1a1d000 + dc1db7d commit 2837533
Show file tree
Hide file tree
Showing 7 changed files with 277 additions and 25 deletions.
80 changes: 80 additions & 0 deletions docs/developers/interact/dynamic.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
description: Dynamic is a powerful web3 auth developer platform with built-in support for Gnosis Chain. It lets you integrate multiple wallets such as Coinbase Wallet, Metamask, and more into your app or website, handles network switching, multi-wallet linking and more. This guide will show you how to use Gnosis Chain with Dynamic.
keywords: [dynamic, wagmi, tools, front end, development, dapps]
---

# Using Dynamic

[Dynamic](https://www.dynamic.xyz/) is a powerful web3 auth developer platform with built-in support for Gnosis Chain. It lets you integrate multiple wallets such as Coinbase Wallet, Metamask, and more into your app or website, handles network switching, multi-wallet linking and more.

Dynamic comes with Gnosis Chain built-in. You can play around with a live demo of Dynamic [here](https://demo.dynamic.xyz/) and see a full video walkthrough [here](https://www.dynamic.xyz/product-walkthrough). In this tutorial, we'll go through how to set up Dynamic with Gnosis Chain.

You can see a CodeSandbox of the example below [here](https://codesandbox.io/s/dynamic-gnosis-chain-demo-vzps4b) (configured to Gnosis Chain).

## Prerequisites

Dynamic works with React today. You can go through the standard getting started guide [here](https://docs.dynamic.xyz/docs/getting-started-with-dynamic).

## Step 1: Create a Dynamic account

1. [Sign up](https://app.dynamic.xyz) to get an environment ID

2. Create an organization and a set up your first project

3. Copy your `environmentID` from the Dynamic overview page

4. (optional) <a href="doc:security" target="_blank"> Configure your site's CORS origins</a>

## Step 2: Install the Dynamic npm package

You can install Dynamic's SDK with either `yarn` or `npm`. We currently support React and NextJS.

```shell
npm install @dynamic-labs/sdk-react
# or yarn add @dynamic-labs/sdk-react
```



## Step 3: Configure the SDK

Copy the following snippet into your project and paste in your environmentId:

```javascript
import { DynamicContextProvider, DynamicWidget} from '@dynamic-labs/sdk-react';

const App = () => (
<DynamicContextProvider
settings={{
environmentId: 'ID'
}}>
<DynamicWidget />
</DynamicContextProvider>
);

export default App;
```



## Step 4: Turn on Gnosis Chain in your developer dashboard

Now that we have the basic Dynamic setup, you can go to your developer dashboard, and select `configurations` from the left menu. Next, click on the `EVM` card and toggle `Gnosis` on. Note that you can also chose to toggle the default network, `Ethereum`, off.

<img width="600" alt="Gnosis_new" src="https://user-images.githubusercontent.com/1596208/228478128-925acb34-1f5d-45a5-bd2a-c6467af265a7.png" />



## See it in action

Now that you put things together, you can see a CodeSandbox of the finished product [here](https://codesandbox.io/s/dynamic-gnosis-chain-demo-vzps4b).

## Next steps

Now that you set up Dynamic with **Gnosis Chain**, there are many additional things you can explore:

- **Log in with your wallet, and see data in Dynamic's developer dashboard** - Now that your widget is set up locally, try to log in with a wallet. As soon as you do, head over to the Dynamic developer dashboard and click on user management and analytics. You'll be able to see your user show up!
- **Customize your SDK design** - There are many ways to customize the Dynamic modal to fit your needs (you can explore them in the SDK configuration section), but to start, we suggest setting a light/dark mode and a primary color for the modal, which you can do in the design section of your developer dashboard.
- **Explore how to use the Dynamic SDK** - After your users connect their wallets, you'll want to interact with them for various reasons. You can read more about the SDK in [Dynamic's docs](https://docs.dynamic.xyz).

For support, you can also join [Dynamic's Slack Community](https://www.dynamic.xyz/slack).
27 changes: 21 additions & 6 deletions docs/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ However, a censorship-resistant, decentralized network should not rely on cloud

Gnosis clients can run on your computer, laptop, server, or even a single-board computer. While running clients on your personal computer is possible, having a dedicated machine just for your node can significantly enhance its performance and security while minimizing the impact on your primary computer.

Using your own hardware can be very easy. There are many simple options as well as advanced setups for more technical people. So let's look into the requirements and means for running Ethereum clients on your machine.
Using your own hardware can be very easy. There are many simple options as well as advanced setups for more technical people. So let's look into the requirements and means for running Gnosis clients on your machine.

#### **Requirements** ####
Hardware requirements differ by client but generally are not that high since the node just needs to stay synced. Don't confuse it with mining, which requires much more computing power. Sync time and performance do improve with more powerful hardware however.

Before installing any client, please ensure your computer has enough resources to run it. You can find the minimum and recommended requirements below.

The bottleneck for your hardware is mostly disk space. Syncing the Ethereum blockchain is very input/output intensive and requires a lot of space. It is best to have a solid-state drive (SSD) with hundreds of GBs of free space to spare even after the synchronization.
The bottleneck for your hardware is mostly disk space. Syncing the Gnosis blockchain is very input/output intensive and requires a lot of space. It is best to have a solid-state drive (SSD) with hundreds of GBs of free space to spare even after the synchronization. Refer to [this post](https://gist.github.com/yorickdowne/f3a3e79a573bf35767cd002cc977b038) for good and bad SSD model.

The size of the database and speed of the initial synchronization depends on the chosen client, its configuration and sync strategy.

Expand Down Expand Up @@ -122,6 +122,21 @@ Requirements vary client to client, for more detail see the associated system re

Check out [Rocketpool's excellent guide](https://docs.rocketpool.net/guides/node/local/hardware.html) that explains hardware requirements for running a node.

**Gnosis in Ethereumverse**

Running a Gnosis node requires no different hardware configuration from other nodes in Ethereum universe.

[Ethereum on ARM](https://twitter.com/EthereumOnARM/status/1641374712348409859) demonstrates that it is possible to run a Gnosis, Ethereum, Starknet, and Arbitrum node using the same hardware configuration with less than $400 per node. (March 2023)

| Hardware | Price (USD) |
|------------------------------------|-------------|
| [Rock 5B board(16GB)](https://twitter.com/theradxa) | $189 |
| Acrylic case with passive heatsink | $13 |
| Crucial P2 NVMe SSD 2TB | $140 |
| MicroSD | $8 |
| Ethernet cable | $6 |
| Power supply | $9 |

### Network Connectivity

Running a node requires a reliable internet connection, as nodes are constantly exchanging data across the peer-to-peer network. Brief offline periods will result in [small inactivity penalties](./rewards-penalties), but this will typically be recouped quickly as long as the outage is short.
Expand Down Expand Up @@ -189,7 +204,7 @@ Here are the release pages of clients where you can find their pre-built binarie
Client diversity is critical for consensus nodes running validators. If majority of validators is running a single client implementation, network security is at risk. It is therefore recommended to consider choosing a minority client.

#### **Verifying the software** ####
When downloading software from the internet, it's recommended to verify its integrity. This step is optional but especially with crucial infrastructure piece like the Ethereum client, it's important to be aware of potential attack vectors and avoid them. If you downloaded a pre-built binary, you need to trust it and risk that an attacker could swap the executable for a malicious one.
When downloading software from the internet, it's recommended to verify its integrity. This step is optional but especially with crucial infrastructure piece like the Gnosis client, it's important to be aware of potential attack vectors and avoid them. If you downloaded a pre-built binary, you need to trust it and risk that an attacker could swap the executable for a malicious one.

Developers sign released binaries with their PGP keys so you can cryptographically verify you are running exactly the software they created. You just need to obtain public keys used by developers, which can be found on client release pages or in documentation. After downloading the client release and its signature, you can use a PGP implementation, e.g. [GnuPG](https://gnupg.org/download/index.html) to easily verify them. Check out a tutorial on verifying open-source software using `gpg` on [linux](https://www.tecmint.com/verify-pgp-signature-downloaded-software/) or [Windows/MacOS](https://freedom.press/training/verifying-open-source-software/).

Expand All @@ -212,13 +227,13 @@ Other basic configuration options are, e.g. choosing a network - Mainnet or test
For testing purposes, you might prefer to run a client on Chiado testnet.

##### **Starting the execution client** #####
Before starting the Ethereum client software, perform a last check that your environment is ready. For example, make sure:
Before starting the Gnosis client software, perform a last check that your environment is ready. For example, make sure:

- There is enough disk space considering the chosen network and sync mode.
- Memory and CPU is not halted by other programs.
- Operating system is updated to the latest version.
- System has the correct time and date.
- Your router and firewall accept connections on listening ports. By default Ethereum clients use a listener (TCP) port and a discovery (UDP) port, both on 30303 by default.
- Your router and firewall accept connections on listening ports. By default Gnosis clients use a listener (TCP) port and a discovery (UDP) port, both on 30303 by default.

Run your client on a testnet first to help make sure everything is working correctly.

Expand Down Expand Up @@ -308,7 +323,7 @@ Before running Lighthouse, learn more on how to install and configure it in [Lig
```bash
teku \
--network gnosis \
--data-path "/data/ethereum" \
--data-path "/data/gnosis" \
--ee-endpoint http://localhost:8551 \
--ee-jwt-secret-file "/path/to/jwtsecret" \
```
Expand Down
2 changes: 1 addition & 1 deletion docs/node/tools/dappnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ You are now ready to fund these validators and start validating.
### Step 4: Fund Your Validators

:::tip
In case you need some xDai for transaction fees you can get some from the [official xDai faucet for Gnosis](https://stakely.io/en/faucet/gnosis-chain-xdai).
In case you need some xDai for transaction fees you can get some from the [official xDai faucet for Gnosis](https://gnosisfaucet.com/).

:::

Expand Down
3 changes: 0 additions & 3 deletions docs/tools/faucets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ A faucet is a service that provides small amounts of [xDai tokens](/about/tokens

## Community Faucets

- [Gimlu](https://www.gimlu.com/faucet)
- [Stakely](https://stakely.io/en/faucet/gnosis-chain-xdai)
- [Unitap](https://unitap.app/gas-faucet)
- [xDai Faucet](https://xdai-faucet.top/)

## Token Faucet

Expand Down
21 changes: 6 additions & 15 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ const sidebars = {
"developers/interact/web3-js",
"developers/interact/ethers-js",
"developers/interact/rainbowkit-wagmi",
"developers/interact/dynamic",
],
},
{
Expand Down Expand Up @@ -522,26 +523,11 @@ const sidebars = {
label: 'Gnosis Faucet',
href: 'https://gnosisfaucet.com/',
},
{
type: 'link',
label: 'Gimlu',
href: 'https://www.gimlu.com/faucet',
},
{
type: 'link',
label: 'Stakely',
href: 'https://stakely.io/en/faucet/gnosis-chain-xdai',
},
{
type: 'link',
label: 'Unitap',
href: 'https://unitap.app/gas-faucet',
},
{
type: 'link',
label: 'xDai Faucet',
href: 'https://xdai-faucet.top/',
},
'tools/faucets/tokens',
],
},
Expand Down Expand Up @@ -658,6 +644,11 @@ const sidebars = {
label: 'Crypto Tax Calculator',
href: 'https://cryptotaxcalculator.io/exchanges/xdai-tax/',
},
{
type: 'link',
label: 'BitOK',
href: 'https://bitok.org/'
},
{
type: 'link',
label: 'Wrapeth',
Expand Down
88 changes: 88 additions & 0 deletions updates/2023/03-22-core-devs-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Core Devs Call - 22/03/2023
authors: [dapplion, armaganercan]
tags: [CoreDevsCall, gnosis]
---

# Gnosis Core Devs Call Notes

![](https://i.imgur.com/iQTcEI1.png)


Greetings everyone, and welcome to the weekly Gnosis Core Devs Call. Just a quick reminder that this meeting takes place every Wednesday.

Participants: Erigon, Gateway, Nethermind, Geth, Gnosis DevOps, Gnosis Core Devs, Gnosis DevRels, Gnosis Comms team and the contributors.

Mar 22, 2023

# Client Team Updates
## EL
* **Nethermind**: Bad block fix was shipped.
* **Erigon**: No updates
* **Geth**: Imported some blocks, but there’s issues with the freezer, hopefully that’s the last hurdle

## CL
* **Prysm**: No updates

# Chain Infra
* **Gateway**

Increasing mainnet RPC to 75% traffic. Implementing monitoring for the Chiado bridge. As soon as this is done, they’ll deploy both bridges for mainnet


# Devnet
Some issues: 3 phases
* Launching chain
* No problem

* Merge
* Issues caught before the merge and fixed in time

* Shapella hard fork
* Erigon nodes got stuck with “known bad hash”. Erigon now stuck with another bug
* Gateway switched Erigon nodes to Nethermind
* Issues regarding sync committees
Mar 22 13:01:07.055 WARN Error processing HTTP API request method: POST, path: /eth/v1/beacon/pool/sync_committees, status: 400 Bad Request, elapsed: 4.13746ms
* Erigon
* Was a good test, revealed some issues. DDoS protection from geth was problematic but is fixed. Missing gas limit implementation. The withdrawal contract reverts on Erigon, but works fine on Nethermind. Missing all the slots (or most?)
Bad blocks on Sepolia, but works on Goerli. If any bad block is detected on Goerli, please tell Andrew. Could be linked to an old version of Erigon. Andrew will check on their Sepolia validators
* Nethermind
* Consensus issues need to be investigated separately. We need consensus between both clients to test client diversity / parity

Igor: where do (automatic) withdrawals go for genesis validators? Do they have a withdrawal address?
Lion: the default tooling sets addresses to 0
Jorge: they sometimes set withdrawal addresses on genesis or after, depending on what’s to be tested
Ruben: can help on how to check if withdrawals are happening or not
The failed withdrawals per slot are fixed to 4 on Nethermind’s side for now
Lion: this should be a consensus config
Marek: how can we be sure that we are triggering all testing paths?
Lion: we could add coverage tools from Solidity to automate those tests
Igor: we need tooling to automatically test withdrawals, because they happen on both consensus and execution
Lion: for the withdrawal contract we can easily test it on chain now because it’s insolvent at genesis anyways, as the validators are created in genesis and thus there’s no GNO in the contract
Jorge: instead of deploying a new devnet or messing with the current one, we can create a shadow fork and modify some storage there to test specific scenarios
I.e. removing the GNO in the contract for example
Marek: downside is that this is not automated testing for the future
Jorge: indeed, but we don’t have automated tests yet and that’s the best we have



* Testnet

Was supposed to hard fork next week: still realistic?
Igor: probably wise to postpone until Erigon is ready


# Tests
* Hive

Max not present: no update

# Withdrawal Contrat

* mGNO is getting removed
Would require a contract upgrade on devnet. Will be tested on devnet by triggering actions that provide good solidity coverage





81 changes: 81 additions & 0 deletions updates/2023/03-29-core-devs-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: Core Devs Call - 22/03/2023
authors: [dapplion, armaganercan]
tags: [CoreDevsCall, gnosis]
---

# Gnosis Core Devs Call Notes

![](https://i.imgur.com/JhORmO7.png)

Greetings everyone, and welcome to the weekly Gnosis Core Devs Call. Just a quick reminder that this meeting takes place every Wednesday.

[Watch full record on YouTube](https://youtu.be/mKJolP4AtKY)

Participants: Erigon, Gateway, Nethermind, Geth, Gnosis DevOps, Gnosis Core Devs, Gnosis DevRels, Gnosis Comms team and the contributors.

Mar 29, 2023

# Client Team Updates
## EL
* **Nethermind**:

Introducing Marcos for Hive tests. Will have a call tomorrow regarding those tests.

After Shapella, Nethermind will probably release a very big version with a lot of changes. Huge amounts of optimizations is coming.. Potential new light mode that would reduce memory consumption *a lot*

Improving attestation performance
Better multi-threading
Potentially (but way later) snap sync

* **Erigon**:

Canceled their agreement with Gateway for developers, thus Max is no longer an Erigon dev. They want to hire new devs, but will take time. Added the max failed withdrawal parameters to the withdrawals system call, which should now work

* **Geth**:

Guillaume has worked around the issue from last week, and is now importing the data to start syncing the chain. It has been running for two days, and there’s probably one more day to go, after which he’ll be able to give an update.


## CL
* **Prysm**:

No updates. Guillaume is focused on Geth
* **Nimbus**:

We’ve written and reviewed our docs to be published soon
After this, we’ll publish client diversity docs, so that validators can start using Nimbus.


# Chain Infra
* **Gateway**

A mainnet bridge validator is now running and has already processed a few transactions.Extra monitoring was added there.


# Devnet

Withdrawals are working again. Tried partial withdrawals, not full exit yet. Gnosis mostly deployed Nethermind nodes. No one seems to know if Erigon nodes still sync. Andrew’s Erigon nodes still work

There’s close to 100% attestation participation.Ruben can do a full exit on 1024 nodes to drain the GNO in the deposit contract.

There’s a faucet for GNO afterwards.Ruben expects Gnosis to be testing this a bit more

Lion will run Truffle scripts

# Tests
* Hive

There’s a call tomorrow, invite in Telegram
Happening at 3pm CET


# Withdrawal Contrat

Adam’s audit is done, and another external audit should be done by early next week. The minimum amount to deposit is 1/32 GNO, which could be an attack vector. Looking into it. We might want to increase that minimum.






0 comments on commit 2837533

Please sign in to comment.