Skip to content

Commit

Permalink
Merge pull request #272 from turbofish-org/update-merk
Browse files Browse the repository at this point in the history
Update merk
  • Loading branch information
keppel authored Nov 1, 2024
2 parents 3b3d25a + 13e52b6 commit ff7eab1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tendermint-rpc = { version = "0.38.0", features = [
], optional = true }
tendermint = { version = "0.38.0", optional = true }
tendermint-proto = { version = "0.38.0" }
merk = { git = "https://github.com/nomic-io/merk", rev = "d6f0490993bcf88f786c5271091aa9a84ff2fe69", optional = true, default-features = false }
merk = { git = "https://github.com/turbofish-org/merk", rev = "058839b813bb373e724b7c9826030e6df1aec2cb", optional = true, default-features = false }
orga-macros = { path = "macros", version = "0.3.1" }
log = "0.4.17"
hex-literal = "0.4.1"
Expand All @@ -22,7 +22,7 @@ is_executable = { version = "1.0.1", optional = true }
reqwest = { version = "0.11.16", features = ["blocking"], optional = true }
flate2 = "1.0.22"
tar = "0.4.38"
ed = { git = "https://github.com/nomic-io/ed", rev = "a657be856792039ff60c2f67e7920e38cd3acffc" }
ed = { git = "https://github.com/turbofish-org/ed", rev = "a657be856792039ff60c2f67e7920e38cd3acffc" }
toml_edit = "0.22.9"
prost = { version = "0.13.1" }
home = { version = "0.5.4", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions src/store/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ impl<S: Read> Read for Store<S> {
impl<S: Write> Write for Store<S> {
#[inline]
fn put(&mut self, key: Vec<u8>, value: Vec<u8>) -> Result<()> {
// merk has a hard limit of 256 bytes for keys, but it does not create
// merk has a hard limit of 65535 bytes for keys, but it does not create
// an error until comitting. we assert the key length here so that
// writes will fail early rather than making the entire block fail. this
// assertion can be removed if the merk key length limit is removed, or
// if we instead check this statically using known encoding lengths via
// ed.
if key.len() + self.prefix.len() >= 65535 {
return Err(Error::Store("Store keys must be < 65535 bytes".into()));
if key.len() + self.prefix.len() >= 65536 {
return Err(Error::Store("Store keys must be < 65536 bytes".into()));
}

let prefixed = concat(self.prefix.as_slice(), key.as_slice());
Expand Down

0 comments on commit ff7eab1

Please sign in to comment.