From a3619df8cfcf0cfe0c92144996c1a7744f8b8a3c Mon Sep 17 00:00:00 2001 From: pablo Date: Tue, 28 Dec 2021 12:31:58 +0100 Subject: [PATCH] inital commit, already did quite a few things. --- README.md | 6 + code_samples/bip39-english-words.txt | 2048 ++++++++++++++++++++++++++ code_samples/seed_playground.py | 100 ++ code_samples/test_seed_playground.py | 101 ++ mastering_bitcoin_notes.md | 65 + requirements.txt | 1 + 6 files changed, 2321 insertions(+) create mode 100644 README.md create mode 100644 code_samples/bip39-english-words.txt create mode 100644 code_samples/seed_playground.py create mode 100644 code_samples/test_seed_playground.py create mode 100644 mastering_bitcoin_notes.md create mode 100644 requirements.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..0769fd0 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Chatochi notes + +My notes on running bitcoin and lighting nodes, as well as in learning more +about learning more through Mastering Bitcoin and Mastering the Lightning +Network. + diff --git a/code_samples/bip39-english-words.txt b/code_samples/bip39-english-words.txt new file mode 100644 index 0000000..f78ccaf --- /dev/null +++ b/code_samples/bip39-english-words.txt @@ -0,0 +1,2048 @@ +abandon +ability +able +about +above +absent +absorb +abstract +absurd +abuse +access +accident +account +accuse +achieve +acid +acoustic +acquire +across +act +action +actor +actress +actual +adapt +add +addict +address +adjust +admit +adult +advance +advice +aerobic +affair +afford +afraid +again +age +agent +agree +ahead +aim +air +airport +aisle +alarm +album +alcohol +alert +alien +all +alley +allow +almost +alone +alpha +already +also +alter +always +amateur +amazing +among +amount +amused +analyst +anchor +ancient +anger +angle +angry +animal +ankle +announce +annual +another +answer +antenna +antique +anxiety +any +apart +apology +appear +apple +approve +april +arch +arctic +area +arena +argue +arm +armed +armor +army +around +arrange +arrest +arrive +arrow +art +artefact +artist +artwork +ask +aspect +assault +asset +assist +assume +asthma +athlete +atom +attack +attend +attitude +attract +auction +audit +august +aunt +author +auto +autumn +average +avocado +avoid +awake +aware +away +awesome +awful +awkward +axis +baby +bachelor +bacon +badge +bag +balance +balcony +ball +bamboo +banana +banner +bar +barely +bargain +barrel +base +basic +basket +battle +beach +bean +beauty +because +become +beef +before +begin +behave +behind +believe +below +belt +bench +benefit +best +betray +better +between +beyond +bicycle +bid +bike +bind +biology +bird +birth +bitter +black +blade +blame +blanket +blast +bleak +bless +blind +blood +blossom +blouse +blue +blur +blush +board +boat +body +boil +bomb +bone +bonus +book +boost +border +boring +borrow +boss +bottom +bounce +box +boy +bracket +brain +brand +brass +brave +bread +breeze +brick +bridge +brief +bright +bring +brisk +broccoli +broken +bronze +broom +brother +brown +brush +bubble +buddy +budget +buffalo +build +bulb +bulk +bullet +bundle +bunker +burden +burger +burst +bus +business +busy +butter +buyer +buzz +cabbage +cabin +cable +cactus +cage +cake +call +calm +camera +camp +can +canal +cancel +candy +cannon +canoe +canvas +canyon +capable +capital +captain +car +carbon +card +cargo +carpet +carry +cart +case +cash +casino +castle +casual +cat +catalog +catch +category +cattle +caught +cause +caution +cave +ceiling +celery +cement +census +century +cereal +certain +chair +chalk +champion +change +chaos +chapter +charge +chase +chat +cheap +check +cheese +chef +cherry +chest +chicken +chief +child +chimney +choice +choose +chronic +chuckle +chunk +churn +cigar +cinnamon +circle +citizen +city +civil +claim +clap +clarify +claw +clay +clean +clerk +clever +click +client +cliff +climb +clinic +clip +clock +clog +close +cloth +cloud +clown +club +clump +cluster +clutch +coach +coast +coconut +code +coffee +coil +coin +collect +color +column +combine +come +comfort +comic +common +company +concert +conduct +confirm +congress +connect +consider +control +convince +cook +cool +copper +copy +coral +core +corn +correct +cost +cotton +couch +country +couple +course +cousin +cover +coyote +crack +cradle +craft +cram +crane +crash +crater +crawl +crazy +cream +credit +creek +crew +cricket +crime +crisp +critic +crop +cross +crouch +crowd +crucial +cruel +cruise +crumble +crunch +crush +cry +crystal +cube +culture +cup +cupboard +curious +current +curtain +curve +cushion +custom +cute +cycle +dad +damage +damp +dance +danger +daring +dash +daughter +dawn +day +deal +debate +debris +decade +december +decide +decline +decorate +decrease +deer +defense +define +defy +degree +delay +deliver +demand +demise +denial +dentist +deny +depart +depend +deposit +depth +deputy +derive +describe +desert +design +desk +despair +destroy +detail +detect +develop +device +devote +diagram +dial +diamond +diary +dice +diesel +diet +differ +digital +dignity +dilemma +dinner +dinosaur +direct +dirt +disagree +discover +disease +dish +dismiss +disorder +display +distance +divert +divide +divorce +dizzy +doctor +document +dog +doll +dolphin +domain +donate +donkey +donor +door +dose +double +dove +draft +dragon +drama +drastic +draw +dream +dress +drift +drill +drink +drip +drive +drop +drum +dry +duck +dumb +dune +during +dust +dutch +duty +dwarf +dynamic +eager +eagle +early +earn +earth +easily +east +easy +echo +ecology +economy +edge +edit +educate +effort +egg +eight +either +elbow +elder +electric +elegant +element +elephant +elevator +elite +else +embark +embody +embrace +emerge +emotion +employ +empower +empty +enable +enact +end +endless +endorse +enemy +energy +enforce +engage +engine +enhance +enjoy +enlist +enough +enrich +enroll +ensure +enter +entire +entry +envelope +episode +equal +equip +era +erase +erode +erosion +error +erupt +escape +essay +essence +estate +eternal +ethics +evidence +evil +evoke +evolve +exact +example +excess +exchange +excite +exclude +excuse +execute +exercise +exhaust +exhibit +exile +exist +exit +exotic +expand +expect +expire +explain +expose +express +extend +extra +eye +eyebrow +fabric +face +faculty +fade +faint +faith +fall +false +fame +family +famous +fan +fancy +fantasy +farm +fashion +fat +fatal +father +fatigue +fault +favorite +feature +february +federal +fee +feed +feel +female +fence +festival +fetch +fever +few +fiber +fiction +field +figure +file +film +filter +final +find +fine +finger +finish +fire +firm +first +fiscal +fish +fit +fitness +fix +flag +flame +flash +flat +flavor +flee +flight +flip +float +flock +floor +flower +fluid +flush +fly +foam +focus +fog +foil +fold +follow +food +foot +force +forest +forget +fork +fortune +forum +forward +fossil +foster +found +fox +fragile +frame +frequent +fresh +friend +fringe +frog +front +frost +frown +frozen +fruit +fuel +fun +funny +furnace +fury +future +gadget +gain +galaxy +gallery +game +gap +garage +garbage +garden +garlic +garment +gas +gasp +gate +gather +gauge +gaze +general +genius +genre +gentle +genuine +gesture +ghost +giant +gift +giggle +ginger +giraffe +girl +give +glad +glance +glare +glass +glide +glimpse +globe +gloom +glory +glove +glow +glue +goat +goddess +gold +good +goose +gorilla +gospel +gossip +govern +gown +grab +grace +grain +grant +grape +grass +gravity +great +green +grid +grief +grit +grocery +group +grow +grunt +guard +guess +guide +guilt +guitar +gun +gym +habit +hair +half +hammer +hamster +hand +happy +harbor +hard +harsh +harvest +hat +have +hawk +hazard +head +health +heart +heavy +hedgehog +height +hello +helmet +help +hen +hero +hidden +high +hill +hint +hip +hire +history +hobby +hockey +hold +hole +holiday +hollow +home +honey +hood +hope +horn +horror +horse +hospital +host +hotel +hour +hover +hub +huge +human +humble +humor +hundred +hungry +hunt +hurdle +hurry +hurt +husband +hybrid +ice +icon +idea +identify +idle +ignore +ill +illegal +illness +image +imitate +immense +immune +impact +impose +improve +impulse +inch +include +income +increase +index +indicate +indoor +industry +infant +inflict +inform +inhale +inherit +initial +inject +injury +inmate +inner +innocent +input +inquiry +insane +insect +inside +inspire +install +intact +interest +into +invest +invite +involve +iron +island +isolate +issue +item +ivory +jacket +jaguar +jar +jazz +jealous +jeans +jelly +jewel +job +join +joke +journey +joy +judge +juice +jump +jungle +junior +junk +just +kangaroo +keen +keep +ketchup +key +kick +kid +kidney +kind +kingdom +kiss +kit +kitchen +kite +kitten +kiwi +knee +knife +knock +know +lab +label +labor +ladder +lady +lake +lamp +language +laptop +large +later +latin +laugh +laundry +lava +law +lawn +lawsuit +layer +lazy +leader +leaf +learn +leave +lecture +left +leg +legal +legend +leisure +lemon +lend +length +lens +leopard +lesson +letter +level +liar +liberty +library +license +life +lift +light +like +limb +limit +link +lion +liquid +list +little +live +lizard +load +loan +lobster +local +lock +logic +lonely +long +loop +lottery +loud +lounge +love +loyal +lucky +luggage +lumber +lunar +lunch +luxury +lyrics +machine +mad +magic +magnet +maid +mail +main +major +make +mammal +man +manage +mandate +mango +mansion +manual +maple +marble +march +margin +marine +market +marriage +mask +mass +master +match +material +math +matrix +matter +maximum +maze +meadow +mean +measure +meat +mechanic +medal +media +melody +melt +member +memory +mention +menu +mercy +merge +merit +merry +mesh +message +metal +method +middle +midnight +milk +million +mimic +mind +minimum +minor +minute +miracle +mirror +misery +miss +mistake +mix +mixed +mixture +mobile +model +modify +mom +moment +monitor +monkey +monster +month +moon +moral +more +morning +mosquito +mother +motion +motor +mountain +mouse +move +movie +much +muffin +mule +multiply +muscle +museum +mushroom +music +must +mutual +myself +mystery +myth +naive +name +napkin +narrow +nasty +nation +nature +near +neck +need +negative +neglect +neither +nephew +nerve +nest +net +network +neutral +never +news +next +nice +night +noble +noise +nominee +noodle +normal +north +nose +notable +note +nothing +notice +novel +now +nuclear +number +nurse +nut +oak +obey +object +oblige +obscure +observe +obtain +obvious +occur +ocean +october +odor +off +offer +office +often +oil +okay +old +olive +olympic +omit +once +one +onion +online +only +open +opera +opinion +oppose +option +orange +orbit +orchard +order +ordinary +organ +orient +original +orphan +ostrich +other +outdoor +outer +output +outside +oval +oven +over +own +owner +oxygen +oyster +ozone +pact +paddle +page +pair +palace +palm +panda +panel +panic +panther +paper +parade +parent +park +parrot +party +pass +patch +path +patient +patrol +pattern +pause +pave +payment +peace +peanut +pear +peasant +pelican +pen +penalty +pencil +people +pepper +perfect +permit +person +pet +phone +photo +phrase +physical +piano +picnic +picture +piece +pig +pigeon +pill +pilot +pink +pioneer +pipe +pistol +pitch +pizza +place +planet +plastic +plate +play +please +pledge +pluck +plug +plunge +poem +poet +point +polar +pole +police +pond +pony +pool +popular +portion +position +possible +post +potato +pottery +poverty +powder +power +practice +praise +predict +prefer +prepare +present +pretty +prevent +price +pride +primary +print +priority +prison +private +prize +problem +process +produce +profit +program +project +promote +proof +property +prosper +protect +proud +provide +public +pudding +pull +pulp +pulse +pumpkin +punch +pupil +puppy +purchase +purity +purpose +purse +push +put +puzzle +pyramid +quality +quantum +quarter +question +quick +quit +quiz +quote +rabbit +raccoon +race +rack +radar +radio +rail +rain +raise +rally +ramp +ranch +random +range +rapid +rare +rate +rather +raven +raw +razor +ready +real +reason +rebel +rebuild +recall +receive +recipe +record +recycle +reduce +reflect +reform +refuse +region +regret +regular +reject +relax +release +relief +rely +remain +remember +remind +remove +render +renew +rent +reopen +repair +repeat +replace +report +require +rescue +resemble +resist +resource +response +result +retire +retreat +return +reunion +reveal +review +reward +rhythm +rib +ribbon +rice +rich +ride +ridge +rifle +right +rigid +ring +riot +ripple +risk +ritual +rival +river +road +roast +robot +robust +rocket +romance +roof +rookie +room +rose +rotate +rough +round +route +royal +rubber +rude +rug +rule +run +runway +rural +sad +saddle +sadness +safe +sail +salad +salmon +salon +salt +salute +same +sample +sand +satisfy +satoshi +sauce +sausage +save +say +scale +scan +scare +scatter +scene +scheme +school +science +scissors +scorpion +scout +scrap +screen +script +scrub +sea +search +season +seat +second +secret +section +security +seed +seek +segment +select +sell +seminar +senior +sense +sentence +series +service +session +settle +setup +seven +shadow +shaft +shallow +share +shed +shell +sheriff +shield +shift +shine +ship +shiver +shock +shoe +shoot +shop +short +shoulder +shove +shrimp +shrug +shuffle +shy +sibling +sick +side +siege +sight +sign +silent +silk +silly +silver +similar +simple +since +sing +siren +sister +situate +six +size +skate +sketch +ski +skill +skin +skirt +skull +slab +slam +sleep +slender +slice +slide +slight +slim +slogan +slot +slow +slush +small +smart +smile +smoke +smooth +snack +snake +snap +sniff +snow +soap +soccer +social +sock +soda +soft +solar +soldier +solid +solution +solve +someone +song +soon +sorry +sort +soul +sound +soup +source +south +space +spare +spatial +spawn +speak +special +speed +spell +spend +sphere +spice +spider +spike +spin +spirit +split +spoil +sponsor +spoon +sport +spot +spray +spread +spring +spy +square +squeeze +squirrel +stable +stadium +staff +stage +stairs +stamp +stand +start +state +stay +steak +steel +stem +step +stereo +stick +still +sting +stock +stomach +stone +stool +story +stove +strategy +street +strike +strong +struggle +student +stuff +stumble +style +subject +submit +subway +success +such +sudden +suffer +sugar +suggest +suit +summer +sun +sunny +sunset +super +supply +supreme +sure +surface +surge +surprise +surround +survey +suspect +sustain +swallow +swamp +swap +swarm +swear +sweet +swift +swim +swing +switch +sword +symbol +symptom +syrup +system +table +tackle +tag +tail +talent +talk +tank +tape +target +task +taste +tattoo +taxi +teach +team +tell +ten +tenant +tennis +tent +term +test +text +thank +that +theme +then +theory +there +they +thing +this +thought +three +thrive +throw +thumb +thunder +ticket +tide +tiger +tilt +timber +time +tiny +tip +tired +tissue +title +toast +tobacco +today +toddler +toe +together +toilet +token +tomato +tomorrow +tone +tongue +tonight +tool +tooth +top +topic +topple +torch +tornado +tortoise +toss +total +tourist +toward +tower +town +toy +track +trade +traffic +tragic +train +transfer +trap +trash +travel +tray +treat +tree +trend +trial +tribe +trick +trigger +trim +trip +trophy +trouble +truck +true +truly +trumpet +trust +truth +try +tube +tuition +tumble +tuna +tunnel +turkey +turn +turtle +twelve +twenty +twice +twin +twist +two +type +typical +ugly +umbrella +unable +unaware +uncle +uncover +under +undo +unfair +unfold +unhappy +uniform +unique +unit +universe +unknown +unlock +until +unusual +unveil +update +upgrade +uphold +upon +upper +upset +urban +urge +usage +use +used +useful +useless +usual +utility +vacant +vacuum +vague +valid +valley +valve +van +vanish +vapor +various +vast +vault +vehicle +velvet +vendor +venture +venue +verb +verify +version +very +vessel +veteran +viable +vibrant +vicious +victory +video +view +village +vintage +violin +virtual +virus +visa +visit +visual +vital +vivid +vocal +voice +void +volcano +volume +vote +voyage +wage +wagon +wait +walk +wall +walnut +want +warfare +warm +warrior +wash +wasp +waste +water +wave +way +wealth +weapon +wear +weasel +weather +web +wedding +weekend +weird +welcome +west +wet +whale +what +wheat +wheel +when +where +whip +whisper +wide +width +wife +wild +will +win +window +wine +wing +wink +winner +winter +wire +wisdom +wise +wish +witness +wolf +woman +wonder +wood +wool +word +work +world +worry +worth +wrap +wreck +wrestle +wrist +write +wrong +yard +year +yellow +you +young +youth +zebra +zero +zone +zoo \ No newline at end of file diff --git a/code_samples/seed_playground.py b/code_samples/seed_playground.py new file mode 100644 index 0000000..c70363e --- /dev/null +++ b/code_samples/seed_playground.py @@ -0,0 +1,100 @@ +from typing import List, Dict, Tuple + + +def get_words_from_file(file_path) -> Tuple[dict, dict]: + with open(file_path, "r") as words_file: + + lines_contents = words_file.read().splitlines() + + words = {index: word for index, word in enumerate(lines_contents)} + indexes = {word: index for index, word in enumerate(lines_contents)} + + return words, indexes + + +WORDS, INDEXES = get_words_from_file("bip39-english-words.txt") + + +class MnemonicWord: + def __init__(self, word: str): + word = word.lstrip().rstrip().lower() + if word not in WORDS.values(): + raise ValueError(f"'{word}' is not a valid bip39 word.") + self.word = word + + def as_int(self): + return INDEXES[self.word] + + def as_binary(self): + return bin(INDEXES[self.word]) + + +class MnemonicPhrase: + + allowed_phrase_lengths = [12, 18, 24] + + def __init__(self, words: List[MnemonicWord]): + if len(words) not in self.allowed_phrase_lengths: + raise ValueError( + f"The mnemonic phrase length should be one of {self.allowed_phrase_lengths}, but it was {len(words)}" + ) + self.words = {index: word for index, word in enumerate(words)} + + def __iter__(self): + for index, word in self.words.items(): + yield word + + def __getitem__(self, item): + return self.words[item] + + def as_bin(self): + binary_representation = "0b" + "".join( + [word.as_binary()[2:] for word in self] + ) + return binary_representation + + def as_int(self): + return int( + self.as_bin(), base=2 + ) + + +class Seed: + def __init__(self, seed_as_int: int): + self._seed_as_int = seed_as_int + + @property + def as_mnemonic(self) -> List[str]: + + + return self._seed_as_mnemonic(self._seed) + pass + + @property + def as_integer(self) -> int: + return self._seed_as_int + + @property + def as_binary(self) -> str: + return bin(self._seed_as_int) + + @property + def as_hex(self) -> str: + return hex(self._seed_as_int) + + @classmethod + def from_mnemonic(cls, mnemonic_phrase: MnemonicPhrase): + seed_as_int = mnemonic_phrase.as_int() + return cls(seed_as_int) + + @classmethod + def from_binary(cls, binary_seed_representation: str): + return cls(int(binary_seed_representation, base=2)) + + @classmethod + def from_integer(cls, int_seed_representation: int): + return cls(int_seed_representation) + + @classmethod + def from_hex(cls, hex_seed_representation: str): + return cls(int(hex_seed_representation, base=16)) diff --git a/code_samples/test_seed_playground.py b/code_samples/test_seed_playground.py new file mode 100644 index 0000000..9e0f7f3 --- /dev/null +++ b/code_samples/test_seed_playground.py @@ -0,0 +1,101 @@ +import pytest + +from seed_playground import WORDS, MnemonicWord, MnemonicPhrase + + +def is_a_bin_num_with_0b(possible_bin_num): + allowed_chars = {"0", "1", "b"} + if possible_bin_num[:2] == "0b" and set(possible_bin_num) <= allowed_chars: + return True + return False + + +@pytest.fixture() +def twelve_valid_words(): + raw_words = [ + "primary", + "find", + "roof", + "forget", + "subject", + "present", + "pipe", + "primary", + "flavor", + "grant", + "remain", + "present", + ] + mnemonic_words = [MnemonicWord(a_word) for a_word in raw_words] + return mnemonic_words + + +@pytest.fixture() +def a_valid_mnemonic_phrase(twelve_valid_words): + return MnemonicPhrase(twelve_valid_words) + + +def test_reading_the_file_works(): + + there_are_2048_words = len(WORDS) == 2048 + + first_word_is_abandon = WORDS[0] == "abandon" + last_word_is_zoo = WORDS[2047] == "zoo" + word_1957_is_virus = WORDS[1956] == "virus" + + assert ( + there_are_2048_words + and first_word_is_abandon + and last_word_is_zoo + and word_1957_is_virus + ) + + +def test_passing_bip39_valid_word_instantiates_mnemonic_word_correctly(): + word = MnemonicWord("abandon") + assert isinstance(word, MnemonicWord) + + +def test_passing_random_word_to_mnemonic_word_raises_exception(): + with pytest.raises(ValueError): + word = MnemonicWord("Machiavelli") + + +def test_mnemonic_word_can_be_represented_as_binary(): + word = MnemonicWord("abandon") + word_as_bin = word.as_binary() + assert is_a_bin_num_with_0b(word_as_bin) + + +def test_mnemonic_word_can_be_represented_as_int(): + word = MnemonicWord("abandon") + + word_as_int = word.as_int() + + assert isinstance(word_as_int, int) + + +def test_mnemonic_phrase_instantiates_properly_with_12_words( + twelve_valid_words +): + phrase = MnemonicPhrase(twelve_valid_words) + assert isinstance(phrase, MnemonicPhrase) + + +def test_mnemonic_phrase_fails_with_13_words(twelve_valid_words): + twelve_valid_words.append(MnemonicWord("abandon")) + thirteen_valid_words = twelve_valid_words + + with pytest.raises(ValueError): + phrase = MnemonicPhrase(thirteen_valid_words) + + +def test_mnemonic_phrase_is_iterable(a_valid_mnemonic_phrase): + for word in a_valid_mnemonic_phrase: + word + + +def test_mnemonic_phrase_as_bin_returns_a_valid_bin(a_valid_mnemonic_phrase): + bin_representation = a_valid_mnemonic_phrase.as_bin() + + assert is_a_bin_num_with_0b(bin_representation) diff --git a/mastering_bitcoin_notes.md b/mastering_bitcoin_notes.md new file mode 100644 index 0000000..4da65d7 --- /dev/null +++ b/mastering_bitcoin_notes.md @@ -0,0 +1,65 @@ +# Mastering Bitcoin notes + +So, after years of messing around with Bitcoin, the time has finally come to +reach the bottom of the rabbit hole and understand things down to the code +level. + +I'm going to use this document to keep my notes and thoughts while going +through the book. + +---------- + +"There's a lot more to Bitcoin than first meets the eye." Joder, ya te digo. + +---------- + +Finally, I get to discover what the hell is an `SPV`: simplified payment +verification, which is fancy pants language for a client that keeps keys and +performs operations but relies on another full-node for following the protocol +and getting the blockchain data from other peers. So, if I understand +correctly, an Electrum Personal Server fits the definition of an SPV. + +---------- + +Andreas mentions that we should talk about "mnemonic phrase", and not a "seed +phrase", because "even though common, its use is incorrect". But, why? -> So +it works this way: technically, the seed is a 512-bit piece of data, which is +the actual piece of information used to generate the keys of a wallet. The +mnemonic is just a human-readeable proxy to this seed, hence why mnemonic != +seed. + +This sparked my curiosity and I have been reading more low level details on how +seed generation works. + +The first thing that's required is randomness. To get this, a series of bits is +generated. Specifically, the entropy should be between 128 and 256 bits (that +means, 128 to 256 random zeros and ones). + +The checksum for this entropy is computed the following way: + +- Generate the SHA256 hash of the entropy. +- Starting from the left, grab one bit of the hash for every 32 bits of length +in the original entropy (if the entropy is 128 bits, 128/32 = 4, you grab the 4 +first bits of the hash). + +```python + +entropy = "01000010011111001011100101101111001010010110101011011111000001101000110111111001010000101000000110011010110011110110010000011001" +entropy_len = len(entropy) + +import hashlib + +hash_of_entropy = hashlib.sha256(entropy) + +print(hash_of_entropy) + + + + +``` + +---------- + +Another interesting fact: miner fees for a transaction are not explicitly +specified anywhere, but are simply calculated as the difference between the +inputs and the outputs of the transaction. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..55b033e --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pytest \ No newline at end of file