It is markdown version, original: https://solana.com/hackathon-grizzlython-official-rules-2023.pdf
Official Rules
NO PURCHASE NECESSARY
| 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. |
| // Запуск локального теснета с 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 | |
| // увеличиваем разрешенное количество открытых файлов/коннектов |
| Источник https://www.forth.org.ru/~ac/rationale/FORTH.TXT | |
| Слово о Форте. Андрей Черезов ac@forth.org | |
| Попытка формализации сути языка :) 29.07.1999 | |
| 1. Форт-система | |
| Традиционная форт-система состоит из двух частей: исполняющая среда (её | |
| часто назвают VFM - виртуальная форт-машина) и транслятор. Транслятор | |
| занимается поглощением исходных текстов программ (и что-то при этом | |
| производит, о чем позже), VFM занимается выполнением программного кода. |
| { | |
| "ABI version": 2, | |
| "version": "2.3", | |
| "header": ["pubkey", "time", "expire"], | |
| "functions": [ | |
| { | |
| "id": "0x00000000", | |
| "name": "transfer", | |
| "inputs": [ | |
| { |
| #!/usr/bin/env bash | |
| std_lib() { | |
| list=() | |
| list+=('"SETCP0":"FF00"') | |
| list+=('"ACCEPT":"F800"') | |
| list+=('"THROW":"F22"') | |
| list+=('"PUSHREF":"88"') | |
| list+=('"SETCODE":"FB04"') | |
| opcodes=$(printf ",%s" "${list[@]}") |
It is markdown version, original: https://solana.com/hackathon-grizzlython-official-rules-2023.pdf
Official Rules
NO PURCHASE NECESSARY
| @startuml | |
| ' configures the library | |
| !global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/v9.4.4/distribution" | |
| ' loads the library's bootstrap | |
| !include $LIB_BASE_LOCATION/bootstrap.puml | |
| ' loads the package bootstrap | |
| include('domainstorytelling/bootstrap') |
| #!/usr/bin/env bash | |
| slugSha256() { | |
| slug=$(echo -n "$1" | sha256sum | cut -d' ' -f1) | |
| echo -n $((16#"${slug:0:8}")) | |
| } | |
| functionHash() { | |
| hash=$(slugSha256 "$(echo -n "$1" | sed 's/ //g')") | |
| if [[ "$1" == *constructor* ]] || [[ "$1" == *cell* ]] || [[ "$1" == *bytes* ]]; then |
| #!/usr/bin/env ts-node | |
| import { createHash } from 'crypto' | |
| function slugSha256(data: string): number { | |
| return Number(`0x${createHash('sha256').update(data).digest('hex').slice(0, 8)}`) | |
| } | |
| function functionHash(signature: string): number { | |
| let hash = slugSha256(signature.replaceAll(' ', '')) | |
| // FIXME for constructor, cell, bytes see https://gist.github.com/ilyar/484360bdb5464a6f252bd8f8ec10aaff |
| #!/usr/bin/env node | |
| 'use strict' | |
| const { createHash } = require('crypto') | |
| function slugSha256(data) { | |
| return Number(`0x${createHash('sha256').update(data).digest('hex').slice(0, 8)}`) | |
| } | |
| function functionHash(signature) { |