Skip to content

Instantly share code, notes, and snippets.

View tuxcanfly's full-sized avatar
🏠
Working from home

Javed Khan tuxcanfly

🏠
Working from home
View GitHub Profile
@tuxcanfly
tuxcanfly / anon-aadhaar-v2-trusted-setup-ceremony_attestation.log
Created June 11, 2024 03:49
Attestation for Anon Aadhaar V2 Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm tuxcanfly-132667 and I have contributed to the Anon Aadhaar V2 Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (aadhaarverifier)
Contributor # 34
Contribution Hash: 7a29e00c 22a51e8c 82f1ce9d ad31363b
21ad2fa7 8884a8cf 037233cf 513d79b8
4699a1e0 5ef2eb51 08926d02 f85571f1
eeb67d26 3dcbabb7 eb547744 3a1e14cc

While debugging rollkit #1036 I came across a potential DOS vector.

Since celestia-node calls the blocking method BroadcastTx on celestia-core which itself blocks on transaction subscription events, a potential adversary can repeatedly trigger a maliciously blocking transactions so that the RPC endpoint has to queue other valid transaction, timing them out as well. This is a potential DOS vector.

Example of a malicious transaction - submit a max size blob - this seems to timeout on testnet with:

2024/01/26 01:56:14 code = Unknown desc = timed out waiting for tx to be included in a block

openapi: 3.1.0
info:
title: Moda
description: A standard Data Availability interface for modular rollup stacks.
termsOfService: https://github.com/example/repo/TERMS
contact:
email: example@example.com
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
* beacon-chain data - sync ~/.eth2/beaconchain
deposit tx from command line:
bazel run //tools/sendDepositTx -- --httpPath=https://goerli.prylabs.net --keystoreUTCPath $PWD/w1 --passwordFile $PWD/password.txt --random-key --depositDelay 2 --depositContract 0x767E9ef9610Abb992099b0994D5e0c164C0813Ab
1550 passing (86s)
3 pending
1 failing
1) HTTP
should generate 10 blocks from RPC call:
Error: Request timed out.
this.finish(new Error('Request timed out.'));
1550 passing (55s)
3 pending
1 failing
1) Disable TXs
should reject claim from mempool before txStart:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
1541 passing (49s)
3 pending
10 failing
1) Disable TXs
should reject tx from mempool before txStart:
AssertionError [ERR_ASSERTION]: Missing expected rejection.
await assert.rejects(node.mempool.addTX(tx),
1548 passing (71s)
3 pending
3 failing
1) Auction
Claim
should reject a fraudulent claim:
Error: Could not resolve name.
'use strict';
const FullNode = require('./lib/node/fullnode');
const NetAddress = require('./lib/net/netaddress.js');
const Network = require('./lib/protocol/network.js');
const random = require('bcrypto/lib/random');
const Logger = require('blgr');
const bs32 = require('bs32');
const rules = require('./lib/covenants/rules');
@tuxcanfly
tuxcanfly / address-tutorial.js
Last active August 7, 2017 16:26
Generate bitcoin address from scratch using bcoin
// https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
secp256k1 = require("bcoin/lib/crypto/secp256k1")
crypto = require("bcoin/lib/crypto")
base58 = require("bcoin/lib/utils/base58")
// 0 - Having a private ECDSA key
privkey = buffer.Buffer.from("18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725", "hex")
// 1 - Take the corresponding public key generated with it (65 bytes, 1 byte 0x04, 32 bytes corresponding to X coordinate, 32 bytes corresponding to Y coordinate)