Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Update transaction test using updated protocol-spec - Closes #5368, #5335 and #5209 #5383

Merged
merged 5 commits into from
Jun 4, 2020

Conversation

shuse2
Copy link
Collaborator

@shuse2 shuse2 commented Jun 3, 2020

What was the problem?

This PR resolves #5368, resolves #5335 and #5209

How was it solved?

  • Updated all protocol spec to use new address system and codec
  • Update transaction tests according to the protocol spec

How was it tested?

  • All transaction library test should pass

@shuse2 shuse2 self-assigned this Jun 3, 2020
@shuse2 shuse2 force-pushed the 5368-update_transaction_test branch from e7bb8b6 to 239e081 Compare June 3, 2020 11:13
signData,
} = require('@liskhq/lisk-cryptography');
const { signData } = require('@liskhq/lisk-cryptography');
const { Codec } = require('@liskhq/lisk-codec');
Copy link
Contributor

Choose a reason for hiding this comment

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

Why to use class and not the instance codec?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just wanted to make sure there is no duplicate registration of schema

const BaseGenerator = require('../base_generator');

const networkIdentifier =
'e48feb88db5b5cf5ad71d93cdcd1d879b6d5ed187a36b0002cc34e0ef9883255';
const codec = new Codec();
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a default instance in the package already, should be used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same as above

Comment on lines +23 to +27
const networkIdentifier = Buffer.from(
'e48feb88db5b5cf5ad71d93cdcd1d879b6d5ed187a36b0002cc34e0ef9883255',
'hex',
);
Copy link
Contributor

Choose a reason for hiding this comment

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

This networkIdentifier is shared across almost all of the generators. Can we move such shared stuff to a common file to reduce the code footprint so we can review and manage it easily.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes but with the current structure, all of the generator is independent, and even if we change the network identifier and it still works

@@ -26,7 +26,8 @@
"framework",
"elements/*",
"commander",
"sdk"
"sdk",
"protocol-specs"
Copy link
Contributor

Choose a reason for hiding this comment

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

With this change, now all elements used in protocol-specs will be linked to local packages. Previously only published packages were used in here. Does that will impact any thing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With only lerna, that was the case, but it seems like if we specify the old version, it is fetching the old version. so unless we increase the dependency version it's ok

@shuse2 shuse2 force-pushed the 5368-update_transaction_test branch 2 times, most recently from 2cc0932 to 8846458 Compare June 4, 2020 12:52
@shuse2 shuse2 marked this pull request as ready for review June 4, 2020 12:59
@shuse2 shuse2 requested review from nazarhussain, pablitovicente and ishantiw and removed request for pablitovicente June 4, 2020 12:59
Copy link
Contributor

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple of comments to consider

@shuse2 shuse2 force-pushed the 5368-update_transaction_test branch from c08d2dd to 6989e34 Compare June 4, 2020 14:03
@shuse2 shuse2 force-pushed the 5368-update_transaction_test branch from 6989e34 to 6b6297d Compare June 4, 2020 14:17
Base automatically changed from 5378-update_framework_use_codec to feature/update_to_use_codec June 4, 2020 14:19
@shuse2 shuse2 merged commit e54474a into feature/update_to_use_codec Jun 4, 2020
@shuse2 shuse2 deleted the 5368-update_transaction_test branch June 4, 2020 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants