Skip to content

Instantly share code, notes, and snippets.

View adria0's full-sized avatar
💭
crustaceanin'

adria0.eth adria0

💭
crustaceanin'
View GitHub Profile
@adria0
adria0 / results.md
Last active September 29, 2020 17:10
EIP2929 diff
ok_count=3112
fail_count=423
disjoint_only_in_oe_count=6692 (tests executed by OE that are not present in geth list)
disjoint_only_in_geth_count=32 (tests executed by geth that are not present in oe list)
root_mismatch_count=21 (tests that have different 'want' hash)


Failed 0_2_28000_96.json/Istanbul/0/trie OE:bda0171f373d45a96610d10c3cc9810fa25ff5a73ffc50f45ad1bd550c52584e Geth:883f24c36066b9d8ba29434304f720007c7f557d30940f6f74ad3333330606d7
Failed 0_2_28000_96.json/Istanbul/1/trie OE:bda0171f373d45a96610d10c3cc9810fa25ff5a73ffc50f45ad1bd550c52584e Geth:883f24c36066b9d8ba29434304f720007c7f557d30940f6f74ad3333330606d7
@adria0
adria0 / tsan.log
Last active July 8, 2020 07:13
oe 3.0.1 RUSTFLAGS=-Zsanitizer=thread cargo build --release --features=final -Zbuild-std --target x86_64-unknown-linux-gnu (nightly)
2020-07-07 18:05:15 UTC Starting OpenEthereum/v3.0.0-stable-63e2781b2-20200630/x86_64-unknown-linux-gnu/rustc1.46.0-nightly
2020-07-07 18:05:15 UTC Keys path /home/ubuntu/.local/share/openethereum/keys/ethereum
2020-07-07 18:05:15 UTC DB path /home/ubuntu/.local/share/openethereum/chains/ethereum/db/906a34e69aec8c0d
2020-07-07 18:05:15 UTC State DB configuration: fast
2020-07-07 18:05:15 UTC Operating mode: active
2020-07-07 18:05:15 UTC Configured for Ethereum using Ethash engine
2020-07-07 18:05:16 UTC Updater is deprecated and may be removed in a future release. Please see #11696 for details:
https://github.com/openethereum/openethereum/issues/11696
2020-07-07 18:05:16 UTC Removed existing file '/home/ubuntu/.local/share/openethereum/jsonrpc.ipc'.
2020-07-07 18:05:16 UTC Updated conversion rate to Ξ1 = US$239.79 (19858646 wei/gas)
@adria0
adria0 / calc_state_trie.go
Created April 14, 2020 09:10
openethereum vs go-ethereum state calc snippets
type stateTest struct {
db ethdb.Database
state *StateDB
}
func newStateTest() *stateTest {
db := rawdb.NewMemoryDatabase()
sdb, _ := New(common.Hash{}, NewDatabase(db), nil)
return &stateTest{db: db, state: sdb}
}
@adria0
adria0 / output
Created March 17, 2020 16:16
cargo-folderinfo on openethreum
dump format:
<folder-name> - [<crate-name>] crate-description
< internal dependencies
> external dependencies
- [parity-ethereum] Parity Ethereum client
< cli-signer, client-traits, common-types, engine, ethcore, ethcore-accounts,
< ethcore-blockchain, ethcore-call-contract, ethcore-db, ethcore-light,
< ethcore-miner, ethcore-private-tx, ethcore-secretstore, ethcore-service,
< ethcore-sync, ethkey, ethstore, node-filter, parity-hash-fetch, parity-ipfs-api,
@adria0
adria0 / notes1.md
Created August 28, 2019 08:12
tt notes
use num_bigint::{BigInt, BigUint};
use circom2_parser::ast::SignalType;
use circom2_compiler::algebra::{LC, QEQ};
use circom2_compiler::storage::{Constraints, Signals,Result};
use byteorder::{BigEndian, WriteBytesExt};
use std::fs::File;
use std::io::{Seek, SeekFrom, Write};
use num_traits::identities::One;
use rand::thread_rng;
@adria0
adria0 / keybase.md
Created June 2, 2019 09:32
keybase.md

Keybase proof

I hereby claim:

  • I am adria0 on github.
  • I am adriamb (https://keybase.io/adriamb) on keybase.
  • I have a public key whose fingerprint is 39DA 93D8 FEF4 B00E C687 27C4 D7F8 2B09 292B 5A03

To claim this, I am signing this object:

@adria0
adria0 / lifetimed_recursion.rs
Created April 15, 2019 08:31
lifetimed recursion
use std::cell::RefCell;
struct S<'a> {
value : RefCell<u64>,
next : Option<&'a Self>
}
impl<'a> S<'a> {
fn new(value: u64, next: Option<&'a Self>) -> Self {
S { value :RefCell::new(value), next }
// Enter your code here. Read input from STDIN. Print output to STDOUT
fn check(n:usize, c: &mut Vec<bool>, v: &Vec<u64>,p : u64) -> Option<usize> {
if n == c.len() {
let (count,sum) = v.iter()
.enumerate()
.filter(|(i,_)| c[*i])
.map(|(_,v)| *v)
.fold((0,0), |(count,sum),e| (count+1,sum+e));
require 'openssl'
require 'base64'
require 'json'
key_pair = OpenSSL::PKey::RSA.new(2048)
public_key, private_key = key_pair.public_key.export, key_pair.export
puts public_key
puts private_key