Skip to content

Instantly share code, notes, and snippets.

View leto's full-sized avatar
🐉
The Blocks Must Flow

Duke Leto leto

🐉
The Blocks Must Flow
View GitHub Profile
@leto
leto / danger.txt
Created December 14, 2019 11:46
Hush Lines of Code stats
SLOC Directory SLOC-by-Language (Sorted)
255527 src cpp=148322,ansic=94870,sh=7554,python=3613,asm=730,
java=438
52476 contrib sh=50626,python=1772,perl=78
14505 qa python=13247,sh=1258
1149 zcutil python=673,sh=476
Totals grouped by language (dominant language first):
cpp: 148322 (45.83%)
@leto
leto / hush_full_sync.md
Last active December 9, 2019 17:47
Simulate Hush Full Sync Quickly

Quickly Simulate Full Sync

To do a "real" full sync test, you should BACKUP YOUR WALLET in ~/.komodo/HUSH3 and then do

# BACKUP YOUR WALLET FIRST!
rm -rf ~/.komodo/HUSH3

This must be done occasionally to do full sync test, but it's often overkill to find bugs and it's very slow.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js"> </script>
<script>
$( document ).ready(function() {
$.ajax({
url: "https://explorer.myhush.org/insight-api-komodo/blocks?limit=1",
type: "GET",
dataType : "json",
})
.done(function( json ) {
@leto
leto / gist:6fcc3bd217c1d9157dc80a0aa580c1e1
Created November 23, 2019 21:45
SilentDragonAndroid with Tor
I have a temporary solution for running TOR, with SDA, NO ROOT.
1. Download FDroid
2. Go to settings, repos, enable
GuardianProject.
3. Download Orbot
4. Go to TOR Enabled Apps settings at bottom of the homepage screen.
5. Find SilentDragon and check it.
6. Now when SDA is in use, it is always
routed through ORBOT (TOR).
@leto
leto / gist:221f2fb8fd34527120f90347127dab40
Created November 19, 2019 17:18
Top 10 committers to git.git
~/git/git$ git shortlog -se|sort -rn|head
21024 Junio C Hamano <[email protected]>
3263 Jeff King <[email protected]>
1824 Nguyễn Thái Ngọc Duy <[email protected]>
1523 Johannes Schindelin <[email protected]>
1401 Shawn O. Pearce <[email protected]>
1117 Linus Torvalds <[email protected]>
954 Michael Haggerty <[email protected]>
881 René Scharfe <[email protected]>
820 Jonathan Nieder <[email protected]>
@leto
leto / hushdroid_threat_model.md
Last active November 18, 2019 15:13
HushDroid Threat Model

HushDroid Threat Model

This gives an overview of different threat actors and how HushDroid users can expect to protect themselves against each class of actors.

Users on same device

HushDroid assumes you never allow untrusted access to the physical android device to a different user. If somebody can run code on your device, assume it is compromised.

Users on same physical network

@leto
leto / currencies.txt
Created November 17, 2019 16:02
coingecko currencies
```
[
"btc",
"eth",
"ltc",
"bch",
"bnb",
"eos",
"xrp",
"xlm",
@leto
leto / worms.md
Created November 16, 2019 14:48
SilentDragon Wormhole Update

SD Wormhole Update

Just 24hrs ago, we were much further from having a wormhole. The service was down, there was no routing from port 443 to the localhost:7070 port that the wormhole runs on, we were not using CloudFlare and our SSL certs were not working correctly.

Now we have a WormHole running, where CloudFlare listens on wormhole.myhush.org:443 and sends data to our haproxy instance maps that to the wormhole backend running localhost:7070.

SDA can initiate a connection, and attempts to register a websocket sessionid. This is where things go wrong:

@leto
leto / gist:e6f559c7a11053476a8dfa856b3b1ad6
Created November 16, 2019 02:00
sync bug on duke branch
2019-11-16 01:50:10 ERROR: ConnectBlock(): JoinSplit requirements not met
2019-11-16 01:50:10 Misbehaving: 64.120.113.130:18030 (0 -> 100)
2019-11-16 01:50:10 InvalidChainFound: invalid block=00000059b23fe7d140019dfce53569e41a046104a073dd51c8557a96976c31ee height=881 log2_work=32.079137 log2_stake=-inf date=2019-04-15 00:29:25
2019-11-16 01:50:10 InvalidChainFound: current best=000000467c73c6ba60b86b87d40c0cfd0291b0d8339bd7d4d1fd37bbd8d710ec height=880 log2_work=32.064296 log2_stake=-inf date=2019-04-15 00:27:12
2019-11-16 01:50:10 ERROR: ConnectTip(): ConnectBlock 00000059b23fe7d140019dfce53569e41a046104a073dd51c8557a96976c31ee failed
2019-11-16 01:50:10 InvalidChainFound: invalid block=00000059b23fe7d140019dfce53569e41a046104a073dd51c8557a96976c31ee height=881 log2_work=32.079137 log2_stake=-inf date=2019-04-15 00:29:25
2019-11-16 01:50:10 InvalidChainFound: current best=000000467c73c6ba60b86b87d40c0cfd0291b0d8339bd7d4d1fd37bbd8d710ec height=880 log2_work=32.064296 log2_stake=-inf date=201
@leto
leto / gist:00aadbc22114b41c24f60a15f0a73df4
Created October 26, 2019 11:59
Rust coredump backtrace
thread '<unnamed>' panicked at 'couldn't load Sapling spend parameters file: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1009:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:71
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:211
2: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:227