Skip to content

Commit 597c227

Browse files
committed
fix proof field forging for reveal
A proof field has been introduced in the protocol Seoul. Its encoding is described here: https://gitlab.com/tezos/tezos/-/blob/octez-v23.0/src/proto_023_PtSeouLo/lib_protocol/operation_repr.ml#L686 If proof is required: - A `ff` tag (True) need to be added in the same way as the `00` tag (False) is added if proof is absent. - A 4-bytes size representing the size of the proof is need.
1 parent cc77a68 commit 597c227

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pytezos/operation/forge.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ def forge_reveal(content: Dict[str, Any]) -> bytes:
9595
res += forge_nat(int(content['gas_limit']))
9696
res += forge_nat(int(content['storage_limit']))
9797
res += forge_public_key(content['public_key'])
98-
res += forge_bool(False) if 'proof' not in content else forge_base58(content['proof'])
98+
99+
if 'proof' in content:
100+
res += forge_bool(True)
101+
res += forge_array(forge_base58(content['proof']))
102+
else:
103+
res += forge_bool(False)
104+
99105
return res
100106

101107

0 commit comments

Comments
 (0)