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

Deleted password file #1040

Merged
merged 1 commit into from Dec 13, 2022
Merged

Conversation

Yashk767
Copy link
Contributor

Description

Deleted an unused password.txt file.

@Yashk767 Yashk767 merged commit cf08876 into razor-network:v1.0.5 Dec 13, 2022
SkandaBhat added a commit that referenced this pull request Dec 14, 2022
* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Yashk767 added a commit that referenced this pull request Dec 15, 2022
* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>
ashish10677 added a commit that referenced this pull request Feb 2, 2023
* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
SkandaBhat added a commit that referenced this pull request Mar 27, 2023
* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated version to

* Revert import change

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
ashish10677 added a commit that referenced this pull request Apr 17, 2023
* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated version to

* Revert import change

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
ashish10677 added a commit that referenced this pull request Apr 17, 2023
* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3ad.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edb.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated version to

* Revert import change

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
SkandaBhat added a commit that referenced this pull request Jul 31, 2023
* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patc…
Yashk767 added a commit that referenced this pull request Aug 3, 2023
* Updated deployed contract addresses and chaind to mainnet ones for 1.0.6-beta release (#1099)

* v1.0.6-beta ready

* updated contract addresses

* Updated version to v1.0.6 (#1101)

* Releasing 1.0.6 (#1102)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 …
Yashk767 added a commit that referenced this pull request Sep 14, 2023
* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.



* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go



* Add logs for dispute and propose.



* Fix tests.



* Suppress unneccessary error logs. (#935)



* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery



* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter








* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly








* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly



* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.



* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go



* Add logs for dispute and propose.



* Fix tests.



* Suppress unneccessary error logs. (#935)



* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery



* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter








* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly








* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version



* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Deleted password file (#1040)









* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.



* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go



* Add logs for dispute and propose.



* Fix tests.



* Suppress unneccessary error logs. (#935)



* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery



* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter








* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly








* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version



* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber










* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------









* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.



* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go



* Add logs for dispute and propose.



* Fix tests.



* Suppress unneccessary error logs. (#935)



* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery



* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter








* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly








* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version



* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Deleted password file (#1040)









* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.



* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go



* Add logs for dispute and propose.



* Fix tests.



* Suppress unneccessary error logs. (#935)



* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery



* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter








* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly








* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version



* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber










* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.



* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go



* Add logs for dispute and propose.



* Fix tests.



* Suppress unneccessary error logs. (#935)



* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery



* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter








* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly








* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version



* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.



* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.



* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go



* Add logs for dispute and propose.



* Fix tests.



* Suppress unneccessary error logs. (#935)



* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery



* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter








* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly








* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patc…

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yohan Nelson <yohan.nelson@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
ashish10677 added a commit that referenced this pull request Sep 26, 2023
…1116)

* Updated deployed contract addresses and chaind to mainnet ones for 1.0.6-beta release (#1099)

* v1.0.6-beta ready

* updated contract addresses

* Updated version to v1.0.6 (#1101)

* Releasing 1.0.6 (#1102)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

*…
Yashk767 added a commit that referenced this pull request Oct 6, 2023
* Releasing 1.0.6 (#1102)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lu…
SkandaBhat added a commit that referenced this pull request Oct 18, 2023
* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch…
Yashk767 added a commit to Yashk767/razor-go that referenced this pull request Nov 6, 2023
* feat: Github Migration  (#1146)

* feat: migrate to github actions

* chore: migrate from circle ci

* Update develop.yml (#1148)

* Update develop.yml (#1149)

* Update develop.yml

* Update develop.yml

* Update develop.yml

* Fix go mod tidy

* Replaced curve instance elliptic.P256() with crypto.S256() (#1150)

* fix: Update Dockerfile with version bumps (#1152)

* chore: hotfix missing workflow

* chore: fix dockerfile versions

* Feature/v1.1.0 (#1154)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.c…
Yashk767 added a commit to Yashk767/razor-go that referenced this pull request Nov 6, 2023
* feat: Github Migration  (#1146)

* feat: migrate to github actions

* chore: migrate from circle ci

* Update develop.yml (#1148)

* Update develop.yml (#1149)

* Update develop.yml

* Update develop.yml

* Update develop.yml

* Fix go mod tidy

* Replaced curve instance elliptic.P256() with crypto.S256() (#1150)

* fix: Update Dockerfile with version bumps (#1152)

* chore: hotfix missing workflow

* chore: fix dockerfile versions

* Feature/v1.1.0 (#1154)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.…
SkandaBhat added a commit that referenced this pull request Feb 5, 2024
* feat: Github Migration  (#1146)

* feat: migrate to github actions

* chore: migrate from circle ci

* Update develop.yml (#1148)

* Update develop.yml (#1149)

* Update develop.yml

* Update develop.yml

* Update develop.yml

* Fix go mod tidy

* Replaced curve instance elliptic.P256() with crypto.S256() (#1150)

* fix: Update Dockerfile with version bumps (#1152)

* chore: hotfix missing workflow

* chore: fix dockerfile versions

* Feature/v1.1.0 (#1154)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmai…
Yashk767 added a commit that referenced this pull request Feb 21, 2024
* Releases/v1.1.0 (#1163)

* feat: Github Migration  (#1146)

* feat: migrate to github actions

* chore: migrate from circle ci

* Update develop.yml (#1148)

* Update develop.yml (#1149)

* Update develop.yml

* Update develop.yml

* Update develop.yml

* Fix go mod tidy

* Replaced curve instance elliptic.P256() with crypto.S256() (#1150)

* fix: Update Dockerfile with version bumps (#1152)

* chore: hotfix missing workflow

* chore: fix dockerfile versions

* Feature/v1.1.0 (#1154)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.g…
Yashk767 added a commit that referenced this pull request Feb 21, 2024
* feat: Implemented getIteration calculation concurrently in batches (#1170)

* feat: Implemented getIteration calculation concurrently in batches

* feat: added iteration concurrency iterations

* refactor: biggest staker calculation implemented using goroutines (#1171)

* feat: GetBiggestStakeAndId() implementation in parallel

* refactor: added logs for biggest staker

* refactor: storing medians concurrently (#1172)

* refactor: Calculated medians concurrently

* Revert refactor: Calculated medians concurrently

* refactor: concurrent implementation of MakeBlock

* refactor: corrected benchmarks

* refactor: optimized GetSortedRevealedValues (#1173)

* refactor: fetched reveal event logs concurrently

* refactor: calculated GetSortedRevealedValues() concurrently

* feat: Fetched each job for each collection in a separate go routine (#1168)

* feat: Fetched each job for each collection in a separate goroutine

* refactor: removed error return from GetDataToCommitFromJobs()

* refactor: defined variables together

* refactor: seperated go routine part in GetDataToCommitFromJobs()

* fix: Increased the buffer size of errChan in `GetBiggestStakerId` (#1175)

* feat: GetBiggestStakeAndId() implementation in parallel

* refactor: added logs for biggest staker

* fix: updated buffer size of error channel

* refactor: fixed tests

* feat: processed collections concurrently (#1180)

* ci: added github workflows to feature branches (#1186)

* ci: added feature branches to github workflows

* refactor: added feature branch trigger in develop.yml itself

* refactor: implemented generic flag input function and refactored config module (#1184)

* refactor: generic flagInputs and refactored config module

* refactor: refactored bigger function

* refactor: fixed setConfig tests

* refactor: changed SKALE staging url to Polygon staging in tests

* refactor: golangci-lint fix

* feat: caching jobs and collections (#1183)

* feat: added cache module for assets

* feat: listening for asset update events

* feat: added event listener for event CollectionActivityStatus

* feat: added listener for create collection and create job

* refcator: separated event logs fetching and processing

* refactor: added method caller for initAssetCache()

* refcator: fixed ExecuteVote() tests

* ci: added eventListeners.go as ignore file for coverage

* fix: fixed GetActiveCollection() and and GetActiveJob() tests

* refactor: tests improvements   (#1187)

* refcator: renamed test_utils.go to test_utils_test.go

* refactor: used a global txnOpts for tests

* feat: added warnings and validations for incorrect config parameters (#1188)

* refactor: added validations for config parameters

* refactor: modified default values for config parameters

* fix: removed equal operator from comparison of config values

* refactor: fixed config getter tests

* chore: updated testnet parameters to europa testnet (#1189)

* Releases/v1.1.0 (#1163)

* feat: Github Migration  (#1146)

* feat: migrate to github actions

* chore: migrate from circle ci

* Update develop.yml (#1148)

* Update develop.yml (#1149)

* Update develop.yml

* Update develop.yml

* Update develop.yml

* Fix go mod tidy

* Replaced curve instance elliptic.P256() with crypto.S256() (#1150)

* fix: Update Dockerfile with version bumps (#1152)

* chore: hotfix missing workflow

* chore: fix dockerfile versions

* Feature/v1.1.0 (#1154)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Reduced wait for block completion to 1 second (#984)

* changed tolerance flag type to uint32 (#983)

* Removed ethBalanceCheck (#982)

* Moved constant values to constants.go (#987)

* moved gasLimitMultiplier as constant in constants.go

* Moved path.go strings to constants.go

* Replaced common.Hash{0x00} with core.NilHash

* Update geth version to v1.10.25 and updated depreciated bindings (#985)

* Updated geth version

* Updated depriciated bindings

* updated go.sum to fix tests

* Replaced errors package

* Validate contract calls (Changes from v1-audit) (#981)

* Added retry mechanism for fetchBalance

* Added ETA for unlockWithdraw

* Added check of staker is slashed for stake

* Added valid ERC20 check for addresses

* Changed name from IsValidErc20Address to IsValidAddress

* Functions Refactor (#989)

* changed state name to Buffer instead of -1

* CalculateBlockNumberAtEpochBeginning cleanup

* Renamed functions in array.go

* ApproveUnstake sends StakerTokenAddress instead of StakerStruct

* Returned error from getMerkleTree()

* Returned error from getMerkleRoot()

* Removed unused functions

* Added tree is nil condition in GetMerkleRoot()

* fixed BenchmarkGenerateTreeRevealData

* Code CleanUp (Issues from v1-audit) (#990)

* Renamed getDelayedState to getBufferedState

* remove uint64 from block time

* Renamed handleRevealState to CheckForLastCommitted

* CalculateBlockNumberAtEpochBeginning renamed to EstimateBlockNumberAtEpochBeginning

* Renamed claimStakeReward to ClaimStakerReward

* Renamed GetStatesAllowed to GetFormattedStateNames

* GetSalt clean up

* changed int64 to uint64 in constants

* Used block.Time directly instead of blockTime variable

* Txn hash made consistent in logging

* remove redundant uint64 typecast from GetEpoch()

* Rename coinContract to erc20contract

* Updated mocks after renaming coinContract to erc20Contract

* Removed redundant code in logger.go

* Removed space from xhtml job result (#991)

* Log changes from v1-audit (#994)

* Renamed eth balance to sFuel balance

* used log.Info instead of fmt.Println for contractAddresses

* Added do not mopdify note in constants.go

* Added a warning for low ethBalance

* replaced path.join with filepath.join (#992)

* Removed redundant cmd/utilsInterface (#997)

* Removed UtilsInterface in cmd package

* Compilation successful for tests

* replaced utils.UtilsInterface with razorUtils

* Included CheckAmountAndBalance in utils/utilsInterface

* Fixed tests

* Fixed benchmark

* Fixed MakeBlock benchmark

* Moved waitForAppropriateState after epoch check (#1008)

* Implemented timeout for logger on fetching blockNumber (#1009)

* Implemented timeout for logger on fethcing blockNumber

* Added comments

* updated dockerfile and readme for non-root user (#1014)

* Moved Lumberjack constants to config (#1011)

* Added logFile parameters to config

* Initialised logger with getting parameters from config

* Added logFile paramters in config set up script

* Added config as a parameter in AssignLogFile()

* Fixed tests

* Avoided passing nil types.Configurations{]

* Passed types.Configuations{} for setConfig

* updated readme for expose metric and running cmd in background (#1015)

* Cached API Response (#1016)

* Added cache package containing caching utils

* Used cache to get data from API

* Fixed tests

* Fixed test

* minor fixes

* removed unwanted test

* Added condition to fetch value only if the key is present in json (#1028)

* Added support for Post Requests (#1020)

* Added POST request support

* datasource URL struct support

* Updated createJob command and new format for assets.json file

* Fixed tests

* Fixed URlStruct in test

* Removed unwanted comment

* Backwards compatible

* Removed unwanted logs

* Merge `v1.0.5`into `v1.0.6` (#1031)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* renamed variable correctly

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Refactor utilsInterface (#1024)

* FileUtils, GasUtils, ClientUtils

* Added test_utils.go to initialiase all the mocked interface

* test_utils.go support for all tests

* Initialised new utils interfaces

* Fetched v1.0.5 updates to v1.0.6 (#1045)

* Fetched the updated changes from v1.0.5

* Staging deployement parameters (#1046)

* Added http timeout as a config parameter (#1055)

* added http timeout as a config parameter

* Fixed and Added tests

* added httpTimeout in config

* Added logFile config parameters to readMe

* Fixed comments

* Fetched API key from env file (#1048)

* Added dot env file utils

* Fetched API key from .env file when required

* updated dependencies

* Changed API key regex

* Added name field in customJob struct

* Replaced content-type field with headers in dataSourceURLStruct

* Updated post request creation

* picked API Regex from constants.go

* Removed unwanted field from header

* returned error as well from GetkeywordAndAPIKey

* replaces regexp.Match() with strings.Contains()

* support for headers in GET requests

* Refactored GetDataFromAPI

* Added processRequest retry constants

* Added condition to check if there was a value in previous block (#1056)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* added condition to check if there was a value in previous block

* changed error messaged

---------

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Checked password is correct at the immediate start of command (#1069)

* Added function CheckPassword()

* Checked password at immediate start of command

* Added CheckPassword in UtilsInterface

* fixed tests

* Fetch `main` branch into `v1.0.6` (#1076)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Releases/v1.0.5 (#1043)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Yashk767 <76935991+Yashk767@users.noreply.github.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>
Co-authored-by: YashK <yash.kurlekar2017@gmail.com>

* updated CI for dockerhub token. (#1052)

* updated CI for tests (#1075)

* updated CI for tests

* removed docker from test ci

* Merge `v1.0.5-patch2` to main  (#1073)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fix home dir path

* Add logs to vote.go and commit.go

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Add logs for dispute and propose.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Fix tests.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Suppress unneccessary error logs. (#935)

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* changed http timeout to 30 sec (#943)

* saving commit data only after successfull commit (#947)

* Added password flag (#946)

* added password flag

* README updated

* Hotfix-giveSorted (new implementation) (#953)

* GiveSorted linear recursion

* Added backupNode flag

* Compilation success for tests

* Fixed tests

* removed recusrsion, called giveSorted linearly

* fixed tests

* Added leafId to giveSortedLeafIds[] on successful giveSorted

* Hotfix-sortedProposedBlocks (#957)

* Shuffled copied slice instead of original slice

* returned error from giveSorted when len(sortedValues)=0

* Fixed dispute tests

* Changed pending nonce at to nonce at. (#948)

* Changed pending nonce at to nonce at.
* Update mockery

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* Hotfix -RPCTimeout (#955)

* Added a generic function with timeout for contract calls

* Moved generic function to utils and implemented to all contract getter calls

* Implemented timeout for contract setter functions

* rpc timeout custom error

* type asserting structs from contract mappings

* Shifted timeout to constants

* passed timeout in int in constants.go

* Added rpcTimeout as config

* Removed errorIndex paramter from CheckIfAnyError()

* Function renamed

* Fixed tests

* Unrequired change

* Added backup node info in readme (#963)

* Passed a initialized varible instead of nil value as a parameter

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* Updated `v1.3.0` branch to staging parameters for v1.3.0-alpha version (#967)

* Updated contract addresses and chainId to staging

* Updated razor-go version to v1.3.0-alpha

* Fixed `CheckIfAnyError()` on RPCTimeout. (#974)

* Added errorIndexInReturnedValues as a parameter in  function

* Fixed comparios of error data type from returned values

* Added a check if config key is present in yaml file before fetching value (#975)

* Added default values for config parameters

* Checked if config key is present in yaml file before fetching

* Fixed tests

* returned default values uniformly

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shekhar Gaur <65169767+shekhar2807@users.noreply.github.com>
Co-authored-by: Ashish Kumar Mishra <ashish10677@gmail.com>
Co-authored-by: Shyam Patel <shyampkira@gmail.com>
Co-authored-by: Raj Kharvar <rajkharvar1808@gmail.com>
Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>

* updated version to v1.0.5-alpha (#978)

* Changes Requested in v1.0.5 Review (#1006)

* updated logs and readMe for v1.0.5

* Canges string formater for errors to %v

* Inserted Logs in the entire codebase (#1018)

* Inserted Logs

* Corrected logs

* Modified lumberJack constants

* V1.0.5-alpha-patch1 Ready (#1022)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Log corrections

* updated release

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Calculated blockNumber in a separate go-routine for logging (#1025)

* Cached block number in logger

* Revert "Cached block number in logger"

This reverts commit 760e3adf38f106bd444ef2d64494565d9bd6dae1.

* Added block/block.go for calculating latestBlock in a seperate goroutine

* Fetched block number from block package

* log corrections

* Increased max size of file to 182MB (#1027)

* V1.0.5 beta ready (#1032)

* Production support

* Updated release version

* Updated maxSize of log file to 200MB

* Added mutex lock in blockNumber calculation (#1035)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

* Added mutex lock in blockNumber calculation

* Added new staging addresses and chainId

* updated version

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* v1.0.5-beta-patch1 (#1037)

* Updated depolyment paramters to prod

* updated version to v1.0.5-beta-patch1

* Updated version to v1.0.5 (#1033)

* Made v1.0.5 branch in sync with main branch (#1039)

* Merge `v1.0.4` release to main branch  (#977)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Updated user in dockerfile (#1012)

* updating user in dockerfile

* updating readme for non-root user

* Revert "Updated user in dockerfile (#1012)" (#1021)

This reverts commit 7f95edbdc1c2963077805a9da6b0b5aa7e4c0f22.

Co-authored-by: Shrikant upadhyay <shrikant1997upadhyay@gmail.com>

* Deleted password file (#1040)

* Added sleep time to reduce amount of RPC calls to get blockNumber (#1042)

add sleep after client call to get blockNumber

* Merge `V1.0.5-gasLimitFix` to `releases/v1.0.5` (#1062)

* Hardcoded gas limit for reveal (#1060)

* Updated version to v1.0.5-patch2 (#1061)

* Added gasLimit to override as a config parameter (#1063)

* Added gasLimitOverride config parameter

* Taking the gas limit value from config if present

* Added tests

* Added default gas limit override value

* Added gas limit overridr in readMe

* Updated deployment parameters to staging for `v1.0.5-patch2-alpha` (#1065)

* Updated deployment parameters to staging

* updated version

* Updated to v1.0.5-patch2-beta (#1066)

* Updated version to v1.0.5-patch2-beta

* Updated deployement parameters to prod

* Updated version to `v1.0.5-patch2` release (#1067)

* Merge v1.0.5 to main (#1038)

* v1.2.0 (#965)

* Hotfix-logImprovements (#952)

* Set up blocknumber and epoch in logs

* updated blocknumber and epoch logger info in every command

* Hotfix-getDataFromAPI (#951)

* Changed numm of retry attempts

* removed redundant retry attempts

* corrected tests

* changed http timeout and logged time elapsed to fetch data (#954)

* Updated version (#960)

* Updated version

* updated version to v1.2.0

* version update (#972)

* Merged `v1.3.0-alpha` into `v1.0.5` (#973)

* Merged `v1` into `v1.3.0-aplha` with hotfixes (#966)

* Hotfix-proposed data (#913)

* Updated propose data global variables correctly

* Fixed tests

* Returned correct waitForBlockCompletion error

* coverage increase

* GetLocalData returns type types.ProposeFileData

* fixed benchmark

* Fetched Last proposed from contracts (#917)

* fetched getLastProposedEpoch from contracts and tests for it

* typo fix

* V1 propose hotfix (#918)

* Change propose.go to get sorted proposed block ids.
* Fix sorted proposed block issue.

Signed-off-by: Ashish Kumar Mishra <ashish10677@gmail.com>

* allow stakers to addStake < minSafeRazor (#928)

* Call claimStakerReward only if there reward to claim (#926)

* Make contract call only if there is commission to claim

* Add tests for claimCommission file

* update check

* Hotfix-giveSorted (#921)

* ResetDispute only done after FinalizeDispute

* Fixed tests

* Update README (#931)

* Update README

* Update logs path

* Fi…
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.

None yet

1 participant