-
Notifications
You must be signed in to change notification settings - Fork 22
Sarvesh/merkel patricia proof generator #139
Sarvesh/merkel patricia proof generator #139
Conversation
…oof_generation and testcases
…thData method to return results
…ch others dependency
…ator # Conflicts: # .travis.yml # config/core_constants.js
package.json
Outdated
"ethereumjs-util": "^5.2.0", | ||
"leveldown": "^4.0.1", | ||
"levelup": "^3.0.1", | ||
"merkle-patricia-tree": "^2.3.1", | ||
"node-cmd": "3.0.0", |
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.
Let's freeze these npm versions.
package.json
Outdated
"mocha": "5.0.0" | ||
"mocha": "5.0.0", | ||
"mock-require": "^3.0.2", | ||
"sinon": "^6.0.0" | ||
} |
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.
Let's also freeze these npm versions.
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.
All the changes which requested by me earlier have been incorporated. The PR looks good for merge.
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.
Added minor comments, other than variable name StorageProof
and storageProof
it looks good to me.
} | ||
|
||
describe('should generate storage proof for mapping type variable', function () { | ||
let storageProofInstance, StorageProof, storageProof; |
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.
variable name StorageProof
and storageProof
is creating confusion. We should name it better.
describe('account proof for single node', function () { | ||
let accountProofInstance, AccountProof,accountProof; | ||
before(async () => { | ||
AccountProof = require(rootPrefix + '/lib/proof/account_proof') |
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.
Any specific reason to have require here ? There are many such instances ex. line 48. (and also in other files.)
storageProof: function (storagePath, trie) { | ||
|
||
let errorConf = { | ||
internal_error_identifier: "l_p_accountProof_2", |
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.
Not so critical but like to mention here.
General observation: we follow a pattern to create internal_error_identifier.
Lets take this example, file path is lib/proof/proof.js
, function name is storageProof
So the internal_error_identifier will be in this case: l_p_p_storageProof_1
If we are still following pattern then we need to update internal_error_identifier
at multiple locations.
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
#140