kleros / gtcr

Web client for the kleros generalized token curated list
https://curate.kleros.io
MIT License
17 stars 10 forks source link

This Address Was Not Deployed With The List Creator. #301

Open marsrobertson opened 1 year ago

marsrobertson commented 1 year ago

I've just created a new list but for some reason getting an error?

image

When I try to view the list: https://curate.kleros.io/tcr/5/0xaF212E9e4D36EfC8893C82f0f3f6186CB3e6E8eE

image image

EDIT / UPDATE

2m30s video: https://youtu.be/Jex7dSiJsI4

marsrobertson commented 1 year ago

I tried to debug the thing...

1. Viewing the created list

A. Deployed 20 days ago: https://curate.kleros.io/tcr/5/0x303B850687153B3cF5d6366677f0c983031f27E7 (loads)

B. Deployed a few moments ago: https://curate.kleros.io/tcr/5/0x2dc74aba33de654ebb02bb98aad9855953e721bf (400 Error fetching number of pages)

When digging into the code and setting breakpoints

A. light-items

https://github.com/kleros/gtcr/blob/9acd78d79e49cf023c9724b60fd79093faf7af10/src/pages/light-items/index.js#L222

B. items

https://github.com/kleros/gtcr/blob/9acd78d79e49cf023c9724b60fd79093faf7af10/src/pages/items/index.js#L225

Would be great to know why sometimes it is light-items VS items?

2. Adding the created list to the registry

There is a subgraph query here: https://github.com/kleros/gtcr/blob/master/src/hooks/factory.js

Maybe there is a delay?

Subgraph: https://thegraph.com/hosted-service/subgraph/greenlucid/curate-goerli

image
greenlucid commented 1 year ago

I'm not entirely sure whats up. The issue stems from the subgraph not recognizing those contracts you deployed. I redeployed the subgraph with the new version. Maybe there wren't new events to be indexed for a while and the graph stopped indexing. When it stops indexing ill take another look. I was going to make a PR allowing to bypass the error and submit anyway in the testnet, but opening the registry wouldn't work anyway since the subgraph wouldn't work.

marsrobertson commented 1 year ago

I've just tried to reproduce.

Both issues persists.

I cannot even view the created list: https://curate.kleros.io/tcr/5/0x2A674bfcd2c7C4831192CE58331cD53719B73A4E

1m30s: https://www.youtube.com/watch?v=E-C-7SFbqk8 (I speeded up transaction mining)

image

Something that can help...

I look at the freshly deployed TCR here, there is a list of available methods in Read Contract: https://goerli.etherscan.io/address/0x2A674bfcd2c7C4831192CE58331cD53719B73A4E#readContract

But I'm unable to see there itemCount... Where does it come from if it is not present on the contract?

https://github.com/kleros/gtcr/blob/9acd78d79e49cf023c9724b60fd79093faf7af10/src/pages/items/index.js#L225

shotaronowhere commented 1 year ago

I believe this issue is fixed in this PR #303. The PR only focuses on goerli, though the issue might persist on gnosis and/or mainnet. If it comes up in the future, we know how to fix it, but if it isn't broke don't fix it. . . Maybe @greenlucid will know better whether to update the mainnet and gnosis subgraphs or not.

Here's the deploy preview

https://deploy-preview-303--gtcr-dev.netlify.app/tcr/5/0xaF212E9e4D36EfC8893C82f0f3f6186CB3e6E8eE

jaybuidl commented 1 year ago

303 has been merged and the issue should be fixed at the code level but after deployment we are seeing some connectivity issues specific to curate.kleros.io which is likely due to some CDN issue for that subdomain. We are investigating.

In the meantime, this URL is pointing exactly to the same curate app, just a different link: https://gtcr-dev.netlify.app/tcr/5/0xd0B04e66d8CAf5A60B0975386159D82586E5B50B

jaybuidl commented 1 year ago

Just set up another alias: https://curate.kleros.builders/tcr/5/0xd0B04e66d8CAf5A60B0975386159D82586E5B50B