### Loki Configuration Example Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Indicates the directory structure related to Loki, which serves as the log database. ```yaml loki/ -- log database ``` -------------------------------- ### Install SIG Service Source: https://github.com/syndica/sig/blob/main/ci/run-and-update-service/README.md Installs the SIG service, its update script, and systemd units. It also provides instructions for optional configuration editing and starting the service, including metrics and a periodic update timer. ```bash git clone https://github.com/Syndica/sig.git cd sig/ci/run-and-update-service sudo make install # install update script and systemd units to the system sudo vim /etc/sig.conf # optionally edit file to specify custom configuration sudo make start # start sig, metrics, and the timer to periodically update sig ``` -------------------------------- ### Alloy Configuration Example Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Highlights the directory for Alloy configurations, which is responsible for scraping logs and pushing them to Loki. ```yaml alloy/ -- this scrapes logs/ and pushes to loki ``` -------------------------------- ### Start Metrics Services with Docker Compose Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Starts all monitoring services (Grafana, Prometheus, Loki, Alloy) in detached mode using Docker Compose. Ensure Docker Compose is installed and you are in the 'src/metrics/' directory. ```bash docker compose up -d ``` -------------------------------- ### Prometheus Configuration Example Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Example Prometheus configuration file, typically named 'prometheus.yml', which defines scrape targets and other operational parameters for the Prometheus monitoring system. ```yaml prometheus/     └── prometheus.yml ``` -------------------------------- ### Docker Compose Configuration Example Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Illustrates the structure of a typical Docker Compose setup for monitoring services, including configurations for Prometheus, Grafana, Loki, and Alloy. ```yaml . ├── docker-compose.yml ├── alloy/ -- this scrapes logs/ and pushes to loki ├── loki/ -- log database ├── grafana/ │   └── dashboards/ -- this is where the sig dashboard lives (will need to copy .json export of dashboard from running container and push through git for any dashboard changes) │   └── datasources/ -- this points to prometheus docker ├── prometheus/ │   └── prometheus.yml └── README.md ``` -------------------------------- ### Install Dependencies (Yarn) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/README.md Installs project dependencies using Yarn. This is the first step before running any other commands. ```bash $ yarn ``` -------------------------------- ### Initialize and Start Gossip Service in Zig Source: https://github.com/syndica/sig/blob/main/src/gossip/README.md Demonstrates how to create and start the Solana gossip service using Zig. It outlines the necessary parameters such as allocators, contact information, keypair, entrypoints, and logger. The service can be started with options like `spy_node` and `dump`. ```Zig const service = try GossipService.create( // general allocator std.heap.page_allocator, // allocator specifically for gossip values std.heap.page_allocator, // information about the current node to share with the network (via gossip) contact_info, // keypair for signing messages my_keypair, // entrypoints to discover peers entrypoints, // logger logger, ); // start the gossip service (ie, spin up the threads // to process and generate messages) try service.start(.{ .spy_node = false, .dump = false, }); ``` -------------------------------- ### Expected Docker Processes Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Shows the expected output of 'docker ps' after successfully starting the monitoring services, listing the running containers for Prometheus, Grafana, Alloy, Loki, and node-exporter. ```bash $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 948f31ee975a prom/prometheus "/bin/prometheus --c…" 32 seconds ago Up 3 seconds 0.0.0.0:9090->9090/tcp, :::9090->9090/tcp prometheus adc6fb731842 grafana/grafana "/run.sh" 32 seconds ago Up 3 seconds 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp grafana e698bc98a061 grafana/alloy:v1.3.1 "/bin/alloy run --se…" 32 seconds ago Up 3 seconds 0.0.0.0:3200->3200/tcp, :::3200->3200/tcp alloy f774e615e5b1 grafana/loki:3.0.0 "/usr/bin/loki --con…" 32 seconds ago Up 3 seconds 0.0.0.0:3100->3100/tcp, :::3100->3100/tcp loki 27ee173b0491 prom/node-exporter "/bin/node_exporter" 32 seconds ago Up 3 seconds 0.0.0.0:9100->9100/tcp, :::9100->9100/tcp node-exporter ``` -------------------------------- ### Start Local Development Server (Yarn) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/README.md Starts a local development server for live previewing changes. The server automatically reloads upon file modifications. ```bash $ yarn start ``` -------------------------------- ### Initialize and Start Gossip Service in Zig Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/gossip.md Demonstrates how to create and start the GossipService in Zig. It requires allocators, contact information, a keypair, entrypoints, and a logger. The service can be started with options like 'spy_node' and 'dump'. ```Zig const service = try GossipService.create( // general allocator std.heap.page_allocator, // allocator specifically for gossip values std.heap.page_allocator, // information about the current node to share with the network (via gossip) contact_info, // keypair for signing messages my_keypair, // entrypoints to discover peers entrypoints, // logger logger, ); // start the gossip service (ie, spin up the threads // to process and generate messages) try service.start(.{ .spy_node = false, .dump = false, }); ``` -------------------------------- ### Zig Import Grouping and Aliasing Example Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/contributing/style-guide.mdx Provides an example of how to group import statements and alias definitions in Zig, categorizing them into @import statements, namespace aliases, struct aliases, function aliases, and constant aliases. It also shows the preferred ordering of external and SIG imports. ```Zig // Import statements const std = @import("std"); const sig = @import("../sig.zig"); // Namespace aliases const bincode = sig.bincode; const pull_request = sig.gossip.pull_request; const pull_response = sig.gossip.pull_response; // External aliases const EndPoint = network.EndPoint; const UdpSocket = network.Socket; const ArrayList = std.ArrayList; const AtomicBool = std.atomic.Value(bool); const KeyPair = std.crypto.sign.Ed25519.KeyPair; const Thread = std.Thread; // Sig aliases const Hash = sig.core.Hash; const Pubkey = sig.core.Pubkey; const Entry = sig.trace.entry.Entry; const Logger = sig.trace.log.Logger; const EchoServer = sig.net.echo.Server; const Packet = sig.net.Packet; ``` -------------------------------- ### Grafana Dashboard Configuration Example Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Indicates the location for Grafana dashboard JSON files. Changes to dashboards typically require exporting the current dashboard from a running container and committing the updated JSON file. ```yaml grafana/         └── dashboards/ -- this is where the sig dashboard lives (will need to copy .json export of dashboard from running container and push through git for any dashboard changes) ``` -------------------------------- ### Grafana Datasource Configuration Example Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Specifies the configuration directory for Grafana datasources, which typically point to the Prometheus Docker container for data retrieval. ```yaml grafana/         └── datasources/ -- this points to prometheus docker ``` -------------------------------- ### Enable Profiling with SIG_PID Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Starts the Docker Compose services while enabling profiling for the 'sig' process. This requires identifying the process ID (PID) of the 'sig' application. ```bash SIG_PID=$(pgrep sig) docker compose up -d ``` -------------------------------- ### Start Sig Validator Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/run.mdx Starts the Sig validator node. This command is subject to modifications as more validator components are developed. ```bash sig validator ``` -------------------------------- ### Collect Sig Client Logs Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Collects logs from the running sig client, pipes them to 'logs/sig.log', and also displays them in the terminal. This is useful for monitoring and debugging. ```bash ./zig-out/bin/sig gossip -c testnet 2>&1 | tee -a logs/sig.log ``` -------------------------------- ### Zig Import Aliasing for Dependencies Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/contributing/style-guide.mdx Illustrates the convention for importing internal dependencies in Zig by defining aliases for fully qualified paths from the root module. This promotes clarity and maintainability. ```Zig const sig = @import("../sig.zig"); const GossipData = sig.gossip.data.GossipData; ``` -------------------------------- ### Leader Schedule Format Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/ledger.md Example format for the leader schedule, typically obtained from an RPC call. It lists slots and their corresponding public keys. ```Plain Text slot pubkey slot pubkey slot pubkey ``` -------------------------------- ### Zig Linter Command Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/contributing/style-guide.mdx Command to format Zig code using the zig fmt tool. This ensures code adheres to project linting standards. ```bash zig fmt ./ ``` -------------------------------- ### Configure Slack Alerts Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Sets up Slack notifications for error messages by defining the SLACK_WEBHOOK_URL environment variable in a '.env' file within the 'metrics' directory. This variable is then propagated to the Grafana container. ```env SLACK_WEBHOOK_URL=hooks.slack.com/services/AAA/BBB/CCC ``` -------------------------------- ### Build and Run Sig Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/introduction/introduction.mdx This command builds and runs the Sig Solana validator client with release-safe optimization. The `-- --help` flag is used to display the help message for the Sig executable. ```Bash zig build -Doptimize=ReleaseSafe sig -- --help ``` -------------------------------- ### Build and Run SIG (Production) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/build.mdx Builds the project in production mode and immediately runs the 'sig' binary with help flags in a single command. ```bash zig build -Doptimize=ReleaseSafe sig -- --help ``` -------------------------------- ### Run Sig CLI Help Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/run.mdx Displays the full list of commands and options available for the Sig CLI. This is the primary command to understand the tool's capabilities. ```bash ./zig-out/bin/sig --help ``` -------------------------------- ### Run SIG Binary Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/build.mdx Executes the 'sig' binary after building the project, displaying its help information. ```bash ./zig-out/bin/sig --help ``` -------------------------------- ### Run Fuzzing with Zig Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/accountsdb.md This snippet demonstrates how to build and run the fuzzing binary for the accounts database. It specifies the command to build the fuzzer and then execute it with optional seed and number of actions arguments. ```Bash zig build -Dno-run fuzz fuzz accountsdb ``` -------------------------------- ### Fuzz Gossip Service using Bash Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/gossip.md Instructions for building and running the gossip service fuzzing client using Zig. This involves building the project with a 'no-run' debug flag and then executing the fuzz command with specific arguments. ```Bash zig build -Dno-run fuzz fuzz gossip_service ``` -------------------------------- ### Uninstall SIG Service Source: https://github.com/syndica/sig/blob/main/ci/run-and-update-service/README.md Removes the SIG service, its update script, and systemd units from the system. ```bash sudo make uninstall ``` -------------------------------- ### Download Snapshot Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/run.mdx Downloads a snapshot of the AccountsDB from the network. Requires specifying a save location, network, trusted validators, and minimum download speed. ```bash sig download_snapshot \ # where to save snapshot -s test_data/tmp \ # use default testnet entrypoints for gossip -n testnet \ # pubkeys of validators who you trust --trusted-validator 3gxDv5XbkkXUiqKiqt5WbsfGN7i9GHB1xMWBqhg4UDzj \ # minimum MB/s speed when downloading snapshot --min-snapshot-download-speed 50 ``` -------------------------------- ### Stop Metrics Services with Docker Compose Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/metrics.md Stops all monitoring services managed by Docker Compose. Navigate to the 'src/metrics/' directory before executing this command. ```bash docker compose down ``` -------------------------------- ### Build Static Website Content (Yarn) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/README.md Generates the static website files, typically placed in a 'build' directory, ready for hosting. ```bash $ yarn build ``` -------------------------------- ### Initialize AccountsDB Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/accountsdb.md Initializes the AccountsDB struct with various configuration options including allocator, logger, snapshot directory, geyser writer, gossip view, index allocation strategy, and number of index shards. ```Zig var accounts_db = try AccountsDB.init(.{ .allocator = allocator, .logger = logger.unscoped(), // where we read the snapshot from .snapshot_dir = snapshot_dir, // optional geyser to stream accounts to .geyser_writer = options.geyser_writer, // gossip information for propogating snapshot info .gossip_view = if (options.gossip_service) |service| try AccountsDB.GossipView.fromService(service) else null, // to use disk or ram for the index .index_allocation = if (current_config.accounts_db.use_disk_index) .disk else .ram, // number of shards for the index .number_of_index_shards = current_config.accounts_db.number_of_index_shards, }); defer accounts_db.deinit(); ``` -------------------------------- ### Leader Schedule Format Source: https://github.com/syndica/sig/blob/main/src/ledger/README.md Example format for the leader schedule data, typically retrieved via an RPC call. It lists slots and their corresponding public keys. ```Text slot pubkey slot pubkey slot pubkey ``` -------------------------------- ### Build and Run Fuzzers (Basic) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/dev-tools/fuzzing.md Command to build the fuzz target and run it with a specified filter. This is the basic command for initiating a fuzzing session. ```bash zig build fuzz -- gossip_service ``` -------------------------------- ### Python Script for Unused Imports Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/contributing/style-guide.mdx Command to execute a Python script that removes unused imports from Zig source files. This helps maintain clean code. ```bash python remove_unused.py src/ ``` -------------------------------- ### Configure VS Code Launch Configuration for Debugging Zig Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/dev-tools/debugging.mdx This JSON configuration sets up a launch configuration for VS Code's CodeLLDB debugger to run and debug a Zig executable. It includes a pre-launch task to build the project. ```json { "version": "0.2.0", "configurations": [ { "type": "lldb", "request": "launch", "name": "Debug Gossip Mainnet", "program": "${workspaceFolder}/zig-out/bin/sig", "args": [ "gossip", "--network", "mainnet" ], "cwd": "${workspaceFolder}", "preLaunchTask": "zig build" } ] } ``` -------------------------------- ### Fuzz Gossip Table using Bash Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/gossip.md Instructions for building and running the gossip table fuzzing client using Zig. Similar to fuzzing the service, this requires building the project with a 'no-run' debug flag and then executing the fuzz command for the gossip table. ```Bash zig build -Dno-run fuzz fuzz gossip_table ``` -------------------------------- ### Zig Optional Value Handling Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/contributing/style-guide.mdx Demonstrates the convention for handling optional values in Zig, where optional values are prepended with 'maybe_' and unwrapping is done using the 'if (maybe_x) |x| {}' format. ```Zig fn do_something(maybe_foo: ?Foo) void { if (maybe_foo) |foo| { // do something with foo here } } ``` -------------------------------- ### BPF Loader Instruction Fixtures Source: https://github.com/syndica/sig/blob/main/conformance/scripts/failing.txt This snippet lists the fixture files for the BPF loader version 3 instructions. These files are used for testing the BPF loader functionality within the Syndica SIG project. ```bash instr/fixtures/bpf-loader-v3/003397ddd497928f8edfa0876065c2572c0d0b5a_3151071.fix instr/fixtures/bpf-loader-v3/01ac03511948cd709b7c3b590eaa4ce5e3682326_740997.fix instr/fixtures/bpf-loader-v3/029448e44b0b35ae8e117b4dc0c2a3fc402a6192_3508450.fix instr/fixtures/bpf-loader-v3/035031479e547f72d29e4ccdc374cdebed0dfa23_2960700.fix instr/fixtures/bpf-loader-v3/0561d2787ea9b5b56b0cde9b2bce701bab5f5714_519080.fix instr/fixtures/bpf-loader-v3/061da73f92210f1c96aa89e5d393fff0238e2066_3953328.fix instr/fixtures/bpf-loader-v3/06712a242da594867f84536148737442579d5747_935989.fix instr/fixtures/bpf-loader-v3/0693c9d57654ac65b74d8092eb30cad13ef2a890_2484163.fix instr/fixtures/bpf-loader-v3/070af7b06c739995f4df6f4294b8524347a4adbf_3140159.fix instr/fixtures/bpf-loader-v3/086ba8cd7adfd9f9669ceddf0ee90f0ac18163c1_455071.fix instr/fixtures/bpf-loader-v3/09dd993d36d1b9bcdf424eb09bd75173d629c01d_804396.fix instr/fixtures/bpf-loader-v3/0af2cef3bfeb7a7cbe2f7f182497ac9e1b2ff230_583161.fix instr/fixtures/bpf-loader-v3/0c589a970df9da2b1d716d00bbcc5fb1628a2b88_3437500.fix instr/fixtures/bpf-loader-v3/0e1f1aa3de3fdfc570b56ea74ee7342d484d_1384527.fix instr/fixtures/bpf-loader-v3/0ea6e7a85f258a197813b79533184c441cd8e794_3884204.fix instr/fixtures/bpf-loader-v3/0ec6c29335cea22fd1234e52b07aed3334dade20_76711.fix instr/fixtures/bpf-loader-v3/0fcb406f0b8c541dbac20309c87f958b8a8f810f_1342477.fix instr/fixtures/bpf-loader-v3/10cca82e0aa7a0c0fe3e844d0fb1a0463d3f92e9_1722562.fix instr/fixtures/bpf-loader-v3/10ce0f1e2afac040637b3140a02d42f8bc6ed169_1216261.fix instr/fixtures/bpf-loader-v3/1259ce2faebef809ff77fe1eec3c6ebbf91deaa4_2981145.fix instr/fixtures/bpf-loader-v3/13e6bcf60ae58e64817e371076204f1913cea052_839748.fix instr/fixtures/bpf-loader-v3/13ecc78d4a6756e333ea9e0a7b1ab24477f003ad_486805.fix instr/fixtures/bpf-loader-v3/1483c9eb9b444f67103f83e34bf3ea95c22c2a24_2269092.fix instr/fixtures/bpf-loader-v3/15a0ce9105c0dc3270a450dcd15e018e3c94e327_3667689.fix instr/fixtures/bpf-loader-v3/1692c382d17b9364d976724b9f6382a7a503c017_1065890.fix instr/fixtures/bpf-loader-v3/17a1776743b4cb758577226c566b8abc83cabf53_2185761.fix instr/fixtures/bpf-loader-v3/18b838f928d6a80e3486d740228640a9d99a84d5_2822461.fix instr/fixtures/bpf-loader-v3/18ba1c2c629bf71f74150dacde69f4aeaf239838_2588961.fix instr/fixtures/bpf-loader-v3/1964018eb1f599212fa4abdfd5c7ca96628c3694_2313944.fix instr/fixtures/bpf-loader-v3/19e1d73c50fdcd3b98a3afbbb90750f80fce63e7_3692555.fix instr/fixtures/bpf-loader-v3/1ae2d428489876b94ebe53b2e6e4303b96f0c06c_3476586.fix instr/fixtures/bpf-loader-v3/1b93658c5fd8ac325b07e4295e218ac307d53d17_4042466.fix instr/fixtures/bpf-loader-v3/1c485789e61d042032ab0496b625f43dfc37fda1_2612084.fix instr/fixtures/bpf-loader-v3/1c93723c9e2a5194dcc15cc70df8f0b934059eb4_1278955.fix instr/fixtures/bpf-loader-v3/1cd2a7826a8a3fdacb2b81a17ef1647887bf3dc5_3001165.fix instr/fixtures/bpf-loader-v3/1cf6542c2a2064a8df27bd81f84dfdb7249784dd_961960.fix instr/fixtures/bpf-loader-v3/1d217fe1b81a287b279ebbc1e6682de59f38fc91_1026095.fix instr/fixtures/bpf-loader-v3/1ea174962f757d23386cb57629afe63f9f225876_2916905.fix instr/fixtures/bpf-loader-v3/205bf3dfe660ee6df666b80fb9d3fa290399d8e4_2263088.fix instr/fixtures/bpf-loader-v3/2125c3d3fe14bfd8c16eb06a40cb8a346a3131f7_1672411.fix ``` -------------------------------- ### Fuzzing the Gossip Service with Zig Source: https://github.com/syndica/sig/blob/main/src/gossip/README.md Provides instructions on how to build and run fuzzing tests for the Solana gossip service using Zig. This involves building the project with a specific flag and then executing the fuzzing command with seed and action count parameters. ```Bash zig build -Dno-run fuzz fuzz gossip_service ``` -------------------------------- ### Get Sig Identity Public Key Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/run.mdx Retrieves and displays the public key associated with the Sig identity. Sig automatically generates a private key in `~/.sig/identity.key` on its first run if none exists. ```bash sig identity ``` -------------------------------- ### Build Project (Debug) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/build.mdx Builds all binaries in the project in debug mode using Zig. ```bash # debug mode zig build ``` -------------------------------- ### Dump Accounts to CSV using Geyser Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/geyser.md This command starts the Geyser reader to dump accounts into a CSV file. It can be used after enabling Geyser during snapshot validation. Optionally, it can filter accounts by owner. ```bash ./zig-out/bin/geyser csv ``` ```bash ./zig-out/bin/geyser csv -o dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH ``` -------------------------------- ### Generate Syndica SIG Documentation Source: https://github.com/syndica/sig/blob/main/docs/README.md This command generates the project's documentation. It should be executed from the 'docs/' directory. ```bash python generate.py ``` -------------------------------- ### Zig Method Parameter Convention Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/contributing/style-guide.mdx Demonstrates the convention for naming the first parameter of a method 'self' and using the struct name as its type in Zig. It also shows the alternative of using 'const Self = @This()' when the type name is unavailable. ```Zig const MyStruct = struct { state: u8, fn write(self: *MyStruct, new_state: u8) void { self.state = new_state; } }; ``` -------------------------------- ### Load AccountsDB from Snapshot Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/accountsdb.md Loads the AccountsDB from a snapshot using the `loadWithDefaults` method. This method takes parameters for the allocator, manifest, number of threads, validation flag, accounts per file estimate, and fastload/save options. ```Zig try accounts_db.loadWithDefaults( allocator, // this manifest contains the snapshot metadata for loading (e.g., slot, account files, etc.) combined_manifest, n_threads_snapshot_load, // bool flag to validate after loading options.validate_snapshot, // used for preallocation of the index current_config.accounts_db.accounts_per_file_estimate, // fastload/save options current_config.accounts_db.fastload, current_config.accounts_db.save_index, ); ``` -------------------------------- ### Deploy Website via SSH (Yarn) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/README.md Deploys the built website using SSH. This command builds the site and pushes it to the 'gh-pages' branch, suitable for GitHub Pages. ```bash $ USE_SSH=true yarn deploy ``` -------------------------------- ### Build Project (Production) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/usage/build.mdx Builds all binaries in the project in production mode with optimizations. ```bash # for proudction zig build -Doptimize=ReleaseSafe ``` -------------------------------- ### Run All Benchmarks (Zig) Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/dev-tools/benchmarks.md Executes all defined benchmarks in the project. This is the primary command for a comprehensive benchmark run. ```bash zig build benchmark -- all ``` -------------------------------- ### Create Pubkey with Seed - Pubkey Utils Source: https://github.com/syndica/sig/blob/main/docs/docusaurus/docs/code/runtime.md The `pubkey_utils` module defines the `createWithSeed` method. This method generates a `Pubkey` from a given base, seed, and owner. It returns a `PubkeyError` on failure, which is then set as a custom error in the `TransactionContext` during program execution. ```Zig pubkey_utils.createWithSeed(base: Pubkey, seed: []const u8, owner: Pubkey) PubkeyError!Pubkey ``` -------------------------------- ### Sig Library Entrypoint (Zig) Source: https://github.com/syndica/sig/blob/main/README.md This snippet represents the main entrypoint for the Sig library, which is the core of the Solana validator client. It likely contains the fundamental logic and structures for validator operations. ```zig src/sig.zig # library entrypoint ```