Skip to content

Instantly share code, notes, and snippets.

View ilyar's full-sized avatar
🖖
this is the way

ilyar

🖖
this is the way
View GitHub Profile
@ilyar
ilyar / chksig_proposal.md
Created February 14, 2026 23:55 — forked from Rexagon/chksig_proposal.md
CHKSIG proposal

Draft

Improved signature verification for TON L2 networks

The appearance of new networks in which a user can reuse the same key for the same contracts carries new risks. The proposed solution allows using same keys and contracts across different L2 networks without worrying about new replay attacks, as the signatures themselves will be different everywhere and will depend on a unique network ID (later referred to as global_id).

Most contracts verify the signature of external message with CHKSIGNU or CHKSIGNS. Therefore, to minimize the number of any changes, we propose adding new behavior for these opcodes (enabled/disabled via capability). Fow now, this new behavior can only be implemented on the L2 side, however, it requires at least the reservation of three additional opcodes, which are needed for explicit verification of signatures with other ids.

VM state changes

@ilyar
ilyar / llama2-mac-gpu.sh
Created July 19, 2023 19:44 — forked from adrienbrault/llama2-mac-gpu.sh
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
wget "https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/resolve/main/${MODEL}"
@ilyar
ilyar / ShardedToken.sol
Created May 17, 2023 13:15 — forked from k06a/ShardedToken.sol
ShardedToken
contract ShardedToken {
using SafeMath for uint256;
address owner = msg.sender;
uint256 private _totalSupply;
mapping(address => ShardedToken.Extension) private extensions;
function register() public {
extensions[msg.sender] = new Token.Extension();
}
@ilyar
ilyar / bash_strict_mode.md
Created May 14, 2023 14:12 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@ilyar
ilyar / forth.v
Created April 16, 2023 04:41 — forked from siraben/forth.v
Small-step operational semantics of Forth in Coq
Set Warnings "-notation-overridden,-parsing".
From Coq Require Import Arith.Arith.
From Coq Require Import Arith.EqNat.
From Coq Require Import Init.Nat.
From Coq Require Import Lia.
From Coq Require Import Lists.List.
Import ListNotations.
From PLF Require Import Maps.
From PLF Require Import Smallstep.
Import Nat.
@ilyar
ilyar / how_to.txt
Created April 9, 2023 10:21 — forked from mnill/how_to.txt
// Запуск локального теснета с 6 валидаторами на одной машине, debian 11
// Лучше побольше цпу и диск от 200 гигабайт
// Зависимости
apt update
apt install jq build-essential git tmux
apt install libc6=2.31-13+deb11u4
apt-get install pkg-config libssl-dev libzstd-dev libclang-dev
apt-get install libgoogle-perftools-dev
// увеличиваем разрешенное количество открытых файлов/коннектов
@ilyar
ilyar / setup-everscale-env.md
Created April 13, 2022 13:06 — forked from qwadratic/setup-everscale-env.md
Everscale smart contract development environment setup
@ilyar
ilyar / minting-native-tokens-on-cardano.sh
Created March 26, 2021 12:54 — forked from ElGatoLoco/minting-native-tokens-on-cardano.sh
Mint native tokens on Cardano testnet using the node and cli that come with Daedalus
# This guide assumes that you're running MacOS and already have a fully synced Daedalus testnet wallet
# For mainnet some minor tweaks are required
# The line below assumes the default location for the testnet wallet at the time of writing this guide
# If your node socket is located somewhere else, you should be able to finding by inspecting the running processes on your machine
export CARDANO_NODE_SOCKET_PATH=~/Library/Application\ Support/Daedalus\ Testnet/cardano-node.socket
# Make testnet id available as environment variable; not needed for the mainnet
# This one is active at the time of writing this guide
export TESTNET_ID=1097911063
@ilyar
ilyar / gist:a187eeec53d04d89eeb9e4cf184eae51
Created September 29, 2017 13:15 — forked from shsteimer/gist:7257245
Tip to delete tags by pattern
#delete all the remote tags with the pattern your looking for, ie. DEV-
git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/%
#delete all your local tags
git tag | xargs -n 1 -i% git tag -d %
#fetch the remote tags which still remain
git fetch
#!/bin/bash
### BEGIN INIT INFO
# Provides: %name%
# Required-Start: $network $remote_fs $local_fs
# Required-Stop: $network $remote_fs $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: forever-service startup script for %name%
# Description: forever-service startup script for node script based service %name%, uses forever to start the service