diff --git a/Cargo.lock b/Cargo.lock index 329a5e3c08a8..a76ce68ba83d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6363,6 +6363,7 @@ dependencies = [ "itertools 0.13.0", "proptest", "proptest-arbitrary-interop", + "rand 0.8.5", "ratatui", "reth-beacon-consensus", "reth-chainspec", diff --git a/Cargo.toml b/Cargo.toml index bfe18acbf57a..cf5b76a2493a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -474,7 +474,7 @@ nybbles = "0.2.1" once_cell = "1.19" parking_lot = "0.12" paste = "1.0" -rand = "0.8.5" +rand = { version = "0.8.5", features = ["small_rng"] } rayon = "1.7" rustc-hash = { version = "2.0", default-features = false } schnellru = "0.2" diff --git a/crates/cli/commands/Cargo.toml b/crates/cli/commands/Cargo.toml index 4a8c71dbe2fc..cb5a3936f8ca 100644 --- a/crates/cli/commands/Cargo.toml +++ b/crates/cli/commands/Cargo.toml @@ -47,6 +47,7 @@ futures.workspace = true tokio.workspace = true # misc +rand.workspace = true ahash = "0.8" human_bytes = "0.4.1" eyre.workspace = true diff --git a/crates/cli/commands/src/ascii_art.rs b/crates/cli/commands/src/ascii_art.rs new file mode 100644 index 000000000000..298000549902 --- /dev/null +++ b/crates/cli/commands/src/ascii_art.rs @@ -0,0 +1,265 @@ +pub const ASCII_ART: [&str; 14] = [ + " + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⢀⠀⠀⠀⠊⣉⡉⠄⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠠⠂⠀⣀⠠⡀⠈⠀⡀⠀⠀⠂⠄⠀⢀⠀ + ⠀⠁⠉⠉⠁⠀⠀⠀⠌⠉⠙⠀⠀⠀⠐⠉⠉⠀⠃ + ⠀⢇⠈⠉⠀⠂⠀⠀⠀⠉⠁⡀⠀⠀⠇⠈⠉⠀⠂ + ⠈⢀⠒⠒⠊⠀⠉Welcome⠁⠐⠒⠒⠂⠂ + ⠀⠆⠘⠙⠀⠀⠀⠀To the⠀⠆⠘⠛⢈⠀ + ⠀⠈⠖⠒⠂ Simulation⠒⠒⠂⠄ + ⠀⡆⠐⠒⠀⠄⠀⠀⠀⠒⠂⠀⠀⠀⡆⠐⠒⠀⠄ + ⠐⡈⠤⠤⠔⠀⠒⠀⡢⠤⠤⠁⠒⠂⠠⠤⠤⠄⠄ + ⠀⠀⠀⠈⠄⠀⠀⠐⠀⠶⠆⠡⠀⠀⠄⠂⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠂⠄⠀⠀⠂⠁⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀", + " + :::!~!!!!!:. + .xUHWH!! !!?M88WHX:. + .X*#M@$!! !X!M$$$$$$WWx:. + :!!!!!!?H! :!$!$$$$$$$$$$8X: + !!~ ~:~!! :~!$!#$$$$$$$$$$8X: + :!~::!H!< ~.U$X!?R$$$$$$$$MM! + ~!~!!!!~~ .:XW$$$U!!?$$$$$$RMM! + !:~~~ .:sᴏᴜғɪᴀɴᴇ!$WX??#MRRMMM! + ~?WuxiW*` `'#$ᴉɹᴉɥɐꓕ!!??!!! + :X- M$$$$ `'T#$T~!8$WUXU~ + :%` ~#$$$m: ~!~ ?$$$$$$ + :!`.- ~T$$$$8xx. .xWW- ~''##*' +..... -~~:<` ! ~?T#$$@@W@*?$$ /` +W$@@M!!! .!~~ !! .:XUW$W!~ `'~: : +#'~~`.:x%`!! !H: !WM$$$$Ti.: .!WUn+!` +:::~:!!`:X~ .: ?H.!u '$$$B$$$!W:U!T$$M~ +.~~ :X@!.-~ ?@WTWo('*$$$W$TH$! ` +Wi.~!X$?!-~ : ?$$$B$Wu('**$RM! +$R@i.~~ ! : ~$$$$$B$$en:`` +?MXT@Wx.~ : ~'##*$$$$M~ + +By Soufiane Tahiri", + " + wake up, Neo... + the matrix has you + follow the white rabbit. + ", + r#" + knock, knock, Neo. + + (`. ,-, + ` `. ,;' / + `. ,'/ .' + `. X /.' + .-;--''--.._` ` ( + .' / ` + , ` ' Q ' + , , `._ \ + ,.| ' `-.;_' + : . ` ; ` ` --,.._; + ' ` , ) .' + `._ , ' /_ + ; ,''-,;' ``- + ``-..__``--` +"#, + r#" +.~+P``````-o+:. -o+:. +.+oooyysyyssyyssyddh++os-````` ``````````````` ` ++++++++++++++++++++++++sydhyoyso/:.````...`...-///::+ohhyosyyosyy/+om++:ooo///o +++++///////~~~~///////++++++++++++++++ooyysoyysosso+++++++++++++++++++///oossosy +--.` .-.-...-////+++++++++++++++////////~~//////++++++++++++/// + `...............` `...-/////...` + + + .::::::::::-. .::::::- + .hmMMMMMMMMMMNddds\...//M\\.../hddddmMMMMMMNo + :Nm-/NMMMMMMMMMMMMM$$NMMMMm&&MMMMMMMMMMMMMMy + .sm/`-yMMMMMMMMMMMM$$MMMMMN&&MMMMMMMMMMMMMh` + -Nd` :MMMMMMMMMMM$$MMMMMN&&MMMMMMMMMMMMh` + -Nh` .yMMMMMMMMMM$$MMMMMN&&MMMMMMMMMMMm/ +`oo/``-hd: `` .sNd :MMMMMMMMMM$$MMMMMN&&MMMMMMMMMMm/ + .yNmMMh//+syysso-`````` -mh` :MMMMMMMMMM$$MMMMMN&&MMMMMMMMMMd +.shMMMMN//dmNMMMMMMMMMMMMs` `:```-o++++oooo+:/ooooo+:+o+++oooo++/ +`///omh//dMMMMMMMMMMMMMMMN/:::::/+ooso--/ydh//+s+/ossssso:--syN///os: + /MMMMMMMMMMMMMMMMMMd. `/++-.-yy/...osydh/-+oo:-`o//...oyodh+ + -hMMmssddd+:dMMmNMMh. `.-=mmk.//^^^\\.^^`:++:^^o://^^^\\`:: + .sMMmo. -dMd--:mN/` ||--X--|| ||--X--|| +........../yddy/:...+hmo-...hdd:............\\=v=//............\\=v=//......... +================================================================================ +=====================+--------------------------------+========================= +=====================| Session one died of dysentery. |========================= +=====================+--------------------------------+========================= +================================================================================ + + Press ENTER to size up the situation + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Date: April 25, 1848 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%% Weather: It's always cool in the lab %%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%% Health: Cracked %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%% Caffeine: 12975 mg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%% Hacked: All the things %%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + Press SPACE BAR to continue + +"#, + r#" + __ + ____ _____/ |_ ____ ______ __ __ ______ + / _ \_/ ___\ __\/ _ \\____ \| | \/ ___/ + ( <_> ) \___| | ( <_> ) |_> > | /\___ \ + \____/ \___ >__| \____/| __/|____//____ > + \/ |__| \/ + .-' `'. + / \ + | ; + | | ___.--, + _.._ |0) ~ (0) | _.---'`__.-( (_. + __.--'`_.. '.__.\ '--. \_.-' ,.--'` `""` + ( ,.--'` ',__ /./; ;, '.__.'` __ + _`) ) .---.__.' / | |\ \__..--"" """--.,_ + `---' .'.''-._.-'`_./ /\ '. \ _.-~~~````~~~-._`-.__.' + | | .' _.-' | | \ \ '. `~---` + \ \/ .' \ \ '. '-._) + \/ / \ \ `=.__`~-. + / /\ `) ) / / `"". \ + , _.-'.'\ \ / / ( ( / / + `--~` ) ) .-'.' '.'. | ( + (/` ( (` ) ) '-; + ` '-; (-' + --== Looking for AWS ID and Secret Access ==-- + B4d C0d3 + +Author: g0ttfr1d +Contributor : Achilles0x01 +github: g0ttfr1d +github: iBLISSLabs + +IBLISS Labs +"#, + r#" + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣴⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣦⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀ + ⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀ + ⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀ + ⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀ + ⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀ + ⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ + ⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀⢀⣠⣴⣶⠿⠟⠻⢿⣶⣤⣄⡀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ + ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⣀⣤⣶⡾⠿⠛⠉⠀⠀⠀⠀⠀⠀⠉⠛⠿⣷⣦⣄⣀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷ + ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣣⣤⣶⠿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⢿⣶⣤⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ + ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ + ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣷⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿ + ⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠉⠻⢿⣶⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣾⡿⠛⠉⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ + ⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠈⠙⠿⣷⣦⣄⠀⠀⠀⠀⠀⠀⣠⣴⣾⠟⠋⠁⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁ + ⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⠀⠙⠻⢿⣶⣄⣤⣶⡿⠟⠉⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀ + ⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠈⠛⠋⠁⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀ + ⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀ + ⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀ + ⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠻⠿⠿⢿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠟⠛⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +"#, + r#" +⢸⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⡷⠀⠀ +⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀ +⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇ Are ya winning son? +⢸⠀⠀⠀⠀⠀⠖⠒⠒⠒⢤⠀⠀⠀⡇ +⢸⠀⠀⣀⢤⣼⣀⡠⠤⠤⠼⠤⡄⠀⡇⠀ +⢸⠀⠀⠑⡤⠤⡒⠒⠒⡊⠙⡏⠀⢀⡇⠀ +⢸⠀⠀⠀⠇⠀⣀⣀⣀⣀⢀⠧⠟⠁⡇ +⢸⠀⠀⠀⠸⣀⠀⠀⠈⢉⠟⠓⠀⠀⡇ +⢸⠀⠀⠀⠀⠈⢱⡖⠋⠁⠀⠀⠀⠀⡇ +⢸⠀⠀⠀⠀⣠⢺⠧⢄⣀⠀⠀⣀⣀⡇ +⢸⠀⠀⠀⣠⠃⢸⠀⠀⠈⠉⡽⠿⠯⡆ +⢸⠀⠀⣰⠁⠀⢸⠀⠀⠀⠀⠉⠉⠉⡇ +⢸⠀⠀⠣⠀⠀⢸⢄⠀⠀⠀⠀⠀⠀⡇ +⢸⠀⠀⠀⠀⠀⢸⠀⢇⠀⠀⠀⠀⠀⡇ +"#, + r#" +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⣤⣤⣶⣶⣿⣷⣆⠀⠀⠀⠀ +⠀⠀⠀⢀⣤⣤⣶⣶⣾⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⡆⠀⠀⠀ +⠀⢀⣴⣿⣿⣿⣿⣿⣿⡿⠛⠉⠉⠀⠀⠀⣿⣿⣿⣿⣷⠀⠀⠀ +⣠⣿⣿⣿⣿⣿⣿⣿⣿⣇⠀⠀⢤⣶⣾⠿⢿⣿⣿⣿⣿⣇⠀⠀ +⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠈⠉⠀⠀⠀⣿⣿⣿⣿⣿⡆⠀ +⢸⣿⣿⣿⣏⣿⣿⣿⣿⣿⣷⠀⠀⢠⣤⣶⣿⣿⣿⣿⣿⣿⣿⡀ +⠀⢿⣿⣿⣿⡸⣿⣿⣿⣿⣿⣇⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣧ +⠀⠸⣿⣿⣿⣷⢹⣿⣿⣿⣿⣿⣄⣀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿ +⠀⠀⢻⣿⣿⣿⡇⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ +⠀⠀⠘⣿⣿⣿⣿⠘⠻⠿⢛⣛⣭⣽⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿ +⠀⠀⠀⢹⣿⣿⠏⠀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠋ +⠀⠀⠀⠈⣿⠏⠀⣰⣿⣿⣿⣿⣿⣿⠿⠟⠛⠋⠉⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⢠⡿⠿⠛⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +"#, + r#" +      />  フ +      |  _  _ l +      /` ミ_xノ +     /      | +    /  ヽ   ノ +    │  | | | + / ̄|   | | | + | ( ̄ヽ__ヽ_)__) + \二つ +"#, + r#" +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⡇⠀⢶⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⢋⡼⠁⠀⣸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⣿⣳⠏⠀⣠⠞⣡⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⡄⢸⣯⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠳⠸⡟⠁⠀ +⢸⡟⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⢻⢿⣷⢀⣀⣀⣀⡀⠀ +⢸⡇⠀⣶⢦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠶⣒⣒⣿⣋⣥⣄⡉⢻⣆ +⢸⣿⠈⣇⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠶⠶⢶⣿⠁⠀⢸⡇⢰⣿ +⠀⢻⣆⢻⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠒⠒⣾⣯⣤⣴⠟⣡⣿⠃ +⠀⠈⢿⣎⠻⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⣿⣿⣭⣥⣴⡿⠟⠁⠀ +⠀⠀⠈⢿⣷⣄⠑⣦⡄⠀⠀⠀⣀⠀⢛⣻⣿⡟⠉⠉⠉⠀⠀⠀⠀⠀ +⠀⣴⡶⠶⠿⠿⢿⣶⣤⣤⣤⣤⣽⣿⠿⠛⣛⣟⣷⡆ +"#, + r#" +● .  ★  ★ ° ☾ ☆ ¸. ¸  ★  :.  . • ○ ° ★  .  * . . +  ¸ .   °  ¸. * ● ¸ .  ° ☾ °  ¸. ● ¸ .  ★ ° :. +  . • °   .  * :. . ¸ . ● ¸    ★  ★☾ °★ .     + .  °☆  . ● ¸ .   ★ ° .  • ○ ° ★  .       + * .  ☾ °  ¸. * ● ¸     ° ☾ °☆  . * ¸.   ★ ★ ° . .  +  ¸ .: ❤ 𝑯𝒂𝒗𝒆 𝒂 𝑾𝒐𝒏𝒅𝒆𝒓𝒇𝒖𝒍 𝑫𝒂𝒚 ❤  ° ☾ ★ ° . +  . • °   .  * :. . ¸ . ● ¸    ★  ★☾ °★ .   ★ ° . .    + . ☾ °☆  . * ● ¸ .   ★ ° :.  . • ○  .   °  . ● .     +° ☾ °☆  ¸.● .  ★  ★ ° ☾ ☆ ¸. ¸  ★  :.  . • ○ ° ★  .  +  ¸ .   °  ¸. * ● ¸ .    ° ☾ °  ¸. ● ¸ .  ★ +"#, + r#" + _ + _(.)- + \__) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"#, + r#" +★                   ★       ★ + + + + +           ★                   ★       ★ + + ★     ★ + + +        ★           ★         ★      ★ + + +    ★         ★ + + ●/ +/▌ +/ \ +"#, +]; diff --git a/crates/cli/commands/src/lib.rs b/crates/cli/commands/src/lib.rs index 843268a84bb1..b9f8cc71d0d4 100644 --- a/crates/cli/commands/src/lib.rs +++ b/crates/cli/commands/src/lib.rs @@ -8,6 +8,7 @@ #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +mod ascii_art; pub mod common; pub mod config_cmd; pub mod db; diff --git a/crates/cli/commands/src/node.rs b/crates/cli/commands/src/node.rs index 35b553f71378..b8499094d490 100644 --- a/crates/cli/commands/src/node.rs +++ b/crates/cli/commands/src/node.rs @@ -1,6 +1,7 @@ //! Main node command for launching a node - +use crate::ascii_art::ASCII_ART; use clap::{value_parser, Args, Parser}; +use rand::{rngs::SmallRng, Rng, SeedableRng}; use reth_chainspec::ChainSpec; use reth_cli::chainspec::ChainSpecParser; use reth_cli_runner::CliContext; @@ -17,7 +18,10 @@ use reth_node_core::{ version, }; use reth_node_metrics::recorder::install_prometheus_recorder; -use std::{ffi::OsString, fmt, future::Future, net::SocketAddr, path::PathBuf, sync::Arc}; +use std::{ + ffi::OsString, fmt, future::Future, net::SocketAddr, path::PathBuf, sync::Arc, time::Duration, +}; +use tokio::time::interval; /// Start the node #[derive(Debug, Parser)] @@ -111,6 +115,10 @@ pub struct NodeCommand< /// Additional cli arguments #[command(flatten, next_help_heading = "Extension")] pub ext: Ext, + + /// Enable h4ck3r-m0d3 + #[arg(long, default_value_t = false, required = false, hide = true)] + pub h4ck3r_m0d3: bool, } impl> NodeCommand { @@ -157,6 +165,7 @@ impl, Ext: clap::Args + fmt::Debug> No dev, pruning, ext, + h4ck3r_m0d3, } = self; // set up node config @@ -174,6 +183,7 @@ impl, Ext: clap::Args + fmt::Debug> No db, dev, pruning, + h4ck3r_m0d3, }; // Register the prometheus recorder before creating the database, @@ -190,6 +200,18 @@ impl, Ext: clap::Args + fmt::Debug> No node_config = node_config.with_unused_ports(); } + // Prints random ascii art to stdout every 5 minutes + if h4ck3r_m0d3 { + ctx.task_executor.spawn_with_signal(|_| async move { + let mut interval = interval(Duration::from_secs(60 * 5)); + let mut small_rng = SmallRng::from_entropy(); + loop { + interval.tick().await; + println!("{}", ASCII_ART[small_rng.gen_range(0..ASCII_ART.len())]); + } + }); + } + let builder = NodeBuilder::new(node_config) .with_database(database) .with_launch_context(ctx.task_executor); diff --git a/crates/node/core/src/node_config.rs b/crates/node/core/src/node_config.rs index 176d43e26c80..ecb1eed8c317 100644 --- a/crates/node/core/src/node_config.rs +++ b/crates/node/core/src/node_config.rs @@ -127,6 +127,9 @@ pub struct NodeConfig { /// All pruning related arguments pub pruning: PruningArgs, + + /// Enable h4ck3r-m0d3 + pub h4ck3r_m0d3: bool, } impl NodeConfig { @@ -147,6 +150,12 @@ impl NodeConfig { self } + /// Sets --h4ck3r-m0d3 for the node. + pub const fn h4ck3r_m0d3(mut self) -> Self { + self.h4ck3r_m0d3 = true; + self + } + /// Sets --dev mode for the node [`NodeConfig::dev`], if `dev` is true. pub const fn set_dev(self, dev: bool) -> Self { if dev { @@ -413,6 +422,7 @@ impl Default for NodeConfig { dev: DevArgs::default(), pruning: PruningArgs::default(), datadir: DatadirArgs::default(), + h4ck3r_m0d3: false, } } }