{"action":"opened","issue":{"url":"https://api.github.com/repos/tendermint/tendermint/issues/1622","repository_url":"https://api.github.com/repos/tendermint/tendermint","labels_url":"https://api.github.com/repos/tendermint/tendermint/issues/1622/labels{/name}","comments_url":"https://api.github.com/repos/tendermint/tendermint/issues/1622/comments","events_url":"https://api.github.com/repos/tendermint/tendermint/issues/1622/events","html_url":"https://github.com/tendermint/tendermint/issues/1622","id":325972462,"number":1622,"title":"Why `Vote.SignBytes` is a JSON string?","user":{"login":"nnkken","id":6733599,"avatar_url":"https://avatars1.githubusercontent.com/u/6733599?v=4","gravatar_id":"","url":"https://api.github.com/users/nnkken","html_url":"https://github.com/nnkken","followers_url":"https://api.github.com/users/nnkken/followers","following_url":"https://api.github.com/users/nnkken/following{/other_user}","gists_url":"https://api.github.com/users/nnkken/gists{/gist_id}","starred_url":"https://api.github.com/users/nnkken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnkken/subscriptions","organizations_url":"https://api.github.com/users/nnkken/orgs","repos_url":"https://api.github.com/users/nnkken/repos","events_url":"https://api.github.com/users/nnkken/events{/privacy}","received_events_url":"https://api.github.com/users/nnkken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-24T05:46:27Z","updated_at":"2018-05-24T05:46:27Z","closed_at":null,"author_association":"NONE","body":"I'm trying to implement a custom blockchain using Tendermint, and I want to have a Relay contract on Ethereum so that my ERC-20 token can transfer between Ethereum and the Tendermint blockchain.\r\n\r\nTo do so, I need to write a smart contract on Ethereum verifying the block header from Tendermint. While other parts go well, the format of Precommits annoys me.\r\n\r\nThe signature are signed on the SHA-256 hash of the SignBytes, which are JSON strings, so to extract block header hash from the message, the smart contract needs to parse the JSON string, which is quite expensive.\r\n\r\nI'm now finding work around on this problem, and my question is, why Tendermint is designed to sign a JSON string instead of a binary one, say a structure encoded by Amino, or the Merkle root of the information in the precommits (just like the block header hash)?"}}
{"actor":{"display_login":"nnkken"}}