kelemeno / anthill-contracts

3 stars 0 forks source link

Fix dagvote equal depth bug , and other test infra #9

Open kelemeno opened 2 months ago

kelemeno commented 2 months ago

cast call 0xe42923350EF3a534f84bb101453D9B442d42Bf0c "readSentTreeVote(address)(address)" 0xFb60921A1Dc09bFEDa73e26CB217B0fc76c41461 0 0 0 --rpc-url "https://sepolia.era.zksync.dev" returns: 0x7921F9F70B754A014922Aca94947e23F1A424164 i.e. Zach, and Fb60.. is Marcin, but they are on the same depth.

image

I looked at the smart contract, I found a bug in it. I'm not sure it was the correct ones. The bug in was in findDistances here: b24246c46b540e44ac17b12a5e21fe027408dbfa . This function was not called in the last Marcin -> Zach tx, so there might be another bug. However, this bug might have been called earlier.

I also created a way to save the DAG from a chain. Next to dos: Remote debug process:

Based on debug process, knowing what wrong we can add more tests.

kelemeno commented 2 months ago

Update: