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

Introduce two new interfaces for SMT verification #118

Merged
merged 5 commits into from
Aug 2, 2023

Conversation

hrmhatef
Copy link
Contributor

What was the problem?

This PR resolves #116

How was it solved?

  • Introduce two new function in SMT and StateDB
  • Also add to interfaces for them

How was it tested?

  • All tests passed
  • Add some new tests

@github-actions
Copy link

Commit SHA:93c64b7b65005ad193857b91c44176edef6b92c6

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 86.08 (0.28) 68.45 (1.54) 94.47 (0.44) 85.92 (0.21)
🟢 sparse_merkle_tree.js 83.33 (0.98) 64.7 (9.15) 100 (0) 82.97 (0.62)
🟢 state_db.js 89.26 (0.38) 70.83 (2.08) 98.59 (0.13) 89.18 (0.3)

@hrmhatef hrmhatef requested review from matjazv and shuse2 June 28, 2023 16:50
@hrmhatef hrmhatef self-assigned this Jun 28, 2023
sparse_merkle_tree.js Outdated Show resolved Hide resolved
sparse_merkle_tree.js Outdated Show resolved Hide resolved
@hrmhatef hrmhatef force-pushed the 116_improve_verify_interface branch from e82d553 to a6be1a3 Compare July 6, 2023 13:11
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Commit SHA:c8677c4faad885fb7dede9802318e71624eb6b17

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 86.11 (0) 68.87 (1.21) 94.51 (0.48) 85.87 (-0.16)
🟢 sparse_merkle_tree.js 81.81 (-0.54) 64.7 (9.15) 100 (0) 81.13 (-1.22)
🟢 state_db.js 89.61 (-0.01) 70.83 (0.52) 98.59 (0.13) 89.47 (-0.15)
✨ 🆕 utils.js 100 100 100 100

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Commit SHA:c8677c4faad885fb7dede9802318e71624eb6b17
Current PR reduces the test coverage percentage by 0.2 for some tests

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Commit SHA:c8677c4faad885fb7dede9802318e71624eb6b17

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 86.11 (0) 68.87 (1.21) 94.51 (0.48) 85.87 (-0.16)
🟢 sparse_merkle_tree.js 81.81 (-0.54) 64.7 (9.15) 100 (0) 81.13 (-1.22)
🟢 state_db.js 89.61 (-0.01) 70.83 (0.52) 98.59 (0.13) 89.47 (-0.15)
✨ 🆕 utils.js 100 100 100 100

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Commit SHA:c8677c4faad885fb7dede9802318e71624eb6b17
Current PR reduces the test coverage percentage by 0.2 for some tests

@hrmhatef hrmhatef force-pushed the 116_improve_verify_interface branch from a6be1a3 to 6dea047 Compare July 6, 2023 14:45
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Commit SHA:597233f625b560a74b442ec42f043f6622de7aff

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 86.11 (0) 68.87 (1.21) 94.51 (0.48) 85.87 (-0.16)
🟢 sparse_merkle_tree.js 81.81 (-0.54) 64.7 (9.15) 100 (0) 81.13 (-1.22)
🟢 state_db.js 89.61 (-0.01) 70.83 (0.52) 98.59 (0.13) 89.47 (-0.15)
✨ 🆕 utils.js 100 100 100 100

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Commit SHA:597233f625b560a74b442ec42f043f6622de7aff
Current PR reduces the test coverage percentage by 0.2 for some tests

@hrmhatef hrmhatef force-pushed the 116_improve_verify_interface branch from 6dea047 to 73ae105 Compare July 7, 2023 15:50
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Commit SHA:f01e835cf6c740cb3ba337d21b7189fe9ed76117

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 86.72 (0.61) 69.65 (1.99) 94.51 (0.48) 86.49 (0.46)
🟢 sparse_merkle_tree.js 81.81 (-0.54) 64.7 (9.15) 100 (0) 81.13 (-1.22)
🟢 state_db.js 91.21 (1.59) 72.72 (2.41) 98.59 (0.13) 91.09 (1.47)
✨ 🆕 utils.js 100 100 100 100

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Commit SHA:f01e835cf6c740cb3ba337d21b7189fe9ed76117
Current PR reduces the test coverage percentage by 0.2 for some tests

@hrmhatef hrmhatef force-pushed the 116_improve_verify_interface branch 2 times, most recently from 270e2fc to 30482b8 Compare July 7, 2023 17:34
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Commit SHA:0846fca7b67fe6f3e6b2c67d0c7cb83937f9a76a

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 88.11 (2) 70.5 (2.84) 94.51 (0.48) 87.9 (1.87)
🟢 sparse_merkle_tree.js 91.3 (8.95) 72.72 (17.17) 100 (0) 90.9 (8.55)
🟢 state_db.js 91.21 (1.59) 72.72 (2.41) 98.59 (0.13) 91.09 (1.47)
✨ 🆕 utils.js 100 100 100 100

@hrmhatef hrmhatef force-pushed the 116_improve_verify_interface branch from 30482b8 to f9784fa Compare July 20, 2023 08:38
@github-actions
Copy link

