Update_entry not propagating new entry?
Closed this issue · 5 comments
In this project: https://github.com/guillemcordoba/hc-badges, I'm using the update_entry
call to update the badge entry with new claims that the user should receive the badge. This is the flow:
1 - Alice creates a badge class -> commit_entry(badge_class)
2 - Alice creates an empty badge for Bob -> commit_entry(empty_badge_for_bob_for_previous_badge_class)
3 - Alice claims that Bob should receive that badge -> update_entry(badge_previously created, with alice as issuer)
Then, when executing get_entry
, Alice returns the updated entry, but Bob never receives the update (only sees the first empty badge entry created in 2). Seems like the update_entry
is not propagating via DHT, but the commit_entry
is.
If it helps, this test demonstrates the issue, in these lines:
await s.consistency();
// This works!
result = await alice.call("badges_instance", "badges", "get_entry", {
address: claimAddr.Ok
});
badge = JSON.parse(result.Ok.App[1]);
t.deepEqual(badge, {
recipient: bobAddress,
badge_class: addr.Ok,
issuers: [aliceAddress],
evidences: []
});
// This fails! (issuers are empty)
result = await bob.call("badges_instance", "badges", "get_entry", {
address: claimAddr.Ok
});
badge = JSON.parse(result.Ok.App[1]);
t.deepEqual(badge, {
recipient: bobAddress,
badge_class: addr.Ok,
issuers: [aliceAddress],
evidences: []
});
I'm using hc 0.0.41-alpha4
.
Hi @guillemcordoba I'm just discovering this issue now; did it get resolved with 0.0.42-alpha5?
No, it didn't... Actually I got to confirm it with different experiments I've been doing.
Oh, I just thought of something -- what network setup are you using for your tests? All the work is being put into sim2h right now, so it's most likely to be bug-free.
Mmm it was sim2h... I tried with postman as well and conductors talking to each other with sim2h as well, with same result.
Just realized it is working in the last version (42-alpha5)... So sorry for the inconvenience... Closing this.