10

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 and say nothing more. In fact, the key was created. call it again: tezos-client -A xxx gen keys for_stackexchange Error: The secret_key alias ...


7

From a high level perspective the purpose of forging is to convert a set of inputs along with the kind of operation you wish to perform (eg: send money, to whom, from whom, how much etc) into a single sequence of bytes which will uniquely represent said operation. Then the next step for this operation to enter the chain is to sign those bytes with your ...


6

Typechecking is done via a protocol RPC, if the node hasn't loaded the protocol, the RPC won't be available. You can also use a sandboxed node to typecheck contracts. Why is the coupling with the node so tight? It shouldn't be, but there is one type of value that can be stored in a contract... Other contracts. The typechecker needs access to the ledger ...


6

Here the RPC API method: /chains/main/blocks/head/context/delegates/tz1.../delegated_contracts Worth to know: If you are working on baking-related software, you should be careful with the level of the block where you get the context. Probably, you might want to use snapshot blocks instead of head, as in example above.


5

The error is due to a mistake I made when upgrading hidapi on OPAM. I was preparing a fix for compiling on FreeBSD (see here), and for some reason re-created the old 1.0 tag which ended up changing the checksum. You can either install hidapi by ignoring the checksum (opam install hidapi --no-checksum) or wait till the 1.1 hits OPAM (probably today).


5

I was able to solve the issue myself. My node had rejected a seemingly valid block. I found this out by listing the rejected blocks of the node: tezos-admin-client list rejected blocks Output: Hash: BLqhrPaH6WQtVYZssbonME7DPiQLTvZyidkYa8dvAxxoeTsnVKD Level: 356181 Error: Inconsistent hash: local: CoWYi7Nmm91pS8ZNXscNTt6uBpNdaWtpantEc3HcV3XASYEVriNS ...


5

Try to be as explicit as possible: specify the full path to tezos-client specify the absolute directory containing the data, especially the aliases (generally --base-dir /home/[..USER..]/.tezos-client) If it does not work, copy-paste the error messages, so that we can understand the problem.


5

To add an originated account to the cli wallet: tezos-client remember contract <new alias> <kt1...> Check if the originated account was successfully added to the client: tezos-client list known contracts Show balance of the originated account: tezos-client get balance for <new alias> In order to transfer from the originated account, ...


5

Active accounts For the first question, it depends on what you mean with "active". This term has at least two meanings in the context of Tezos. First, an implicit account (i.e. a Tezos account that is not associated with a smart contract: a regular account that is used to store and transfer tez) is either present or not in the context. The context contains ...


4

when working with the Tezos command line client it's useful know that you can give accounts an alias to make it easier to enter commands: client add address <new alias> <public key hash to which alias applies> To create an originated account for a given tz1 alias, you need to be aware that it will burn 0.257 xtz, plus you need to specify a fee ...


4

From my understanding, yes and no. There are four groups of operations: Baking - endorsements Voting - proposals and ballots Annonymous - seed_nonce_revelation, double_bake/endorse, activate_account Manager - reveal, delegation, transaction, origination I believe you can combine different operations from the same group.


4

The fee computation follows the formula. The only subtle thing here is that the fee itself can affect the size of the operation in binary. This usually doesn't matter, but to handle the general case, the client currently loops: Start with the draft op with fee set to zero (with its gas_limit and storage_limit chosen appropriately). Measure the op size in ...


4

Turns out this supposed to be passed like this: '(Pair "tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg" "KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7")'


4

Communication with the Ledger Nano X is added in this MR, which is not yet merged - https://gitlab.com/tezos/tezos/merge_requests/1037


4

The tezos-client and tezos-node RPC have no such feature. If you don't mind using an API other then the node RPC you can find this in the new version of the tzstats indexer (GET /explorer/contract/{hash} returns an object with a key bigmap_ids which is an array) see https://api.babylonnet.tzstats.com/explorer/contract/KT1E5toJrALhVPuKpHWTbRVjgEvWWR98sVKj ...


4

