Comments (10)
triggered by
new Trie(stateDb, '0000000000000000000000000000000000000000000000000000000000000000')
trie.createReadStream().pipe(out)
from merkle-patricia-tree.
of course I dont expect that to work, but i dont expect it to crash my program either
from merkle-patricia-tree.
right that won't work because the stateRoot '0000000000000000000000000000000000000000000000000000000000000000' doesn't exsist.
from merkle-patricia-tree.
@kumavis do you have any opoins on the expected behavior here?
from merkle-patricia-tree.
should throw an error on a non-existing state root, no?
from merkle-patricia-tree.
with the exception of the empty rlp stateRoot
from merkle-patricia-tree.
Is this sorted?
from merkle-patricia-tree.
no. I think we just need a better error message here
from merkle-patricia-tree.
related #12
from merkle-patricia-tree.
Behavior of the current state of the library is to check for correctness of the provided stateRoot
value and then initialize a trie with the stateRoot
as the new root. Will close here.
Example code run:
import { BaseTrie as Trie } from 'merkle-patricia-tree'
const trie = new Trie(null, Buffer.from('0000000000000000000000000000000000000000000000000000000000000000', 'hex'))
stream.on('data', (d: any) => {
console.log(d.key.toString())
console.log(d.value.toString())
})
stream.on('end', () => {
console.log('The end.')
})
Feel free to reopen if I haven't understand something correctly about the issue semantics.
from merkle-patricia-tree.
Related Issues (20)
- missing typescript types HOT 3
- Trie only accepts one `put` call HOT 2
- Rename Trie.prove to Trie.createProof HOT 7
- Analyze speed deterioration of v4 HOT 6
- Verify Proof fails if there is an extension with an embedded branch
- Library fails branch-value-update test HOT 5
- update checkpointing API HOT 2
- Support Question, headline replaced by admin
- better proof/verification support HOT 3
- Support Promise and callbacks for async functions HOT 1
- Extract db-related logic from baseTrie HOT 4
- Replace istanbul with nyc HOT 1
- More consistent and better structured directory/file layout HOT 2
- Data gets lost when using string as a key. (memdown + 2 tries) HOT 3
- Tape v4.10.0 breaks tests
- Delete node error HOT 6
- nibbles.js matchingNibbleLength potential error HOT 1
- Replace sha3 with keccak256 HOT 1
- npm run build fails HOT 1
- Add Ethereum name or address to package.json
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from merkle-patricia-tree.