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

Weighted merkle trie #25

Merged
merged 34 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f68df4a
added ranged merkle tries
dabasov Jul 28, 2024
684ff52
fixed tests
dabasov Jul 28, 2024
edb7935
weighted merkle trie
Hitenjain14 Sep 3, 2024
ba640b9
add extension node and block proof
Hitenjain14 Sep 4, 2024
02f0ef6
fix insert and add ut
Hitenjain14 Sep 4, 2024
c41898c
move pebble to kv package
Hitenjain14 Sep 5, 2024
3342423
add get root method
Hitenjain14 Sep 6, 2024
df3ffa0
copy recursive
Hitenjain14 Sep 6, 2024
c5c9d07
return change in delete
Hitenjain14 Sep 9, 2024
3a50934
mod tidy
Hitenjain14 Sep 10, 2024
3b969e9
add collapse level in copy root
Hitenjain14 Sep 11, 2024
a615b06
remove pebble for js and wasm
Hitenjain14 Sep 11, 2024
3f40100
rmv pebble from path and proof
Hitenjain14 Sep 11, 2024
c34b238
improve commit
Hitenjain14 Sep 12, 2024
7afeda1
use chan instead of lock
Hitenjain14 Sep 12, 2024
96dceec
allocate buffer
Hitenjain14 Sep 12, 2024
0b7f793
add rollback trie
Hitenjain14 Sep 13, 2024
71aca33
return hash node if db is not set
Hitenjain14 Sep 14, 2024
6eba55b
add merge logs
Hitenjain14 Sep 15, 2024
023cd7b
serialize as short node
Hitenjain14 Sep 15, 2024
dd036b1
fix collapse for short node
Hitenjain14 Sep 15, 2024
0e4d37a
cleanup
Hitenjain14 Sep 15, 2024
4c9de12
improve get path
Hitenjain14 Sep 18, 2024
4f81424
add timing logs
Hitenjain14 Sep 18, 2024
e9e6c3c
cleanup
Hitenjain14 Sep 18, 2024
7261e05
set to empty node
Hitenjain14 Sep 24, 2024
9dbb21f
fix update key
Hitenjain14 Sep 25, 2024
2680c8c
update value node
Hitenjain14 Sep 25, 2024
58c8bc6
fix rollback for empty trie
Hitenjain14 Sep 25, 2024
87cdd22
fix update key weight
Hitenjain14 Sep 26, 2024
61b88d3
fix save root
Hitenjain14 Sep 26, 2024
40440b0
fix proof
Hitenjain14 Oct 1, 2024
0b1ed4d
fix get proof
Hitenjain14 Oct 1, 2024
e2c4e7e
cleanup
Hitenjain14 Oct 3, 2024
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
8 changes: 4 additions & 4 deletions core/encryption/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"golang.org/x/crypto/sha3"
)

//ErrInvalidHash - hash is invalid error
// ErrInvalidHash - hash is invalid error
var ErrInvalidHash = common.NewError("invalid_hash", "Invalid hash")

const HASH_LENGTH = 32
Expand All @@ -24,10 +24,10 @@ func IsHash(str string) bool {
return err == nil && len(bytes) == HASH_LENGTH
}

//EmptyHash - hash of an empty string
// EmptyHash - hash of an empty string
var EmptyHash = Hash("")

//EmptyHashBytes - hash bytes of an empty string
// EmptyHashBytes - hash bytes of an empty string
var EmptyHashBytes = RawHash("")

/*RawHash - Logic to hash the text and return the hash bytes */
Expand All @@ -45,6 +45,6 @@ func RawHash(data interface{}) []byte {
}
hash := sha3.New256()
hash.Write(databuf)
var buf []byte
buf := make([]byte, 0, hash.Size())
return hash.Sum(buf)
}
130 changes: 0 additions & 130 deletions core/mocks/change_collector_i.go

This file was deleted.

55 changes: 0 additions & 55 deletions core/mocks/hashable.go

This file was deleted.

Loading