Skip to content

Commit

Permalink
fix: remove signers from tenure change tx
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Jan 23, 2024
1 parent 8e44b2d commit f8b0ba5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 24 deletions.
4 changes: 0 additions & 4 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,6 @@ export interface TxPayloadTenureChange {
cause: TenureChangeCause;
/** (Hex string) The ECDSA public key hash of the current tenure */
pubkey_hash: string;
/** (Hex string) A Schnorr signature from at least 70% of the Stackers */
signature: string;
/** (Hex string) A bitmap of which Stackers signed */
signers: string;
}

export enum TenureChangeCause {
Expand Down
12 changes: 0 additions & 12 deletions src/stacks_tx/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,6 @@ impl TransactionTenureChange {
let mut pubkey_hash = [0u8; 20];
fd.read_exact(&mut pubkey_hash)?;

// ThresholdSignature { R: [0u8; 33], z: [0u8; 32] }
let mut signature = [0u8; 65];
fd.read_exact(&mut signature)?;

let signers_len: u32 = fd.read_u32::<BigEndian>()?;
let mut signers: Vec<u8> = vec![0u8; signers_len as usize];
fd.read_exact(&mut signers)?;

Ok(TransactionTenureChange {
tenure_consensus_hash,
prev_tenure_consensus_hash,
Expand All @@ -486,8 +478,6 @@ impl TransactionTenureChange {
previous_tenure_blocks,
cause,
pubkey_hash,
signature,
signers,
})
}
}
Expand Down Expand Up @@ -729,8 +719,6 @@ pub struct TransactionTenureChange {
pub previous_tenure_blocks: u32,
pub cause: TenureChangeCause,
pub pubkey_hash: [u8; 20],
pub signature: [u8; 65],
pub signers: Vec<u8>,
}

#[repr(u8)]
Expand Down
6 changes: 0 additions & 6 deletions src/stacks_tx/neon_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,12 +682,6 @@ impl NeonJsSerialize for TransactionTenureChange {
let pubkey_hash = cx.string(encode_hex(&self.pubkey_hash));
obj.set(cx, "pubkey_hash", pubkey_hash)?;

let signature = cx.string(encode_hex(&self.signature));
obj.set(cx, "signature", signature)?;

let signers = cx.string(encode_hex(&self.signers));
obj.set(cx, "signers", signers)?;

Ok(())
}
}
Expand Down
2 changes: 0 additions & 2 deletions tests/tx-decode-3.0.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ test('stacks3.0 - decode tx - tenure change', () => {
"previous_tenure_blocks": 1,
"cause": TenureChangeCause.BlockFound,
"pubkey_hash": "0x14ff3cb19986645fd7e71282ad9fea07d540a60e",
"signature": "0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817980000000000000000000000000000000000000000000000000000000000000000",
"signers": "0x"
}
});
});
Expand Down

0 comments on commit f8b0ba5

Please sign in to comment.