Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 answer
19 views

How do I find the message signature hash

What is the message signature hash or How do I find the message signature hash to verify my contact address
Milli Ticket's user avatar
1 vote
1 answer
88 views

Is the sum of hashes cryptographically secure for a set of addresses?

In a smart contract, I want to maintain a set of addresses independent of the order. Would the sum of the hashes for each of the addresses be a cryptographically secure approach? If I do: root = ...
wolf dun's user avatar
0 votes
0 answers
10 views

DNS using blockchain (how can i hashed my domain name ) in the code below help me to complete this code

import Web3 from "web3"; import Registry from "./contracts/Registry.json"; import Resolver from "./contracts/Resolver.json"; import Cache from "./contracts/Cache....
Zain Alramahi's user avatar
0 votes
1 answer
26 views

How to get the hash of the Fulfill Random Words transaction (callback) that gets mined after calling the Chainlink's VRF?

I have the hash of the transaction that called Chainlink's VRF but I need to get the hash of the callback transaction that gets executed after the RandomWordsRequested event is fulfilled. How do I do ...
Falcon Stakepool's user avatar
1 vote
0 answers
27 views

how get last 10 transaction hash for a address (kotlin)

i want to get last 10 transaction hash of a wallet address. i use block numbers but it's return block number is too wide ! the block number is limited and every hrs is under update.... if anyone know ...
luntik's user avatar
  • 23
0 votes
1 answer
87 views

How is signing a hash different from signing a message?

I've got an Arduino microcontroller (ATmega328P) where I can use the following code (borrowed from here) snippet to sign an arbitrary message . First, I take the keccak256 hash of the message, and ...
Ryan's user avatar
  • 92
0 votes
1 answer
61 views

Can I find the hash using a partial hash address in order to look it up at etherscan.io?

For example 0x0DDF2…e7D19 How can I find/search for the reminder the address? The auto complete feature is no longer available at etherscan.io
Clarck Gin's user avatar
0 votes
2 answers
20 views

Hashes don't seem to match even though created with the same params

