Create transactions to replace the implicit state change.#324
Create transactions to replace the implicit state change.#324sgkim126 merged 6 commits intoCodeChain-io:masterfrom
Conversation
|
@HoOngEe @somniumism I think you should take into account this change when you are working on |
a4b80e7 to
316d036
Compare
|
One of the shutdown test fails yet, but I think it's because the test is fragile. It depends on the timing very hard to meet. I'm considering disabling the test temporarily if I cannot find the fix. |
|
I disabled one of the e2e test. The test assumes that the network executes all setup transactions(ex. sending ccc, distributing stakes...) in a term. But the assumption is hard to meet because this PR makes block generation slower. |
|
The transaction is not complete yet. This PR made an |
| .into()) | ||
| } | ||
| NextValidators::elect(self)?.save_to_state(self)?; | ||
| return self.update_term_params() |
There was a problem hiding this comment.
Calling update_term_params in the Action::Elect feels awkward. update_term_params changes the value used in election, jail, nomination. How about creating UpdateTermParams transaction?
There was a problem hiding this comment.
Actually, I added the transaction, but it made block generation slow and more tests became fragile.
So I merged the transaction to reduce the number of transactions.
I still wonder why one more signing makes the node slow, but it did. I'll try again. Maybe it was a problem of the Travis.
There was a problem hiding this comment.
I tested it in several ways. It seems that adding one more transaction would not harm the performance significantly, but it seems that it's the last step which makes the tests fail.
The test assumes the test setup is done in one term. But, the previous patches makes the block generation slow, and it's hard to meet this condition.
It closes #40, #124 and #125.
I still implement a verification that this transaction must be the first transaction of every block.