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

Quasar Fast Exit: Add IFE Claims for Byzantine conditions #724

Merged
merged 15 commits into from
Jan 20, 2021

Conversation

souradeep-das
Copy link
Contributor

@souradeep-das souradeep-das commented Dec 11, 2020

Includes -

describe('And Quasar maintainer deploys and adds liquid funds to the Quasar', () => {
before(async () => {
await setupQuasar();
this.quasarCapacityBeforeAddingFunds = new BN(await this.quasar.tokenUsableCapacity(ETH));
Copy link
Contributor

Choose a reason for hiding this comment

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

I presume this simply means inital quasar funds. which... is empty aka. 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, right. It is empty at this moment

});

describe('And then Alice tries to obtain a ticket from the Quasar using the output', () => {
describe('If the output is from block over the safe-blocknum', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the logic behind a to old output coming from block num?

Copy link
Contributor

Choose a reason for hiding this comment

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

aha, so... I think I understand.
It's also a question I wanted to ask you earler.

The reason you need this, is because the contracts don't know if the chain is byzantine or not, correct? Only Watchers have the functionality of declaring (raising) byzantine events.
So with this parameter you declare what the operator of the quasar thinks is blknum up to which the chain is byzantine safe. Correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

Another one - the functionality of updateSafeBlockLimit implies that the operator of the quasar needs to perpetually update this safe block number, correct?

If this is true (open for debate):

  • perhaps we need a way to declare it always safe? From the conversation with Leslie I understood we want to be aggresive with parameters, since we're running Watchers, Childchain and the challenge infrastructure.

  • if it's not safe or too risky, perhaps we need to include this in the Watcher or some other component, that would ask Watcher - Up to where are you byzantine free - and update the Quasar contract accordingly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly!
yes, the updateSafeBlockLimit is a bit cumbersome. One safe way we thought about was-

In the current design, there is a requirement for the Quasar owner to constantly keep updating the Safe Blocknum upper-bound. 
An alternative could be - Provide tickets for a UTXO if either one of these satisfy:

- UTXOs is older than (Latest_Block_timestamp - Buffer), ideally the buffer could take the value of the minimum validation period. or
- UTXO is from a safe block (determined by safe blocknum upper-bound) set by the Owner

Yes, i feel the same about your points too. since we are the only one running this for now
about 2) Yes this is a good idea, since we run our own watcher, we could run a service that could ping our watcher periodically to update the safe block limit

this.framework.address,
this.spendingConditionRegistry.address,
quasarOwner,
0,
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's stupid but it would be great if we could pass in a named variable to a constructor that takes 6 arguments, it's just easier to know what it is. In this case
safePlasmaBlockNum = 0;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, will do that

this.waitingPeriod = 14400;
this.ifeWaitingPeriod = 691200;
this.dummyQuasarBondValue = 500;

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
safePlasmaBlockNum = 0;

Copy link
Contributor

@kevsul kevsul left a comment

Choose a reason for hiding this comment

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

Great! 👍

@souradeep-das souradeep-das requested a review from kevsul January 20, 2021 07:49
@souradeep-das souradeep-das merged commit 743e1e2 into v2.0.0 Jan 20, 2021
@souradeep-das souradeep-das deleted the souradeep/quasar_ife_claim branch January 20, 2021 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants