MCPcopy Create free account

hub / github.com/JoshOrndorff/blockchain-from-scratch / functions

Functions239 in github.com/JoshOrndorff/blockchain-from-scratch

Functionchange_difficulty
Create a PoW consensus engine that changes the difficulty part way through the chain's history.
src/c3_consensus/p6_forking.rs:55
Methodchild
Create and return a valid child header.
src/c4_client/p1_data_structure.rs:31
Methodcontains
(&self, t: <SM as StateMachine>::Transition)
src/c4_client/p4_transaction_pool.rs:80
Functioncreate_empty_chain
Create and return a block chain that is n blocks long starting from the given genesis state. The blocks should not contain any transactions.
src/c4_client/p1_data_structure.rs:70
Methoddefault
()
src/c4_client/p1_data_structure.rs:99
Functioneven_after_given_height
Earlier in this chapter we implemented a consensus rule in which blocks are only considered valid if they contain an even state root. Sometimes a chai
src/c3_consensus/p6_forking.rs:70
Methodfirst_chain_is_better
(chain_1: &[Header], chain_2: &[Header])
src/c2_blockchain/p5_fork_choice.rs:43
Methodfrom
(value: [Bill; N])
src/c1_state_machine/p5_digital_cash.rs:71
Methodfrom
(_: u64)
src/c3_consensus/p5_interleave.rs:22
Methodfrom_iter
(iter: I)
src/c1_state_machine/p5_digital_cash.rs:60
Methodgenesis
Returns a new valid genesis header.
src/c4_client/p1_data_structure.rs:26
Methodgenesis
Returns a new valid genesis header.
src/c2_blockchain/p2_extrinsic_state.rs:33
Methodgenesis
Returns a new valid genesis header.
src/c2_blockchain/p4_batched_extrinsics.rs:35
Methodgenesis
Returns a new valid genesis header.
src/c2_blockchain/p3_consensus.rs:39
Methodgenesis
Returns a new valid genesis header.
src/c2_blockchain/p6_rich_state.rs:49
Methodgenesis
Returns a new valid genesis header.
src/c2_blockchain/p1_header_chain.rs:27
Methodget_block
(&self, block_hash: u64)
src/c4_client/p2_importing_blocks.rs:41
Methodget_state
(&self, block_hash: u64)
src/c4_client/p2_importing_blocks.rs:45
Methodhuman_name
A human-readable name for this state machine. This may be used in user-facing programs such as the repl described below. This is not in any way relate
src/c1_state_machine/mod.rs:25
Methodhuman_name
A human-readable name for this engine. This may be used in user-facing programs error reporting. This is not in any way related to the correctness of
src/c3_consensus/mod.rs:85
Methodimport_block
(&mut self, _: Block<C, SM>)
src/c4_client/p2_importing_blocks.rs:37
Methodimport_hook
(&mut self, header: Header<C::Digest>)
src/c4_client/p3_fork_choice.rs:36
Methodis_leaf
(&self, block_hash: u64)
src/c4_client/p2_importing_blocks.rs:49
Methodmanually_finalize_block
Mark the given block as final so that it will never be reverted. Returns whether or not the block was known and marked successfully.
src/c4_client/p6_finality.rs:13
Functionmoderate_difficulty_pow
Create a PoW consensus engine that has a difficulty threshold such that roughly 1 in 100 blocks with randomly drawn nonces will be valid. That is: the
src/c3_consensus/p1_pow.rs:34
Methodnew
(genesis_state: SM::State)
src/c4_client/p1_data_structure.rs:84
Methodnew
()
src/c1_state_machine/p5_digital_cash.rs:34
Methodnext_from_pool
(&mut self)
src/c4_client/p4_transaction_pool.rs:84
Methodnext_serial
(&self)
src/c1_state_machine/p5_digital_cash.rs:45
Methodnext_state
(starting_state: &ClothesState, t: &ClothesAction)
src/c1_state_machine/p2_laundry_machine.rs:42
Methodnext_state
(starting_state: &bool, t: &())
src/c1_state_machine/p1_switches.rs:17
Methodnext_state
(starting_state: &Self::State, t: &Self::Transition)
src/c1_state_machine/p5_digital_cash.rs:96
Methodnext_state
(starting_state: &Balances, t: &AccountingTransaction)
src/c1_state_machine/p4_accounted_currency.rs:47
Methodnext_state
(_starting: &Self::State, _t: &Self::Transition)
src/c1_state_machine/p6_open_ended.rs:33
Methodnext_state
(starting_state: &Self::State, t: &Self::Transition)
src/c1_state_machine/p3_atm.rs:60
Methodpool_contains
Check whether a a given transaction is in the client's transaction pool.
src/c4_client/p4_transaction_pool.rs:59
Methodpool_size
Get the total number of transactions in the node's transaction pool.
src/c4_client/p4_transaction_pool.rs:54
Functionpow_to_poa
In the spirit of Ethereum's recent switch from PoW to PoA, let us model a similar switch in our consensus framework. It should go without saying that
src/c3_consensus/p6_forking.rs:80
Methodremove
(&mut self, t: <SM as StateMachine>::Transition)
src/c4_client/p4_transaction_pool.rs:72
Methodseal
( &self, parent_digest: &Self::Digest, partial_header: Header<()>, )
src/c3_consensus/p5_interleave.rs:56
Methodseal
Sign the given partial header by the dictator
src/c3_consensus/p2_dictator.rs:28
Methodseal
( &self, parent_digest: &Self::Digest, partial_header: Header<()>, )
src/c3_consensus/p3_poa.rs:26
Methodseal
No real sealing is required.
src/c3_consensus/mod.rs:101
Methodseal
( &self, parent_digest: &Self::Digest, partial_header: Header<()>, )
src/c3_consensus/p4_even_only.rs:23
Methodseal
Mine a new PoW seal for the partial header provided. This does not rely on the parent digest at all.
src/c3_consensus/p1_pow.rs:27
Methodseal
( &self, parent_digest: &Self::Digest, partial_header: Header<()>, )
src/c3_consensus/p6_forking.rs:35
Methodsize
(&self)
src/c4_client/p4_transaction_pool.rs:76
Functionsm_1_light_switch_toggles_off
()
src/c1_state_machine/p1_switches.rs:50
Functionsm_1_light_switch_toggles_on
()
src/c1_state_machine/p1_switches.rs:55
Functionsm_1_two_switches_first_goes_off_second_was_off
()
src/c1_state_machine/p1_switches.rs:93
Functionsm_1_two_switches_first_goes_off_second_was_on
()
src/c1_state_machine/p1_switches.rs:76
Functionsm_1_two_switches_first_goes_on
()
src/c1_state_machine/p1_switches.rs:60
Functionsm_1_two_switches_second_goes_off
()
src/c1_state_machine/p1_switches.rs:126
Functionsm_1_two_switches_second_goes_on
()
src/c1_state_machine/p1_switches.rs:110
Functionsm_2_dry_clean_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:160
Functionsm_2_dry_clean_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:192
Functionsm_2_dry_cwet_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:200
Functionsm_2_dry_dirty_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:168
Functionsm_2_dry_dirty_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:208
Functionsm_2_dry_tattered_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:184
Functionsm_2_dry_wet_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:176
Functionsm_2_wash_clean_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:104
Functionsm_2_wash_clean_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:136
Functionsm_2_wash_dirty_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:112
Functionsm_2_wash_dirty_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:152
Functionsm_2_wash_tattered_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:128
Functionsm_2_wash_wet_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:120
Functionsm_2_wash_wet_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:144
Functionsm_2_wear_clean_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:48
Functionsm_2_wear_clean_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:80
Functionsm_2_wear_dirty_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:56
Functionsm_2_wear_dirty_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:96
Functionsm_2_wear_tattered_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:72
Functionsm_2_wear_wet_clothes
()
src/c1_state_machine/p2_laundry_machine.rs:64
Functionsm_2_wear_wet_until_tattered
()
src/c1_state_machine/p2_laundry_machine.rs:88
Functionsm_3_enter_correct_pin
()
src/c1_state_machine/p3_atm.rs:183
Functionsm_3_enter_single_digit_of_pin
()
src/c1_state_machine/p3_atm.rs:131
Functionsm_3_enter_single_digit_of_withdraw_amount
()
src/c1_state_machine/p3_atm.rs:204
Functionsm_3_enter_wrong_pin
()
src/c1_state_machine/p3_atm.rs:162
Functionsm_3_press_key_before_card_swipe
()
src/c1_state_machine/p3_atm.rs:114
Functionsm_3_simple_swipe_card
()
src/c1_state_machine/p3_atm.rs:66
Functionsm_3_swipe_card_again_part_way_through
()
src/c1_state_machine/p3_atm.rs:83
Functionsm_3_try_to_withdraw_too_much
()
src/c1_state_machine/p3_atm.rs:235
Functionsm_3_withdraw_acceptable_amount
()
src/c1_state_machine/p3_atm.rs:252
Functionsm_4_burn_more_than_balance
()
src/c1_state_machine/p4_accounted_currency.rs:158
Functionsm_4_burn_no_existential_deposit_left
()
src/c1_state_machine/p4_accounted_currency.rs:128
Functionsm_4_burner_does_not_exist
()
src/c1_state_machine/p4_accounted_currency.rs:188
Functionsm_4_empty_burn
()
src/c1_state_machine/p4_accounted_currency.rs:173
Functionsm_4_empty_mint
()
src/c1_state_machine/p4_accounted_currency.rs:98
Functionsm_4_insufficient_balance_transfer
()
src/c1_state_machine/p4_accounted_currency.rs:248
Functionsm_4_mint_creates_account
()
src/c1_state_machine/p4_accounted_currency.rs:53
Functionsm_4_mint_creates_second_account
()
src/c1_state_machine/p4_accounted_currency.rs:68
Functionsm_4_mint_increases_balance
()
src/c1_state_machine/p4_accounted_currency.rs:83
Functionsm_4_non_registered_burner
()
src/c1_state_machine/p4_accounted_currency.rs:143
Functionsm_4_receiver_not_registered
()
src/c1_state_machine/p4_accounted_currency.rs:280
Functionsm_4_send_to_same_user
()
src/c1_state_machine/p4_accounted_currency.rs:232
Functionsm_4_sender_not_registered
()
src/c1_state_machine/p4_accounted_currency.rs:264
Functionsm_4_sender_to_empty_balance
()
src/c1_state_machine/p4_accounted_currency.rs:296
Functionsm_4_simple_burn
()
src/c1_state_machine/p4_accounted_currency.rs:113
Functionsm_4_simple_transfer
()
src/c1_state_machine/p4_accounted_currency.rs:203
← previousnext →101–200 of 239, ranked by callers