Comments (3)
The only intended use of the API currently is for a Sidtree node (sidetree-core) to fetch ALL the transactions starting at a certain point in time.
The intention is to let the blockchain implementation return all transactions that are known at the time of asking immediately so Sidetree can start processing them, there is no point IMO for the sidetree-core to specify the number of transactions to return in because: 1. Would the blockchain layer need to wait if the transaction count known falls short of that number until the asked size is met? 2. If it returns the exact number of transactions as asked, does the Sidetree node need to ask for more immediately? 3. The Sidetree node really just wants to know ALL transactions available, it might as well specify a very large number, like 1000000, is seems rather arbitrary whatever that number is. Thus I opted for just having a flag in the response indicating if there are more transactions or not, and let the blockchain layer decide how many to return, with expectation that the layer doesn't return 1 at a time if it knows of 1M. In the case of 1M transaction hashes, it can choose to return all of them in one shot, or 100K at a time, sidetree-core probably don't care all that much.
Hopefully it makes sense. Happy to discuss further.
from sidetree-ethereum.
Thanks Henry that makes sense.
I'm thinking in addition to the ethereum smart contract, we can track the transactions and ipfs hashes in a server cache (memory or localdb) and make lookups much quicker. Or do you think we need the guarantee that we're reading this directly from the blockchain?
from sidetree-ethereum.
Hi @ebaizel, cache is a major component in the sidetree-core architecture, we are currently calling it the DID Cache. You can see from the architecture diagram that lookups/resolves are intended to hit the DID Cache for perf reasons as you suggested. The description of the DID Cache can be found further down the same implementation doc, but more details can probably be provided. In fact, I plan to merge the first in-memory implementation of it into master sometime today, with the intention that persistency probably using localdb (coincidentally) to come within a week or two. It is by no means the final version, but you can take a look at the pull request here and give comments if you want.
from sidetree-ethereum.
Related Issues (20)
- Init the project
- Create the API for writing Sidetree transactions
- Create the API for fetching Sidetree transactions HOT 1
- Create the Smart Contract that will hold the anchor file hashes HOT 1
- ERC725 and ERC735 HOT 2
- Persist the batch transaction number in the smart contract HOT 1
- Add ipfs module
- Create a service method that creates a new DID HOT 1
- Create a service method that updates a DID
- Create a service method that revokes a key from a DID
- Add API route to fetch latest DID Doc for a given DID
- Limit who can execute the smart contract HOT 4
- Add API infrastructure
- Add IPFS setup steps to README
- Review of the EthDIDAnchor contract HOT 4
- Support TypeScript Full Node with Sidetree (core) HOT 1
- . ./env file does not exit.
- which npm version HOT 1
- is this repo still active ? HOT 3
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 sidetree-ethereum.