lefessan
  • Member for 2 years, 11 months
  • Last seen more than 1 year ago
Reentrancy attack vector on tezos smart contracts?
Accepted answer
16 votes

Michelson (and higher level language like Liquidity on top of it) does not allow a smart contract to call another smart contract without commmitting its state/storage first. It makes reentrancy ...

View answer
Total amount of XTZ in existence
12 votes

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",...

View answer
Is there a way to generate a pseudo-random number inside a contract in liquidity?
11 votes

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 ...

View answer
How can I write tests for my smart contracts?
Accepted answer
11 votes

There are several test frameworks coming for Tezos. Ours (Techelson) can be used both from Michelson and from Liquidity. It should be released soon. (I will update this answer when it is released)

View answer
What is the difference between implicit vs originated accounts?
11 votes

Implicit accounts are accounts created from a public/private key pair. They start with tz{1,2,3}. They are always spendable, but not delegatable. They can be used for baking. They are created on the ...

View answer
How can I create unencrypted addresses?
Accepted answer
10 votes

On mainnet, here is how to do it: start by creating the key with a non-existent node (here xxx does not exist !): tezos-client -A xxx gen keys for_stackexchange It will display some error messages ...

View answer
Benefits of Michelson
9 votes

The main benefits of Michelson are the guarrantees that it gives on the execution of a smart contract : static typing catches many errors, and the semantics is clearly defined, so you have no surprise ...

View answer
Why is running the accuser "optional"?
9 votes

Your baker and your endorser are working for you : they create blocks and operations with your signature, and you get rewards for that. The accuser is different: it monitors the network, detects ...

View answer
Binding the node to any address, not just localhost
Accepted answer
9 votes

If you are using a configuration file, there are two different ports : the "listen-addr" option can be used both in the "p2p" section and in the "rpc" section. You can use "0.0.0.0:8732" for example ...

View answer
What is the difference between fee and gaslimit?
8 votes

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 ...

View answer
How does the accuser determine which account identified a double baking
Accepted answer
8 votes

There is no need to identity who submitted the evidence, because it is the baker who includes the evidence who receives the rewards.

View answer
When is baking rewards counted to the staking balance?
Accepted answer
7 votes

Frozen deposits are part of the staking balance (otherwise, your staking balance would decrease during baking); Frozen rewards are not part of the staking balance. They are taken into account only ...

View answer
How i can get the header of an uncle block using rpc?
7 votes

A node does not keep the former alternative heads. You can only query the current heads: tezos-client -A mainnet-node.tzscan.io rpc help /chains/main/blocks Old ones are removed when their fitness ...

View answer
How do I begin developing on the Tezos network?
7 votes

If you plan to write Smart Contracts, using Liquidity is often simpler than Michelson: http://www.liquidity-lang.org/

View answer
Is it recommended to be 100% delegated for a baker?
Accepted answer
6 votes

Unless you have infinite funds, you cannot prevent from being over delegated, since you cannot prevent users from delegating to you. So, you shouldn’t care too much about it, maybe only give rewards ...

View answer
How do I know my password or backup information is not being shared when creating a new wallet?
6 votes

If the key is generated on their server, you have no way to know. If the key is generated locally in your browser, you may try to monitor the network to see what the wallet sends to the server. ...

View answer
Why a reveal operation?
Accepted answer
6 votes

Ethereum way of retrieving the public key only works with some signing algorithms, ECDSA with secp256k1 in its case. It is also used by Tezos for tz2 (and P-256 for tz3), but not for tz1 which uses ...

View answer
Format of public key, signature and key_hash literals
Accepted answer
6 votes

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/

View answer
How do I remove the private mode setting from my node? My node is not connecting to peer
6 votes

If you want to remain in private-mode, you must provide an argument --peer node:port when starting your node, or edit the config.json file of the node to add such peers (which is better, as it will be ...

View answer
Running a private tezos chain for development
6 votes

Which protocol is indicated in: tezos-client -A <your-node> rpc get /chains/main/blocks/head/header It is likely that it switched to protocol 002 (instead of 003), and that your client does ...

View answer
Node on zeronet giving validator errors
Accepted answer
6 votes

You are probably connected to very few nodes, some of them very slow. You get timeouts while synchronizing the chain. Since there are very few nodes participating on Zeronet, and probably running on ...

View answer
What does Block_locator.mli in tezos-base do?
Accepted answer
6 votes

The block locator is used to synchronize two nodes : each node sends a block locator to the other one at connection initialization, so that they can evaluate how far they are on the blockchain. If ...

View answer
How to run tezos node in private mode using docker images?
6 votes

When you launch the docker node with ./mainnet.sh start, you can add extra arguments such as --private-mode --peer AAA.BBB.CCC.DDD:PORT (you probably need to specify --peer to connect your private ...

View answer
When setting up a contract, what do the fields mean?
5 votes

Manager : the keyhash (tz) of the account that can spend the money on the contract, if the contract is spendable, or change the delegate Spendable : is it possible to spend the money on this account ...

View answer
How does NOW work?
Accepted answer
5 votes

There is an assumption that all Tezos nodes are synchronized, otherwise the consensus with 1-minute slots would not work. Of course, some delay is ok, but more than a few seconds might prevent a baker ...

View answer
Is tezos-node single or multi-threaded?
Accepted answer
5 votes

The current version of the Tezos node is mono-threaded. Indeed, there is work in the direction of parallelisation, it is probably better to do so through multiple processes than through multithreading,...

View answer
Generic baking error on main
Accepted answer
5 votes

The bond computation (% of tokens you need for a given number of rolls) is not exact, it depends on how many rolls are actually used for baking, and also of what happen on the network: the mean ...

View answer
what this 2 empty [] mean?
5 votes

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,...

View answer
How can I call a contract with a type parameter?
5 votes

If you use the next branch of Liquidity, you can use : liquidity CONTRACT.liq --call-arg main '{ name = "test"; sig = "abcd" }' to print the argument to be used by tezos-client (where main is the ...

View answer
How can I deploy a Michelson smart contract?
Accepted answer
5 votes

Read the documentation of: tezos-client -A mainnet-node.tzscan.io originate contract It says: tezos-client originate contract <new> for <mgr> transferring <qty> from <src> ...

View answer