-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge/foundation release/1.10.9 fix remotefreezer #24
base: merge/foundation-release/1.10.9
Are you sure you want to change the base?
Merge/foundation release/1.10.9 fix remotefreezer #24
Conversation
Date: 2021-10-13 11:14:53-07:00 Signed-off-by: meows <[email protected]>
Interfaces are do-ers. This interfaces defines an operator, not an operation. Date: 2021-10-14 05:58:35-07:00 Signed-off-by: meows <[email protected]>
…Freezer Date: 2021-10-14 06:51:40-07:00 Signed-off-by: meows <[email protected]>
…for test freezer store mock Date: 2021-10-14 08:30:09-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-14 08:44:27-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-14 09:23:33-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-14 09:23:55-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-14 09:24:11-07:00 Signed-off-by: meows <[email protected]>
Signed-off-by: meows <[email protected]>
Signed-off-by: meows <[email protected]>
…mem) Append method Date: 2021-10-15 07:43:33-07:00 Signed-off-by: meows <[email protected]>
…teConcise passes Date: 2021-10-15 08:18:14-07:00 Signed-off-by: meows <[email protected]>
…s Error Date: 2021-10-18 09:24:46-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-18 09:29:05-07:00 Signed-off-by: meows <[email protected]>
Signed-off-by: meows <[email protected]>
Date: 2021-10-21 09:11:03-07:00 Signed-off-by: meows <[email protected]>
…ssignment at CommitGenesis This fixes most tests. I'm not sure yet exactly why. One remaining failing test: TestIncompleteAncientReceiptChainInsertion_RemoteFreezer Date: 2021-10-21 09:14:10-07:00 Signed-off-by: meows <[email protected]>
InsertReceiptChain calls the db accessor directly, and the terminateInsert function got ill-formed for the job. We're going to limit our responsibility for the remote freezer (client) implementations; other tests show that the server side of the API is functioning correctly. Date: 2021-10-21 09:54:12-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-21 10:39:36-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-21 10:51:17-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-21 10:56:20-07:00 Signed-off-by: meows <[email protected]>
Config: params.TestChainConfig, | ||
Alloc: genesisT.GenesisAlloc{address: {Balance: funds}}, | ||
BaseFee: big.NewInt(vars.InitialBaseFee), | ||
Difficulty: vars.MinimumDifficulty, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed stuff.
@@ -95,7 +95,7 @@ type AncientWriter interface { | |||
// ModifyAncients runs a write operation on the ancient store. | |||
// If the function returns an error, any changes to the underlying store are reverted. | |||
// The integer return value is the total size of the written data. | |||
ModifyAncients(func(AncientWriteOp) error) (int64, error) | |||
ModifyAncients(func(AncientWriteOperator) error) (int64, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a rename. Interface names should be do-ers. This disambiguates between "operation" and "operator."
cmd/ancient-store-mem/lib/mem.go
Outdated
@@ -117,6 +120,36 @@ func (f *MemFreezerRemoteServerAPI) AppendAncient(number uint64, hash, header, b | |||
return nil | |||
} | |||
|
|||
func (f *MemFreezerRemoteServerAPI) Append(kind string, num uint64, item interface{}) error { | |||
// if num < f.count || num > f.count+1 { |
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.
errOutOfOrder
requirements are unfinished.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was fixed with 2a9289e and the one after it.
Date: 2021-10-21 11:03:37-07:00 Signed-off-by: meows <[email protected]>
|
||
return b.api.AppendAncient(num) | ||
err = b.client.Call(&res, FreezerMethodWriteAppend, kind, num, common.Bytes2Hex(bs)) |
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.
RLP-encoded bytes are further encoded in hex for transmission. The client needs to decode first from hex, then from RLP.
In core/genesis.go a default value for difficulty is provided in GenesisToBlock, the vars.GenesisDifficulty value. This value was not used in CommitGenesis, where instead genesis.Difficulty (instead of block.Difficulty()) was used. As you can see in the diff, the vars.GenesisDifficulty.Int64() value is added to the preexisting expected TD outcomes for Short and Long reorg tests. Date: 2021-10-21 13:00:04-07:00 Signed-off-by: meows <[email protected]>
…ed errOutOfOrder conditions Date: 2021-10-26 08:43:53-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-26 10:31:24-07:00 Signed-off-by: meows <[email protected]>
Date: 2021-10-27 08:48:50-07:00 Signed-off-by: meows <[email protected]>
9dd8280
to
04a7829
Compare
No description provided.