-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix(ethereum-storage): OldNonce error, wait for 1 confirmation when submitting hashes #1078
Conversation
- Ethereum and Gnosis Chain freuquently experience 1-block reorgs So 2 confirmations are required to ensure block finality in most cases.
@@ -17,6 +17,7 @@ const config = { | |||
retryDelay: 0, | |||
safeGasPriceLimit: '500000000000', | |||
transactionPollingTimeout: 300, | |||
blockConfirmations: 2, |
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.
I don't think this is ever used
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.
Fixed, see comment below. it's used now.
* Retrieve from config the default number of block confirmations to wait before considering a transaction successful | ||
* @returns the number of block confirmations | ||
*/ | ||
export function getDefaultEthereumBlockConfirmations(): number { |
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.
same
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.
Fixed. I called it as a fallback.
return ( | ||
(argv.blockConfirmations && Number(argv.blockConfirmations)) || | ||
(process.env.BLOCK_CONFIRMATIONS && Number(process.env.BLOCK_CONFIRMATIONS)) || | ||
defaultValues.ethereumStorage.ethereum.blockConfirmations |
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 is never set, see at the top of this file
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.
Fixed.
Fixes #1074
Fixes #1075
Fixes dw-97
Changes: