Skip to content

Instantly share code, notes, and snippets.

View gballet's full-sized avatar
🗿

Guillaume Ballet gballet

🗿
View GitHub Profile
@gballet
gballet / genesis.json
Created February 22, 2024 10:25
Files to run conversion in CI
{
"config": {
"chainId": 69420,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
@gballet
gballet / genesis_kaustinen.dot
Created December 1, 2023 14:21
Dot representation of the kaustinen (verkle-gen-devnet-2) state tree at genesis
digraph D {
internal [label="I: 6e077a5ba3d6b0db91ed0c35b6bb6916981d1247a2b85e811a97f400ccc0ab1c"]
internal00 [label="I: 6804eb758a6834682402efd3306f40205d3e208914dc6242598c29334706e317"]
internal -> internal00
leaf0000 [label="L: 0f48b19a718164b3d498a9395e8d36152b1c6e5fdc7d0e786169f7162b8453f6
C: 2704c74a25b5eb42c3d886230166e58031f23efd0fc5e7ded0fd95835266d45f
Stem: 000014e2456692cfd9f86fece6e9b2e753e2d46c669326610a9634d0a99539
C₁: 62dbc83963aef42b5c6696695bbbf01e92ad6d0db9e565b687bc145b463ec46c
C₂:0000000000000000000000000000000000000000000000000000000000000000"]
internal00 -> leaf0000
@gballet
gballet / kaustinen_block_with_exec.md
Created May 25, 2023 11:53
The execution payload corresponding to three kaustinen blocks covering the deployment of a contract, a first call to its `store` function and then a second call with to that same function.

I deployed remix's default 'storage' contract at address 0x595B73830714F3cAaE764219A9919902af76f832, which corresponds to the stem

{
  "jsonrpc": "2.0",
  "method": "engine_newPayloadV1",
  "params": [
    {
      "baseFeePerGas": "0x8",
      "blockHash": "0xb528b8feb9f7c45dc76b1dab179567f3fcbba43069c0835e20e2080b9e1bf47d",
@gballet
gballet / README.tmpl
Created November 25, 2022 15:33
Template for generating the README of
[![Rust](https://github.com/gballet/verkle-block-sample/actions/workflows/rust.yml/badge.svg)](https://github.com/gballet/verkle-block-sample/actions/workflows/rust.yml)
# Example of a block root with a Verkle state root
## Purpose
In order to foster the implementation of verkle trees in clients, and to facilitate client interoperability, this repository provides:
* a sample block containing a verkle proof,
* a utility that decodes this block, verifies it, and displays some information.
35.42 10.353
30.754 10.522 average 36.3614814814815 10.6865720930233
34.275 9.481 max 100.28 70.711
29.308 7.573 min 19.063 4.151
26.364 8.974 count 108 215
29.767 16.895
26.904 8.63
30.911 14.788
35.47 8.031
44.779 7.369
@gballet
gballet / run_test.rb
Last active October 31, 2022 11:11
Verkle test transactions
#!/usr/bin/env ruby
require 'json'
txs = JSON.parse(File.open("transactions.json").read)
system "curl -X POST -d '#{txs[0].to_json}' -H 'Content-Type: application/json' http://localhost:8545"
count = 0
@gballet
gballet / freebsd_amd64
Last active August 22, 2022 17:25
fp.Mul benchmarks
goos: freebsd
goarch: amd64
pkg: github.com/crate-crypto/go-ipa/bandersnatch/fp
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Benchmark1kMul-8 24026 46608 ns/op
Benchmark10kMul-8 2775 403095 ns/op
Benchmark100kMul-8 267 4171780 ns/op
Benchmark1MMul-8 31 37684170 ns/op
PASS
ok github.com/crate-crypto/go-ipa/bandersnatch/fp 18.014s
@gballet
gballet / bench.txt
Last active March 10, 2022 14:42
A tx blob verification benchmark for eip 4844
'trustless' setup in progress, please wait
done
goos: freebsd
goarch: amd64
pkg: gballet.eu/testkzg
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
BenchmarkPolyEval-8 24 42047844 ns/op 1008948 B/op 8300 allocs/op
BenchmarkPolyEval-8 22 49744581 ns/op 1008948 B/op 8300 allocs/op
BenchmarkPolyEval-8 25 44590933 ns/op 1008944 B/op 8300 allocs/op
BenchmarkPolyEval-8 24 51210360 ns/op 1008948 B/op 8300 allocs/op
@gballet
gballet / contracts...extcodecopy_in_constructor.sol
Created February 25, 2022 12:08
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract One {
function getOne() external pure returns (uint) {
return 1;
}
}
contract Two {
@gballet
gballet / i7.csv
Created June 10, 2021 08:41
Benchmarks comparing the performance of the EC multiplication of secp256k1 and alt_bn128. In the first column, 0 indicates alt_bn128 and 1 indicates secp256k1.
0 44124
1 2208673
0 43598
1 2209066
0 43718
1 2518759
0 47691
1 2203296
0 43962
1 2272930