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

[BUG] Dkg node connection fails #377

Closed
salman01zp opened this issue Mar 27, 2023 · 1 comment · Fixed by #378 or #379
Closed

[BUG] Dkg node connection fails #377

salman01zp opened this issue Mar 27, 2023 · 1 comment · Fixed by #378 or #379
Assignees
Labels
bug 🪲 Something isn't working difficulty: starter 🏁 Small issues that are great for starters or easy to complete tasks p0 🔥 Critical issues that need to be resolved immediately

Comments

@salman01zp
Copy link
Contributor

Summary

While creating DkgBridgeRegistryBackend it uses OnlineClient::<PolkadotConfig>::new() method to create a dkg client which by default points to a locally running node on ws://127.0.0.1:9944.

pub async fn new() -> Result<OnlineClient<T>, Error> {
        let url = "ws://127.0.0.1:9944";
        OnlineClient::from_url(url).await
    }

Solution

We should connect to the node using the wss URL provided by node configuration with the from_url method.

pub async fn from_url(url: impl AsRef<str>) -> Result<OnlineClient<T>, Error> {
        let client = default_rpc_client(url).await?;
        OnlineClient::from_rpc_client(Arc::new(client)).await
    }

We also store DKG client in DkgProposalSigningBackend and directly use by making it public.

pub struct DkgProposalSigningBackend {
    pub client: DkgClient,
    pub pair: PairSigner<PolkadotConfig, Sr25519Pair>,
    pub typed_chain_id: webb_proposals::TypedChainId,
}
@salman01zp salman01zp self-assigned this Mar 27, 2023
@salman01zp salman01zp added bug 🪲 Something isn't working p0 🔥 Critical issues that need to be resolved immediately difficulty: starter 🏁 Small issues that are great for starters or easy to complete tasks labels Mar 27, 2023
@github-project-automation github-project-automation bot moved this to Not Started 🕧 in Webb Universe Mar 27, 2023
@salman01zp salman01zp moved this from Not Started 🕧 to Building 🏗️ in Webb Universe Mar 27, 2023
@salman01zp salman01zp mentioned this issue Mar 27, 2023
2 tasks
@shekohex
Copy link
Collaborator

Closed by #378 #379

@github-project-automation github-project-automation bot moved this from Building 🏗️ to Completed ✅ in Webb Universe Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working difficulty: starter 🏁 Small issues that are great for starters or easy to complete tasks p0 🔥 Critical issues that need to be resolved immediately
Projects
Archived in project
3 participants