-
Notifications
You must be signed in to change notification settings - Fork 9
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
Issues from running substrate & service #18
Comments
So, looking into the apps UI, I'm actually seeing all of the expected events seperately, so all the pins are happening successfully. I can however replicate the same issue in datdot-service, which leads me to believe this is a bug in either
Notice we are printing where |
@ninabreznik as recommended by Jaco we should probably not be reusing the same |
const keypairs = [ALICE, CHARLIE, DAVE, EVE, FERDIE, NEW_ACCOUNT]
/* ------------------------------------------------------------------------
EXTRINSICS
---------------------------------------------------------------------------- */
/* ------------------------- TRANSACTIONS -------------------------------- */
/* --- registerSeeder() --- */
async function registerSeederAccount(pair){
const registerSeeder = api.tx.datVerify.registerSeeder()
await promiseRerun(registerSeeder.signAndSend(pair, ({ events = [], status }) => {
if (status.isFinalized) {
events.forEach(({ phase, event: { data, method, section } }) => {
console.log('\t', phase.toString(), `: ${section}.${method}`, data.toString())
})
}
}))
}
for(const pairIndex in keypairs){
await registerSeederAccount(keypairs[pairIndex])
} ^^ this refactoring fixes the issue for me. |
Re: part 2 - I should probably also clarify that currently we don't "pin" dats (as in assign an existing hypercore to a host) unless the host explicitly asks for one to host - which means if you register_seeder and there is nothing to host, you don't emit a newPin event. This behaviour will change (you declare capacity and you get a set of hypercores under that capacity which rotate over time, you need to watch for NewPins with your address) but currently newPin is only emitted as part of register_seeder and only iff there is data preregistered and available to pin. |
* fix * Update consensus/src/lib.rs Co-Authored-By: Bastian Köcher <[email protected]>
* fix * Update consensus/src/lib.rs Co-Authored-By: Bastian Köcher <[email protected]>
newPin event
It seems like it doesn't log the correct user nor hypercore address. I get all event logs look the same (same user + same key (not matching the actual hypercore key)). The user account logged in the event seem to be always the one that gets finalized first (we're also creating users)
VIDEO 1 (watch first) https://www.loom.com/share/78305a4036804a14af3f67fa0c36e2f0
VIDEO 2 (watch next) https://www.loom.com/share/4bb8ab5e497c47ceb7b09734122d2688
The text was updated successfully, but these errors were encountered: