20
votes
Accepted
What flavor of zksnark in tezos
I am one of the developer working on the integration of some privacy features based on ZKP at Tezos.
Yes there are many tradeoffs in ZKP.
I can try to sum up some them and explain our choices.
The ...
14
votes
what this 2 empty [] mean?
The first list contains the endorsements.
The second list contains all the operations regarding votes and proposals.
The third list contains anonymous operations.
The last one contains the manager ...
12
votes
Total amount of XTZ in existence
TzScan has a service for that, but only for the current value:
https://api1.tzscan.io/v1/supply
returns
{
"dls":"76431859801260",
"foundation":"76431859801260",
"early_bakers":"3156502294100",...
12
votes
Accepted
What determines the length of a cycle in Tezos?
Fundamentally a cycle is a set of block heights for which the baking en endorsement rights are determined by a single random seed.
The reason to have many blocks in a cycle is that it lowers the ...
12
votes
Accepted
What steps should be taken to safely upgrade a baker after a new protocol update
In principle the node doesn't need to be updated, it is capable of receiving a new protocol 004, compile it and use it to validate blocks produced by protocol 004. In practice it is a good idea to ...
11
votes
Is there a way to generate a pseudo-random number inside a contract in liquidity?
If what you mean is a non-predictable source of randomness, no, there is none. Any information that could be used for that could either be predictable by a user, or tempered by a malicious baker.
You ...
9
votes
Accepted
Fees in proto 003?
The information is available from the official documentation in the « Baker » section
https://tezos.gitlab.io/mainnet/protocols/003_PsddFKi3.html
The basic formula specifies that fees are now ...
9
votes
Accepted
What is the smallest monetary unit in Tezos?
Currently 1 tez (1 XTZ) is divisible to six decimal places, and the smallest unit is called a micro tez (mutez).
1 tez = 1,000,000 micro tez
In code it is referred to as one_mutez and it is defined in ...
8
votes
What is the difference between fee and gaslimit?
In Tezos, the fee is independant from the gas : whatever the gas consumed, you always pay the full fee.
However, bakers will probably compute the ratio fee/gas, and prefer transactions with higher ...
8
votes
Accepted
Pruning empty accounts or inactive contracts?
Implicit (tz* accounts) can be removed by storage by reducing the balance to 0, and ensuring the account isn't a registered delegate. If the account is registered, there's no direct way to de-register,...
7
votes
Accepted
Largest block size in tezos?
In Tezos Alpha the Transaction List size is limited:
Tezos does not download blocks all at once, but rather considers headers and various lists of operations separately. In Tezos.alpha, a maximum ...
7
votes
How to generate a fake but valid protocol hash?
Take blake2b hash of arbitrary data.
Prepend \x02\xaa and base58 encode it with checksum.
Example in Python:
from pytezos.encoding import base58_encode
from pytezos.crypto import blake2b_32
...
7
votes
Accepted
What are nonce-revelations?
Fundamentally, nonces are used by the blockchain to create randomness, such as choosing the snapshot for a cycle. Nonces are created by bakers and all the nonces for the cycle are combined to create a ...
7
votes
Accepted
How to calculate a random seed?
We will need these operations:
blake2b: size 32
concat: concatenation of byte arrays
Also, let zero_bytes be 32 zero bytes.
My answer is based on seed_storage.ml and seed_repr.ml, with some ...
6
votes
Accepted
Amending the P2P Layer
The P2P layer is part of the shell and is not amended via the onchain governance. Improvements to the existing approach are always welcome by contributing to the gitlab.
People are also free to work ...
6
votes
Format of public key, signature and key_hash literals
1) About the ed25519 public key, and how it is in bytes:
From [1]:
Ed25519 keys start life as a 32-byte (256-bit) uniformly random binary seed (e.g. the output of SHA256 on some random input). The ...
6
votes
Accepted
Format of public key, signature and key_hash literals
There are some Python code to do that in this blog and a comment posted by Alain:
http://www.ocamlpro.com/2018/11/21/an-introduction-to-tezos-rpcs-signing-operations/
6
votes
Accepted
Total amount of XTZ in existence
The current protocol does not keep track of a tally of all tez on the network. It would be a good idea to do so, as it permits computing proportional reward, it can serve as a canari against money ...
6
votes
Accepted
Where is the reward operation for athens?
This happened directly as part of the context "stitching". When a new protocol is activated, an initialization function is called which lets the new protocol performs some housekeeping on the context ...
6
votes
Accepted
BABY5 vs. BABYM1? How does the network decide which is the "right" protocol?
What happen at the network level is the combination of 2 phenomenons:
First and foremost, we can expect that bakers (who voted for this amended protocol!) will run up to date software and therefore ...
5
votes
Accepted
What does "stakeholders govern the protocol" exactly means?
"Stakeholders govern the protocol" is what it says, there is on-chain governance process where amendments to protocol are voted by stakeholders. An overview of how it is done can be found here.
It is ...
5
votes
What is the difference between fee and gaslimit?
The full fee is always paid for every transactions - the gas limit is just that, a cap on the amount of gas a given transaction can consume. A baker can be guaranteed that they are paid at least fee/...
5
votes
what this 2 empty [] mean?
Difference between reveal and transaction:
When a wallet sends a transaction, it must sign the transaction with the user's private key. However, there is no way for other users to check the signature,...
5
votes
Accepted
How to generate a fake but valid protocol hash?
A "Tezos protocol hash" like PsqEZzKWvmWY29kV6oJZhWDNz9FMmYDjV3S7c496zMuAGDYAF7e is the Base58Check encoding of the hash of some protocol code.
The Base58Check encoding of some data is ...
5
votes
Accepted
How do I base58 encode the chain ID using Python?
Your magicbyte seems to be wrong. If you take the decimal byte values from the original, convert them to hex, then pad it with a leading zero, you get
>>> struct.unpack('>L', b'\x00\x57\...
5
votes
What steps should be taken to safely upgrade a baker after a new protocol update
Bakers don’t have to update the node when athens goes through. The updated rules will activate automagically at the end of the voting cycle (if succesful).
For the baking deamons updated software ...
5
votes
What steps should be taken to safely upgrade a baker after a new protocol update
The Exploration phase for Pt24m4xi.....(Athens A) will end on block level 39216.
We have a supermajority to test the winning proposal (Athens A)
This means that when the exploration phase (https://...
5
votes
Zero-fee transactions
1. No, it's not correct.
There are two types of operations in Tezos: ordinary and internal (aka a result of smart contracts execution). If there is a nonce field or originalSender field, then it's an ...
4
votes
Accepted
Fees for various operation
Docs in tezos.git
Docs by TezTech
To copy from the tezos.git docs:
fees >= (minimal_fees + minimal_nanotez_per_byte * size
+ minimal_nanotez_per_gas_unit * gas)
(size is ...
4
votes
How do I base58 encode the chain ID using Python?
It looks like you are only actually grabbing 2 bytes of data (4 hex chars). I verified this by decoding the result you got, and it only returning two bytes of data for the given magic byte.
Try ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
protocol × 73baking × 12
node × 11
consensus × 7
tezos-client × 5
transactions × 5
operation × 4
fees × 4
gas × 4
testnet × 4
protocol-hash × 4
michelson × 3
testing × 3
encoding × 3
smart-contracts × 2
rpc × 2
api × 2
liquidity × 2
rewards × 2
governance × 2
fee × 2
updates × 2
upgrade × 2
athens × 2
economics × 2