New answers tagged

0

bootnode -nodekey ~/.ethereum/geth/nodekey -writeaddress


-1

Yes, it's possible. You can check out this article for other possible ways to secure your nodes https://medium.com/coinmonks/securing-your-ethereum-nodes-from-hackers-8b7d5bac8986


0

If you can possibly avoid doing a sort in a contract, that is probably what you should do. This might give you some ideas about how to avoid it: https://blog.b9lab.com/the-joy-of-minimalism-in-smart-contract-design-2303010c8b09 There are cases where a contract needs access to a sorted list. You have to think about the maximum possible size of the set and ...


1

This issue has been solved. @karalabe: Missing hashrate was a regression. It was fixed in the latest stable release. Please update. As for the potential slowdown, we did switch out the C++ ethash code to a Go version a couple years back. CPU mining in general is not feasible, so there's not much point in striving to absolute max out performance. ...


1

This issue has been solved by the go-ethereum team. @karalabe: The transaction should propagate across the network at the same time. It however is not included in the current block, because the block currently being mined is already finalized. It's expensive to recreate a new block every time a new transaction pops up. And in the case of ...


1

goodvibration's answer is correct, but just to expand a bit: When you use mapping(address => Cookie[]) cookie; what you are getting is a multidimensional array, in a way. There's a "list" of addresses (the mapping) and each address has a list of Cookies (the array Cookies[]). Then, when a user sends a Cookie to the CookieJar, instead of setting the ...


1

This is good reference that do a new pre-compile contract for Ethereum next hardfork named Istanbul https://github.com/keep-network/go-ethereum/pull/4/files Basically, you only need to implement two methods of per-compiled contract interface RequiredGas(): to define how many gas user need to pay when calling the per-compiled contract. Run(): write your ...


1

This is only the temporary EVM for running tnx to get the value then it doesn't make and changes in the state/blockchain


1

This is only the Call API expose to everyone then from is not deal. The state is only temporarily for execute the call and cannot update any real state so it do no harm at all. You can see on the comment code also https://github.com/ethereum/go-ethereum/blob/f578d41ee6b3087f8021fd561a0b5665aea3dba6/internal/ethapi/api.go#L812 // Call executes the given ...


0

You got this message because your account is not enough amount to fee for this transaction.


0

This depends on what do you mean by ”transaction” and what do you mean by “transaction of a contract”. For transaction there could be at least two meanings: Real Ethereum transaction included into a block with separate hash, receipt etc. So called “internal” transaction, initiated by a smart contract, that does not have hash nor receipt. For “transaction ...


1

The main constraint to keep in mind is you want to always organize things so you can complete the needed operations with functions of O(1) complexity, so they will have a consistent gas cost at any scale. In practical terms, avoid unbounded for loops and recursion (The stack depth limit will probably "get you" before it runs out of gas). The naive way is ...


0

In Bitcoin, there are various coin selection strategies designed to reduce Utxos set & transaction fees due to the ability to transfer several Utxos in one transaction. But Ethereum uses the account model so it's quite not quite possible, the best approach considering the dust issue (i.e the value transferred is less than the required transaction fees ...


0

It is not possible to downgrade the version of the database: From a developer comment https://github.com/ethereum/go-ethereum/issues/19693 Whenever we make a minor version bump (e.g. from 1.8.x to 1.9.0) you can expect incompatible breaking changes that will prevent going back down. There's no way to make old versions aware of new data formats. If you ...


0

Multisig (multiple signatures) wallet is a common way to collectively own Ethereum address. Basically, multisig wallet is a smart contract with several owners, which performs actions that collected enough owner approvals.


1

When you say that you want to connect users' Metamask account to your service, you are actually referring to be able to make Metamask send the transactions(basically sign them using the user's private key and then submit to the network) for the user. This is achieved using the window.web3 object's provider. The object is injected into the browser window by ...


0

You can obtain the value returned from a transaction by calling debug_traceTransaction and looking at the final step in the trace. It is typically a RETURN opcode, so the top 2 stack values give the offset and length of the expected return data within the memory. You can then use the ABI to format this data accordingly. Here is some sample code to achieve ...


1

Simply, we need to do the same things as ethereum do for their networks on your chain. We have two options: 1. First is do like this answer How to setup constantinople fork for private ethereum chain 2. Modify config in the source code as below step Update the config as relevant with your config.json file in below file Update config.go in https://...


1

Try this: pragma solidity 0.5.1; contract NewBook { struct ChapterData { // string chapterID; string title; uint pages; } struct BookData { // string bookID; ChapterData[] chapters; } mapping(bytes32 => BookData) books; // bookId => BookData //This is where the problem occurs, how do ...


0

I made a new contract to carry out new tests, and I made the same mistake. I do not know where to look anymore. I would appreciate if someone helps me regards contract pragma solidity ^0.5.9; contract certificarProcesoNuevo { struct Informacion { string informacion; string informacionHashArchivo; } mapping(string => ...


2

Firstly, the flag provided but not defined message means that you are running a standard Ethereum geth executable, not Quorum. You need to make sure the Quorum geth is the first one found in your path. To build Quorum, follow the steps in the documentation. Ensure you have a valid version of golang (try 1.10.3 or 1.10.4) and that your GOPATH is set up ...


1

It will be very difficult. I'll break it down into a few separate concerns. The first is just general programming. You need need numbers in the range of 0-99 to to pick people out of the array. Let us set the "randomness" concern aside for now and focus on scaling a uint. Let us suppose the uint to start with could be anything, so somewhere in the range ...


2

There are two main reasons. To minimize contract size To ensure compliance If you make the smallest possible contract and use Augor.sol, then your contract will be at least as big as Augor.sol. contract Mine { Augor a; } You have defined a as an instance of Augor and that means all of the Augor bytecode is rolled up into yours. It's not evaluated for ...


1

Because often when you're writing contracts which interact with other contracts, the internal workings of those contracts are not relevant, just the externally exposed functions. By providing an Interface, other developers can write code that interacts perfectly with yours, without needing to see/include your entire codebase.


0

I think you have two general categories of problems to think about. Let's call them on-chain and off-chain, for now. There might be a better classification. With care, yes, you can obfuscate the votes with a commit/reveal pattern so no one can know what the votes are until all the votes are collected. That won't even hide who voted unless you go to a lot ...


0

If you generated the account with Geth, then the account is embedded in the name of the keystore file. As an example, take the following keystore file: UTC--2017-10-18T01-34-15.931234561Z--bb22a1230f132a468c9383cabcabe00894aaa679 UTC--2017-10-18T01-34-15.931234561Z is the timestamp the keystore file was created. bb22a1230f132a468c9383cabcabe00894aaa679is ...


0

Indeed there is a data size limit. you can check it in geth code https://github.com/ethereum/go-ethereum/blob/master/rpc/http.go you'll find : const ( maxRequestContentLength = 1024 * 512 contentType = "application/json" ) I think to rise it and recompile or better in https://github.com/ethereum/go-ethereum/blob/master/core/tx_pool.go ...


0

you need first to enable personal API using geth --rpc --rpcapi "db,eth,net,web3,personal" then run your rpc call : curl -X POST --data '{"jsonrpc":"2.0","method":"personal_newAccount","params":["password"],"id":1}' localhost:8545 Here's the documentation link for newAccount https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_newaccount


2

From the docs: .selector returns the ABI function selector. The first four bytes of the call data for a function call specifies the function to be called. It is the first (left, high-order in big-endian) four bytes of the Keccak-256 (SHA-3) hash of the signature of the function. The signature is defined as the canonical expression of the basic ...


0

I thank you for your answer. I corrected what you indicated to me, but unfortunately it throws the same error. Then I tried another contract to rule out that I see a problem with that contract, but I also throw the same error I am testing from the console because from my java application with web3j I get the following error when I want to read a variable of ...


1

My hunch is you're probably doing async requests that open up new connections for each call. From my own experience with running a GETH node, i can tell you that yes, the limit is internal and working as expected, if you're opening up new connections for each request then you're going to end up with what you're experiencing. The geth logs should tell you ...


-1

Eth syncing percent: eth.syncing.currentBlock * 100 / eth.syncing.highestBlock


0

the problem is that the contract's address is undefined. in the console remove the keyword var in the instantiation and keep just : address ="0x93ba4ede5903c6656060c443255ed4ef569a5144" same for abi ... you can check afterwards if the value set by just typing the variable name in the console exp > address ...


0

Yes, unless you need to automate it, the simplest way is probably just to use Etherscan. Just go to etherscan.io and paste the contract address in the search bar. Then in the "more info" section of the page about the contract you will see ContractCreator: 0xabcd... at txn 0xabcd... Click on the txn, and it will give you all the information about that ...


0

I am not sure if i've understood your need but you can use admin.peer to get details about the peers connected to your node. admin.peers [{ ID: 'a4de274d3a159e10c2c9a68c326511236381b84c9ec52e72ad732eb0b2b1a2277938f78593cdbe734e6002bf23114d434a085d260514ab336d4acdc312db671b', Name: 'Geth/v0.9.14/linux/go1.4.2', Caps: 'eth/60', RemoteAddress: '5.9.150....


0

This is an error from your Chrome web browser. You can disable mixed content security policy in settings or from command line. https://stackoverflow.com/questions/18321032/how-to-get-chrome-to-allow-mixed-content I recommend disabling it from the command line and not using the web browser for anything else, as you are disabling a security feature. ...


1

The ethclient package doesn't provide a method for that but you can use the rpc package to do what you need. Here's a working example: package main import ( "fmt" "github.com/ethereum/go-ethereum/rpc" ) func main() { client, err := rpc.DialHTTP("https://mainnet.infura.io") if err != nil { panic(err) } var res string ...


0

Finally i have to write in the web3provider "localhost:port" and not the ip of my node


0

You cannot pass struct as function parameter and function cannot return struct, but you can pass struct parameters as function parameters and function can return struct parameters. The following code might help you: pragma solidity 0.5.0; contract DeviceContract { struct Device { bytes16 hardware_UUID; string phone_Number; } ...


0

Maybe you need to convert code to bytecode.


0

You need to change the chainID to 1337 (Geth private chains (default)) chainID := big.NewInt(1337) Test with your code: $ go version go version go1.10.4 linux/amd64 $ go run transaction.go tx sent: 0x2f80a25ddb20c614c9bfb47f964540f235c3f74a99b66d810df04816d40a453a status: 1 It's a problem with the simulated.go. You can find more about the error here. ...


0

It's unclear exactly what is being asked about here: the amount of gas sent with a transaction or the amount of gas required by it? The amount of gas sent with a transaction can be modified when building the transaction to announce to the network. For example, if using web3, you can use the "gas" parameter, or when using MetaMask, you can click "Edit" just ...


0

try to define enough gas in your TX TX={ from: FROM, to: TO, value: VALUE, nonce: NONCE , gas: 3000000 } keep rising the gas value until it works.


0

Having the max gas consumed usually means that the contract construction function throws or reverts. But the question does not have enough details to tell. Maybe you can edit the question and add your contract code and what commands you use to deploy it.


4

As @goodvibration mentioned, you can't modify this in the code of a client running publicly. (It'd lead to a protocol mismatch when your client tried to publicly broadcast anything - I think... ) If the scope of your question concerns your own private network, then you can edit the value and rebuild your client code. The value is defined in protocol_params....


0

If you're talking about private transaction between two nodes, it's not possible with Ethereum. Check out JP Morgan's Quorum. https://github.com/jpmorganchase/quorum


0

So here is how I solved my issue. I host my kubernetes cluster in google cloud, but the same concepts should apply to any provider. First I created the clusters within a predefined VPC with subnets. Be mindful of secondary ranges for the IP. The gcloud script below illustrates: sh "gcloud compute networks create ${CLUSTER_NAME}-network --subnet-mode custom"...


0

With the current version of geth, peers already contains enode then we can simply export peers by below javascript code snippet admin.peers.forEach(function(value){console.log(value.enode)})


0

I think this article is going to help for what you looking for.


0

Check this answer for some options - How can I run go-ethereum as daemon process on Ubuntu? And one more option - use /etc/inittab to add the geth process to TTY 10 (for example): 10:2345:respawn:/path/to/geth --geth_options console later you can switch to that console with Ctrl + Alt + F10


Top 50 recent answers are included