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

Initial implementation #4

Merged
merged 1 commit into from
May 13, 2020
Merged

Conversation

abukosek
Copy link
Contributor

Closes #1.

@abukosek abukosek force-pushed the andrej/feature/initial-implementation branch 4 times, most recently from 37424c8 to 103eee0 Compare May 5, 2020 08:49
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using the logging framework from Oasis Core instead of fmt.Printf.

Otherwise the most problematic thing seems to be the transaction identifiers, see my inline comments. Also we should probably consider using Bech32 for account identifiers as discussed and we should use the hash of the canonical genesis document as the network identifier instead of just the chain ID field (as this is what we use internally).

Index: genBlk.Height,
Hash: genBlk.Hash,
},
Peers: []*types.Peer{}, // TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require a method in the consensus backend to return the list of peers (or just a similar Status method that returns all these things like the current and genesis block metadata together with the list of peers to avoid multiple requests). Having something like a Status method for the consensus backend seems useful anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abukosek abukosek force-pushed the andrej/feature/initial-implementation branch 8 times, most recently from c7404df to fbe4dcc Compare May 8, 2020 13:29
const OpBurn = "Burn"

// OpStatusOK is the OK status.
const OpStatusOK = "OK"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One potential issue which may or may not be problematic: this currently only emits successful operations as events are only generated once transactions succeed. Failures will currently never be propagated.

Index: genBlk.Height,
Hash: genBlk.Hash,
},
Peers: []*types.Peer{}, // TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abukosek abukosek force-pushed the andrej/feature/initial-implementation branch 2 times, most recently from 697444a to 7c9f6e2 Compare May 11, 2020 11:00
@abukosek abukosek force-pushed the andrej/feature/initial-implementation branch 2 times, most recently from 04a504b to 4f4f75c Compare May 12, 2020 14:53
@abukosek abukosek force-pushed the andrej/feature/initial-implementation branch from 4f4f75c to de7486e Compare May 12, 2020 15:04
@abukosek abukosek marked this pull request as ready for review May 12, 2020 15:06
@abukosek
Copy link
Contributor Author

OK, I think this is ready for final review now. Thanks for the great comments so far!

We can add the remaining stuff in subsequent PRs (using Status, once I implement it in oasis-core, and Bech32 encoding of addresses, once someone else implements it in oasis-core).

@kostko
Copy link
Member

kostko commented May 12, 2020

We can add the remaining stuff in subsequent PRs (using Status, once I implement it in oasis-core, and Bech32 encoding of addresses, once someone else implements it in oasis-core).

Agreed, can you file issues in this repository so that we don't forget about these things?

@abukosek
Copy link
Contributor Author

Done! :)
Filed as issues #5 and #6.

@abukosek abukosek merged commit 267eae0 into master May 13, 2020
@abukosek abukosek deleted the andrej/feature/initial-implementation branch May 13, 2020 11:18
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

Successfully merging this pull request may close these issues.

Initial implementation
3 participants