Skip to content

Instantly share code, notes, and snippets.

View nchashch's full-sized avatar
👾
Battlecruiser operational.

Nikita Chashchinskii nchashch

👾
Battlecruiser operational.
  • Layer Two Labs
View GitHub Profile
@gavinandresen
gavinandresen / balanced_merkle_path_update.md
Last active April 20, 2023 13:38
Updating old paths (witnesses) for a balanced merkle forest accumulator

Introduction

It would be spiffy to use the balanced merkle forest idea for ethereum tokens or to store unspent transaction outputs.

Tadge Dryja has been working on 'utreexo' (presentation) for storing unspent transaction outputs in log(n) space; this gist is inspired by, and is very similar to, that work.

So my previous gist describes really simple algorithms for adding and removing items from a balanced merkle forest. This gist extends those operations to create

@minecrawler
minecrawler / main.rs
Created March 22, 2017 00:40
Simple Snake implemented on top of Amethyst
extern crate rand;
extern crate amethyst;
use amethyst::{Application, Event, State, Trans, VirtualKeyCode, WindowEvent};
use amethyst::asset_manager::AssetManager;
use amethyst::config::Element;
use amethyst::ecs::{World, Join, VecStorage, Component, RunArg, System, Entity};
use amethyst::ecs::components::{Mesh, LocalTransform, Texture, Transform, Renderable};
use amethyst::gfx_device::DisplayConfig;