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

Rosetta SDK: Initial Draft Implementation #1

Merged
merged 80 commits into from
Jan 17, 2022

Conversation

SmartArray
Copy link
Contributor

@SmartArray SmartArray commented Jun 30, 2020

Introduction

This PR contains an initial draft implementation for Coinbase's official Rosetta Spec, written in NodeJS/Javascript.

State of this implementation

The state of this implementation is still an early alpha. All components have been ported from the official Go reference implementation to maintain 100% compatibility.

At the moment: the following unit tests have been ported to this implementation:

  • syncer/syncer_test.go ✅
  • fetcher/account_test.go ✅
  • fetcher/network_test.go ✅
  • fetcher/block_test.go ✅
  • asserter/block_test.go ✅
  • asserter/account_test.go ✅
  • asserter/network_test.go ✅
  • asserter/request_test.go ✅
  • asserter/asserter_test.go ✅
  • asserter/construction_test.go ✅
  • asserter/request.go ✅
  • asserter/construction.go ✅
  • reconciler/reconciler_test.go ✅
  • parser/balance_changes_test.go ✅
  • parser/group_operations_test.go ✅
  • parser/match_operations_test.go ✅

Additional Remarks

  1. We have used the official OpenAPI NodeJS Express Generator to generate the server stub.

  2. Furthermore, the Client Module was generated with the OpenAPI Javascript Generator. This generator was executed twice to have one promised version, and one with callbacks. They have also generated type classes, which are located in lib/client/src/model. These may be exported to another separate module in the future.

  3. Documentation has been added for Fetcher Module only. See lib/fetcher/README.md.

gto90 and others added 30 commits June 21, 2020 11:39
…they extracted

the model name wrong and accessed the schema incorrectly.
the other is a skeleton for a basic Rosetta Server Implementation.
@gto90
Copy link
Member

gto90 commented Aug 24, 2020

@SmartArray , can we close this PR out in favor of the newer one?

@gto90 gto90 marked this pull request as ready for review August 24, 2020 14:33
Copy link
Member

@gto90 gto90 left a comment

Choose a reason for hiding this comment

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

@SmartArray ,

This is looking really good. Just a few comments on implementing ESLint with Semistandard rules and fixing up some formatting issues here and there.

});

Server.launch()
.catch(e => logger.error(e));
Copy link
Member

Choose a reason for hiding this comment

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

@SmartArray ,

Can you add a new line here? I'll take a look at the project structure but we should be using ES Lint with Semistandard rules. Most IDEs would catch this as a result and offer to automatically fix them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct.


RosettaSyncerEvents,
Errors,
};
Copy link
Member

Choose a reason for hiding this comment

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

Same here @SmartArray , We'll want to use something like ES Lint to fix all this up automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought I was using ESLint, but let me double check.

@SmartArray
Copy link
Contributor Author

@SmartArray , can we close this PR out in favor of the newer one?

Kk, let us close all the PRs. Will do one for every version. Please create a branch 1.3.1 and 1.4.1 so I can PR against them.

@gto90 gto90 merged commit 75d148d into DigiByte-Core:develop Jan 17, 2022
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.

4 participants