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

Data node v2 spec #763

Merged
merged 3 commits into from
Apr 13, 2022
Merged

Data node v2 spec #763

merged 3 commits into from
Apr 13, 2022

Conversation

davidsiska-vega
Copy link
Contributor

No description provided.

@gordsport
Copy link
Contributor

@gordsport
Copy link
Contributor

@campbellssource - please can you review this and add the FE requirements to this as its part of Oregon Trail

@gordsport
Copy link
Contributor

gordsport commented Jan 26, 2022

@pscott31 and @Vegaklaus - to discuss the db choice and how this can work with hashing and update spec requirements if needed

non-protocol-specs/0000-data-node.md Outdated Show resolved Hide resolved
non-protocol-specs/0000-data-node.md Outdated Show resolved Hide resolved

### Orders

Store the orders at the configured resolution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it part of this spec to think about how the data is to be retrieved retrieved as well? Perhaps that's a separate thing to think about

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few things that we have talked about at various points which aren't in here; such as proof of storage, bootstrapping another node without playing the whole chain etc.. Again maybe they are topics for another day or another spec. Something else to consider is what behaviour to expect when there is restore from a checkpoint (delete everything?) or a snapshot (delete everything with a block height > the snapshot and continue?)

@Vegaklaus
Copy link
Contributor

@pscott31 and @Vegaklaus - to discuss the db choice and how this can work with hashing and update spec requirements if needed

Results: The database will be designed so it can (deterministically) map a random number into a table, and then (also deterministically) be able to go sequentially through the contents of this table (e.g., by timestamp) starting at a point determined by another random number.
The database can also (again deterministically) convert records into an appropriate serialisation that can be fed into a hash function.

@pscott31 does that sum it up correctly ?

@pscott31
Copy link
Contributor

pscott31 commented Feb 3, 2022

Yeah, that's about it Klaus :)

Copy link
Contributor

@Vegaklaus Vegaklaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added two questions for clarification.

@davidsiska-vega
Copy link
Contributor Author

The data node v2 must support the following workflow:

  1. a vega network is running
  2. a core node joins (as non-validator) by restoring state from a snaphot
  3. a new data node can be spun up that obtains full history from other data nodes (get addresses from the non-validator node and then download) and finally start receiving events from "its own" non validator node.

@campbellssource
Copy link
Contributor

@gordsport forgive this PR into a PR #886
I thing this spec is too general to add all of the FE requirements to.
As mentioned, we need to figure out a process for specifying each FE requirement on data node. At the moment we have this list in notion under the new from front end column. Either the Q2 objectives get agreed and we write a mini-spec for each Data node augmentation or we just have data node capacity to work in real time with Front end team (as well as other data node users)

@davidsiska-vega
Copy link
Contributor Author

davidsiska-vega commented Feb 16, 2022

If we get this working vegaprotocol/quant#22 then there may be a way of using the quant libraries we have (or with small extension) on client side.

Added some general FE requirements.
We may need to work out a process specing the specific `augmentations` to APIs or additional server side calculators in a way that isn't making this spec bigger.
@gordsport gordsport added this to the 🤠 Oregon Trail milestone Mar 23, 2022
pscott31
pscott31 previously approved these changes Mar 23, 2022
@gordsport
Copy link
Contributor

gordsport commented Mar 30, 2022

Hi @jeremyletang @pscott31
I have renamed this file and created a ticked to review this spec with the aim to add acceptance criteria:

If you are OK with the naming please can you give it a review and merge?

Copy link
Contributor

@gordsport gordsport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed in protocol design meeting this can be merged

@gordsport gordsport merged commit 9b8242d into master Apr 13, 2022
@peterbarrow peterbarrow deleted the data-node-v2 branch July 10, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants