Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ergo maintained avl tree library #51

Merged
merged 3 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/real-dancers-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ergoplatform/authenticated-avl-tree": minor
---

Migrate to Ergo Platform maintained AVL tree library
1 change: 1 addition & 0 deletions packages/authenticated-avl-tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ crate_type = ["cdylib", "rlib"]
wasm-bindgen = "0.2.83"
js-sys = "0.3.60"
scorex_crypto_avltree = "0.1.0"
ergo_avltree_rust = { git = "https://github.com/ergoplatform/ergo_avltree_rust.git" }
derive_more = "0.99.17"
ergo-wasm-derive = { path = "../ergo-wasm-derive" }
ergo-lib-utils = { path = "../ergo-lib-utils" }
Expand Down
2 changes: 1 addition & 1 deletion packages/authenticated-avl-tree/src/batch_avl_prover.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::batch_node::AVLTree;
use crate::operation::{Operation, TsOperationType};
use derive_more::{From, Into};
use ergo_avltree_rust::batch_avl_prover::BatchAVLProver as NativeBatchAVLProver;
use ergo_lib_utils::MapJsValueErrorResult;
use js_sys::Uint8Array;
use scorex_crypto_avltree::batch_avl_prover::BatchAVLProver as NativeBatchAVLProver;
use wasm_bindgen::prelude::wasm_bindgen;
use wasm_bindgen::JsValue;

Expand Down
2 changes: 1 addition & 1 deletion packages/authenticated-avl-tree/src/batch_node.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use derive_more::{From, Into};
use scorex_crypto_avltree::batch_node::{AVLTree as NativeAVLTree, Node, NodeHeader};
use ergo_avltree_rust::batch_node::{AVLTree as NativeAVLTree, Node, NodeHeader};
use wasm_bindgen::prelude::wasm_bindgen;

#[wasm_bindgen]
Expand Down
2 changes: 1 addition & 1 deletion packages/authenticated-avl-tree/src/operation.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use derive_more::{From, Into};
use ergo_avltree_rust::operation::{KeyValue, Operation as NativeOperation};
use ergo_lib_utils::{extract_classname, MapJsValueErrorResult};
use ergo_wasm_derive::TryFromJsValue;
use js_sys::Uint8Array;
use scorex_crypto_avltree::operation::{KeyValue, Operation as NativeOperation};
use wasm_bindgen::{prelude::wasm_bindgen, JsValue};

#[wasm_bindgen]
Expand Down
89 changes: 28 additions & 61 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz"
integrity sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==

"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8":
"@babel/core@^7.11.6", "@babel/core@^7.12.3":
version "7.20.5"
resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz"
integrity sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==
Expand Down Expand Up @@ -504,18 +504,6 @@
human-id "^1.0.2"
prettier "^2.7.1"

"@ergoplatform/authenticated-avl-tree@file:/home/ross/dev/ergo-lib-wasm/packages/authenticated-avl-tree":
version "0.1.0"
resolved "file:packages/authenticated-avl-tree"

"@ergoplatform/ergo-lib-wasm@file:/home/ross/dev/ergo-lib-wasm/packages/ergo-lib-wasm":
version "0.1.1"
resolved "file:packages/ergo-lib-wasm"

"@ergoplatform/scorex-buffer@file:/home/ross/dev/ergo-lib-wasm/packages/scorex-buffer":
version "1.0.0"
resolved "file:packages/scorex-buffer"

"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz"
Expand Down Expand Up @@ -712,7 +700,7 @@
slash "^3.0.0"
write-file-atomic "^4.0.1"

"@jest/types@^29.0.0", "@jest/types@^29.3.1":
"@jest/types@^29.3.1":
version "29.3.1"
resolved "https://registry.npmjs.org/@jest/types/-/types-29.3.1.tgz"
integrity sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA==
Expand Down Expand Up @@ -751,7 +739,7 @@
resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==

"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/[email protected].14":
"@jridgewell/[email protected].14", "@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.14"
resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz"
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
Expand Down Expand Up @@ -794,7 +782,7 @@
"@nodelib/fs.stat" "2.0.5"
run-parallel "^1.1.9"

"@nodelib/fs.stat@^2.0.2", "@nodelib/[email protected].5":
"@nodelib/[email protected].5", "@nodelib/fs.stat@^2.0.2":
version "2.0.5"
resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz"
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
Expand Down Expand Up @@ -1018,7 +1006,7 @@ arrify@^1.0.1:
resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz"
integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==

babel-jest@^29.0.0, babel-jest@^29.3.1:
babel-jest@^29.3.1:
version "29.3.1"
resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.3.1.tgz"
integrity sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA==
Expand Down Expand Up @@ -1112,7 +1100,7 @@ breakword@^1.0.5:
dependencies:
wcwidth "^1.0.1"

browserslist@^4.21.3, "browserslist@>= 4.21.0":
browserslist@^4.21.3:
version "4.21.4"
resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz"
integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==
Expand Down Expand Up @@ -1178,16 +1166,7 @@ caniuse-lite@^1.0.30001400:
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz"
integrity sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==

chalk@^2.0.0:
version "2.4.2"
resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

chalk@^2.1.0:
chalk@^2.0.0, chalk@^2.1.0:
version "2.4.2"
resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
Expand Down Expand Up @@ -1271,16 +1250,16 @@ color-convert@^2.0.1:
dependencies:
color-name "~1.1.4"

color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==

[email protected]:
version "1.1.3"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==

color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==

[email protected]:
version "0.0.1"
resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
Expand Down Expand Up @@ -1558,7 +1537,7 @@ fast-glob@^3.2.9:
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x:
fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0:
version "2.1.0"
resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
Expand Down Expand Up @@ -1631,6 +1610,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==

fsevents@^2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
Expand Down Expand Up @@ -2252,7 +2236,7 @@ jest-resolve-dependencies@^29.3.1:
jest-regex-util "^29.2.0"
jest-snapshot "^29.3.1"

jest-resolve@*, jest-resolve@^29.3.1:
jest-resolve@^29.3.1:
version "29.3.1"
resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.3.1.tgz"
integrity sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw==
Expand Down Expand Up @@ -2400,7 +2384,7 @@ jest-worker@^29.3.1:
merge-stream "^2.0.0"
supports-color "^8.0.0"

jest@^29.0.0, jest@^29.3.1:
jest@^29.3.1:
version "29.3.1"
resolved "https://registry.npmjs.org/jest/-/jest-29.3.1.tgz"
integrity sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA==
Expand Down Expand Up @@ -2972,34 +2956,22 @@ safe-regex-test@^1.0.0:
resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==

semver@^5.4.1, "semver@2 || 3 || 4 || 5":
"semver@2 || 3 || 4 || 5", semver@^5.4.1:
version "5.7.1"
resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==

semver@^6.0.0:
version "6.3.0"
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^6.3.0:
version "6.3.0"
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^7.3.5:
[email protected], semver@^7.3.5:
version "7.3.8"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
dependencies:
lru-cache "^6.0.0"

[email protected]:
version "7.3.8"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
dependencies:
lru-cache "^6.0.0"
semver@^6.0.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

set-blocking@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -3322,7 +3294,7 @@ type-fest@^0.8.1:
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==

typescript@^4.9.4, typescript@>=4.3:
typescript@^4.9.4:
version "4.9.4"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz"
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
Expand Down Expand Up @@ -3478,12 +3450,7 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^21.0.1:
version "21.1.1"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==

yargs-parser@^21.1.1:
yargs-parser@^21.0.1, yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
Expand Down
Loading