-
Notifications
You must be signed in to change notification settings - Fork 56
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
David/adversary test2 #786
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
All the new features added are very helpful features and look good to me. One thing to discuss is making adversary a challenger. |
@ChaitanyaKonda, thanks for the feedback. We have currently prioritized the fact of having few actors and thus having an adversary + challenger. There is an additional functionality implemented in eb229bf that allows us to maintain adversary producing blocks even in the event of a rollback to test deep rollbacks. Let me know if this satisfies your concerns. |
expectedBalance += value2; | ||
} | ||
await new Promise(resolve => setTimeout(resolve, TX_WAIT)); // this may need to be longer on a real blockchain | ||
console.log(`Completed ${i + 1} pings`); | ||
} | ||
|
||
// TODO:_ how can i check that queue 2 is empty | ||
await waitForSufficientBalance(nf3User, expectedBalance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems to be a duplicate of line 217 ?
Multiple minor changes to adversary and optimist to increase testing functionality
adversary-test-all
that tests all possible challengesadversary-test
so that one can pass the type of challenge we want to test.CHALLENGE_TYPE=IncorrectTreeRoot npm run adversary-test
will testIncorrectTreeRoot
. IfCHALLENGE_TYPE
is undefined, then challenges are configured in adversary codeBAD_BLOCK_SEQUENCE
andBAD_TX_SEQUENCE
and also via POST end point/block/gen-block
{blockType: [sequence of blocks]}Changes are tested in regular adversary test.