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

Message hash is different from tonscan's message hash. #245

Open
fishTsai20 opened this issue Sep 2, 2024 · 4 comments
Open

Message hash is different from tonscan's message hash. #245

fishTsai20 opened this issue Sep 2, 2024 · 4 comments

Comments

@fishTsai20
Copy link

fishTsai20 commented Sep 2, 2024

src_tx_hash:'8do0P2NEK7qtycZHniERQWGQ9Wy7BJQKtarpMkOa/gw='
hash:'5cOyEmX7zMOffQ41NkjeEuAfVaAFbGis8wIExCxlOVI='
src:'EQCN8t4vcAdfIinTuARZ49Ue3Wbx4XPUUET2KgVu579AhnYv'
dest:'EQDkLxDcJbXAlP3pzhrK6BRVLgYB538FENOIUQSBTWR6GypP'
the way we parse message.hash as below

message tlb.Message
msgCell, err := tlb.ToCell(message)
msg.Hash = msgCell.Hash()
hash = base64.StdEncoding.EncodeToString(msg.Hash)

https://tonscan.org/tx/f1da343f63442bbaadc9c6479e2111416190f56cbb04940ab5aae932439afe0c
But tonscan's message hash is 'ZpxcGqC4otnm2wIXgrSTMGaEmAe7f5UKgkPHV+bpNMQ='
image

@xssnick
Copy link
Owner

xssnick commented Sep 2, 2024

Try calc hash of message.Msg (ExternalMessage type)

@fishTsai20
Copy link
Author

this is internal message

@xssnick
Copy link
Owner

xssnick commented Sep 2, 2024

then hash InternalMessage type, same Msg field, not full tlb.Message

@fishTsai20
Copy link
Author

I use msg field. the base64 the same as full tlb.Message. and still different from tonscan.
the hash I get: '5cOyEmX7zMOffQ41NkjeEuAfVaAFbGis8wIExCxlOVI=', but tonscan 'ZpxcGqC4otnm2wIXgrSTMGaEmAe7f5UKgkPHV+bpNMQ='

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants