Skip to content

Instantly share code, notes, and snippets.

View maoueh's full-sized avatar

Matthieu Vachon maoueh

View GitHub Profile
@maoueh
maoueh / README.md
Created October 6, 2023 19:24
EOS EVM Firehose Integration

The goal of this task would be to instrument the current EOS EVM implementation so that a live "tracer" can fully trace the block execution including transactions, calls, state changes, balance changes, nonce changes, account created.

The tracer module should be able to work at the block level accumulating everything transaction execution. The final tracer should be a single textual line of the form:

FIRE BLOCK <NUMBER (u64 string)> <HASH (hex string)> <LIB NUMBER (u64 string)> <LIB ID (hex string)> <proto (base64 string)>
@maoueh
maoueh / cookbooks.md
Last active August 23, 2023 14:08
Audio/Video CLI Instructions (ffmpeg cookbooks)

Get Streams Information

ffprobe -hide_banner -i <source_file>
  • Getting a testing sample output

Use -t 120 for a 2 minutes sample

@maoueh
maoueh / README.md
Last active October 3, 2023 18:10
Blockchain's Node Operator Updates
@maoueh
maoueh / complete_call_tree_with_failures.json5
Last active October 19, 2022 13:37
Ethereum Battlefield Call with Failures
# Firehose Block Model after Execution of https://github.com/streamingfast/battlefield-ethereum/blob/master/contract/src/main.sol#L107
{
"beginOrdinal": "1",
"calls": [
{
"address": "71940c77ccadaea1238cea27674e6253128ca177",
"balanceChanges": [
{
"address": "821b55d8abe79bc98f05eb675fdc50dfe796b7ab",
"newValue": "02863c1f5cdaaee529985e1e51",
@maoueh
maoueh / terraform-redacted.log
Created October 6, 2022 16:07
Terraform `google_sql_user` bug
2022-10-05T15:28:14.847-0400 [INFO] Terraform version: 1.3.1
2022-10-05T15:28:14.848-0400 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2022-10-05T15:28:14.848-0400 [DEBUG] using github.com/hashicorp/hcl/v2 v2.14.1
2022-10-05T15:28:14.848-0400 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2022-10-05T15:28:14.848-0400 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2022-10-05T15:28:14.848-0400 [DEBUG] using github.com/zclconf/go-cty v1.11.0
2022-10-05T15:28:14.848-0400 [INFO] Go runtime version: go1.19.1
2022-10-05T15:28:14.848-0400 [INFO] CLI args: []string{"/opt/homebrew/Cellar/tfenv/2.2.2/versions/1.3.1/terraform", "apply", "-target", "google_sql_user.graph_dev_dev", "-target", "google_sql_user.graph_dev_graph", "-var", "gcp_access_token=<token>"}
2022-10-05T15:28:14.848-0400 [DEBUG] Attempting to open CLI config file: /Users/maoueh/.terraformrc
2022-10-05T15:28:14.848-0400 [DEBUG] File doesn't exist, but doesn't
apiVersion: v1
data:
beacon-jwt-secret: <secret, can be generated with `cat /dev/urandom | head -c 32 | to_hex -in`>
kind: ConfigMap
metadata:
name: consensus-jwt
namespace: <namespace>
@maoueh
maoueh / block.json
Created April 13, 2022 17:29
Block The Graph
{
"ver": 1,
"hash": "UYr/kcNniZ6ONwDabkOUC7Ql1lg2p+ybozcmooMHZNA=",
"number": "11235113",
"size": "39368",
"header": {
"parentHash": "t4KICcevrY0uGdxPOvonOoU3jO9jit6Z+N4fSxkLCOM=",
"uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=",
"coinbase": "6mdP3ecU/Zed4+3w9WqpcWuJjsg=",
"stateRoot": "xcqfE5cbaWTy6LEjfYGrsTG1uIynNb5d9CelSMJHrUA=",
TsvHttpData-1.0
https://near-protocol-public.s3-accelerate.amazonaws.com/backups/testnet/archive/data.tar 3026181378048
@maoueh
maoueh / print.go
Last active November 13, 2020 04:18
A `*query.Document` printer for https://github.com/graph-gophers/graphql-go library (internal work)
package query
// Goes in internal/query/print.go
import "fmt"
func PrintGraphQLDocument(document *Document) {
if document == nil {
fmt.Println("Document <nil>")
return
@maoueh
maoueh / index.js
Last active August 29, 2019 07:38
A quick script to play with Promise nesting and resolution (node index.js)
function buildPromise(tag, shouldError) {
if (shouldError) {
return new Promise((resolve, reject) => {
console.log(tag + " executor")
setTimeout(() => { console.log(tag + " rejecting!"); reject(tag + " failed on purpose") }, 250)
})
}
return new Promise((resolve, reject) => {
console.log(tag + " executor")