Only manager operations spend fees (and no, fees are not fixed): delegation origination transaction reveal Also, if you sum up all the operations you won't get the correct balance (in many cases), because there are additional things or events which affect the account balance, such as balance updates inside the block metadata or context migration during ...


4

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 internal operation. In case of internal operation, original sender pays for all the fees, so here is the correct code: if (tx.originalSender != null) { ...


4

The storage and allocations costs you mentions should rather be referred to as burn as they are not sent to anyone: they are only removed from the account of the sender. They are applied when the size of the blockchain increases. Fees, such as the baker fee, are payed to someone, in this case the baker. When the size of the context of the blockchain ...


4

The counter is simply a number that is incremented with each operation. I think the documentation refers to a replay attack. If operations where not tagged with a counter, that is signed along with the original operation by the author, then an attacker could inject the same operation again. For instance, if you forge an operation that transfers tokens to me,...


3

Following the previous issue the mainnet HEAD hash had to be updated to d27205... Please make sure your head points to there instead of fce3f95... Reference: https://gitlab.com/tezos/tezos/commit/d272059bf474018d0c39f5a6e60634a95f0c44aa


3

Your Chain is not synced yet. (timestamp: 2018-12-06T06:17:48Z, validation: 2019-04-03T14:08:44Z) As you can see, the chain is currently in 2018-12-06T06:17:48Z. To check if the chain is synced you can use the following commands: ./tezos-client bootstrapped or ./tezos-client get timestamp About node synchronization: link


3

Yes, you need a different data-dir, RPC port, and P2P port, like: --net-addr :10001 --rpc-addr :10002 --data-dir /some/path The tezos-node executables should be compiled from each respective branch mainnet / alphamet too.


3

It turned out to be a specific issue with docker-compose version 1.23.0 and 1.23.1, where containers get hashes appended to their names when running them (source: this serverfault question). This turns eg. mainnet_baker-003-PsddFKi3_1 into mainnet_baker-003-PsddFKi3_1_fefc704f16d2. The solution is to upgrade docker-compose to version 1.23.3or higher and ...


3

npm i eztz wont work. Instead you can add eztz's git repo as a dependency in your package.json "dependencies": { "eztz": "git://github.com/TezTech/eztz.git#0c6b93ffdd774f7ed3c528058f854deb0649a61c" } After that you just run npm i or yarn to install the package. When you want to use the library you have to import it import { eztz } from 'eztz';...


3

This request is using the balance updates that we have disabled on alphanet. I would recommend to use the node rpc: https://alphanet-node.tzscan.io/chains/main/blocks/head/context/contracts/tz1XgTzqC9JJNds5isd95VPaRHpVHpFX8zs2/balance But this also gives 0 so your balance is actually of 0.


3

You should replace PUSH key_hash tz1xxx by PUSH key_hash "tz1xxx" (note the double quotes). However, the client should be smart enough to understand tezos-client transfer 1000 from KT1xxx to tz1xxx.


3

High watermark is the lowest block number that your ledger is allowed to sign bake or endorse operations. That means if the watermark is set to 100000, the ledger is disallowed to sign any block number 100000 or below. This is a mechanism to prevent double baking. The ledger-app documentation states: When updating the version of Tezos Baking you are ...


3

From the command line interface reference, also accessible through tezos-client man -v 3: tezos-client set delegate for <src> to <mgr> src is your tz1, mgr is the baker's address.


3

Not supported by the command line client at the moment, but the pytezos library supports it, see Key.generate. Generates new key :param passphrase: optional password :param curve: b'sp' for secp251k1, b'p2' for P256/secp256r1, b'ed' for Ed25519 (default) :param strength: mnemonic strength, default is 128 :param language: mnemonic language, default is ...


3

./tezos-client rpc get /chains/main/mempool/pending_operations (same but less overhead) http://127.0.0.1:8732/chains/main/mempool/pending_operations Output is a JSON object. Just parse it using your favorite programming language.


Only top voted, non community-wiki answers of a minimum length are eligible