From 6a9be054677bdd1c8afda43f56cf95b9cfcaa3f5 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 24 May 2024 13:18:28 -0700 Subject: [PATCH 1/3] doc tweaks --- pages/dev-advanced-concepts/_meta.json | 1 - .../interoperability/introduction.mdx | 46 +++++++++++++++++++ .../pointer-contracts.mdx | 0 pages/dev-tutorials/_meta.json | 1 - pages/dev-tutorials/cosmwasm-general.mdx | 10 ++-- pages/dev-tutorials/evm-general.mdx | 14 +++--- pages/dev-tutorials/interoperability.mdx | 38 --------------- pages/dev-tutorials/pointer-contracts.mdx | 9 ++-- 8 files changed, 62 insertions(+), 57 deletions(-) delete mode 100644 pages/dev-advanced-concepts/pointer-contracts.mdx delete mode 100644 pages/dev-tutorials/interoperability.mdx diff --git a/pages/dev-advanced-concepts/_meta.json b/pages/dev-advanced-concepts/_meta.json index 6705f8e..c167fc3 100644 --- a/pages/dev-advanced-concepts/_meta.json +++ b/pages/dev-advanced-concepts/_meta.json @@ -8,6 +8,5 @@ "hd-path-coin-types": "HD Path & Coin Types", "proposals": "Proposals", "evm-rpc-endpoints": "EVM RPC Endpoints", - "pointer-contracts": "EVM Pointer Contracts", "interoperability": "Interoperability" } diff --git a/pages/dev-advanced-concepts/interoperability/introduction.mdx b/pages/dev-advanced-concepts/interoperability/introduction.mdx index e69de29..451b5ba 100644 --- a/pages/dev-advanced-concepts/interoperability/introduction.mdx +++ b/pages/dev-advanced-concepts/interoperability/introduction.mdx @@ -0,0 +1,46 @@ +import {ImageWithCaption} from "../../../components/ImageWithCaption"; + +import interoperability from '../../../public/assets/interoperability.png'; + +# EVM version +Shanghai + +# EVM \<\> Wasm Interoperability +EVM and Cosmos based applications co-exist on Sei, but live in different execution environments. +This creates a challenge for users, who use wallets that typically only support a single execution environment. +Likewise for devlelopers, existing tooling and libraries can only interact with either EVM or Wasm (Think EthersJS vs CosmJS). + +To bridge the gap between EVM and Wasm, Sei has introduced novel interoperability features, allowing for smooth and easy interactions between both environments. +These features will enable all contracts deployed to Sei to be accessible by tools and wallets from both environments. + + + +## Precompiled Contracts + +Sei precompiles are smart contracts embedded directly within the Sei blockchain. They provide a gateway for users and developers to access native Sei functionalities through the EVM RPC interface. + +### Sei Precompiles + +The following is a list of precompiled contracts available on Sei: + +- [Addr](./precompiles/addr.mdx) +- [Bank](./precompiles/bank.mdx) +- [CosmWasm](./precompiles/cosmwasm.mdx) +- [Staking](./precompiles/staking.mdx) +- [Distribution](./precompiles/distribution.mdx) +- [IBC](./precompiles/ibc.mdx) +- [JSON](./precompiles/json.mdx) +- [Oracle](./precompiles/oracle.mdx) +- [Pointer](./precompiles/pointer.mdx) +- [PointerView](./precompiles/pointerview.mdx) +- [Governance](./precompiles/governance.mdx) + +For instructions on utilizing these precompiles, refer to the [Example Usage](./precompiles/example-usage.mdx) section. + +## Pointer Contracts + +Pointer Contracts are a unique feature introduced on Sei, designed to enhance interoperability between EVM and CosmWasm environments. +These contracts facilitate the creation of links between tokens across both EVM and CosmWasm. +This enables tokens to move smoothly and be used seamlessly in both environments. + +Learn more about Pointer Contracts and how to deploy them [here](../../dev-tutorials/pointer-contracts.mdx ). diff --git a/pages/dev-advanced-concepts/pointer-contracts.mdx b/pages/dev-advanced-concepts/pointer-contracts.mdx deleted file mode 100644 index e69de29..0000000 diff --git a/pages/dev-tutorials/_meta.json b/pages/dev-tutorials/_meta.json index f733444..aea031c 100644 --- a/pages/dev-tutorials/_meta.json +++ b/pages/dev-tutorials/_meta.json @@ -4,7 +4,6 @@ "cosmwasm-general": "CosmWasm (General)", "evm-general": "EVM (General)", "evm-cli": "EVM (CLI)", - "interoperability": "Interoperability", "token-factory-tutorial": "Token Factory", "nft-contract-tutorial": "NFT Contracts", "pointer-contracts": "Pointer Contracts", diff --git a/pages/dev-tutorials/cosmwasm-general.mdx b/pages/dev-tutorials/cosmwasm-general.mdx index 2629d69..4bef755 100644 --- a/pages/dev-tutorials/cosmwasm-general.mdx +++ b/pages/dev-tutorials/cosmwasm-general.mdx @@ -1,5 +1,5 @@ # CosmWasm (general) - +## Overview CosmWasm is a smart contract platform focusing on security, performance, and interoperability It is the only smart contracting platform for public blockchains with heavy adoption outside of the EVM world. Key features of CosmWasm are: @@ -16,11 +16,11 @@ CosmWasm runs the Web Assembly, Wasm virtual machine guarantees high performance CosmWasm was built for multi-chain, cross-chain world, deeply integrated with IBC (Inter-blockchain communication). -# Smart contract language +## Smart contract language CosmWasm smart contracts are written in [Rust](https://www.rust-lang.org/) programming language. Here’s a good reference if you would like to make a [deep dive](https://doc.rust-lang.org/book/). -## Rust +### Rust Why Rust? @@ -30,7 +30,7 @@ Why Rust? **Productivity.** Rust has great documentation, a friendly compiler with useful error messages, and top-notch tooling — an integrated package manager and build tool, smart multi-editor support with auto-completion and type inspections, an auto-formatter, and more. -### Example CosmWasm smart contract +#### Example CosmWasm smart contract ```rust // cosmwasm_std is a standard library for smart contracts. @@ -101,7 +101,7 @@ pub fn query( } ``` -# Deploying a smart contract on Sei +## Deploying a smart contract on Sei Let’s create a simple smart contract project from template. diff --git a/pages/dev-tutorials/evm-general.mdx b/pages/dev-tutorials/evm-general.mdx index 8447679..8c5481c 100644 --- a/pages/dev-tutorials/evm-general.mdx +++ b/pages/dev-tutorials/evm-general.mdx @@ -1,5 +1,5 @@ # EVM (general) - +## Overview The Ethereum Virtual Machine (EVM) is the runtime environment for smart contracts, enabling compatibility with Ethereum-based dApps. Sei is an EVM compatible blockchain. Sei's parallelized EVM ensures high performance and efficiency. Here are some key points about the EVM: @@ -8,11 +8,11 @@ Here are some key points about the EVM: 2. **Gas**: Transactions and contract executions on the EVM compatible network consume gas. Gas is a measure of computational work, and users pay for it in usei on Sei networks . Gas ensures that malicious or inefficient code doesn’t overload the network. 3. **Bytecode Execution**: Smart contracts are compiled into bytecode (low-level machine-readable instructions) and deployed to the EVM compatible network. The EVM executes this bytecode. -# Smart contract languages +## Smart contract languages The two most popular languages for developing smart contracts on the EVM are **Solidity** and **Vyper**. -## Solidity +### Solidity - Object-oriented, high-level language for implementing smart contracts. - Curly-bracket language that has been most profoundly influenced by C++. @@ -23,7 +23,7 @@ The two most popular languages for developing smart contracts on the EVM are **S - Complex user-defined types. -### Example solidity contract +#### Example solidity contract ```solidity // SPDX-License-Identifier: GPL-3.0 @@ -64,7 +64,7 @@ contract Coin { } ``` -## Vyper +### Vyper - Pythonic programming language - Strong typing @@ -80,7 +80,7 @@ contract Coin { - Infinite-length loops - Binary fixed points -### Example Vyper contract +#### Example Vyper contract ```python # Open Auction @@ -167,7 +167,7 @@ contract Coin { send(self.beneficiary, self.highestBid) ``` -# Deploying EVM contract on Sei +## Deploying EVM contract on Sei Since Sei is an EVM compatible chain, existing EVM tooling like [hardhat](https://hardhat.org/), [foundry forge](https://book.getfoundry.sh/) or other could be re-used. diff --git a/pages/dev-tutorials/interoperability.mdx b/pages/dev-tutorials/interoperability.mdx deleted file mode 100644 index 73974b6..0000000 --- a/pages/dev-tutorials/interoperability.mdx +++ /dev/null @@ -1,38 +0,0 @@ -import {ImageWithCaption} from "../../components/ImageWithCaption"; - -[//]: # (import interoperability from '../assets/interoperability.png';) - -# EVM version -Shanghai - -# EVM \<\> Wasm Interoperability -EVM and Cosmos based applications co-exist on Sei, but live in different execution environments. -This creates a challenge for users, who use wallets that typically only support a single execution environment. -Likewise for devlelopers, existing tooling and libraries can only interact with either EVM or Wasm (Think EthersJS vs CosmJS). - -To bridge the gap between EVM and Wasm, Sei has introduced novel interoperability features, allowing for smooth and easy interactions between both environments. -These features will enable all contracts deployed to Sei to be accessible by tools and wallets from both environments. - -[//]: # () - -## Precompiled Contracts - -Sei precompiles are smart contracts embedded directly within the Sei blockchain. They provide a gateway for users and developers to access native Sei functionalities through the EVM RPC interface. - -### Sei Precompiles - -The following is a list of precompiled contracts available on Sei: - -- [CosmWasm](./precompiles/cosmwasm.mdx) -- [Staking](./precompiles/staking.mdx) -- [Governance](./precompiles/governance.mdx) - -For instructions on utilizing these precompiles, refer to the [Example Usage](./precompiles/example-usage.mdx) section. - -## Pointer Contracts - -Pointer Contracts are a unique feature introduced on Sei, designed to enhance interoperability between EVM and CosmWasm environments. -These contracts facilitate the creation of links between tokens across both EVM and CosmWasm. -This enables tokens to move smoothly and be used seamlessly in both environments. - -Learn more about Pointer Contracts and how to deploy them [here](./pointer-contracts.mdx). diff --git a/pages/dev-tutorials/pointer-contracts.mdx b/pages/dev-tutorials/pointer-contracts.mdx index aafc532..1cfd72d 100644 --- a/pages/dev-tutorials/pointer-contracts.mdx +++ b/pages/dev-tutorials/pointer-contracts.mdx @@ -1,9 +1,8 @@ import { Callout } from "nextra/components"; -import { ImageWithCaption } from "../../../components"; -import PointerContractsWithout from "../../../public/assets/pointer-contracts-without.png"; -import PointerContractsSimplified from "../../../public/assets/pointer-contracts-simplified.png"; -import HowItWorks from "../../../public/assets/pointer-contracts-how-it-works.png"; -import addressTranslationImage from "../../../public/assets/address-derivation.png"; +import { ImageWithCaption } from "../../components"; +import PointerContractsWithout from "../../public/assets/pointer-contracts-without.png"; +import PointerContractsSimplified from "../../public/assets/pointer-contracts-simplified.png"; +import HowItWorks from "../../public/assets/pointer-contracts-how-it-works.png"; # Pointer Contracts From fb36f9d24fae80a4baaa1beef4368d1fda273ee6 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 24 May 2024 13:25:00 -0700 Subject: [PATCH 2/3] fix broken links --- pages/dev-tutorials/_meta.json | 4 ++-- pages/dev-tutorials/nft-contract-tutorial.mdx | 2 +- pages/dev-tutorials/tokenfactory-tutorial.mdx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/dev-tutorials/_meta.json b/pages/dev-tutorials/_meta.json index aea031c..31a9767 100644 --- a/pages/dev-tutorials/_meta.json +++ b/pages/dev-tutorials/_meta.json @@ -3,8 +3,8 @@ "building-a-frontend": "Building a frontend", "cosmwasm-general": "CosmWasm (General)", "evm-general": "EVM (General)", - "evm-cli": "EVM (CLI)", - "token-factory-tutorial": "Token Factory", + "evm-cli-tutorial": "EVM (CLI)", + "tokenfactory-tutorial": "Token Factory", "nft-contract-tutorial": "NFT Contracts", "pointer-contracts": "Pointer Contracts", "multi-sig-accounts": "Multi-Sig Accounts", diff --git a/pages/dev-tutorials/nft-contract-tutorial.mdx b/pages/dev-tutorials/nft-contract-tutorial.mdx index 4b04480..f955194 100644 --- a/pages/dev-tutorials/nft-contract-tutorial.mdx +++ b/pages/dev-tutorials/nft-contract-tutorial.mdx @@ -1,5 +1,5 @@ import { Callout, Tabs } from "nextra/components"; -import { HelpCallout, Nfts } from "../../../components"; +import { HelpCallout, Nfts } from "../../components"; # NFT Contract Tutorial diff --git a/pages/dev-tutorials/tokenfactory-tutorial.mdx b/pages/dev-tutorials/tokenfactory-tutorial.mdx index 53cf395..373ae10 100644 --- a/pages/dev-tutorials/tokenfactory-tutorial.mdx +++ b/pages/dev-tutorials/tokenfactory-tutorial.mdx @@ -1,5 +1,5 @@ import { Callout } from "nextra/components"; -import { HelpCallout } from "../../../components"; +import { HelpCallout } from "../../components"; # Token Factory Tutorial From 0e3d8de01b1e5fb6265d77fa6ab059f77605d730 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 24 May 2024 15:02:42 -0700 Subject: [PATCH 3/3] fix formatting --- pages/dev-node/_meta.json | 2 +- pages/dev-node/join-a-network.mdx | 33 +++--- pages/dev-node/node-configuration.mdx | 24 ++-- pages/dev-node/running-seid.mdx | 160 ++++++++++---------------- pages/dev-resources/_meta.json | 2 +- 5 files changed, 97 insertions(+), 124 deletions(-) diff --git a/pages/dev-node/_meta.json b/pages/dev-node/_meta.json index 7564e7b..bf2785d 100644 --- a/pages/dev-node/_meta.json +++ b/pages/dev-node/_meta.json @@ -5,5 +5,5 @@ "node-configuration": "Node Configuration", "configure-general-settings": "Configure General Settings", "join-a-network": "Join a Network", - "running-seid": "Running seid CLI" + "running-seid": "Running Seid" } diff --git a/pages/dev-node/join-a-network.mdx b/pages/dev-node/join-a-network.mdx index 6fffd8a..43d1c6b 100644 --- a/pages/dev-node/join-a-network.mdx +++ b/pages/dev-node/join-a-network.mdx @@ -1,34 +1,38 @@ -Join a Network +## Join a Network Follow this guide to join an existing network through statesync To quickly stand up a fresh full node and join in the network, it's recommended to sync through state sync. If you want to run a local instance of Sei, see Running a Local Node -Install Seid Binary +## Install Seid Binary To stand up a sei node, the first step is to download and install seid on your machine. If you have not done so, follow the steps in Install Seid. -State Sync +### State Sync State sync allows a new node to join a network by fetching a snapshot of the application state at a recent height instead of fetching and replaying all historical blocks. This can reduce the time needed to sync with the network from days to minutes. -Clean Up +### Clean Up If you are not starting a node from fresh, then you need to do some backups and clean ups. -# Assuming your sei home directory is /root/.sei -# backup priv_validator_state.json +Assuming your sei home directory is `/root/.sei`, backup `priv_validator_state.json` +```bash cp /root/.sei/data/priv_validator_state.json /root/priv_validator_state.json - -# backup priv_validator_key.json +``` +backup `priv_validator_key.json` +```bash cp /root/.sei/config/priv_validator_key.json /root/priv_validator_key.json - -# backup genesis.json +``` +backup `genesis.json` +```bash cp /root/.sei/config/genesis.json /root/genesis.json rm -rf /root/.sei/data/* rm -rf /root/.sei/wasm rm -rf /root/.sei/config/priv_validator_key.json rm -rf /root/.sei/config/genesis.json Note: This step is not needed for fresh nodes. - -Update Configurations -Set up rpc servers for primary and secondary endpoints. You can use one of the RPC endpoints from the Tools and Resources page. +``` +### Update Configurations +Set up rpc servers for primary and secondary endpoints. You can use one of the RPC endpoints from the [RPC providers](../dev-ecosystem-providers/rpc-providers.mdx ) page. Set up trust height and trust hash. Each snapshot is created at a certain block height, and best practice here is to set the trust height to be earlier than the latest snapshot block height to avoid backward verifications. -# Example: set trust height and hash to be the block height 10,000 earlier + +#### Example: set trust height and hash to be the block height 10,000 earlier +```bash PRIMARY_ENDPOINT=https://sei-testnet-rpc.polkachu.com:443 TRUST_HEIGHT_DELTA=10000 @@ -65,3 +69,4 @@ Once you finished the above steps, if you previously have done the clean up step cp /root/priv_validator_state.json /root/.sei/data/priv_validator_state.json cp /root/priv_validator_key.json /root/.sei/config/priv_validator_key.json cp /root/genesis.json /root/.sei/config/genesis.json +``` \ No newline at end of file diff --git a/pages/dev-node/node-configuration.mdx b/pages/dev-node/node-configuration.mdx index 973131b..ac8d074 100644 --- a/pages/dev-node/node-configuration.mdx +++ b/pages/dev-node/node-configuration.mdx @@ -1,20 +1,23 @@ -Node types +## Node types + There are a few node types that can be run on Sei network which serve a variety of purposes. These include: -rpc / full nodes: these nodes are generally used for querying data or interacting with the chain. They maintain some state but not since genesis. The default settings will run rpc / full nodes. -archive nodes: maintain full state of the blockchain from genesis. Generally requires large disks. To enable this type of node, set min-retain-blocks=0 and pruning="nothing" in your app.toml -state sync nodes: provide snapshot data for other nodes to use to bootstrap onto the chain. To enable this type of node, set enable=true under the [statesync] section in config.toml -validator nodes: provide security to the chain by proposing and signing blocks. To enable this type of node, set mode=validator in config.toml. Note that because Sei is proof-of-stake, you must have enough delegation to join the active set +- rpc / full nodes: these nodes are generally used for querying data or interacting with the chain. They maintain some state but not since genesis. The default settings will run rpc / full nodes. +- archive nodes: maintain full state of the blockchain from genesis. Generally requires large disks. To enable this type of node, set min-retain-blocks=0 and pruning="nothing" in your app.toml +- state sync nodes: provide snapshot data for other nodes to use to bootstrap onto the chain. To enable this type of node, set enable=true under the [statesync] section in config.toml +- validator nodes: provide security to the chain by proposing and signing blocks. To enable this type of node, set mode=validator in config.toml. Note that because Sei is proof-of-stake, you must have enough delegation to join the active set Commonly Used Ports + Seid uses the following TCP ports. Toggle their settings to match your environment. -26656: The default port for the P2P protocol. This port is used to communicate with other nodes and must be open to join a network. -1317: The default port for interacting with the Seid API server for HTTP RESTful requests. This allows applications and services to interact with the seid instance through RPC. -26660: The default port for interacting with the Prometheus database, which can be used to monitor the environment. In the default configuration, this port is not open. -26657: The default port for the RPC protocol. Because this port is used for querying and sending transactions, it must be open for serving queries from seid. +- `26656`: The default port for the P2P protocol. This port is used to communicate with other nodes and must be open to join a network. +- `1317`: The default port for interacting with the Seid API server for HTTP RESTful requests. This allows applications and services to interact with the seid instance through RPC. +- `26660`: The default port for interacting with the Prometheus database, which can be used to monitor the environment. In the default configuration, this port is not open. +- `26657`: The default port for the RPC protocol. Because this port is used for querying and sending transactions, it must be open for serving queries from seid. These ports are all customizable in $HOME/.sei/config/config.toml and $HOME/.sei/config/app/toml discussed in the later sections along with other fields. -Systemd File Template +### Systemd File Template +```bash [Unit] Description=Sei Node After=network.target @@ -36,3 +39,4 @@ LimitNOFILE=65535 [Install] WantedBy=multi-user.target +``` \ No newline at end of file diff --git a/pages/dev-node/running-seid.mdx b/pages/dev-node/running-seid.mdx index a9b975c..12eeb41 100644 --- a/pages/dev-node/running-seid.mdx +++ b/pages/dev-node/running-seid.mdx @@ -1,40 +1,45 @@ -Running Seid +## Running Seid How to start and run seid on a full node -Prerequisites +### Prerequisites This section assumes that you have set up a full node, configured all settings and joined a network. -Run Seid + +### Run Seid You may run seid with +```bash seid start +``` If you want to see all the flags, you can use -> seid start --help +```bash +seid start --help +``` Run the full node application with Tendermint in or out of process. By default, the application will run with Tendermint in process. -Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent', -'pruning-keep-every', and 'pruning-interval' together. +Pruning options can be provided via the `--pruning` flag or alternatively with `--pruning-keep-recent`, +`--pruning-keep-every`, and `--pruning-interval` together. -For '--pruning' the options are as follows: +For `--pruning` the options are as follows: -default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals -nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -everything: all saved states will be deleted, storing only the current and previous state; pruning at 10 block intervals -custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' +- default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals +- nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) +- everything: all saved states will be deleted, storing only the current and previous state; pruning at 10 block intervals +- custom: allow pruning options to be manually specified through `--pruning-keep-recent`, `--pruning-keep-every`, and `--pruning-interval` -Node halting configurations exist in the form of two flags: '--halt-height' and '--halt-time'. During +Node halting configurations exist in the form of two flags: `--halt-height` and `--halt-time`. During the ABCI Commit phase, the node will check if the current block height is greater than or equal to the halt-height or if the current block time is greater than or equal to the halt-time. If so, the node will attempt to gracefully shutdown and the block will not be committed. In addition, the node will not be able to commit subsequent blocks. -For profiling and benchmarking purposes, CPU profiling can be enabled via the '--cpu-profile' flag +For profiling and benchmarking purposes, CPU profiling can be enabled via the `--cpu-profile` flag which accepts a path for the resulting pprof file. The node may be started in a 'query only' mode where only the gRPC and JSON HTTP -API services are enabled via the 'grpc-only' flag. In this mode, Tendermint is +API services are enabled via the `--grpc-only` flag. In this mode, Tendermint is bypassed and can be used when legacy queries are needed after an on-chain upgrade is performed. Note, when enabled, gRPC will also be automatically enabled. - +```bash Usage: seid start [flags] @@ -101,10 +106,12 @@ Global Flags: --log_format string The logging format (json|plain) --log_level string The logging level (trace|debug|info|warn|error|fatal|panic) --trace print out full stack trace on errors -Systemd -Seid should be running at all times, it's reccomended you register Seid as a systemd service so that it will be automatically restarted if your system reboots +``` +### Systemd +Seid should be running at all times, it's recommended you register Seid as a systemd service so that it will be automatically restarted if your system reboots -Create a definition file in /etc/systemd/system/seid.service +Create a definition file in `/etc/systemd/system/seid.service` +```bash [Unit] Description=Sei Node After=network.target @@ -129,83 +136,40 @@ LimitNOFILE=65535 [Install] WantedBy=multi-user.target - -Modify the file with the proper path and Network. - - Enter the path to the Seid executable. is likely /home//go/bin/seid or /usr/go/bin. Confirm this with whereis seid. - Enter the user (likely your username or root, unless you created a user specifically for Seid). - the Chain that this seid binary runs on - Make sure you made the correct edits to /etc/security/limits.conf. - Run systemctl daemon-reload followed by systemctl enable seid. This will register seid as a system service and run the program upon startup. - Controlling the service - Use systemctl to start, stop and restart the service. - - # Check health - systemctl status seid - # Start - systemctl start seid - # Stop - systemctl stop seid - # Restart - systemctl restart seid - Use journalctl -t to access entire logs, entire logs in reverse, and the latest and continuous log. - - # Entire log reversed - journalctl -t seid -r - # Entire log - journalctl -t seid - # Latest and continuous - journalctl -t seid -f - # Since 30 minutes ago - journalctl -t seid --since -30m - (Optional) Cosmovisor - You may also want to use Cosmovisor such that it's easier to manage upgrades, it's a wrapper around the default seid binary, to install it: - - curl -Ls https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.3.0/cosmovisor-v1.3.0-linux-amd64.tar.gz | tar xz - chmod 755 cosmovisor - sudo mv cosmovisor /usr/bin/cosmovisor - - sudo tee /etc/systemd/system/seid.service > /dev/null << EOF - [Unit] - Description=Sei Atlantic 2 Node Service - After=network-online.target - - [Service] - User=$USER - ExecStart=/usr/bin/cosmovisor run start - Restart=always - - # wait 30 seconds before restarting the service after it has failed. - RestartSec=30 - - # wait up to 30 seconds for the service to stop gracefully when it is being stopped. - TimeoutStopSec=30 - - # send the SIGINT signal (equivalent to pressing Ctrl-C) to the service process when it is being stopped - # giving it a chance to shut down gracefully. - KillSignal=SIGINT - - LimitNOFILE=65535 - Environment="DAEMON_HOME=$HOME/.sei" - Environment="DAEMON_NAME=seid" - Environment="UNSAFE_SKIP_BACKUP=true" - - [Install] - WantedBy=multi-user.target - EOF - - sudo systemctl daemon-reload - sudo systemctl enable seid - The folder layout is expected to be - - . - ├── current -> genesis or upgrades/ - ├── genesis - │ └── bin - │ └── $DAEMON_NAME - └── upgrades - └── - └── bin - └── $DAEMON_NAME - The cosmovisor/ directory includes a subdirectory for each version of the application (i.e. genesis or upgrades/). Within each subdirectory is the application binary (i.e. bin/$DAEMON_NAME) and any additional auxiliary files associated with each binary. current is a symbolic link to the currently active directory (i.e. genesis or upgrades/). The name variable in upgrades/ is the URI-encoded name of the upgrade as specified in the upgrade module plan. - - Please note that $DAEMON_HOME/cosmovisor only stores the application binaries. The cosmovisor binary itself can be stored in any typical location (e.g. /usr/local/bin). The application will continue to store its data in the default data directory (e.g. $HOME/.sei) or the data directory specified with the --home flag. $DAEMON_HOME is independent of the data directory and can be set to any location. If you set $DAEMON_HOME it to the same directory as the data directory, you will end up with a configuration like the following: +``` +Modify the file with the proper path and network. + +- `` - Enter the path to the Seid executable. `` is likely `/home//go/bin/seid` or `/usr/go/bin`. Confirm this with where is seid. +- `` Enter the user (likely your username or root, unless you created a user specifically for Seid). +- `` the Chain that this seid binary runs on + +Make sure you made the correct edits to `/etc/security/limits.conf`. +Run systemctl daemon-reload followed by systemctl enable seid. This will register seid as a system service and run the program upon startup. + +### Controlling the service +Use `systemctl` to start, stop and restart the service. +```bash + # Check health + systemctl status seid + # Start + systemctl start seid + # Stop + systemctl stop seid + # Restart + systemctl restart seid +``` +Use `journalctl -t` to access entire logs, entire logs in reverse, and the latest and continuous log. +```bash + # Entire log reversed + journalctl -t seid -r + # Entire log + journalctl -t seid + # Latest and continuous + journalctl -t seid -f + # Since 30 minutes ago + journalctl -t seid --since -30m +``` +### (Optional) Cosmovisor + +You may also want to use Cosmovisor such that it's easier to manage upgrades, it's a wrapper around the default seid +binary, to install it follow [Cosmosvisor Quick Start](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html) \ No newline at end of file diff --git a/pages/dev-resources/_meta.json b/pages/dev-resources/_meta.json index 44fa34a..3437af5 100644 --- a/pages/dev-resources/_meta.json +++ b/pages/dev-resources/_meta.json @@ -1,5 +1,5 @@ { "tools-and-resources": "Tools and Resources", - "precompiles": "EVM Precompile Contracts", + "resources": "Resources", "differences-with-ethereum": "Differences from Ethereum" }