xssnick / tonutils-go

TON SDK Library in pure Golang for interacting with The Open Network ecosystem using native protocols, such as ADNL, RLDP and etc.
Apache License 2.0
535 stars 108 forks source link

Fix policy ProofCheckPolicyFast with multiple existing shards #155

Closed KudinovKV closed 10 months ago

KudinovKV commented 10 months ago

Hey! Could you please check, current example is not work. Probably this happened because multiple shard became alive in mainnet. I found out that error appears in this switch case with zero value in ab variable. Could you please research it and maybe adding another case to this switch case would fix the problem? And then I switched mode to ProofCheckPolicyUnsafe, checks was skipped and everything works well. Is it safe to use ProofCheckPolicyUnsafe?

xssnick commented 10 months ago

Hi, fixed in v1.8.8, thank you for the report!

About ProofCheckPolicyUnsafe, it is pretty safe, if you trust liteservers (for example, using public ton liteservers or your own). Most of the other libraries has no proof checks :)

KudinovKV commented 10 months ago

Got it. Thanks for quick reply!