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

Filtering by rollup (non rollup) #381

Open
tunnckoCore opened this issue Apr 19, 2024 · 6 comments
Open

Filtering by rollup (non rollup) #381

tunnckoCore opened this issue Apr 19, 2024 · 6 comments

Comments

@tunnckoCore
Copy link

tunnckoCore commented Apr 19, 2024

Heya there!

I tried to pass null to the rollup query param on the API endpoints it fails with error (invalid input, ok logical).

But since the beginning of Blobs in march we started using the blobspace for creating Ethscriptions (and also storing it permanently), thus in you api it will say rollup: null. More on that at ESIP-8 we developed and implemented.

Now, I think we can either add ethscriptions as a "rollup" label (despite it's not), or support filtering by rollup=null in the API.


Another a bit side question: can somehow we access the stored data from these dataReferences? Or it's not public. I know we can fetch the blob data hex from the blob endpoint but still, can we access the raw data?


A third question: can we add the "transaction fee", the normal gas fee used?


Another one: what are the API rate limits?

@tunnckoCore
Copy link
Author

It's here https://github.com/Blobscan/blobscan/blob/23c26e146b16602f4f8ac8be5e9f69162da694cd/packages/api/src/routers/tx/getAll.ts#L72C22-L72C48

If it's empty string in the database, then we can detect if the param is null as a string, if it as a string, then pass string to the db.

I assume that if it was null in the database, that the rollup=null would have worked.

Btw, gg for Prisma, it's awesome. I recently switched to Drizzle and it's a frickin breeze.

@tunnckoCore
Copy link
Author

Hey folks, @PabloCastellano @0xGabi @sembrestels,

don't want to bother you too much, but can you check this please 😉 🙌

@PJColombo
Copy link
Member

Hey @tunnckoCore, sorry for the late reply on this.

I tried to pass null to the rollup query param on the API endpoints it fails with error (invalid input, ok logical).

This is probably a zod issue. I'll add a fix to the api to be able to filter by null values.

Also, we're planning to generalize therollup field to something more appropriate, such as type, to accommodate new codifications like Ethscriptions that are emerging and also create a new "decoder" component in charge of decoding these blobs and storing the decoded data on the db. This way we could show the decoded blob data on the web app and serve it through the api as well.

Another a bit side question: can somehow we access the stored data from these dataReferences? Or it's not public. I know we can fetch the blob data hex from the blob endpoint but still, can we access the raw data?

The blob data pointed by these references are public. We're actually redirecting to these resources in the web app when you click on any of the storage badges of any blob.

We just need to add this logic to the api so it returns the same built url for every available blob data reference (currently we support google cloud storage and ethereum swarm, but we're planning to propagate blobs to other storages as well such as filecoin or arweave)

A third question: can we add the "transaction fee", the normal gas fee used?

Sure, we can expose this as well.

I'll work on these PRs during these days.

@tunnckoCore
Copy link
Author

@PJColombo

such as type, to accommodate new codifications like Ethscriptions that are emerging and also create a new "decoder" component in charge of decoding these blobs and storing the decoded data on the db. This way we could show the decoded blob data on the web app and serve it through the api as well.

Sounds about right and awesome! Would love that.

The blob data pointed by these references are public. We're actually redirecting to these resources in the web app when you click on any of the storage badges of any blob.

Yeah, i figured that out and found the public bucket url.

I'll work on these PRs during these days.

Great, waiting for them :P

What are the rate limits on the API? I'm not planning to spam constantly, just maybe few times since a given past block.
I'm yet to try out, and will see if i get limited at all. I'm going to fetch from the gcp storage url too which is cached anyway so, i might not even get rate limited in reality.

@tunnckoCore
Copy link
Author

tunnckoCore commented Apr 30, 2024

@PJColombo btw, you can check ESIP-8 on how to decode Blobscriptions specifically (it's basically all blobs data combined, passed to cbor decode and having content and contentType inside). Cuz in reality it better be labeled Blobscriptions if at all. But yea.

I also have blobscriptions "stateless" indexer, chain listener, which parse and process things and send webhooks to you, or run it on your own and pass handler function that writes to your db

It's here https://github.com/tunnckoCore/blobscriptions

@tunnckoCore
Copy link
Author

Another note: include transaction's index :P

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

No branches or pull requests

2 participants