New answers tagged

0

The iExec or Enigma projects might be what you are looking for. A challenge of this sort of thing is verifying that the parties executed the job honestly and correctly without every node needing to repeat the job - because that would severely limit the complexity of what can be done and defeat the purpose of deligating a large job to a specific node. ...


1

Prior to Solidity v0.4.21: contract ContractName { function ContractName(...) public { ... } ... } Solidity v0.4.21 onward: contract ContractName { constructor(...) public { ... } ... } The reason: In the older version, if you renamed the contract but forgot to rename the constructor, the latter would turn into a ...


0

Not necessarily. ERC721 tokens can represent anything you want. It can be a collectible 'digital item', but it can also represent things like ownership of a smart contract or a specific basket of currencies (e.g. 1.34 ETH + 157 DAI)


0

Constructor functions should not have a name. Just this will do fine as a constructor: constructor() public { totalSupply = 10000; }


0

Known Ethereum nodes lack functionality to get transaction list for ETH address (account). To solve the issue, there is free and open source third-party solution — Ethereum transaction Indexer: https://github.com/Adamant-im/ETH-transactions-storage The Indexer allows to explore transactions by Ethereum address and obtain a history of any user|wallet in ...


0

A private blockchain is independent from a smart contract. You can run your own private Ethereum network (for example using ganache, geth or parity). To ensure (others) that you don't randomly rollback in a network based on Proof-of-Authority or a low computation power Proof-of-Work consensus mechanism (for example), you can send a transaction to a strong ...


1

Sorry - I forgot I had to add the --rpc --rpcaddr 0.0.0.0 arguments. With that it's working.


1

As long as you're running a version that supports the fork (the latest version), there is no need to stop it.


0

There's a difference between 'hard to achieve' and 'you could run your computer for a quadrillion years and probably not find one'. This falls into the second category.


0

You can try using a reverse ssh connection on a host with public ip of your property, or otherwise use ngrok for the reverse ssh. host= public ip $ssh -R 8545:localhost:<port> user@<host> $ngrok tcp 8545 web3 = Web3(Web3.HTTPProvider("http://<host>:<port>")) //or ngrok link connection with port


0

I found a same issue when I tried to deploy a contract on a private chain with remix-ide using we3 provider. It seems that a node with RPC/HTTP access and an unlocked account is needed. Otherwise, An error occurred saying "Not possible to connect to the Web3 provider. Make sure the provider is running and a connection is open (via IPC or RPC)". In this ...


0

Chain hammer uses a geth and solc as dependencies on Debian. You can use borrow parts of the installation script to help you. Install Go: https://github.com/drandreaskrueger/chainhammer/blob/master/scripts/install-go.sh Install Geth : https://github.com/drandreaskrueger/chainhammer/blob/master/scripts/install-geth.sh Install Solc: https://github.com/...


0

Your high-level thinking about this deserves a little reorientation. You should not use Ethereum to store large objects. It's just not efficient even if you can raise the gas limit high enough to accomodate it in a private network scenario. Let's take a step back. Ethereum is not a suitable replacement for a database, object store or compute server - it's ...


1

Transaction was failing because of fixed gasLimit : 37000. Gas depends on what the function is doing. For example, it is more expensive to set a zero-value storage value to non-zero, than it is to set a non-zero storage value to another non-zero storage value. In my case it was because of SSTORE opcode as it takes 20000 when storage value is set to non-...


0

func decodeTxParams(abi abi.ABI, v map[string]interface{}, data []byte) (map[string]interface{}, error) { m, err := abi.MethodById(data[:4]) if err != nil { return map[string]interface{}{}, err } if err := m.Inputs.UnpackIntoMap(v, data[4:]); err != nil { return map[string]interface{}{}, err } return v, nil }


0

This is related to Geth's Freezer functionality, which "moves ancient chain segments out of the active database into immutable append-only flat files." The message you're seeing is informational, so it's nothing to worry about. Geth's freeze() function (in freezer.go), where that message is output, does the following: "freeze is a background thread that ...


1

Following my comments above, try this: async function test() { var contractObject = web3.eth.contract(...); var submittedContract = await contractObject.new(...); var totalSupply = await contractObject.at(...).totalSupply(); console.log(totalSupply); } test();


0

Of course. It should be stopped.


0

To achieve this I would start off with one node (or a couple) and sync to the main net. At block X, I would then server the connection with the mainnet The connected nodes should continue to propagate their own blocks, which in essence is a fork New nodes can join this network a continue to propagte this new fork. A caveat is that you might have issues ...


1

Those instructions work for me on Ubuntu 18.04. I'm assuming it's something to do with your Go installation (or a missing/out-of-date C compiler?). Another, make-based, method (which again works for me on Ubuntu) is the following: git clone https://github.com/ethereum/go-ethereum Install the latest version of Go sudo apt-get install -y build-essential cd ...


0

If you're not interested in the history then fast node should be enough, I guess. Fast sync basically just ignores the history and starts full sync from the present time, approximately. On the other hand if I was to run an exchange I wouldn't want to have to trust the past history checkpoints of fast sync and I'd want to verify the past data myself so I'd ...


0

As @Ismael said, the problem seems to have been the fact that I was missing 3 forks: petersburg constantinople byzantium After adding these at block 0 it started working.


0

power on raspi / open terminal download geth / move geth to bin wget "https://gethstore.blob.core.windows.net/builds/geth-linux-arm7-1.9.7-a718daa6.tar.gz" tar -xvf geth-linux-arm7-1.9.7-a718daa6.tar.gz; cd geth-linux-arm7-1.9.7-a718daa6; sudo mv geth /usr/local/bin/; initialize a geth node geth --datadir privatenet init genesis.json edit the /etc/rc....


0

If you only need this for development purposes, you can likely just use your laptop / desktop. Here's a tutorial for setting up your own private network creating two local nodes on the same computer. (if you want PoW just select ethash when using puppeth) https://hackernoon.com/setup-your-own-private-proof-of-authority-ethereum-network-with-geth-...


0

The comment from @Briomkez is a correct start - when running the geth command, it is showing that you've connected to ChainID: 1 which is not correct - it's not your private network. To start a private network, create your genesis file (I like to use puppeth). Once you've created your genesis file, run geth init, importantly here - define a datadir geth --...


0

While you can try a web automation tool, this will be slow and often brittle. A better approach would be use npm and a small script which loads web3js and the text file. Then you can parse the text file and submit the transactions via methods of web3js The code under "Usage" should get you started: https://github.com/ethereum/web3.js/


0

You could look into a service which does this for you, for example Cindercloud. Disclaimer: I'm the owner of Cindercloud. There are other services that do this out there, and this is just an example of a service that offers this.


0

Function transfer_money takes one input parameter. So you cannot call transfer_money() without passing it.


2

The problem with tokens is that they can be implemented in a million different ways and still be standard compliant. Also as a partial result of that problem, it's very difficult to say whether a contract is a token contract or not - and different platforms estimate the correctness differently. Let's have a look at the ERC721 standard: http://erc721.org/ . ...


0

You can't through blockchain. You'd need to transfer the actual keys separately (that is outside of blockchain). In geth, to do that you'd need to copy over contents of keystore in datadir.


0

yes, it possible to retrieve data from Ethereum platform. Solidity provides special function that are used to store and retrieve data from Ethereum network.


0

You can't do it. It is not possible to write a contract that directly accesses the wallet of another user or the storage of another contract. So, you need a different approach. Consider users that give the contract authorization to manage a certain amount of money. That can include redistributing to other users according to the rules. Think about an ...


1

Rather than unlocking an account, signing specific transactions is generally a better and more secure way to handle this. There are multiple ways to do this depending on the library you are using. Below are a few examples: web3.js With web3.js you can create a raw transaction and then sign the raw transaction with the account's private key and send it to ...


0

https://www.npmjs.com/package/web3-eth // install using yarn or npm npm install web3 yarn add web3 // in node.js var Web3Eth = require('web3-eth'), eth = new Web3Eth('ws://localhost:8546');


0

When working with web3.js version 1.2.x, there is not .getData method. The solution I found was to estimate of gas of the .deploy() method, which effectively returns the cost of contract creation. The sequence of operations is: let contractJSON = // JSON compiled contract const contractABI = contractJSON.abi; const bytecode = contractJSON.bytecode; const ...


1

You need to set the target gas limit in your command starting the geth network --targetgaslimit value Target gas limit sets the artificial target gas floor for the blocks to mine (default: 4712388) If you don't do this, each time a block is published, the miner of the block moves the gas limit closer to their defined target gas limit.


0

Someone correct me if I'm wrong but as I've understood it archive node can be built from full node information. Full node basically gets all blocks in history and processes them (more specifically: their transactions) to verify the results. An archive node does the same thing but it also saves state information between every transaction. So with full node ...


0

As long as no vote was cast by the majority to change the OPCODE prices, every client will have the same prices, otherwise they will fork and create an isolated network. If the majority casts a vote for changing the prices, you will recognize this by Ethereum being hardforked into 2 different Ethereum Blockchains (like ETH and ETC).


1

To connect to a blockchain you need a node which implements the blockchain functionality. Basically it's a client software. There are currently two major client platforms: Geth and Parity. It can be a bit cumbersome to run your own node but in theory anyone can do it. Infura is a service provider. They basically just provide you with access to one of the ...


0

I've had the same problem. This issue has nothing to do with your genesis file, but rather with the geth version installed by snap. Simply download the most recent geth version from the official website add it should work.


0

OMG, I finally did it... Create Geth Service File: /etc/init.d/geth #!/bin/bash # ### BEGIN INIT INFO # Provides: geth # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Should-Start: $network $named $time # Should-Stop: $network $named $time # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-...


3

TL;DR - Ganache and Puppeth are both tools to spin up your own blockchain. Ganache is meant to be used as a testbed where transactions can be created and contracts can be deployed freely and instantaneously. Puppeth is similar in that it has the ability to do this as well. Puppeth has the advantage of being more configurable and acting more similar to a live ...


2

Just tested with parity ethereum client 2.5.10: maximum possible value was 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff being 64 hexadecimal signs -> 256 bit long. Anything exceeding it leads to a node panic


0

You can run miner.start() on your Geth node, if you enable this rpc module at geth's start. Example : geth --networkid=3 --rpc --rpcapi "eth,net,web3,admin,personal,miner,debug" --etherbase 0xe78150FaCD36E8EB00291e251424a0515AA1FF05 This "miner" module is not available in Parity as there is not embedded miner for it (unless you configure an external GPU ...


0

I changed the path and it worked locate geth.ipc /opt/project/ethereum/geth.ipc


0

Install NodeJS. Run npm install web3@1.2.1. Implement file send.js: const Web3 = require("web3"); async function send(value, firstWalletPrivateKey, secondWalletPublicAddress) { const web3 = new Web3("https://mainnet.infura.io"); const options = { value : value, gas : 21000, to : secondWalletPublicAddress, ...


1

Some answers: 1) I'm not sure where you get your idea about petabytes. Currently a full node takes about 200GB of space: https://etherscan.io/chartsync/chaindefault . Even if you use an archive node (which is very rarely needed) it takes about 3,5 TB: https://etherscan.io/chartsync/chainarchive . So petabytes don't seem to be reality. Clients of course don'...


Top 50 recent answers are included