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

Remove insecure endpoints - Closes #457 #676

Merged
merged 18 commits into from
Jul 26, 2017
Merged

Conversation

MaciejBaj
Copy link
Contributor

@MaciejBaj MaciejBaj commented Jul 19, 2017

remove insecure endpoints and move corresponding tests:

  • move public signatures tests to the transport layer
  • rename transport layer tests using transport prefix
  • use lisk-js in functional tests to fill removed lisk functionalities
  • remove create functions from all transaction types

closes #457

@MaciejBaj MaciejBaj self-assigned this Jul 19, 2017
@MaciejBaj MaciejBaj added medium and removed medium labels Jul 19, 2017
@MaciejBaj MaciejBaj force-pushed the 457-remove-insecure-endpoints branch from 30d4253 to 097fba8 Compare July 19, 2017 09:48
library.logger.debug('Received transaction ' + transaction.id + ' from public client');
} else {
library.logger.debug('Received transaction ' + transaction.id + ' from peer ' + library.logic.peers.peersManager.getAddress(peer.nonce));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this quite a bit!

@@ -77,6 +73,20 @@ describe('postTransactions', function () {
secret: node.gAccount.password,
amount: 100000000000,
recipientId: account.address
}, function (err, res) {
node.expect(err).to.be.null;
node.onNewBlock(done);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be fragile

- apply signatures tests in transport layer
- rename transport layer tests from peers prefix
- use lisk-js in functional tests when necessary
@MaciejBaj MaciejBaj force-pushed the 457-remove-insecure-endpoints branch from 097fba8 to 2ec7272 Compare July 19, 2017 10:58
@diego-G diego-G self-requested a review July 19, 2017 11:53
SargeKhan and others added 7 commits July 19, 2017 19:29
- use prototype in peersManager
- don't use acceptable in returning peers list
- use self.findGoodPeers in loader
- introduce updatePeerStatus function
- apply signatures tests in transport layer
- rename transport layer tests from peers prefix
- use lisk-js in functional tests when necessary
…nto 457-remove-insecure-endpoints

# Conflicts:
#	test/unit/logic/transaction.js
@MaciejBaj MaciejBaj force-pushed the 457-remove-insecure-endpoints branch 2 times, most recently from 92060ee to fe0153d Compare July 21, 2017 08:35
Copy link

@diego-G diego-G left a comment

Choose a reason for hiding this comment

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

API documentation from files needs to be updated.

- add missing transport tests
- add structure for tests in transport.transaction.main
- remove tests relying on public endpoints
@MaciejBaj MaciejBaj force-pushed the 457-remove-insecure-endpoints branch from fe0153d to fc68a1c Compare July 21, 2017 09:15
@diego-G diego-G force-pushed the 457-remove-insecure-endpoints branch from 7fe9860 to 253a9cc Compare July 21, 2017 10:08
@diego-G diego-G force-pushed the 457-remove-insecure-endpoints branch from 253a9cc to 5aaffdb Compare July 21, 2017 13:04
diego-G
diego-G previously approved these changes Jul 21, 2017
@diego-G diego-G requested a review from SargeKhan July 21, 2017 14:15
@MaciejBaj MaciejBaj force-pushed the 457-remove-insecure-endpoints branch from bb71a5e to e841ac2 Compare July 25, 2017 12:54
@MaciejBaj MaciejBaj force-pushed the 446-ws-peers-rebased branch 2 times, most recently from 60e15f5 to 475992d Compare July 25, 2017 14:55
@diego-G diego-G force-pushed the 457-remove-insecure-endpoints branch from 14b3acb to 19363c8 Compare July 26, 2017 09:30
Copy link
Contributor

@Isabello Isabello left a comment

Choose a reason for hiding this comment

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

Minor logging changes. I am open for discussion on the wording but these need to be a bit more verbose.

@@ -63,6 +63,9 @@ function Multisignatures (cb, scope) {
* @todo test function!.
*/
Multisignatures.prototype.processSignature = function (tx, cb) {
if (!tx) {
return setImmediate(cb, 'Cannot process an empty signature.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Unable to process signature. Signature is undefined.

Copy link
Contributor

Choose a reason for hiding this comment

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

something like this. Not sure on the wording myself.

@@ -195,6 +197,9 @@ __private.receiveTransactions = function (query, peer, extraLogMessage, cb) {
transactions = query.transactions;

async.eachSeries(transactions, function (transaction, eachSeriesCb) {
if (!transaction) {
return setImmediate(eachSeriesCb, 'Cannot receive empty transaction');
Copy link
Contributor

@Isabello Isabello Jul 26, 2017

Choose a reason for hiding this comment

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

Unable to process signature. Signature is undefined.

return trs;
};

/**
* Obtains constant fee secondsignature.
Copy link
Contributor

Choose a reason for hiding this comment

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

secondSignature

Copy link

@diego-G diego-G Jul 26, 2017

Choose a reason for hiding this comment

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

This implies several changes coming from the helper constants. @Isabello Shall we follow the same pattern to multiSignature? https://github.com/LiskHQ/lisk/blob/457-remove-insecure-endpoints/helpers/constants.js#L15

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah damn. No lets not change this until later. Please log an issue about standardizing it to be camelCase if you don't mind.

@Isabello Isabello changed the base branch from 446-ws-peers-rebased to 1.0.0 July 26, 2017 12:48
@diego-G diego-G dismissed stale reviews from SargeKhan and themself via 5182544 July 26, 2017 15:03
@MaciejBaj MaciejBaj merged commit e861853 into 1.0.0 Jul 26, 2017
@MaciejBaj MaciejBaj deleted the 457-remove-insecure-endpoints branch July 26, 2017 15:26
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.

5 participants