Skip to content

Instantly share code, notes, and snippets.

View prestonvanloon's full-sized avatar
⛓️
Buidl ETH2

Preston Van Loon prestonvanloon

⛓️
Buidl ETH2
View GitHub Profile

Proxmox with LVM-thin and why we should use Trim/Discard

Excerpts from the Proxmox VE Administration Guide]

LVM normally allocates blocks when you create a volume. LVM thin pools instead allocates blocks when they are written. This behaviour is called thin-provisioning, because volumes can be much larger than physically available space.

8.10.2. Trim/Discard It is good practice to run fstrim (discard) regularly on VMs and containers. This releases data blocks that the filesystem isn’t using anymore. It reduces data usage and resource load. Most modern operating systems issue such discard commands to their disks regularly. You only need to ensure that the Virtual Machines enable the disk discard option.

@prestonvanloon
prestonvanloon / PVE-HP-ssacli-smart-storage-admin.md
Created January 20, 2022 20:34 — forked from mrpeardotnet/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@preston_vanloon's plugins

Be sure to watch the YouTube stream where we talk about how these plugins work in depth.

These two plugins helped me get into the top 10 of the dark forest score contest for v0.5.

auto-conquer is a plugin that would find the best planets to conquer. It is currently tweaked for late game, so you'll have to read the code and change parameters if you are just starting out!

auto-silver is a plugin to re-distribute silver mines to available planets. It's also tweaked for late game, ignoring silver mines with small amounts of silver.

@prestonvanloon
prestonvanloon / prysm.bat
Created November 13, 2020 17:11
Windows workaround for AMD processors. prysmaticlabs/prysm#7810
@echo off
SetLocal EnableDelayedExpansion & REM All variables are set local to this run & expanded at execution time rather than at parse time (tip: echo !output!)
set PRYLABS_SIGNING_KEY=0AE0051D647BA3C1A917AF4072E33E4DF1A5036E
REM Complain if invalid arguments were provided.
for %%a in (beacon-chain validator slasher) do (
if %1 equ %%a (
goto validprocess
[Unit]
Description=Prysm Beacon Chain
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=ubuntu
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //fuzz:block_fuzz_test_with_libfuzzer
-----------------------------------------------------------------------------
INFO: Seed: 781782552
INFO: Loaded 1 modules (69186 inline 8-bit counters): 69186 [0x2045cc8, 0x2056b0a),
INFO: Loaded 1 PC tables (69186 PCs): 69186 [0x2056b10,0x2164f30),
INFO: 26126 Extra Counters
INFO: 0 files found in /home/preston/.cache/bazel/_bazel_preston/6e220e5720b8243fd605645eb29a29ba/sandbox/linux-sandbox/819/execroot/prysm/bazel-out/k8-dbg/testlogs/fuzz/block_fuzz_test_with_libfuzzer/test.outputs
INFO: 606 files found in external/sigp_beacon_fuzz_corpora/0-11-0/mainnet/block_header
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 23427 bytes
@prestonvanloon
prestonvanloon / script.sh
Created April 15, 2020 02:24
Build instructions for ethereumapis and python
mkdir work
cd work
# Have the well known protos available somewhere on your system.
git clone git@github.com:googleapis/api-common-protos.git
# Have the ethereumapis repo somewhere on your system
git clone git@github.com:prysmaticlabs/ethereumapis.git
# Create some output directory
@prestonvanloon
prestonvanloon / prysm.sh
Last active March 8, 2020 20:53
Prysm launcher by downloading latest version binary
#!/bin/bash
set -eu
# Use this script to download the latest Prysm release binary.
# Usage: ./prysm.sh PROCESS FLAGS
# PROCESS can be one of beacon-chain or validator.
# FLAGS are the flags or arguments passed to the PROCESS.
# Downloaded binaries are saved to ./dist.
# Use USE_PRYSM_VERSION to specify a specific release version.
@prestonvanloon
prestonvanloon / linebreak.md
Last active December 7, 2019 18:44
Line breaks in markdown
[![Build status](https://badge.buildkite.com/62be08099e9e228b165c2dba69c637eb9ca7a1ca95efd54b9f.svg?branch=master)](https://buildkite.com/prysmatic-labs/ethereum-apis)
[![Discord](https://user-images.githubusercontent.com/7288322/34471967-1df7808a-efbb-11e7-9088-ed0b04151291.png)](https://discord.gg/KSA7rPr)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/prysmaticlabs/geth-sharding?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

This swagger site hosts the service interface definitions for the Ethereum Serenity JSON API.

## Service Overview

At the core of Ethereum Serenity lies the "Beacon Chain", a proof-of-stake based blockchain managing a set of validators and "shards" across a network, which are stateful, smaller blockchains used for transaction and smart contract execution. The Beacon Chain reconciles consensus results across shards to provide the backbone of Ethereum Serenity. The services below allow for retrieval of current and historical information relating t
OK - Two single attestations can be aggregated.
attestation_0: b00001000
attestation_1: b01000000
result: b01001000 OK!
OK - Two aggregated attestations with distinct bits (no overlap).
attestation_0: b00011010
attestation_1: b01000001
result: b01011011 OK!