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

📡 Problem with the Faucet #465

Closed
KarimJedda opened this issue Jan 8, 2025 · 8 comments
Closed

📡 Problem with the Faucet #465

KarimJedda opened this issue Jan 8, 2025 · 8 comments
Labels
client Changes related to th client

Comments

@KarimJedda
Copy link

Faucet Type

Web

Problem

From a Telegram discussion

Hey all - The faucet is not working for me when I put H160 (AccountKey20) type address https://faucet.polkadot.io/westend?parachain=1000

It does an XCM transfer to an AccountId32 that is my address and FFF to fill in the 32 bytes.

Is this behavior expected?

https://westend.subscan.io/xcm_message/westend-42b82aed9d7aa0c7bf6ae146d39039d16304cd0d

cc @albertov19

Address

No response

Network ID

Relay Chain

Relevant log output

No response

@KarimJedda KarimJedda added the client Changes related to th client label Jan 8, 2025
@albertov19
Copy link

To add more context. It seems that the faucet is properly delivering the funds to the right H160 account. It seems that when you pass an Eth-style address it just appends f until the desired length (32 bytes).

The problem of me actually not seeing the funds in Metamask is because there is an issue with eth_getBalance. Check this:

curl --location 'https://westend-asset-hub-eth-rpc.polkadot.io' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"eth_getBalance",
    "params": ["0x476e0ecfc39c5070846159dceea5555fcbb26e08","latest"]
  }'

Response:

Error decoding into dynamic value: Error at : Error decoding bytes given the type ID and registry provided: Not enough data to fill buffer

I reproduced this with just a manual JSON RPC call but also in the console log of Metamask.

@mutantcornholio
Copy link
Contributor

To add more context. It seems that the faucet is properly delivering the funds to the right H160 account. It seems that when you pass an Eth-style address it just appends f until the desired length (32 bytes).

Yeah, kinda.

The problem of me actually not seeing the funds in Metamask is because there is an issue with eth_getBalance.

Worked for me earlier today, but doesn't work now.

@athei
Copy link
Member

athei commented Jan 8, 2025

It does an XCM transfer to an AccountId32 that is my address and FFF to fill in the 32 bytes.

This is expected behaviour. So I assume the person is trying to send to an account owned by a Polkadot account? In this case why not enter the full address instead of the H160?

@albertov19
Copy link

It does an XCM transfer to an AccountId32 that is my address and FFF to fill in the 32 bytes.

This is expected behaviour. So I assume the person is trying to send to an account owned by a Polkadot account? In this case why not enter the full address instead of the H160?

As an Ethereum developer, if you go to a Faucet, you would want to paste your ETH address as it is the one you usually interact with. This worked on my end with no problem (as you said, it was expected behavior).

The issue is not actually on the faucet but on the ETH_JSON_RPC side, as I reported in my comment.

I can see the actual balance in my Eth address (with the appended F to make it 32 bytes Substrate compliant), but only if I check it via the Substrate API and not the Ethereum JSON RPC.

@athei
Copy link
Member

athei commented Jan 8, 2025

Okay then I misunderstood. I thought it was sent to an unexpected account. The error message looks like it is coming from suxt trying to decode.

@pgherveou
Copy link

I'll take a look now

@pgherveou
Copy link

Looks like this is related to the release of the runtime upgrade 1017003 that happened yesterday, we will re-deploy the eth-rpc to fix that

@albertov19
Copy link

Seems that this was fixed with the latest fix. Thanks! @pgherveou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Changes related to th client
Projects
None yet
Development

No branches or pull requests

5 participants