
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
solidity-patricia-tree
Advanced tools
This is a rewritten version of Christian Reitwießner's patricia-trie to use his patricia tree implementation as a solidity library through npm.
npm i solidity-patricia-tree
pragma solidity ^0.4.25;
import {PatriciaTree} from "solidity-patricia-tree/contracts/tree.sol";
contract TestPatriciaTree {
using PatriciaTree for PatriciaTree.Tree;
PatriciaTree.Tree tree;
function test() public {
// testInsert();
testProofs();
}
function testInsert() internal {
tree.insert("one", "ONE");
tree.insert("two", "ONE");
tree.insert("three", "ONE");
tree.insert("four", "ONE");
tree.insert("five", "ONE");
tree.insert("six", "ONE");
tree.insert("seven", "ONE");
// update
tree.insert("one", "TWO");
}
function testProofs() internal {
tree.insert("one", "ONE");
uint branchMask;
bytes32[] memory siblings;
(branchMask, siblings) = tree.getProof("one");
PatriciaTree.verifyProof(tree.root, "one", "ONE", branchMask, siblings);
tree.insert("two", "TWO");
(branchMask, siblings) = tree.getProof("one");
PatriciaTree.verifyProof(tree.root, "one", "ONE", branchMask, siblings);
(branchMask, siblings) = tree.getProof("two");
PatriciaTree.verifyProof(tree.root, "two", "TWO", branchMask, siblings);
}
}
npm install -g truffle
npm install -g ganache
npm install
Test cases include the information about how the functions work, but also includes a demo scenario. Running and reading the test cases will help you understand how it works.
npm run test
FAQs
Patricia Tree solidity implemenation
The npm package solidity-patricia-tree receives a total of 19 weekly downloads. As such, solidity-patricia-tree popularity was classified as not popular.
We found that solidity-patricia-tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.