-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: burn tax exemption concept (as parameter) #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. You need to sync the last changes I pushed to the branch, but those should slot right in. I recon we might as well integrate it into my PR and test if altering the proto code constitutes a breaking change. By and large it shouldnt as long as we manage the "field ids" so we dont end up overlapping with legacy blocks "binary ordering", which means this might very well be a safe thing to do :)
…-temp Whitelist concept parameter temp - Thank you @nghuyenthevinh2000
@nghuyenthevinh2000 I cleaned up my originally proposed parameter mess. |
Just one thing I would like to throw in is that I am not sure if spending too much of the work on this is good at the moment. If it is for "general improvement of parameters", yes. If it's specifically for whitelisting, I would suggest not to. Because it's not even sure that any whitelisting (and what form of) will be voted on (or even pass) by governance. |
rofl - that's exactly what I said before in the review section: here |
Thanks, didn't see that. |
I think in general it makes sense to prepare the code for future change via a "parameter stub" simply because its not a lot of work. So I think in the context of this PR we should just complete that work, resolve the conflicts and get the PR merged :) |
Great work @nghuyenthevinh2000 & @fragwuerdig :) |
@fragwuerdig @JoowonYun |
The liveness test seems to keep failing on this PR :) @nghuyenthevinh2000 can you look into what might be breaking this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetWhitelistAddressProposal
and RemoveWhitelistAddressProposal
must be added to RegisterLegacyAminoCodec
and RegisterInterfaces
of the treasury module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work buddy <3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some extended testing because quiet frankly this liveness-test failing was bugging me. If I run it locally and build the images via "make clean localnet-start" docker will build the images however when the containers are started they all instantly crash with this stack trace:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1730f7a]
goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/gov.AppModuleBasic.RegisterRESTRoutes({{_, }, {, _, }}, {{0x0, 0x0, 0x0}, {0x2ef4308, 0xc000225a40}, ...}, ...)
github.com/cosmos/[email protected]/x/gov/module.go:79 +0x13a
github.com/cosmos/cosmos-sdk/types/module.BasicManager.RegisterRESTRoutes(...)
github.com/cosmos/[email protected]/types/module/module.go:114
github.com/terra-money/core/app.(*TerraApp).RegisterAPIRoutes(0x2edd090?, 0xc0010f2000, {0x1, 0x0, 0x0, {0xc0004dafc0, 0x12}, 0x3e8, 0xa, 0x0, ...})
github.com/terra-money/core/app/app.go:813 +0x49d
github.com/cosmos/cosmos-sdk/server.startInProcess(, {{0x0, 0x0, 0x0}, {0x2ef4308, 0xc000225a40}, {0x0, 0x0}, {0x2edd090, 0xc001204220}, ...}, ...)
github.com/cosmos/[email protected]/server/start.go:325 +0xc36
github.com/cosmos/cosmos-sdk/server.StartCmd.func2(0xc001250900?, {0xc0004e6bc0?, 0x0?, 0x4?})
github.com/cosmos/[email protected]/server/start.go:129 +0x169
github.com/spf13/cobra.(*Command).execute(0xc001250900, {0xc0004e6b80, 0x4, 0x4})
github.com/spf13/[email protected]/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc001146c00)
github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(...)
github.com/spf13/[email protected]/command.go:961
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x0?, {0xc00116de30, 0x7})
github.com/cosmos/[email protected]/server/cmd/execute.go:36 +0x1eb
main.main()
github.com/terra-money/core/cmd/terrad/main.go:15 +0x2c
My assumption is that something in the PR is causing the start command to blow up which is why the liveness test ultimately fails.
@nghuyenthevinh2000 if you could look into this that would be great. I will be available tomorrow between 0900 and 1200 CET to help you debug if you need assistance with the docker stuff :)
thanks @ZaradarBH for further debugging it is due to me registering rest proposal handler as nil. I have changed it to an implementation After fixing it, querying whitelist through rest api |
:D good job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ZaradarBH @nghuyenthevinh2000 @inon-man @edk208 - So I made this pull request showing how we could implement the whitelist as parameter in the treasury. This is by no means complete. I would need to continue on the upgrade handling and then we would need to use the actual parameter in the ante handler. But its getting late already and I need to sleep over my cold.
Would that be good for you as a starting point?