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

DSMR package #1712

Merged
merged 98 commits into from
Nov 5, 2024
Merged

DSMR package #1712

merged 98 commits into from
Nov 5, 2024

Conversation

joshua-kim
Copy link
Contributor

@joshua-kim joshua-kim commented Nov 4, 2024

Merging DSMR feature branch

aaronbuchwald and others added 30 commits November 4, 2024 11:29
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
@joshua-kim joshua-kim changed the title DSMR DSMR package Nov 4, 2024
@joshua-kim joshua-kim self-assigned this Nov 4, 2024
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
@joshua-kim joshua-kim marked this pull request as ready for review November 4, 2024 18:25
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
@joshua-kim joshua-kim enabled auto-merge (squash) November 4, 2024 19:33
Copy link
Collaborator

@aaronbuchwald aaronbuchwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this into x/dsmr/

Since this is a feature branch it has a lot of TODOs that I'd rather not have the TODO bot pick up. We should either remove the TODO bot completely or explicitly exclude everything in x/ to avoid clutter from DSMR related TODOs.

dsmr/certificate.go Outdated Show resolved Hide resolved
dsmr/block.go Outdated Show resolved Hide resolved
dsmr/block.go Outdated
Comment on lines 38 to 44
type Chunk[T Tx] struct {
Producer ids.NodeID `serialize:"true"`
Beneficiary codec.Address `serialize:"true"`
Expiry int64 `serialize:"true"`
Txs []T `serialize:"true"`
Signer [bls.PublicKeyLen]byte `serialize:"true"`
Signature [bls.SignatureLen]byte `serialize:"true"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move the producer specific information to a generic type rather than hardcoding the warp specific information?

dsmr/block.go Outdated Show resolved Hide resolved
dsmr/block.go Outdated Show resolved Hide resolved
dsmr/typed_client.go Outdated Show resolved Hide resolved
examples/morpheusvm/README.md Outdated Show resolved Hide resolved
dsmr/README.md Outdated Show resolved Hide resolved
dsmr/node.go Outdated
Comment on lines 162 to 164
if timestamp <= parent.Timestamp {
return Block{}, ErrTimestampNotMonotonicallyIncreasing
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to allow them to be equal to handle the case a malicious peer sets their timestamp as far ahead as possible, we can either handle that by failing to build a block or allowing duplicate timestamps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NewBlock should only be called from code building blocks which will be local, so I don't think we have to worry about a malicious timestamp being passed in

dsmr/node_test.go Outdated Show resolved Hide resolved
joshua-kim and others added 11 commits November 5, 2024 10:43
Co-authored-by: aaronbuchwald <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
@aaronbuchwald aaronbuchwald merged commit f01e497 into main Nov 5, 2024
17 checks passed
@joshua-kim joshua-kim deleted the dsmr branch November 5, 2024 21:03
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.

2 participants