Skip to content

Instantly share code, notes, and snippets.

View rafaelescrich's full-sized avatar

Rafael Escrich rafaelescrich

View GitHub Profile

Aptos vs. Sui: Technical Snapshot

Aspect Aptos Sui
Launch date Oct 17 2022 – “Aptos Autumn” mainnet¹ May 3 2023 – Mysten Labs mainnet²
Programming language Move (Aptos Move) & Move Prover for formal verification Move (Sui Move) & Sui Prover
Consensus mechanism DPoS + AptosBFT v4 (HotStuff lineage) with quorum-store mempool & leader-reputation rotation; ~0.9 s finality³ DPoS + Narwhal & Bullshark (DAG-BFT); ~0.4 s finality in tests⁵
Execution model Block-STM optimistic parallel execution (conflict detection & rollback)⁴ Object-centric parallel execution (independent-object txns skip global consensus)
Peak benchmark TPS 170 k TPS on 32-core lab setup⁴ 297 k TPS on 100-validator distributed test⁵
Signature features • Quorum-Store batched mempool • Account-abstraction primitives • On-chain upgrade path zkLogin (social-lo
@rafaelescrich
rafaelescrich / cuda_install.md
Created November 17, 2023 03:00 — forked from denguir/cuda_install.md
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@rafaelescrich
rafaelescrich / send_bundle.rs
Created November 16, 2023 18:33
Rust flashbots
use flashbots_rs::{
client::FlashbotsClient,
types::{Bundle, Transaction},
};
fn main() {
// Establish a connection to the Flashbots RPC endpoint
let client = FlashbotsClient::new("https://rpc.flashbots.net");
// Create a transaction object with the necessary details
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/crypto"
hdwallet "github.com/rafaelescrich/go-ethereum-hdwallet"
)
func main() {
@rafaelescrich
rafaelescrich / main.go
Created April 17, 2023 00:26
ZKP example in Golang
package main
import (
"crypto/elliptic"
"crypto/rand"
"fmt"
"math/big"
)
type Prover struct {
import React, {useState, useEffect} from 'react';
let Web3 = require('web3');
function Index() {
const [web3, setWeb3] = useState(null)
const [address, setAddress] = useState(null)
const [contract, setContract] = useState(null)
const [totalSupply, setTotalSupply] = useState(0)
@rafaelescrich
rafaelescrich / safe_sig_gen_uport_eip712.ts
Created June 10, 2022 14:18 — forked from rmeissner/safe_sig_gen_uport_eip712.ts
Example Safe signature generation with uport eip712 lib
import EIP712Domain from "eth-typed-data";
import BigNumber from "bignumber.js";
import * as ethUtil from 'ethereumjs-util';
import { ethers } from "ethers";
import axios from "axios";
/*
* Safe relay service example
* * * * * * * * * * * * * * * * * * * */
@rafaelescrich
rafaelescrich / main.go
Created March 28, 2022 13:06 — forked from LordGhostX/main.go
Solana Wallet with Go
package main
import (
"context"
"fmt"
"github.com/portto/solana-go-sdk/client"
"github.com/portto/solana-go-sdk/client/rpc"
"github.com/portto/solana-go-sdk/common"
"github.com/portto/solana-go-sdk/program/sysprog"
"github.com/portto/solana-go-sdk/types"
@rafaelescrich
rafaelescrich / erc20.go
Created February 1, 2022 18:25 — forked from miguelmota/erc20.go
Go go-ethereum watch ERC-20 token transfer events
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package token
import (
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
@rafaelescrich
rafaelescrich / estimate_gas.go
Created November 10, 2021 20:57 — forked from miguelmota/estimate_gas.go
Go estimate ethereum transaction gas limit and add 30% percent
package main
import (
"context"
"fmt"
"log"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"