Commit SHA:92b9fdb0570709fdc615cf971f170d4f5e5a3a6e

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 88.11 (2.31) 70.5 (3.59) 94.51 (0.48) 87.9 (2.19)
🟢 sparse_merkle_tree.js 91.3 (8.95) 72.72 (17.17) 100 (0) 90.9 (8.55)
🟢 state_db.js 91.21 (2.33) 72.72 (3.97) 98.59 (0.13) 91.09 (2.21)
✨ 🆕 utils.js 100 100 100 100

@shuse2 shuse2 requested review from ricott1 and matjazv July 24, 2023 07:07
state_db.js Outdated Show resolved Hide resolved
state_db.js Outdated Show resolved Hide resolved
types.d.ts Show resolved Hide resolved
sparse_merkle_tree.js Outdated Show resolved Hide resolved
sparse_merkle_tree.js Outdated Show resolved Hide resolved
sparse_merkle_tree.js Outdated Show resolved Hide resolved
state_db.js Outdated Show resolved Hide resolved
Copy link

@ricott1 ricott1 left a comment

Choose a reason for hiding this comment

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

Some comments about renaming a function

@hrmhatef hrmhatef force-pushed the 116_improve_verify_interface branch from f9784fa to 9b29ce6 Compare July 24, 2023 08:29
@github-actions
Copy link

Commit SHA:8b4d0238924b3960478e111f37902c08999733d5

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 88.15 (2.04) 70.5 (2.84) 94.51 (0.48) 87.94 (1.91)
🟢 sparse_merkle_tree.js 91.3 (8.95) 72.72 (17.17) 100 (0) 90.9 (8.55)
🟢 state_db.js 91.27 (1.65) 72.72 (2.41) 98.59 (0.13) 91.15 (1.53)
✨ 🆕 utils.js 100 100 100 100

- Also introduce a new function `isInclusionProofForQueryKey` to check inclusion & non-inclusion
- Update JS unit test to check two new interfaces
@hrmhatef hrmhatef force-pushed the 116_improve_verify_interface branch from 9b29ce6 to bf846fb Compare July 24, 2023 09:12
utils.js Outdated Show resolved Hide resolved
@github-actions
Copy link

Commit SHA:9af487384135320ab2cfe0fbff658972321af165

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 88.15 (2.04) 70.5 (2.84) 94.51 (0.48) 87.94 (1.91)
🟢 sparse_merkle_tree.js 91.3 (8.95) 72.72 (17.17) 100 (0) 90.9 (8.55)
🟢 state_db.js 91.27 (1.65) 72.72 (2.41) 98.59 (0.13) 91.15 (1.53)
✨ 🆕 utils.js 100 100 100 100

sparse_merkle_tree.js Outdated Show resolved Hide resolved
sparse_merkle_tree.js Outdated Show resolved Hide resolved
@github-actions
Copy link

Commit SHA:b5be7c1bc8189f3b3245d1cde1b3aeab3bc4d25b

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 86.72 (0.61) 69.93 (2.27) 92.26 (-1.77) 86.49 (0.46)
🟢 sparse_merkle_tree.js 86 (3.65) 69.23 (13.68) 91.3 (-8.7) 85.41 (3.06)
🔴 state_db.js 89.54 (-0.08) 72.05 (1.74) 95.89 (-2.57) 89.4 (-0.22)
✨ 🆕 utils.js 100 100 100 100

@github-actions
Copy link

Commit SHA:b5be7c1bc8189f3b3245d1cde1b3aeab3bc4d25b
Current PR reduces the test coverage percentage by 0.2 for some tests

sparse_merkle_tree.js Outdated Show resolved Hide resolved
@github-actions
Copy link

Commit SHA:903d39add2c9faf1949e29002b7968c4af2ae3fa

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 87.42 (1.31) 69.93 (2.27) 94.23 (0.2) 87.2 (1.17)
🟢 sparse_merkle_tree.js 88.63 (6.28) 69.23 (13.68) 100 (0) 88.09 (5.74)
🟢 state_db.js 90.47 (0.85) 72.05 (1.74) 98.5 (0.04) 90.34 (0.72)
✨ 🆕 utils.js 100 100 100 100

@hrmhatef hrmhatef requested review from shuse2 and matjazv July 24, 2023 17:16
@shuse2 shuse2 requested a review from ricott1 July 25, 2023 05:24
@shuse2 shuse2 requested a review from ricott1 August 2, 2023 07:17
@shuse2 shuse2 enabled auto-merge (squash) August 2, 2023 15:00
@shuse2 shuse2 force-pushed the 116_improve_verify_interface branch from 0222ac2 to 57b5e35 Compare August 2, 2023 15:17
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Commit SHA:bbf247ce42e6e74ac790b59526c7431bf5e3775c

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: 116_improve_verify_interface 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 87.42 (1.31) 69.93 (2.27) 94.23 (0.2) 87.2 (1.17)
🟢 sparse_merkle_tree.js 88.63 (6.28) 69.23 (13.68) 100 (0) 88.09 (5.74)
🟢 state_db.js 90.47 (0.85) 72.05 (1.74) 98.5 (0.04) 90.34 (0.72)
✨ 🆕 utils.js 100 100 100 100

@shuse2 shuse2 merged commit 101a43c into main Aug 2, 2023
8 checks passed
@shuse2 shuse2 deleted the 116_improve_verify_interface branch August 2, 2023 16:22
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.

Improve verify interface
4 participants