This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in a new folder be sure to run "npm init -y" and "npm install puppeteer" | |
const puppeteer = require("puppeteer") | |
const fs = require("fs/promises") | |
async function start() { | |
const browser = await puppeteer.launch() | |
const page = await browser.newPage() | |
await page.goto("https://learnwebcode.github.io/practice-requests/") | |
const names = await page.evaluate(() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name | Description | On-chain Retrival | Off-chain Retrieval | |
---|---|---|---|---|
Creation Bytecode | Code that generates the runtime bytecode | type(ContractName).creationCode | getTransactionByHash | |
Runtime Bytecode | Code that is stored on-chain that describes a smart contract | extcodecopy(a) or type(ContractName).runtimeCode | getCode | |
Bytecode | Umbrella term that encompasses both runtime bytecode and creation bytecode | NA | NA | |
Deployed Bytecode | Same as runtime bytecode | extcodecopy(a) or type(ContractName).runtimeCode | getCode | |
Init Code | Same as creation bytecode | type(ContractName).creationCode | getTransactionByHash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "hashes/sha256/1024bitPadded.code" as sha256 | |
import "ecc/edwardsScalarMult.code" as scalarMult | |
import "ecc/edwardsAdd.code" as add | |
import "utils/pack/unpack256.code" as unpack256 | |
import "ecc/edwardsOnCurve.code" as onCurve | |
import "ecc/edwardsOrderCheck.code" as orderCheck | |
/// Verifies an EdDSA Signature. | |
/// | |
/// Checks the correctness of a given EdDSA Signature (R,S) for the provided |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/ethereum/go-ethereum/accounts" | |
"github.com/ethereum/go-ethereum/common/hexutil" | |
"github.com/ethereum/go-ethereum/crypto" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |