Bitcoin Forum
June 20, 2018, 11:03:39 PM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: anyone know about the P2Pool code regards merge mining?  (Read 641 times)
temple
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500


OPEN Platform - Powering Blockchain Acceptance


View Profile
May 11, 2016, 11:42:22 PM
 #1

Code:
   if True:
            share_info, gentx, other_transaction_hashes, get_share = share_type.generate_transaction(
                tracker=self.node.tracker,
                share_data=dict(
                    previous_share_hash=self.node.best_share_var.value,
                    coinbase=(script.create_push_script([
                        self.current_work.value['height'],
                        ] + ([mm_data] if mm_data else []) + [
                    ]) + self.current_work.value['coinbaseflags'])[:100],
                    nonce=random.randrange(2**32),
                    pubkey_hash=pubkey_hash,
                    subsidy=self.current_work.value['subsidy'],
                    donation=math.perfect_round(65535*self.donation_percentage/100),
                    stale_info=(lambda (orphans, doas), total, (orphans_recorded_in_chain, doas_recorded_in_chain):
                        'orphan' if orphans > orphans_recorded_in_chain else
                        'doa' if doas > doas_recorded_in_chain else
                        None
                    )(*self.get_stale_counts()),
                    desired_version=(share_type.SUCCESSOR if share_type.SUCCESSOR is not None else share_type).VOTING_VERSION,
                ),
                block_target=self.current_work.value['bits'].target,
                desired_timestamp=int(time.time() + 0.5),
                desired_target=desired_share_target,
                ref_merkle_link=dict(branch=[], index=0),
                desired_other_transaction_hashes_and_fees=zip(tx_hashes, self.current_work.value['transaction_fees']),
                net=self.node.net,
                known_txs=tx_map,
                base_subsidy=self.node.net.PARENT.SUBSIDY_FUNC(self.current_work.value['height']),
            )
       

What does this piecesof code do?
It is in the p2pool work.py file.


        %%%%%%%%%%(        
      %%%%%%%%%%%%%  %%     
    %%%%%%%%%%%%%%  .%%%%   
   %%%%%%%%        %%%%%%%  
  /%%%%%%           %%%%%%/ 
  %%%%%%(           (%%%%%% 
  %%%%%%(           (%%%%%% 
  ,%%%%%%           %%%%%%, 
   %%%%%%%%       %%%%%%%%  
    %%%%%%%%%%%%%%%%%%%%%   
      %%%%%%%%%%%%%%%%%     
         %%%%%%%%%%%       
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
.
OPEN PLATFORM
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
[]
1529535819
Hero Member
*
Offline Offline

Posts: 1529535819

View Profile Personal Message (Offline)

Ignore
1529535819
Reply with quote  #2

1529535819
Report to moderator
1529535819
Hero Member
*
Offline Offline

Posts: 1529535819

View Profile Personal Message (Offline)

Ignore
1529535819
Reply with quote  #2

1529535819
Report to moderator
1529535819
Hero Member
*
Offline Offline

Posts: 1529535819

View Profile Personal Message (Offline)

Ignore
1529535819
Reply with quote  #2

1529535819
Report to moderator
Automated Bitcoin Fork Extraction Tool WE DO TOUGH WALLETS: BCH | BTG | BCD | SBTC | UBTC | B2X | BCX | BTF Electrum 2FA, Trezor, Ledger, SegWit, Bech32
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1529535819
Hero Member
*
Offline Offline

Posts: 1529535819

View Profile Personal Message (Offline)

Ignore
1529535819
Reply with quote  #2

1529535819
Report to moderator
1529535819
Hero Member
*
Offline Offline

Posts: 1529535819

View Profile Personal Message (Offline)

Ignore
1529535819
Reply with quote  #2

1529535819
Report to moderator
1529535819
Hero Member
*
Offline Offline

Posts: 1529535819

View Profile Personal Message (Offline)

Ignore
1529535819
Reply with quote  #2

1529535819
Report to moderator
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2562
Merit: 1092


Ruu \o/


View Profile WWW
May 12, 2016, 03:34:47 AM
 #2

p2pool thread:
https://bitcointalk.org/index.php?topic=18313.0
/locked

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!