You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Modify asset status implemented. (#163)
* Modify asset status implemented.
* Add modifyAsset command.
* Apply gofmt.
* Fix README.
* Made status as a string and parsed to bool later.
* Apply gofmt.
Signed-off-by: Ashish Mishra <[email protected]>
* Update go.yml (#173)
* Update CONTRIBUTING.md (#174)
* Checked Eth Balance is 0 instead of RZR balance check. (#162)
* Added CheckEthBalanceIsZero() function
* Removed RZR balance==0 check, instead added eth Balance check
* Removed 'yes' as an option (#176)
* Added condition to check ethBalance=0 in state dependent functions. (#175)
* Added condition to check ethBalance=0
* Checked eth balance before fetching epoch
* Propose only when iteration is less than last block in alt blocks when no. of proposed blocks == max alt blocks (#139)
* Added GetMaxAltBlocks() function
* Added condition to check numOfProposedBlocks == maxAltBlocks
* Added aditional condition when numOfProposedBlocks > maxAltBlocks
* Changed log.Infof to log.Info where it was not required
* Modified log
* minor changes to optimize code
* Ux improvements for incentivized test-net. (#140)
* Add description for `addJobToCollection` command.
* Run help command by default.
* Cobra CLI placeholder texts removed.
Running razor without any commands displays the help page.
Description of all commands changed.
* Update fetching of addresses from addresses.json (#120)
* Added addresses.json file
* Added AssignAddressesFromJSON() function
* Added getters for deployed addresses
* Made changes according to new getters
* Capitalized GetParametersAddress() function
* Ran gofmt
* Changed path to 'addresses.json'
* minor changes
* Moved addresses.json to dir deployed_addresses
* Remove cache requirement. (#142)
* Revert "Update fetching of addresses from addresses.json (#120)" (#147)
This reverts commit 978bcdf.
* Change amount to value and add -a shorthand for address.
* Renamed docekerize-build to build-noargs
* Throw warning if the RPC URL isn't an https URL.
* Waiting for x blocks now changed to waiting x seconds.
* Address validation done before checking for epoch and sending txn.
* Run gofmt to format the code.
* Made setconfig as camelcase.
* Check if the user has unstaked before withdrawing funds.
Signed-off-by: Ashish Mishra <[email protected]>
Co-authored-by: Skanda Bhat <[email protected]>
* Read password from file (#177)
* Added GetPasswordFromFile(), IsFlagPassed() functions
* Added an optional password flag
* Added AssignPassword() function and moved password util functions to utils/password.go
* Used AssignPassword() for same block of codes at places
* Added a confirmation from user to set password from file
* Revert "Added a confirmation from user to set password from file"
This reverts commit 75e9402.
* Added a warning when password flag is passed
* Added chainID and salt in hash calculation (#161)
* Auto unstake and withdraw if stake < minStake while voting (#181)
* Added function to auto unstake and withdraw
* Added condition when staker has already auto withdrawn
* Shifted log statement
* Added condition when stakerId=0
* Created Unstake and AutoWithdraw functions seperately in unstake.go
* Changed log.Fatal to log.Error
* Transact fractional RZRs (#180)
* Added AssignAmountInWei(),GetFractionalAmountInWei() functions
* Added pow flag, assigned valueInWei = AssignAmountInWei()
* Changed 'amount' type to '*big.Int' in TestGetAmountWithChecks()
* minor change
* Added tests for new functions
* Ran gofmt
* Added GetAmountInDecimal() function
* Implement algorithm to support large amount of votes during giveSorted. (#172)
Signed-off-by: Ashish Mishra <[email protected]>
* Apply gofmt. (#183)
Signed-off-by: Ashish Mishra <[email protected]>
* PR template (#184)
* Apply gofmt.
* Add Pull Request Template.
Signed-off-by: Ashish Mishra <[email protected]>
* v0.1.6 support implemented (#182)
* Start working on v0.1.6
* Change contracts version on package.json
* Fixed all compilation errors.
* Ran gofmt.
* Fix linting and test issues.
* Fix performAggregation and add test cases.
* Add new state parameter.
* Commit and Reveal working.
* Vote working.
* Run gofmt.
* Change version
* Change the log messages.
* Fix requested changes.
* Remove unnecessary test.
* Add stakerId as a flag in unstake, withdraw and reset lock.
Signed-off-by: Ashish Mishra <[email protected]>
* Implement logger (#209)
* Initialize logger package.
* Change log file name.
* Add log rotation using lumberjack.
* Apply gofmt.
* Change log.Info to log.Debug at unnecessary places.
* Removed icons from log.
* Removed sleep animations.
* Apply gofmt and run golangci lint run.
* Implement config variable to toggle debug mode.
* Add config details in log.
* Modify README to support new changes.
Signed-off-by: Ashish Mishra <[email protected]>
* Fix bug in median calculation (#211)
* Fix the issue of the wrong median while proposing.
Signed-off-by: Ashish Mishra <[email protected]>
* Displayed state name instead of state no. (#190)
* Added switch case for state names
* Removed state no. from log
* Created new files
* Displayed state name in vote.go
* Revert "Created new files"
This reverts commit 90a958d.
* Add check for inactive stakers (#217)
* Add a check for active staker while proposing a block.
Signed-off-by: Ashish Mishra <[email protected]>
* Test approve (#218)
* Added interfaces and supporting structs in new file
* Created mocks
* Modified approve() and seperated it in approve.go
* Added Test cases for approve()
* minor changes
* Changed error formating
* requested changes
* Logger hotfix (#225)
Logger now logs to both STDERR and the log file.
Signed-off-by: Ashish Mishra <[email protected]>
* Stake value is now shown in highest denomination with precision of 32bytes. (#226)
Converted stake from Wei.
Signed-off-by: Ashish Mishra <[email protected]>
* Median calculation fix (#228)
* Fix issue of wrong median while proposing.
* Median calculation fixed by multiplying stake of each staker with their influence.
* Fix typo in log.
Signed-off-by: Ashish Mishra <[email protected]>
* Test create (#229)
* Separate create function
* Implemented functions and added mocks
* Added create tests
* Minor changes
* Test stake (#223)
* Added stakeManager utils
* Modified stake function
* Added tests for stake
* minor changes
* minor changes and removed unused functions
* Fixed error package (#235)
* Retry mechanism (#234)
* Apply gofmt.
Signed-off-by: Ashish Mishra <[email protected]>
* PR template (#184)
* Apply gofmt.
* Add Pull Request Template.
Signed-off-by: Ashish Mishra <[email protected]>
* v0.1.6 support implemented (#182)
* Start working on v0.1.6
* Change contracts version on package.json
* Fixed all compilation errors.
* Ran gofmt.
* Fix linting and test issues.
* Fix performAggregation and add test cases.
* Add new state parameter.
* Commit and Reveal working.
* Vote working.
* Run gofmt.
* Change version
* Change the log messages.
* Fix requested changes.
* Remove unnecessary test.
* Add stakerId as a flag in unstake, withdraw and reset lock.
Signed-off-by: Ashish Mishra <[email protected]>
* Fix issue of wrong median while proposing.
Signed-off-by: Ashish Mishra <[email protected]>
* Retry fallback mechanism implemented in Commit state.
Signed-off-by: Ashish Mishra <[email protected]>
* Add retry mechanism completely in GetActiveAssetsData function.
Signed-off-by: Ashish Mishra <[email protected]>
* Implement retry for block manager functions.
Signed-off-by: Ashish Mishra <[email protected]>
* Implement retry in stake.go.
Signed-off-by: Ashish Mishra <[email protected]>
* Implement retry mechanism for vote.go.
Signed-off-by: Ashish Mishra <[email protected]>
* Apply gofmt.
Signed-off-by: Ashish Mishra <[email protected]>
* Fix bug in median calculation (#211)
* Fix the issue of the wrong median while proposing.
Signed-off-by: Ashish Mishra <[email protected]>
* Displayed state name instead of state no. (#190)
* Added switch case for state names
* Removed state no. from log
* Created new files
* Displayed state name in vote.go
* Revert "Created new files"
This reverts commit 90a958d.
* Add retry mechanism completely in GetActiveAssetsData function.
Signed-off-by: Ashish Mishra <[email protected]>
* Apply gofmt.
Signed-off-by: Ashish Mishra <[email protected]>
* Run golangci lint.
Signed-off-by: Ashish Mishra <[email protected]>
* Remove TODO comments.
Signed-off-by: Ashish Mishra <[email protected]>
* Stake value is now shown in highest denomination with precision of 32bytes. (#226)
Converted stake from Wei.
Signed-off-by: Ashish Mishra <[email protected]>
* Median calculation fix (#228)
* Fix issue of wrong median while proposing.
* Median calculation fixed by multiplying stake of each staker with their influence.
* Fix typo in log.
Signed-off-by: Ashish Mishra <[email protected]>
* Test create (#229)
* Separate create function
* Implemented functions and added mocks
* Added create tests
* Minor changes
* Test stake (#223)
* Added stakeManager utils
* Modified stake function
* Added tests for stake
* minor changes
* minor changes and removed unused functions
* Apply new fallback algorithm for fetching collection values.
Signed-off-by: Ashish Mishra <[email protected]>
Co-authored-by: Yashk767 <[email protected]>
Co-authored-by: Ashish Kumar Mishra <[email protected]>
Co-authored-by: Yashk767 <[email protected]>
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,13 @@ We use github to host code, to track issues and feature requests, as well as acc
13
13
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
14
14
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
15
15
16
-
1. Fork the repo and create your branch from `main`.
16
+
1. Fork the repo and create your branch from `develop`.
17
17
2. If you've added code that should be tested, add tests.
18
18
3. If you've changed commands, update the documentation.
19
19
4. Ensure the test suite passes.
20
20
5. Issue that pull request!
21
21
22
-
PS: make sure that your commits are [signed](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification). Only signed commits can be merged to the `main` branch.
22
+
PS: make sure that your commits are [signed](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification). Only signed commits can be merged to the `develop` branch.
23
23
24
24
## Report bugs using Github's [issues](https://github.com/razor-network/razor-go/issues)
25
25
If you've found something wrong we want to know about it, please help us understand the problem so we can resolve it.
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4
+
5
+
Fixes # (issue)
6
+
7
+
## Type of change
8
+
9
+
Please delete options that are not relevant.
10
+
11
+
-[ ] Bug fix (non-breaking change which fixes an issue)
12
+
-[ ] New feature (non-breaking change which adds functionality)
13
+
-[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14
+
-[ ] This change requires a documentation update
15
+
16
+
# How Has This Been Tested?
17
+
18
+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
19
+
20
+
-[ ] Test A
21
+
-[ ] Test B
22
+
23
+
**Test Configuration**:
24
+
* Contracts version:
25
+
* Hardware:
26
+
27
+
# Checklist:
28
+
29
+
-[ ] My code follows the style guidelines of this project
30
+
-[ ] I have performed a self-review of my own code
31
+
-[ ] I have commented my code, particularly in hard-to-understand areas
32
+
-[ ] I have made corresponding changes to the documentation
33
+
-[ ] My changes generate no new warnings
34
+
-[ ] I have added tests that prove my fix is effective or that my feature works
35
+
-[ ] New and existing unit tests pass locally with my changes
36
+
-[ ] Any dependent changes have been merged and published in downstream modules
Copy file name to clipboardExpand all lines: README.md
+43-22
Original file line number
Diff line number
Diff line change
@@ -168,9 +168,40 @@ Example:
168
168
$ ./razor transfer --amount 100 --to 0x91b1E6488307450f4c0442a1c35Bc314A505293e --from 0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c
169
169
```
170
170
171
+
### Set Config
172
+
There are a set of parameters that are configurable. These include:
173
+
174
+
* Provider: The RPC URL of the provider you are using to connect to the blockchain.
175
+
* Gas Multiplier: The value with which the gas price will be multiplied while sending every transaction.
176
+
* Buffer Size: Buffer size determines, out of all blocks in a state, in how many blocks the voting or any other operation can be performed.
177
+
* Wait Time: This is the number of blocks the system will wait while voting.
178
+
* Gas Price: The value of gas price if you want to set manually. If you don't provide any value or simply keep it to 0, the razor client will automatically calculate the optimum gas price and send it.
179
+
* Log Level: Normally debug logs are not logged into the log file. But if you want you can set `logLevel` to `debug` and fetch the debug logs.
180
+
181
+
The config is set while the build is generated, but if you need to change any of the above parameter, you can use the `setConfig` command.
Other than setting these parameters in the config, you can use different values of these parameters in different command. Just add the same flag to any command you want to use and the new config changes will appear for that command.
There are a set of parameters that are configurable. These include:
213
-
214
-
* Provider: The RPC URL of the provider you are using to connect to the blockchain.
215
-
* Gas Multiplier: The value with which the gas price will be multiplied while sending every transaction.
216
-
* Buffer Size: Buffer size determines, out of all blocks in a state, in how many blocks the voting or any other operation can be performed.
217
-
* Wait Time: This is the number of blocks the system will wait while voting.
218
-
* Gas Price: The value of gas price if you want to set manually. If you don't provide any value or simply keep it to 0, the razor client will automatically calculate the optimum gas price and send it.
219
-
220
-
The config is set while the build is generated, but if you need to change any of the above parameter, you can use the `setconfig` command.
246
+
### Modify Asset Status
247
+
Modify the active status of an asset using the `modifyAssetStatus` command.
Other than setting these parameters in the config, you can use different values of these parameters in different command. Just add the same flag to any command you want to use and the new config changes will appear for that command.
This will cause this particular vote command to run with a gas price of 10.
238
259
239
260
### Contribute to razor-go
240
261
We would really appreciate your contribution. To see our [contribution guideline](https://github.com/razor-network/razor-go/blob/main/.github/CONTRIBUTING.md)
0 commit comments