Hot answers tagged

17

Each Tezos node maintains a representation of the current state of the ledger. That state includes things like the storage of each contract, the balance of different addresses, etc. The goal of the blockchain is to allow a decentralized network of participants to reach consensus on what that state is. Since the chain can have reorganizations, it's sometimes ...


14

There's no other way, you have to simulate what the operation does if you want to estimate this value, and this is exactly what a dry run does. You could try to reimplement it outside of a node, but the approach would be the same.


11

The clue to the solution is in the part of the error saying that Validation of block BK... failed. It seems that it wasn't checking to see if there was any new free disk space available, it was just reading back the error of why it failed in the first place. And when it failed to validate the block, the block was marked as invalid. After running ./tezos-...


10

Garbage collection deletes unused data from your drive. In this case, it deletes intermediate states which are not needed to operate the chain. No information is lost as those states can be reconstructed from the past blocks. Pruning has been used to describe different things. The concept makes more sense in the context of Bitcoin where it refers to ...


9

There isn't currently a wallet for iOS using the secure enclave. But the tz3 accounts use p-256 encryption and were put in primarily to support iOS, Android, and other devices which are only compatible with p-256. There has been some work toward multisig contracts intended for use with secure enclave based wallets, I would expect we will see something soon. ...


8

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 dependent on 3 parameters: a fixed minimum fee, a fee by storage unit and a fee by gas unit (reflection the cost of performing calculations). Those 3 parameters are ...


8

1. Maximum parameter size per transaction The maximum number of bytes per transaction for a single transaction is limited several constants, in particular an upper size of for operations max_operation_data_length and the hard gas limits for operations and blocks (a block contains a set of operations): "max_operation_data_length": 16384, "...


7

In the command line ./tezos-client get contract storage for KT1BRudFZEXLYANgmZTka1xCDN5nWTMWY7SZ You could also just call the RPC curl http://localhost:8732/chains/main/blocks/head/context/contracts/KT1BRudFZEXLYANgmZTka1xCDN5nWTMWY7SZ/storage


5

As of today(2/18/2019), the chain size is ~95GB. The chain grows about .5GB per day so if we don't change anything, namely garbage collection, we'll need about 100GB upgrade about every 7 months. But since garbage collection will be implemented soon, there will be choices of 3 separate modes: archive, full and rolling. These are their descriptions: full ...


4

An implicit account will be deleted as soon as it's emptied. However, if it's a registered delegate, it won't be deleted. Also, if the implicit account is delegated, you will not be able to empty it, unless the delegation is withdrawn first. You will not need to repeat the reveal, only the burn to reactivate by the sender.


3

There are several example templates, such as FA2 (real world token contracts) and Collatz (small demo and test template). https://www.smartpy.io/dev/?template=FA2.py https://www.smartpy.io/dev/?template=collatz.py For your example, the error message is clearly unhelping but you should define an entry point to receive the value in a contract. You cannot use ...


3

You actually answered the question in the comments, but for those who don't read comments: There are two limitations: max_operation_data_length: 16384 bytes hard_storage_limit_per_operation: 60000 bytes This means that you can't send more than ~16KB per transaction, so the only way is to split the "really long string" into chunks and store those ...


3

A guide to upgrade toward the new storage can be found here.


2

If you are interested in a study on the impact of storage improvements, see here (there is also a link towards a storage-efficient tezos node).


2

My dedicated miner/machine has 8gb of ram and a 512 gb SSD. SSD could be less, but data is increasing about 0.5gb per day and I wanted enough space to not have to worry.


2

Actually, it is not the full storage, but only the non-big_map part. Normally, that part should not grow too much, compared to the big_map part. But indeed, it can still be expensive to repeat that storage in all transaction results, especially partial ones. In the node, transaction_results are stored in the blocks, themselves stored in the store database. ...


2

Taylor Keefer demonstrated a prototype iOS app on May 6, 2019 in a Medium article "Signing Tezos Transactions with iOS’s Secure Enclave and Face ID". As in the solution described by @cousinit, this prototype uses a "1 of 2 multi signature smart contract" with a second key used in case the access to the key in the secure enclave is not available anymore.


2

When running a node, the store is responsible of storing blocks (headers, operations, …) and the context stores the ledger state (balances, contracts, …). In the current rolling mode implementation, only the store is cleaned on regular basis (at the beginning of a new cycle). Indeed, the garbage collection (deletion of unreachable elements) of the context ...


2

Let's find the contract on Arronax and look at its code... storage unit; code { CDR ; NIL operation ; AMOUNT ; PUSH mutez 0 ; { COMPARE ; EQ ; IF {} { SOURCE ; CONTRACT unit ; { IF_NONE { { UNIT ; FAILWITH } } {} } ; AMOUNT ; UNIT ; TRANSFER_TOKENS ; CONS } } ; PAIR } ..you will see that nothing is effectively being ...


2

I found the solution! For me it: function httpGet() { let xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", 'https://alphanet-node.tzscan.io/chains/main/blocks/head/context/contracts/<CONTRACT_ADDRESS>/storage', false ); // false for synchronous request xmlHttp.send( null ); return JSON.parse(xmlHttp.responseText) } It returns ...


2

As of Taquito release v6.1.0-beta.0 Taquito offers a new API for Maps which provides you with get and set calls. The API does not offer an optional default value param, You will have to catch the error and assign your value. We will change the behaviour of get to return undefined on the unknown key. I will update this issue when it is released. You can ...


2

Here's the parameter values to initialize storage for the fa1.2 contract. It is working well on my side. If you want to more look at pascaligo syntax, you can visit ligolang doc pages on https://ligolang.org/docs/language-basics/maps-records and https://ligolang.org/docs/tutorials/get-started/tezos-taco-shop-smart-contract/#populating-our-storage-in-a-dry-...


2

You shouldn't do it. It's very expensive and a total waste of resources. What you can definitely do is store a hash of your string or a ipfs address for example (which is more or less the same).


1

assertTrasnferRecord = sp.TRecord(arg = sp.TRecord(owner = params.owner), target = params.address) You're building a type sp.TRecord and put a value inside params.owner. This is not well built which leads to a Literal format error. Instead of using sp.TRecord, you should try sp.record to build an expression (not a type).


1

If nobody gets back to you soon you can always contact the Ligo team directly on Telegram at: https://t.me/LigoLang You can also find them on Twitter at: https://twitter.com/ligolang And can file an issue if necessary at: https://gitlab.com/ligolang/ligo/issues


1

If the balance is exactly 0, then it needs the burn. /chains/main/blocks/head/context/contracts/${addr}/balance


1

I believe the answer to your question essentially depends on your hardware setup. As you may know, blockchain full nodes are usually pretty intense on disk io so if you are using an old HDD you may likely suffer. But with a recent SSD drive a snapshot of block 458815 too less than 5 mins to generate.


1

Tzscan has joined the Dune network and APIs can change quite dramatically, which will break your app. Why not using Taquito? It is simple and elegant and the package being bundled with your app, it won't break if there is an update. import { Tezos } from "@taquito/taquito"; [...] Tezos.setProvider({...}); const contract = await Tezos.contract.at(...


1

The fees have been updated for proto004 (athens) please have a look here going forward https://github.com/keefertaylor/TezosKit/blob/master/docs/AthensProtocolFees.md


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