-
Notifications
You must be signed in to change notification settings - Fork 773
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
Transactions from an invalid block should be put back into the backlog #193
Comments
Ok, trying to get some understanding here. It seems the functions involved from So the changefeed will look something like feed = r.table('bigchain').filter(r.row['votes']).changes().run(self.conn) Which I suppose will go somewhere in Do the votes currently trigger anything at all? It looks like the votes get written but are never used again, correct? Finally, should an invalidated block be deleted once all of its transactions are liquidated? |
We can use the already existing changefeed |
When a block is marked invalid the transactions in the block need to be re-assigned and put back into the backlog.
The difficult part is to decide which node should do it. A simple solution would be to have a changefeed listening to updates on the
bigchain
table (the only updates permitted should be appending new votes) and everytime a new vote comes in we check if a majority decision was reached. If so and if the decision is invalid put the transactions back into thebacklog
. Since the primary key in thebacklog
table is theid
of the transaction even if several nodes try to do this at the same time there will be no duplicated transactions in thebacklog
.The text was updated successfully, but these errors were encountered: