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

Multisig parser #196

Merged
merged 10 commits into from
Jun 14, 2024
Merged

Multisig parser #196

merged 10 commits into from
Jun 14, 2024

Conversation

lucaslopezf
Copy link
Contributor

@lucaslopezf lucaslopezf commented Jun 11, 2024

🔗 zboto Link

@lucaslopezf lucaslopezf requested a review from emmanuelm41 June 11, 2024 13:23
@lucaslopezf lucaslopezf marked this pull request as ready for review June 11, 2024 13:23
Copy link
Member

@emmanuelm41 emmanuelm41 left a comment

Choose a reason for hiding this comment

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

Code looks pretty great. But we need to add some tests here. Now that this is wrapped, we can add tests as we have for other parsing functions.

parser/helper/helpers.go Outdated Show resolved Hide resolved
parser/helper/helpers.go Show resolved Hide resolved
@lucaslopezf lucaslopezf requested a review from emmanuelm41 June 11, 2024 15:29
Copy link
Member

@emmanuelm41 emmanuelm41 left a comment

Choose a reason for hiding this comment

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

I like the approach. But we need to test this at least in a few cases. Set a bunch of block cids, generate the tipset key and compare with the expected value

parser/v2/parser.go Outdated Show resolved Hide resolved
parser/v2/parser.go Outdated Show resolved Hide resolved
parser/v2/parser.go Outdated Show resolved Hide resolved
@lucaslopezf lucaslopezf requested a review from emmanuelm41 June 12, 2024 12:15
Copy link
Member

@emmanuelm41 emmanuelm41 left a comment

Choose a reason for hiding this comment

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

Just one last comment. It looks great!

tools/multisig/multisig.go Outdated Show resolved Hide resolved
@lucaslopezf lucaslopezf requested a review from emmanuelm41 June 14, 2024 12:06
parser/helper/helpers.go Outdated Show resolved Hide resolved
parser/helper/helpers.go Outdated Show resolved Hide resolved
tools/multisig/multisig.go Show resolved Hide resolved
parser/v2/parser.go Outdated Show resolved Hide resolved
parser/v2/parser.go Outdated Show resolved Hide resolved
tools/multisig/multisig.go Outdated Show resolved Hide resolved
@lucaslopezf lucaslopezf requested a review from raynaudoe June 14, 2024 13:23
@@ -180,12 +180,12 @@ func (h *Helper) FilterTxsByActorType(ctx context.Context, txs []*types.Transact
addrTo, err := address.NewFromString(tx.TxTo)
if err != nil {
h.logger.Sugar().Errorf("could not parse address. Err: %s", err)
return nil, err
Copy link
Member

Choose a reason for hiding this comment

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

I don't really like this, as if something fails, we loose the tx at all, and never know. I guess this is the general approach on the fil parser, so I am ok now. But in the future we need a way to track these errors, as we won't never be able to fix them otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree, we need to include some metrics here

@@ -87,7 +87,7 @@ func (eg *eventGenerator) GenerateMultisigEvents(ctx context.Context, transactio
addrTo, err := address.NewFromString(tx.TxTo)
if err != nil {
eg.logger.Sugar().Errorf("could not parse address. Err: %s", err)
return nil, err
Copy link
Member

Choose a reason for hiding this comment

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

Same happens here.

@lucaslopezf lucaslopezf merged commit 23cfd93 into dev Jun 14, 2024
5 checks passed
@lucaslopezf lucaslopezf deleted the feat/multisig-parser branch June 14, 2024 19:08
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.

3 participants