I have a function in Solidity that is supposed to check if the recovery hash committed by the Email recovery service matches the hash generated through the token and nonce sent by the user (He ...
alfheimrShiven's user avatar
1 vote
1 answer
281 views

How can I create a message hash in Solidity that matches Viem?

I'm creating a message hash with Viem in typescript and in Solidity, however, I can't seem to get the hash in Solidity to match the one created with Viem. My viem code: const hashedMessage = ...
Rohan Nero's user avatar
  • 1,607
2 votes
1 answer
141 views

How are Ethereum 2 block hashes computed?

After the merge, the block hash computation has a different formula. Before that, the following data were used to compute the hash via feeding the list of hex values to an RLP encoder and hashing the ...
Kianoush Arshi's user avatar
1 vote
0 answers
11 views

What's difference between filter for hashes and filter for full transactions?

I'am trying to understand the main difference between a filter for hashes and a filter for full transactions. Can anyone explain me this please?
PandaKungFuu's user avatar
0 votes
1 answer
44 views

To what extent was the block hash malleable under proof-of-work?

To emphasise, I’m solely interested in blocks prior to the transition to PoS. Given that a miner making any change to the block header would have resulted in a completely different hash, my thinking ...
user72364's user avatar
  • 135
2 votes
1 answer
44 views

Generating a NFT token

Let's say we are generating an NFT token for a picture. How is the token generated? Is it just the hash value (say SHA256) of the picture? Is it possible to find a collision? If so, how is the ...
Zirui Wang's user avatar
2 votes
1 answer
788 views

How to Resolve "ambiguous primary types or unused types" Error with _TypedDataEncoder.hash?

I am trying to compute the hash to be signed for EIP-712 typed data using the ethers.js(v5.7.2) library in TypeScript. I'm using _TypedDataEncoder.hash() to hash the typed data, but I am encountering ...
MShakeG's user avatar
  • 1,713
0 votes
1 answer
246 views

How to rebuild ethereum block hash using Solidity/JavaScript [duplicate]

Can someone point me to a good resource to see how a BLOCK HASH is being built by hashing the BLOCK HEADER fields (which fields and how to process/encode them - keccak/rlp)? My main goal is to get the ...
Ivan Kyuchukov's user avatar
1 vote
0 answers
15 views

How to manually hash blocks and transactions to get a better feel for the Ethereum protocol?

Is there a way to easily get a transaction, the full transaction payload, and then hash it with keccak256 using a hash tool, to get a better feel for how the protocol works? Ditto for full blocks. I ...
Danny B's user avatar
  • 323
0 votes
0 answers
10 views

How to create provance hash for NFTs

i am working on the NFT project where i need to implement the provance hash. but i am unable sure from where is should start. like it is doen through smart contracts are from JS Libraries or node js ...
Umar Raza's user avatar
0 votes
1 answer
662 views

How to calculate a pair address given token addresses

How do you combine two token addresses to form a pair address? I would imagine this is purely mathematical and doesn't require a call to web3. I want to know how to do it without calling the internet....
BAR's user avatar
  • 135
0 votes
1 answer
486 views

"invalid signature length" when trying to verify signature

I'm using the entire source code to sign and verify messages from https://solidity-by-example.org/signature/ on Remix. But when I go through the process of running the functions getMessageHash, ...
ratib90486's user avatar
2 votes
0 answers
40 views

Calculating difficulty and target with 256 bits

Why do the yellow paper and Ethereum implementations use 2**256 instead of 2**256 - 1 when calculating hash target from difficulty? The Ethereum Yellow Paper uses 2**256 / difficulty to define the ...
hughy's user avatar
  • 21
0 votes
1 answer
106 views

How to get the subgraph hash once compiled and deployed using graph-cli?

I have a graph-node running in a EC2 instance. The subgraph has been compiled, created and deployed already and it is running with no issues. I want to query its status by running the following ...
Falcon Stakepool's user avatar
6 votes
4 answers
1k views

Verifying signed messages on chain

I have the following message, domain and types: const domain = { // Defining the chain aka Goerli testnet or Ethereum Main Net chainId: NETWORK_ID, // User friendly name to the ...
MM1's user avatar
  • 213
2 votes
0 answers
46 views

Hash metamask message

I have the following metamask message (type v4): const message = { domain: domain, // Defining the message signing data content. message: { Commit: { ...
MM1's user avatar
  • 213
0 votes
1 answer
153 views

Does a TX hash get produced *before* it's been confirmed in 1 block?

I has code which sends ETH and ERC-20 and of which I want to make sense: let tx1 = await transferETH(amount, privateKey); console.log(`${tx1.hash}`); const receipt1 = await tx1.wait(); console.log(`...
Camila326's user avatar
  • 115
0 votes
1 answer
36 views

Hash an array of variables and reverse hash them off chain

I'm trying to accomplish a task but I'm not sure how to approach the problem. I want to hash some variables inside a byte32 array. For example: ["Hashley", 32, "Random string"] -&...
Allennick's user avatar
  • 253
3 votes
1 answer
291 views

calldata ambiguity - likelihood of hash collision

To call a function in a smart contract, a transaction (or a message call depending on where it originates from) is sent to the contract address with a data field that has the encoded function ...
Adham's user avatar
  • 181
0 votes
1 answer
383 views

How to generate the correct hash for signatures?

I want to create a hash in JavaScript for a signature. The hash needs to have the same output as this in solidity: keccak256(abi.encodePacked(address, bytes32)) My solution in JavaScript so far ...
rajohs's user avatar
  • 179
1 vote
1 answer
99 views

"Reverse ENS lookup" using php-keccak

I am using kornrunner/php-keccak and I am attempting to do a "reverse lookup" on an ENS name, essentially the same as this question which was never answered. Any thoughts? Here's my attempt ...
cryptonub's user avatar
0 votes
1 answer
42 views

Is there a way to change the block hashing method of private Etherem?

As all we know, Ethereum hashes blocks by Keccak-256 and this method used in private Ethereum too. Now, if we need to use Keccak-512 for hashing blocks in a PoA private Ethereum (For our project), ...
Alireza's user avatar
  • 547
1 vote
1 answer
219 views

Why blockhash returns zero always? [duplicate]

I have a problem with understanding. I created a utility function, safeMath() , which I run first to create the block. Next, I get the block number, which is usually in the range from 10 to 14. And ...
Sam Knight's user avatar
0 votes
1 answer
109 views

How is calculated the "lowest hash value" in Proof-of-stake random block selection?

https://www.geeksforgeeks.org/proof-of-stake-pos-in-blockchain/ Dont know how you can get the "lowest hash value". Hash value in PoW I can understand, is it related? How does it work in PoS?
João Pestana's user avatar
0 votes
1 answer
228 views

How do I predict my transaction hash before putting through a transaction?

I'm trying to figure out how to get the transaction hash for some transactions. I don't have the hashes in my data; all I have is approximate time (to the minute), size, and token. I think I can get ...
Ilan Katz's user avatar
0 votes
2 answers
2k views

Ethers: Get transaction hash without sending transaction

My transaction fails, so it doesn't give me a hash that I would be able to use to debug it when I call ethers.wallet.sendTransaction(tx). The tx object has 4 fields: from, to, data, value. If I do ...
John Targaryen's user avatar
1 vote
0 answers
71 views

Computing a 512 bit hash

Ethers.js has this 512 bit hash function ethers.utils.sha512, but as far as I can tell there is no OPCODE or precompiled contract for doing this. There seems to be some implementations in solidity ...
WILL D's user avatar
  • 11
1 vote
0 answers
31 views

Explorers have not mixhash [closed]

Why do ethereums explorer (like blockchain.com or etherscan.io) , have not mixhash in block information? Only Nonce. And why nonce in block explorer on blockchain.com is always 0?
AGMINC's user avatar
  • 11
2 votes
1 answer
51 views

What information can I get from a hash?

Say i have a hash - I think sha256/keccak: 90ad6dec4ce7167e92c7a7122232d48a1fd5e6c5e81cb3f45c147424b6728437 What do i do with it? Is there something on etherscan that can decipher it or show what it ...
LazyOctopus's user avatar
2 votes
1 answer
88 views

Question about the namehash algorithm in EIP-137

I am trying to recreate the namehash algorithm from EIP-137. After spending a lot of time trying to create my own algorithm, I tried to find a working python3 package online and couldn't find any. I ...
Jack Hancock's user avatar
3 votes
2 answers
445 views

if I put a message's sha256() hash on smart contract, can anyone recoverd the message?

If no one can recover the message, can I use this message as a "password" to some functions in the smart contract? like: contract Test { bytes32 hash; constructor(bytes32 _hash) { ...
JESSE Bin's user avatar
  • 197
0 votes
1 answer
251 views

How to decode and update input data of a specific transaction?

So, I've decoded the input-data and fetched it via block-hash, Now what I want to do is that, I want to update the input data and post that updated input data back to the same transaction of the same ...
Syed Murtaza Ali Shah's user avatar
1 vote
0 answers
22 views

How is the the net probability mentioned in EIP-55 calculated?

In EIP-55, it says: the net probability that a randomly generated address if mistyped will accidentally pass a check is 0.0247% I am curious about how this probability is calculated and tried to ...
Philip's user avatar
  • 11
0 votes
1 answer
215 views

Sha256 Hash from Solidity Smart Contract doesn't match web3.js Hash

I'm struggling to match two hashes. I hash a Json in String format in my Smart Contract like this. function verifyProof(string calldata _fullProof) public returns(bool r){ bytes32 hashed = ...
tapir36's user avatar
0 votes
1 answer
176 views

Signature from array of tokenId's isn't verifying

The domain message is: struct Offer{ address from; address to; uint256 nonce; uint256[] tokenIds; uint256 duration; } bytes32 constant ...
Владимир Владимирович's user avatar
0 votes
1 answer
78 views

How are we able to verify signatures using the public key?

I get that: private key --ECDSA--> public key private key + message --ECDSA-->signature But then how do we verify the signature with the public key? Wouldn't we have to reverse-ECDSA the public ...
AweSamarth's user avatar
0 votes
1 answer
240 views

How to determine if the hash is finalized?

For some reason, I am require to store the hash to database. I would like to know is there any criteria to determine that the hash is finalize? For example, Block #15000000 have hash value of ...
karfai's user avatar
  • 101
0 votes
1 answer
1k views

What is the difference between "hash" and "block hash" as is demonstrated in the data?

In the following data, there are two kinds of hashes. One is a "hash" variable and the other is a "block hash". While I sense that the latter should be the block header hash, I do ...
Ritik P. Nayak's user avatar
1 vote
1 answer
591 views

Solidity Keccak256 raw data vs abi encoded data

I am new to solidity. I am trying to store some hash of the data to the blockchain. I saw some online tutorial used keccak256(abi.encodePacked( <data input> )) to calculate the hash. I am ...
Jiarui Han's user avatar
1 vote
1 answer
244 views

In Polygon transaction ID of Sync-State transactions does not match Keccak-256(RLP(nonce,gasPrice,gasLimit,to,value,data,v,r,s)

Polygon has special “Sync-State” transactions added to the blocks https://polygonscan.com/address/0x0000000000000000000000000000000000000000 . Transaction hash returned by eth_getBlockByNumber does ...
Zimbabao's user avatar
  • 121
0 votes
1 answer
73 views

How much ether was transferred in this transaction?

Is there any way to determine how much ether was transferred in the following transaction? If so, how much was it? Transaction of interest { "hash": "...
Mowzer's user avatar
  • 211
0 votes
1 answer
36 views

when i call my function metamask telling "this operation is expected to fail"

Hi guys im trying to create question challenge dapp and i have a checkAnswer() function can accessable from frontend. My question struct: struct Question{ string qDesc; uint qPrize;...
Enes Çakır's user avatar
1 vote
1 answer
831 views

How to hash an address?

I just want to hash the senders' address function myHash() public returns(string memory){ return(keccak256(abi.encodePacked(msg.sender))); } but no matter what I do I get the ...
helpme's user avatar
  • 77

1
2 3 4 5 6