Skip to content

Instantly share code, notes, and snippets.

View jmcph4's full-sized avatar

Jack McPherson jmcph4

View GitHub Profile

References

  1. F. D'Amato and M. Neuder. "Equivocation attacks in mev-boost and ePBS" Ethereum Research. https://ethresear.ch/t/equivocation-attacks-in-mev-boost-and-epbs/15338 (accessed May 15, 2023).
  2. R. Miller. "Post mortem: April 3rd, 2023 mev-boost relay incident and related timing issue." The Flashbots Collective. https://collective.flashbots.net/t/post-mortem-april-3rd-2023-mev-boost-relay-incident-and-related-timing-issue/1540 (accessed May 15, 2023).
  3. M. Sproul. "Unbundling attacks on MEV relays using RPC" Lighthouse Blog. https://lighthouse-blog.sigmaprime.io/mev-unbundling-rpc.html (accessed May 11, 2023).
  4. D. Marzec and L. Thibault. "Subverting the total eclipse (of the heart)" HackMD. [https://hackmd.io/@dmarz/total-eclipse-o
digraph asset_graph {
node [shape = circle] "GBP" "USD" "JPY" ;
"GBP" -> "USD" [label = "1.25"];
"JPY" -> "GBP" [label = "0.01"];
"USD" -> "JPY" [label = "76.92307692307692"];
"USD" -> "GBP" [label = "0.8"];
"GBP" -> "JPY" [label = "100"];
"JPY" -> "USD" [label = "0.013"];
}
[package]
name = "uniswap_v2_prices"
edition = "2021"
[dependencies]
alloy = { git = "https://github.com/alloy-rs/alloy", features = [
"contract",
"network",
"providers",
"rpc",
sequenceDiagram
  actor Searcher
  actor Builder
  actor Relay
  actor Proposer
  
  Note over Searcher,Builder: Custom API
  Note over Builder,Relay: Relay API
 Note over Relay,Proposer: Builder API
@jmcph4
jmcph4 / merkle.rs
Last active February 14, 2024 04:52
use std::{convert::AsRef, env, fmt, fs::read_to_string};
use sha2::{Digest as ShaDigest, Sha256};
pub type Bytes = Vec<u8>;
#[derive(Clone, Debug)]
pub struct Plaintext(pub Bytes);
impl AsRef<[u8]> for Plaintext {
let top_val: serde_json::Value = serde_json::from_str(raw.as_ref())?;
let inner_val: &serde_json::Value = top_val
.get(
top_val
.as_object()
.unwrap()
.keys()
.collect::<Vec<_>>()
.first()
.unwrap(),

Direct Heimdall Usage

$ heimdall disassemble --rpc-url https://polygon.llamarpc.com 0x45068ef2273a928a9b092c5e41cdca1672ebc6921355deb3dcc5ae7b9a43db11
$ cat output/137/0x45068ef2273a928a9b092c5e41cdca1672ebc6921355deb3dcc5ae7b9a43db11/disassembled.asm
000000 GASLIMIT 
000001 MOD 
000002 DUP15 
000003 CALLCODE 
000004 unknown 
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;
contract Foo {
function bar() public pure {
assembly {
mstore(0x08, 0x01000000000000000000000000000000000000000000000000000000000000FF)
}
}
}
{
"peer_id": "16Uiu2HAkzG8D5PVPfZZBq3hvjKX2QyFfpVjCR2y5Te4Dff2xLckp",
"addresses": [
"/ip4/83.150.19.30/tcp/9001/p2p/16Uiu2HAkzG8D5PVPfZZBq3hvjKX2QyFfpVjCR2y5Te4Dff2xLckp"
],
"client_info": {
"kind": "Unknown",
"version": "unknown",
"os_version": "unknown",
"protocol_version": "unknown",