-
Notifications
You must be signed in to change notification settings - Fork 217
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
Implement Jörmungandr Transaction-message decoder #273
The head ref may contain hidden characters: "anviking/218/j\u00F6rmungandr-tx"
Conversation
64e46d6
to
23213e1
Compare
|
||
2 -> isolate 64 $ do | ||
_sig <- Hash <$> getByteString 64 | ||
error "unimplemented: New address witness scheme" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to implement as little as possible for now…
17b6622
to
8b4dfec
Compare
8b4dfec
to
58dfa56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -70,8 +80,9 @@ data TODO = TODO | |||
data SignedVote = SignedVote | |||
deriving (Eq, Show) | |||
|
|||
-- Do-notation is favoured over applicative syntax for readability: | |||
{-# ANN module ("HLint: ignore Use <$>" :: String) #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
, outputs = | ||
[ TxOut | ||
{ address = Address "3$\195xi\193\"h\154\&5\145}\245:O\"\148\163\165/h^\ENQ\245\248\229;\135\231\234E/" | ||
, coin = Coin 14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coin 14
sounds like something I've could have put in the genesis block indeed 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are two points that are confusing to me - maybe I am missing something
|
||
getTokenTransfer :: Get ([TxIn], [TxOut]) | ||
getTokenTransfer = do | ||
inCount <- fromIntegral <$> getWord8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we miss transaction header (2bytes) here according to https://github.com/input-output-hk/rust-cardano/blob/master/chain-impl-mockchain/doc/format.md#token-transfer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works this way 🤷♂ (+ I guess I followed the rust-decoder)
let _discrimination = discriminationValue headerByte | ||
case kind of | ||
-- Single Address | ||
0x3 -> Address <$> getByteString 32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where can I find this info? I can't seem to find it in https://github.com/input-output-hk/rust-cardano/blob/master/chain-impl-mockchain/doc/format.md#preliminaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue Number
#218
Overview
Transaction
messageComments
Discrimination
withNetwork