Questions tagged [hash]

A hash function is an algorithm that transfers data input of any size into a fixed size data which acts as a kind of "signature" for the data provided.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

What is the best way of storing document hashes on Ethereum?

I have a website in which users can add some input and be given back a 'download' button that will generate a report in PDF format after some calculations are run in the backend of the website on the ...
0
votes
1answer
23 views

Cryptographic hash of the entire Ethereum database

I need a cryptographic hash of the entire Ethereum database (of the information in all blocks up to a certain block number). Is there a service that calculates this hash?
0
votes
2answers
53 views

How to get transaction hash without waiting for await call?

for my demo I need the transaction hash instantly without waiting for callback of sync call. Here my code: aggiungiAllaBlockChain: async(u,n,c,e) => { try { const web3 = new Web3(App....
0
votes
1answer
15 views

EcRecover signed message does not match PublicAddress

I am trying to create a C# webservice back end API that handles the code logic found in Step #5 here: https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial Their code looks like ...
1
vote
0answers
44 views

web3.utils.sha3 and web3.sha3 are not returning same hash

I am referring to example given in link. I will summarize the steps given in the example to save your time from reading. The example used below smart contract to demonstrate the web3.eth.getStorageAt()...
0
votes
1answer
24 views

What is difference between “network hash rate” and “individual hash rate”

suppose for example if nonce is 32 bit then the total possibility of hashing attempts is 2^32 ( 4,294,967,296 ) times only, but why it is mentioned in every article as PH/s or EH/s (1,000,000,000,000,...
0
votes
0answers
25 views

it is possible to save the hash in the ethereum contract before the transaction?

i have a question because i dont know how to do this. Question : it is possible to save the hash in the ethereum contract before the transaction ? Example Steps : Run The ethereum function -> get ...
3
votes
1answer
30 views

Transaction hash on a degree certifiate

About a week ago I completed an online course from a reputed university. When I got the certificate, at the bottom I noticed a 'Blockchain Hash' followed by a long string of characters. When I clicked ...
0
votes
0answers
11 views

how to calculate the message part for pedersen hash in solidity

I am trying to implement pedersen hash using solidity. Is it possible to implement and how to split the message according to the conditions of pedersen hash.
0
votes
0answers
20 views

Passing a hash value to function

I'm trying to authenticate users by comparing the hashes created by backend server and contract. Seems like "byte32" values cannot be coerced into strings. So, instead I'm converting it into ...
0
votes
1answer
41 views

I have a Transaction Hash, how to get the readable Input Data?

i have a Transaction Hash: 0x9f46760404dd3075533e8360fe4beb0ba7210423af1f4a95a5c80defffe824b5, for how do i decode the "input data" easily? for example: https://www.blockchain.com/eth/tx/...
0
votes
1answer
84 views

Detecting dropped and replaced transactions web3.py

I am using web3.py. Given a transaction hash, is there any way to determine if a transaction was dropped and replaced by another transaction with the same nonce? Currently i am looping w3.eth....
1
vote
1answer
40 views

Is a Hash Function really useful in a Smart Contract Election?

Noob here. Was reading this: https://karl.tech/learning-solidity-part-2-voting/ From my basic understanding, a hash function: Receives an input (like x) and spits some result (like y) y is ...
0
votes
1answer
57 views

web3 eth return returns a nonexistent transaction hash

I'm trying to create transactions something like this: var sender = meth.eth.accounts.privateKeyToAccount(data.fromPrivate) meth.sendTransaction({ sender, to: data.to, amount: data.value, }, cb) ...
0
votes
1answer
36 views

Data validation using Ethereum

I'm pretty new to the BC and specifically Ethereum world and I'm just starting to scratch the surface of the potential applications of this powerful technology. As I'm approaching to build my first ...
0
votes
1answer
38 views

Mapping didn't storing unique values

I wrote this piece of code with the goal to store unique documents hash. Used mapping to accomplished that. pragma solidity ^0.5.16; contract DocumentHash{ string public documentHash; ...
0
votes
1answer
24 views

Blockhash Minus-256 Problem [duplicate]

What is meant by Blockhash Minus-256 Problem? I am reading an article at: Bad Randomness It talks about Blockhash Minus-256 problem but does not explain much about it. As a result I can’t ...
0
votes
1answer
50 views

Blockhash: Register the block number

I am reading the following article from a website: bad randomness In the context of Blockhash the author says: For instance, a good protocol (formulating a random trial as a “bet”) is the following: ...
2
votes
2answers
48 views

What is meant by on-chain randomness? What is the difference between on-chain and off-chain operations in the context of randomness?

I want to understand on-chain and off-chain operations in the context of randomness. Kindly provide me an example so that its clear to me. I got one post here: What are offchain and onchain ...
1
vote
1answer
21 views

transfer hash verification on contract side

I want to verify if message-hash has a particular contract method. Like below web3 code generates a rawTransaction having,messageHash,v, r, s, rawTransaction let rawTransaction = { 'from': ...
2
votes
0answers
24 views

Advantage of Chainlink's VRF over commitment scheme chain

News Chainlink announced a randomness oracle via VRF: https://blog.chain.link/verifiable-random-functions-vrf-random-number-generation-rng-feature/. Question What is the advantage of an VRF over a ...
0
votes
0answers
21 views

Geth returns tx hash but blockchain

I have a Geth server on light mode, and implemented sending transactions based on web3.php project. Everything works well, except sending transactions. The code I am using sends from, to, and value ...
0
votes
1answer
41 views

web3.eth.getBlock isn't triggered

Basically, i want get the callback result of first method to get each index value in pass it to the second method to scan this value, in this case is an ethereum transaction to get the input value. ...
0
votes
1answer
25 views

Sha256 and abi.encode of number

If I calculate the following in Solidity 0.6.3: bytes memory secretSalt = "abc"; hashedSecret = sha256(abi.encodePacked(secretSalt)) I get the result "...
0
votes
1answer
20 views

Is there any other signature mechanism like ECDSA to verify the signed message if its tampered or not?

I would like to know if there are other signature verification methods other than ECDSA, to verify the message (eg., string, number) signed by a signer. Actually if there are alternative algorithms ...
0
votes
0answers
26 views

Geth returns txhash of sendTransaction() but nothing is broadcasted on Ethereum blockchain

I have a strange issue with Geth. The code I've written is based on web3.php and worked well up to now. Currently, I'm testing sending ETH via sendTransaction() method. The operation finishs and I ...
1
vote
1answer
43 views

How can I convert an element of a byte32 array to number?

The array contains an SHA256 hash. I want to add up 2 hexadecimal values, and later multiply them by 1.125 (only keeping integer). The resulted number would represent an alphanumerical character, it ...
1
vote
1answer
27 views

How keccak hashing and for loop happening in pure function?

I put a keccak hashing inside pure function, it works and return me the result.It also works in a for loop. I studied that hashing the data and loop consumes consider amount of gas. Do we need to ...
1
vote
2answers
86 views

Get hash transaction by your encode input data

In my application i must follow the use case: I need to record any document hash on the Ropsten (eth testnet) blockchain. The hash is unique and i'm using a mapping in my smart contract to accomplish ...
0
votes
1answer
33 views

Integrity of old blocks in the blockchain

I am learning Ethereum using Geth, and I am testing PoA-Clique networks. Now I have a conceptual doubt about old blocks integrity. Suppose I have a private blockchain network of only one miner node ...
0
votes
0answers
156 views

Efficient way to save and retrieve hash in blockchain

I am learning Ethereum using Geth. I have a private blockchain and I am saving hashes through a REST API (python web service). I have readed I can save hash values using maps (mapping data type) and ...
0
votes
2answers
67 views

From ENS Name to hash AND print in console

I'm just studying about Ethereum, ENS and and and.. Actually I try to compute an ENS .eth Name to a hash. In https://app.ens.domains/name I baught a ENS .eth Name with the Ropsten Testnetwork. Now I ...
0
votes
0answers
25 views

Blackjack - keep dealer second card hidden

I am working on a multiplayer blackjack implementation with an array of 52 cards as the deck that have a flag if they're selected or not. I'm implementing a random number generator to choose a random ...
0
votes
0answers
49 views

Can you verify transaction data by matching it to the transaction hash

TlDr; Can you use the transaction hash to confirm the integrity of the data components of a transaction (post data, addresses, nonce, etc). In my application, I have a connection to the Ethereum ...
3
votes
2answers
293 views

Gas cost of a sha256 hash

I'm confused about the cost of the sha256 function, because my understanding of the cost from the yellow paper ( https://ethereum.github.io/yellowpaper/paper.pdf (Appendix E. Precompiled Contracts) ) ...
0
votes
1answer
56 views

How to parse ecrecover parameters?

I am looking into getting the public key from ANY ethereum address (not owned by me) that has sent a transaction at least once. It seems that the most viable solution here would be to use ethereumjs-...
2
votes
1answer
220 views

Different outputs for Keccak256(), which one is right?

To get a value from contract storage I used this geth code succesfully: var contractAddress = '0x88e726de6cbadc47159c6ccd4f7868ae7a037730' var index = '...
0
votes
2answers
1k views

How to cancel pending transaction of ethereum from exchange wallet? [duplicate]

How to cancel pending transaction of ethereum from exchange wallet? It is pending for around 36 hours now. There is no available tx hash.
0
votes
1answer
201 views

Solidity: extract data from signed message?

In an effort to reduce gas costs for users, I'm looking for a way to delegate certain transactions to a contract owner so that the owner makes a transactions that would have been otherwise sent by the ...
1
vote
1answer
57 views

Off-chain authorization system

I'm working on a dapp and am running into a dilemma regarding how to balance trustlessness with the cost of transactions for users. In order to reduce gas usage by users, I want to be able to able to ...
0
votes
3answers
362 views

How to generate the full list of function selectors for a contract?

A contract has many functions and how to automatically generate the full selector list, including inherited functions, for the whole contract? Preferred solution shouldn’t require more than a web ...
0
votes
1answer
117 views

How to find the value of erc20 token sent out using transaction hash

How can i find the value of erc20 token in a transaction using the hash generated? I can't seem to find answers anywhere. Edit:I found that it is possible to use w.eth.getTransactionReceipt('...
0
votes
1answer
77 views

is it possible to use IPFS Hash to ensure file integrity?

My question is if i can use the IPFS Reference/Hash to ensure file integrity. In other words if i have a file can i use a specific Hashfunction to ensure that the generated Hash of that file is equal ...
0
votes
1answer
81 views

What is the best way to store a hexadecimal value in an array in Solidity?

I am attempting to store a hash (web3.sha3) into an array in a smart contract. What is the best way to do that?
1
vote
1answer
44 views

Am I hashing the data in the file itself, or just the reference?

I am attempting to create an app where I upload a file to a website and then I submit a hash of that file onto Ethereum. I am unsure whether I am hashing the actual file below or just the reference to ...
0
votes
1answer
320 views

How to hash multiple values including array keccak256 Solidity v5.0.x and web3 'Autodetection of array types is not supported.'

How can I receive the same hash in solidity and web3? Multiple values where one is a multi dimensional array. Solidity v0.5.x: pragma solidity 0.5.6; pragma experimental ABIEncoderV2; contract Hash{...
0
votes
3answers
434 views

web3.eth.sendSignedTransaction executed successfully but never any ETH transferred actually

as you see in below, i the raw transaction has been set by the gas simplify value, the returned value is an implemented transaction hashcode, but never assumed result by this transaction figure out ...
1
vote
1answer
254 views

Getting the transaction hash on function call

I am new to Solidity, Web3, and Ethereum. I am trying to build a web application through which users can upload a file to IPFS, then store the IPFS hash in the blockchain. I am using the React truffle ...
0
votes
0answers
21 views

Parity synced at not existing block 4839212

I have problem with parity, cant get synchronization in archive mode to end, anything, changing arguments, max-, min-, snapshot-peers, parity verisions do not help. I have blockchain in archive mode ...
0
votes
1answer
69 views

Hash bytes32 and uint32 in Soldiity 0.5.8

How can we efficiently calculate a hash value for a combination of bytes32 and integer value? Like in JavaScript "someString" + someInt. I tried: function fx(bytes32 _left, uint32 _right) public ...