Neuigkeiten zum Tezos
baking/node code, ich weiß nur noch nicht, ob gut oder schlecht.... Aber alleine anhand der Formulierung befürchte ich nichts Gutes, aber mal abwarten, was die Entwicklerprofis sagen. Tezos unterläuft ja ohnehin permanenten Audits.
Baking Bad: DYOR with PyTezos
tech
We have taken first steps to turn the original PyTezos library created by u/murbard into a full-fledged Python SDK for Tezos, including working with RPC, cryptography, and other features.
One of the goals is providing a tool for blockchain investigations. Like most data scientists we are big fans of Jupyter notebook, so we tried to adapt PyTezos for the interactive use.
We will show some examples of investigations that can be carried out with PyTezos in a series of posts. What do you think?
Ich habe mir jetzt
https://github.com/murbard/pytezos mal angesehen, und im Prinzip geht's wohl um Anfälligkeiten und unsaubere Programmierung der Tezos Nodes... Aber ich bin da absoluter Laie und kann das nicht verifizieren, daher gerne andere Meinungen oder abwarten...
And several methods for operations manipulation:
ops = mainnet.mempool.pending_operations.applied(kind='endorsement')
ops[0].forge()
>>> '6b96a5df309727b4cd9a2aee24a56a83565db00d7dce158d5b55400d92f5022c0000050888'
ops[0].preapply()
>>> [{'contents': [{'kind': 'endorsement',
'level': 329864,
'metadata': {'balance_updates': [{'kind': 'contract',
'contract': 'tz3RDC3Jdn4j15J7bBHZd29EUee9gVB1CxD9',
'change': '-128000000'},
{'kind': 'freezer',
'category': 'deposits',
'delegate': 'tz3RDC3Jdn4j15J7bBHZd29EUee9gVB1CxD9',
'level': 80,
'change': '128000000'},
{'kind': 'freezer',
'category': 'rewards',
'delegate': 'tz3RDC3Jdn4j15J7bBHZd29EUee9gVB1CxD9',
'level': 80,
'change': '4000000'}],
'delegate': 'tz3RDC3Jdn4j15J7bBHZd29EUee9gVB1CxD9',
'slots': [15, 5]}}],
'signature': 'sigsfBsrxKVcS8btuik6vgqR1TRNundZD36ph2tEgjUQdMqHjrNYziJ6godapYMCKq483XqS7rcvfPD61StZ63TE5Jchujs4'}]
ops[0].verify_signature()
>>> No exceptions
The best thing about this wrapper is that you can use not yet wrapped RPC endpoints:
mainnet.context.delegates(active=True)
>>> ['tz2KuCcKSyMzs8wRJXzjqoHgojPkSUem8ZBS',
'tz2JMPu9yVKuX2Au8UUbp7YrKBZJSdYhgwwu',
'tz2E3BvcMiGvFEgNVdsAiwVvPHcwJDTA8wLt', ... ]
Or just use raw requests:
from pytezos.rpc.node import Node
node = Node()
node.get('chains/main/blocks', params={'length': 1})
>>> [['BKvRWnbPeFzFNJ9mkUEcxCzYk68fLa3mPYweqcFVo7TNLAJAz2G'], ... ]
node.post('chains/main/mempool/filter', json={'minimal_fees': 0})
>>> {}