From fad821870415b9e19827386135d482e6a3e3a305 Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:13:42 +0200 Subject: [PATCH 1/8] stateSyncLava.ts created --- src/components/SelectPaste/stateSyncLava.ts | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/components/SelectPaste/stateSyncLava.ts diff --git a/src/components/SelectPaste/stateSyncLava.ts b/src/components/SelectPaste/stateSyncLava.ts new file mode 100644 index 00000000..89829005 --- /dev/null +++ b/src/components/SelectPaste/stateSyncLava.ts @@ -0,0 +1,22 @@ +export const stateSync = `sudo systemctl stop lavad + +cp $HOME/.lava/data/priv_validator_state.json $HOME/.lava/priv_validator_state.json.backup +lavad tendermint unsafe-reset-all --home $HOME/.lava --keep-addr-book + +CUSTOM_RPC="{{endpoint}}" + +LATEST_HEIGHT=$(curl -s $CUSTOM_RPC/block | jq -r .result.block.header.height) +BLOCK_HEIGHT=$((LATEST_HEIGHT - 1500)) +TRUST_HASH=$(curl -s "$CUSTOM_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) + +echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH + +sed -i 's|^enable *=.*|enable = true|' $HOME/.lava/config/config.toml +sed -i 's|^rpc_servers *=.*|rpc_servers = "'$CUSTOM_RPC,$CUSTOM_RPC'"|' $HOME/.lava/config/config.toml +sed -i 's|^trust_height *=.*|trust_height = '$BLOCK_HEIGHT'|' $HOME/.lava/config/config.toml +sed -i 's|^trust_hash *=.*|trust_hash = "'$TRUST_HASH'"|' $HOME/.lava/config/config.toml + +mv $HOME/.lava/priv_validator_state.json.backup $HOME/.lava/data/priv_validator_state.json + +sudo systemctl restart lavad +sudo journalctl -fu lavad -o cat`; From bb7986aaeb88c5a8c486c4bf39b9b8e77427e619 Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:19:24 +0200 Subject: [PATCH 2/8] state-sync.mdx created --- docs/lava-network/sync/state-sync.mdx | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docs/lava-network/sync/state-sync.mdx diff --git a/docs/lava-network/sync/state-sync.mdx b/docs/lava-network/sync/state-sync.mdx new file mode 100644 index 00000000..1f7d569b --- /dev/null +++ b/docs/lava-network/sync/state-sync.mdx @@ -0,0 +1,28 @@ +--- +sidebar_position: 2 +description: State Sync +--- + +# State Sync + +> State Sync allows new nodes to join a blockchain network by downloading a recent snapshot of the application state instead of processing all historical blocks. This approach is typically faster and requires less data, as the application state is usually more concise than the entire block history. + +import SelectPaste from '@site/src/components/SelectPaste'; + +import { stateSync } from '@site/src/components/SelectPaste/stateSyncLava.ts'; + +export let endpoints = [ + 'https://lava.rpc.t.anode.team', + 'https://rpc.lava-testnet-2.lava.aviaone.com', + 'https://lava-testnet-rpc.itrocket.net:443', + 'https://lava-testnet.rpc.kjnodes.com', + 'https://t-lava.rpc.utsa.tech', + 'https://lava.rpc.liveraven.net', + 'https://lava-testnet.nodejumper.io:443', + 'https://rpc-t.lava.nodestake.top', + 'https://rpc.lava-t.nodexcapital.com', + 'https://lava-testnet-rpc.polkachu.com', + 'https://lava-testnet.rpc.stakevillage.net:443', +]; + + From 259e85a3d36c28cefddb47da0c6aa87c046e0ea0 Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:34:10 +0200 Subject: [PATCH 3/8] peers-seeds.mdx created --- docs/lava-network/sync/peers-seeds.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/lava-network/sync/peers-seeds.mdx diff --git a/docs/lava-network/sync/peers-seeds.mdx b/docs/lava-network/sync/peers-seeds.mdx new file mode 100644 index 00000000..952cf99e --- /dev/null +++ b/docs/lava-network/sync/peers-seeds.mdx @@ -0,0 +1,12 @@ +--- +sidebar_position: 3 +description: Live Peers / Seeds +--- + +# Live Peers / Seeds + +> When you start a node, you often need to connect to the network. This requires you to connect to one or more peers to start downloading the blockchain and receiving new blocks and transactions. Seeding nodes or bootstrap nodes help in this initial connection process. + +:::info +Copy and run the commands below to add your peers into `config.toml`. +::: From 551caaafa2216782bb574c8b133db1fb7c1a163a Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:37:07 +0200 Subject: [PATCH 4/8] =?UTF-8?q?addrbook.mdx=20=D1=81reated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/lava-network/sync/addrbook.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/lava-network/sync/addrbook.mdx diff --git a/docs/lava-network/sync/addrbook.mdx b/docs/lava-network/sync/addrbook.mdx new file mode 100644 index 00000000..c1122cc6 --- /dev/null +++ b/docs/lava-network/sync/addrbook.mdx @@ -0,0 +1,8 @@ +--- +sidebar_position: 4 +description: AddrBook +--- + +# AddrBook + +> Address book refers to a local database or record that a node maintains of all the peers it has come into contact with or learned about. This helps in the peer discovery process. From be5f51d77f6658b0426afce9b5547d99ed2ed7b6 Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:38:05 +0200 Subject: [PATCH 5/8] _category_.json created --- docs/lava-network/useful-tools/_category_.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 docs/lava-network/useful-tools/_category_.json diff --git a/docs/lava-network/useful-tools/_category_.json b/docs/lava-network/useful-tools/_category_.json new file mode 100644 index 00000000..289b79ac --- /dev/null +++ b/docs/lava-network/useful-tools/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Useful tools", + "position": 3 +} From 8012355a1c712921959d375501ece78e39541d13 Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:39:31 +0200 Subject: [PATCH 6/8] explorers.md created --- docs/lava-network/useful-tools/explorers.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/lava-network/useful-tools/explorers.md diff --git a/docs/lava-network/useful-tools/explorers.md b/docs/lava-network/useful-tools/explorers.md new file mode 100644 index 00000000..de1da2d6 --- /dev/null +++ b/docs/lava-network/useful-tools/explorers.md @@ -0,0 +1,10 @@ +--- +sidebar_position: 1 +description: Explorers +--- + +# Explorers + +> A block explorer is a search engine that allows users to access and explore the contents of individual blocks, transactions, validators, and addresses on a blockchain. It provides a visual interface to navigate the intricate details of blockchain operations. + +### There are a number of explorers that you can use for Lava Network: From 61879959b10230f120c017b10f523a2c27b1a03e Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:40:22 +0200 Subject: [PATCH 7/8] telegram-bots.md created --- docs/lava-network/useful-tools/telegram-bots.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/lava-network/useful-tools/telegram-bots.md diff --git a/docs/lava-network/useful-tools/telegram-bots.md b/docs/lava-network/useful-tools/telegram-bots.md new file mode 100644 index 00000000..e30b5b83 --- /dev/null +++ b/docs/lava-network/useful-tools/telegram-bots.md @@ -0,0 +1,8 @@ +--- +sidebar_position: 2 +description: Telegram Bots +--- + +# Telegram Bots + +> Telegram bots are designed to monitor nodes, provide real-time alerts and health statistics. Bots deliver instant notifications on server downtimes, resource usage, or governance proposals, enabling administrators to act swiftly in response to any anomalies. From bd30f1ab390893e60422b44bf7e89ccd43aa5a67 Mon Sep 17 00:00:00 2001 From: redwest88 <71982739+redwest88@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:40:59 +0200 Subject: [PATCH 8/8] other-tools.md created --- docs/lava-network/useful-tools/other-tools.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/lava-network/useful-tools/other-tools.md diff --git a/docs/lava-network/useful-tools/other-tools.md b/docs/lava-network/useful-tools/other-tools.md new file mode 100644 index 00000000..12cab952 --- /dev/null +++ b/docs/lava-network/useful-tools/other-tools.md @@ -0,0 +1,6 @@ +--- +sidebar_position: 3 +description: Other-tools +--- + +# Other Tools