Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enforce hex number for block number parameter #8220

Open
macfarla opened this issue Feb 3, 2025 · 1 comment · May be fixed by #8225
Open

enforce hex number for block number parameter #8220

macfarla opened this issue Feb 3, 2025 · 1 comment · May be fixed by #8225
Assignees
Labels
RPC snack Smaller coding task - less than a day for an experienced dev

Comments

@macfarla
Copy link
Contributor

macfarla commented Feb 3, 2025

Currently besu is failing a number of rpc-compat hive tests because we allow decimal values for block number param for debug_getRaw[Header|Block|Receipts|Transaction]

According to the rpc spec it's either a hex block number, or a string tag (earliest etc)

failing tests -

debug_getRawBlock/get-invalid-number 
debug_getRawHeader/get-invalid-number
debug_getRawReceipts/get-block-n 
debug_getRawReceipts/get-invalid-number 
debug_getRawTransaction/get-invalid-hash 

Refs #5377

@macfarla macfarla added RPC snack Smaller coding task - less than a day for an experienced dev labels Feb 3, 2025
@macfarla macfarla self-assigned this Feb 3, 2025
@macfarla macfarla linked a pull request Feb 3, 2025 that will close this issue
9 tasks
@macfarla
Copy link
Contributor Author

macfarla commented Feb 5, 2025

blocked as hive tests need updating - we are getting same error as geth - invalid merkle root

with the latest version of Geth, to fill the tests:

 ########## BAD BLOCK #########
Block: 1 (0x242d0b0e1a294622ab8b3011c2f8429ed06351bcea30c7dbdf91a6d1948a0c54)
Error: invalid merkle root (remote: 3f8db435adcc76f01bd64f20ad2a336bea35e09b2e26e89431fe2cd9c5874c86 local: 1f4609afa6671fcc5a9115bb32cfe9a09ef3773eda4a64d4b1e7600d10ca5a46) dberr: %!w(<nil>)
Platform: geth (devel) go1.23.4 arm64 darwin
VCS: 3e99e597-20250205
Chain config: &params.ChainConfig{ChainID:3503995874084926, HomesteadBlock:0, DAOForkBlock:<nil>, DAOForkSupport:false, EIP150Block:0, EIP155Block:0, EIP158Block:0, ByzantiumBlock:0, ConstantinopleBlock:0, PetersburgBlock:0, IstanbulBlock:0, MuirGlacierBlock:0, BerlinBlock:0, LondonBlock:0, ArrowGlacierBlock:0, GrayGlacierBlock:0, MergeNetsplitBlock:0, ShanghaiTime:(*uint64)(0x14000276fe8), CancunTime:(*uint64)(0x14000277010), PragueTime:(*uint64)(0x14000277018), OsakaTime:(*uint64)(nil), VerkleTime:(*uint64)(nil), TerminalTotalDifficulty:131072, DepositContractAddress:0x0000000000000000000000000000000000000000, EnableVerkleAtGenesis:false, Ethash:(*params.EthashConfig)(0x107861ea0), Clique:(*params.CliqueConfig)(nil), BlobScheduleConfig:(*params.BlobScheduleConfig)(0x14000ba4858)}
Receipts:
 0: cumulative: 63351 gas: 63351 contract: 0x9344b07175800259691961298cA11c824e65032d status: 1 tx: 0xc6bf0511ae12477efae150fa743992b00867729fbc8dfe8e7b16f5a2596a979b logs: [] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 state:
 1: cumulative: 134462 gas: 71111 contract: 0x17e7EedCe4Ac02ef114a7eD9fE6E2F33Feba1667 status: 1 tx: 0x1732167826154d3d414236a60c6e22cf99e3fc2542752e164b595473117612f9 logs: [] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 state:
 2: cumulative: 217385 gas: 82923 contract: 0x0eE3aB1371c93E7c0c281cC0c2107cDebc8B1930 status: 1 tx: 0x7a6572aeb5f2825d5e243c7b1be4173abbe711d8fa0f692b1ee8ce859922cdb9 logs: [] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 state:
 3: cumulative: 323167 gas: 105782 contract: 0x2c1287779024c3a2F0924b54816D79b7e378907d status: 1 tx: 0x97cb777e677baaddaf9d5c1c2f2d8efe8db65f7cc29a8baf78a427f92504bc47 logs: [] bloom: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 state:
##############################

ERROR[02-05|11:42:53.064] Import error               err="invalid block 1: invalid merkle root (remote: 3f8db435adcc76f01bd64f20ad2a336bea35e09b2e26e89431fe2cd9c5874c86 local: 1f4609afa6671fcc5a9115bb32cfe9a09ef3773eda4a64d4b1e7600d10ca5a46) dberr: %!w(<nil>)"
INFO [02-05|11:42:53.064] Blockchain stopped
Import done in 2.396958ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC snack Smaller coding task - less than a day for an experienced dev
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant