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

Handle REDACTED sender address #33

Closed
wants to merge 2 commits into from

Conversation

Chomtana
Copy link

@Chomtana Chomtana commented Apr 9, 2024

ENS Official CCIP Gateway Proxy (https://ccip-v2.ens.xyz) redact sender address with REDACTED. However, ccip-read-server implementation doesn't support REDACTED and response with "Invalid request format". Causing resolving process to fail.

For example: https://op-gateway-worker.optidomains.workers.dev/REDACTED/0xea9cd3bf000000000000000000000000f079f2a30f3c797f8e6920ad783b74846a9acbf4000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002000001ff000000000000000000000000000000000000000000000000000000000102200304ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020438bfe3fc990665148f8ac1638323ab84054a5c22a1ab61fe63cebc3040129cb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000020438bfe3fc990665148f8ac1638323ab84054a5c22a1ab61fe63cebc3040129cb000000000000000000000000000000000000000000000000000000000000000b6465736372697074696f6e000000000000000000000000000000000000000000.json

Response: Invalid request format

We fix this by checking if sender is REDACTED then set it to address(0)

@TateB
Copy link

TateB commented Apr 9, 2024

here’s the repo for ccip-v2.ens.xyz: universal-offchain-unwrapper

i’m almost certain that sender addresses aren’t being replaced with REDACTED in universal-offchain-unwrapper. if there were evidence that this was happening, it should be fixed there, rather than the ccip-read server implementation, since it deviates from the spec.

i think what is much more likely is that you’re using Cloudflare Logpush or similar, and the log software is redacting the sender address thinking that it’s sensitive data. see related Cloudflare Community post

would be happy to be proven wrong, just can’t see how that’s possible at this time

@TateB
Copy link

TateB commented Apr 9, 2024

follow-up on this: started looking into it and this might be a cloudflare bug, still gathering info

edit: nvm, this is still what i outlined above i think

@Chomtana
Copy link
Author

Thank you for looking into this. Here is a log from Cloudflare

Screenshot 2567-04-10 at 14 19 49

Error: "The script will never generate a response."

@TateB
Copy link

TateB commented Apr 10, 2024

can you try adding a console.log for the sender value, and then tail your worker? e.g. wrangler tail

@Chomtana
Copy link
Author

Screenshot 2567-04-10 at 15 10 34

I'm trying to log the sender this way but it doesn't print that on wrangler tail. But in the above case, I have entered URL with normal sender and it actually get masked to REDACTED.

@TateB
Copy link

TateB commented Apr 10, 2024

ah ok, so definitely a cloudflare logging thing then. in that case i think the actual issue is definitely somewhere within your worker.

@Chomtana
Copy link
Author

cloudflare/workerd#210

https://zuplo.com/blog/2022/03/04/the-script-will-never-generate-a-response

It seem to be about the Cloudflare worker script is using a global variable to store a promise

@Chomtana
Copy link
Author

I have pushed a temporary fix by removing the use of global variables at ensdomains/evmgateway#36

It work after removing global variables

Screenshot 2567-04-11 at 00 24 44

@Arachnid Arachnid closed this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants