Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit 198fd21

Browse files
authored
Merge pull request #477 from keep-network/stakedrop-demo
stakedrop-demo material Material used for the stakedrop-demo. Includes accounts, files, and documentation that describes the steps taken.
2 parents fa41dbc + 5602f84 commit 198fd21

5 files changed

Lines changed: 148 additions & 0 deletions

File tree

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Stakedrop Demo Activity Log
2+
3+
This activty log contains step-by-step actions to go from a new Ethereum account to running a staked keep-ecdsa-client on the Ropsten testnet.
4+
5+
6+
## Things You Need
7+
8+
. Text editor.
9+
. An internet connection.
10+
. https://metamask.io/[Metamask] and compatible web browser. (Chrome, Firefox, Brave).
11+
. An Ethereum account with keyfile and password for the account. https://geth.ethereum.org/docs/install-and-build/installing-geth[Geth] was used with this demo.
12+
. Some amount of Ropsten ETH. https://faucet.metamask.io/[Metamask faucet].
13+
. https://docs.docker.com/get-docker/[Docker].
14+
15+
16+
## Activity Log
17+
18+
. **Create stakedrop-demo directory**
19+
.. `mkdir -p stakedrop-demo/config stakedrop-demo/persistence`
20+
21+
. **Create keep-ecdsa-client files**
22+
.. `cd stakedrop-demo/config`
23+
.. `touch config.toml keep-ecdsa-operator-account-address.txt keep-ecdsa-operator-account-keyfile keep-ecdsa-operator-account-password.txt`
24+
... Final directory structure:
25+
26+
.
27+
├── config
28+
│ ├── config.toml
29+
│ ├── keep-ecdsa-operator-account-address.txt
30+
│ ├── keep-ecdsa-operator-account-keyfile
31+
│ └── keep-ecdsa-operator-account-password.txt
32+
└── persistence
33+
2 directories, 4 files
34+
35+
. **Create ETH account**
36+
.. Put your account password in the `keep-ecdsa-operator-account-password.txt` file created in step 2. Put just the password text on the first line, no other comments in the file.
37+
.. `cd stakedrop-demo/config`
38+
.. `geth account new --keystore . --password keep-ecdsa-operator-account-password.txt`
39+
.. Copy generated account address to file `keep-ecdsa-operator-account-address.txt`. Prefix the output address with `0x`.
40+
... `0x91c9122ee29ab47908f00dc2cafaa41454f1722f`
41+
42+
.. Copy generated keyfile (`UTC--...`) to file `keep-ecdsa-operator-account-keyfile`.
43+
... `cp UTC--2020-06-07T18-07-48.709606000Z--91c9122ee29ab47908f00dc2cafaa41454f1722f keep-ecdsa-operator-account-keyfile`
44+
45+
. **Import your account into Metamask**
46+
.. https://metamask.zendesk.com/hc/en-us/articles/360015489331-Importing-an-Account[ Visual Instructions]
47+
.. Select `JSON File` as import option.
48+
.. Choose the `keep-ecdsa-operator-account-keyfile` prepared earlier as the JSON file.
49+
.. Copy/Paste the password in `keep-ecdsa-operator-account-password.txt`.
50+
51+
. **Get a KEEP token grant**
52+
.. https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc#72-testnet[Documentation]
53+
.. `https://us-central1-keep-test-f3e0.cloudfunctions.net/keep-faucet-ropsten?account=0x91c9122ee29ab47908f00dc2cafaa41454f1722f` From Browser. Results in Ethereum transaction.
54+
... Expected Output:
55+
56+
Created token grant with 300000000000000000000000 KEEP for account: 0x91c9122ee29ab47908f00dc2cafaa41454f1722f
57+
You can follow the transaction at https://ropsten.etherscan.io/tx/0x71129ec72b54529ee96298a87a734df3275baf92b918d6d48b6b8394ef2addc7
58+
You can manage your token grants at: https://dashboard.test.keep.network.
59+
You can find us on Discord at: https://discord.gg/jqxBU4m.
60+
61+
. **Delegate a stake from your grant**
62+
.. https://keep-network.gitbook.io/staking-documentation/how-to-stake/how-to-get-staking-after-tge[Visual Instructions]
63+
.. https://dashboard.test.keep.network
64+
.. Log in via metamask
65+
.. Select your account imported in the previous step
66+
.. Delegate at least `100k` KEEP with `authorizer`, `beneficiary`, `operator` set as your generated account from step 3. Results in Ethereum transaction.
67+
68+
. **Authorize operator contracts**
69+
.. https://keep-network.gitbook.io/staking-documentation/how-to-stake/how-to-authorize-contracts[Visual Instructions]
70+
.. Click `Authorize` for `BondedECDSAKeepFactory`. Results in Ethereum Transaciton.
71+
.. Click `Authorize` for `TBTCSystem`. Results in Ethereum Transaction.
72+
73+
. **Add ETH for bondng**
74+
.. https://keep-network.gitbook.io/staking-documentation/how-to-stake/how-to-add-eth-for-bonding[Visual Instructions]
75+
.. Click `Add ETH`, add some nominal amount. `0.5` used for demo. Results in Ethereum Transaction.
76+
77+
. **Prepare `keep-ecdsa-client` configuration file**
78+
.. See https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc#application[Application Configuration] for template.
79+
.. Testnet contract addresses can be found https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc#723-contracts[here].
80+
.. See `/stakedrop-demo/config/config.toml` for prepared example.
81+
82+
. Get latest Ropsten keep-ecdsa-client Docker iamge
83+
.. `docker pull keepnetwork/keep-ecdsa-client:v1.0.0`
84+
85+
. **Start keep-ecdsa-client**
86+
.. cd `/stakedrop-demo`
87+
.. Run:
88+
```
89+
export KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD=$(cat ./config/keep-ecdsa-operator-account-password.txt)
90+
export KEEP_ECDSA_CONFIG_DIR=$(pwd)/config
91+
export KEEP_ECDSA_PERSISTENCE_DIR=$(pwd)/persistence
92+
93+
docker run \
94+
--entrypoint keep-ecdsa \
95+
--volume $KEEP_ECDSA_PERSISTENCE_DIR:/mnt/keep-ecdsa-client/persistence \
96+
--volume $KEEP_ECDSA_CONFIG_DIR:/mnt/keep-ecdsa-client/config \
97+
--env KEEP_ETHEREUM_PASSWORD=$KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD \
98+
--env LOG_LEVEL=info \
99+
-p 3919:3919 \
100+
keepnetwork/keep-ecdsa-client:v1.0.0 --config /mnt/keep-ecdsa-client/config/config.toml start
101+
```
102+
103+
104+
## Supporting Documents
105+
106+
- https://github.com/keep-network/keep-ecdsa/blob/master/docs/run-keep-ecdsa.adoc[Run Keep ECDSA]
107+
- https://keep-network.gitbook.io/staking-documentation/[KEEP staking guide]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This is a TOML configuration file.
2+
3+
# Connection details of ethereum blockchain.
4+
[ethereum]
5+
URL = "wss://eth-ropsten.ws.alchemyapi.io/v2/BfBlnbrARASF-TtU7Q3lcavbgnwW3ZDc"
6+
URLRPC = "https://eth-ropsten.alchemyapi.io/v2/BfBlnbrARASF-TtU7Q3lcavbgnwW3ZDc"
7+
8+
[ethereum.account]
9+
KeyFile = "/mnt/keep-ecdsa-client/config/keep-ecdsa-operator-account-keyfile"
10+
11+
# Addresses of contracts deployed on ethereum blockchain.
12+
[ethereum.ContractAddresses]
13+
BondedECDSAKeepFactory = "0x17caddf97a1d1123efb7b233cb16c76c31a96e02"
14+
15+
# Addresses of applications approved by the operator.
16+
[SanctionedApplications]
17+
Addresses = [
18+
"0x2b70907b5c44897030ea1369591ddcd23c5d85d6"
19+
]
20+
21+
[Storage]
22+
DataDir = "/mnt/keep-ecdsa-client/persistence"
23+
24+
[LibP2P]
25+
Peers = ["/dns4/bootstrap-1.ecdsa.keep.test.boar.network/tcp/4001/ipfs/16Uiu2HAmPFXDaeGWtnzd8s39NsaQguoWtKi77834A6xwYqeicq6N"]
26+
Port = 3919
27+
# Uncomment to override the node's default addresses announced in the network
28+
AnnouncedAddresses = []
29+
30+
[TSS]
31+
# Timeout for TSS protocol pre-parameters generation. The value
32+
# should be provided based on resources available on the machine running the client.
33+
# This is an optional parameter, if not provided timeout for TSS protocol
34+
# pre-parameters generation will be set to `2 minutes`.
35+
PreParamsGenerationTimeout = "2m30s"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS FOR DEMO PURPOSES ONLY
2+
# DO NOT USE THIS ACCOUNT EVERYONE HAS ACCESS
3+
4+
0x91c9122ee29ab47908f00dc2cafaa41454f1722f
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"address":"91c9122ee29ab47908f00dc2cafaa41454f1722f","crypto":{"cipher":"aes-128-ctr","ciphertext":"a164cc5264e825db37ec880a0be09a3664ce996445d8cf80e018d577be870790","cipherparams":{"iv":"7f0b2a86d76b386905e5ece81eb15869"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"c4a8ffd814c6b7ec5b598ef56ae9952bb8e5859e2f827b2ae06c6972aeccef6b"},"mac":"5406ad0c938ca1682b5639636cf63cd105499d15ca8e0b27b2bfb1ff1d57592b"},"id":"5a5825fe-c493-4d58-8476-297296217a88","version":3}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
awkward castle pistol toss belt try ritual jar stage twenty firm trigger

0 commit comments

Comments
 (0)