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

feat: add new task for fevm receipt #1208

Merged
merged 7 commits into from
May 22, 2023

Conversation

Terryhung
Copy link
Collaborator

No description provided.

@Terryhung Terryhung marked this pull request as ready for review May 19, 2023 14:06
@Terryhung Terryhung requested review from birdychang and kasteph May 19, 2023 14:17
act, err := p.node.Actor(ctx, addr, tsk)
if err != nil {
// If actor not found, then this is a placeholder address
if addr.String()[:5] == "f410f" {
Copy link
Contributor

Choose a reason for hiding this comment

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

addr.Protocol() == addr.Delegated better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nice 👍

func (p *Task) isSentToEVMAddress(ctx context.Context, addr address.Address, tsk types.TipSetKey) bool {
act, err := p.node.Actor(ctx, addr, tsk)
if err != nil {
// If actor not found, then this is a placeholder address
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: If actor not found, check if it's a placeholder address.

if err != nil {
// If actor not found, then this is a placeholder address
if addr.String()[:5] == "f410f" {
log.Infof("Sent to Placeholder address: %v", addr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Debugf?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed

Comment on lines +63 to +68
func init() {
tipsetMessageReceiptCacheSize = getCacheSizeFromEnv(tipsetMessageReceiptSizeEnv, 4)
executedTsCacheSize = getCacheSizeFromEnv(executedTsCacheSizeEnv, 4)
diffPreCommitCacheSize = getCacheSizeFromEnv(diffPreCommitCacheSizeEnv, 500)
diffSectorCacheSize = getCacheSizeFromEnv(diffSectorCacheSizeEnv, 500)
actorCacheSize = getCacheSizeFromEnv(actorCacheSizeEnv, 1000)
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks much cleaner!


key, err := asKey(addr, tsk)
if err != nil {
return nil, err
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure when this would happen, but shouldn't we still try to continue and call t.node.StateGetActor instead of returning error?

if err == nil {
  value, found := t.actorCache.Get(key)
  ...
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed!

@Terryhung Terryhung requested a review from birdychang May 20, 2023 03:32
Copy link
Contributor

@birdychang birdychang left a comment

Choose a reason for hiding this comment

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

Thanks!

@Terryhung Terryhung merged commit 8814fc4 into master May 22, 2023
@Terryhung Terryhung deleted the terryhung/new-task-for-fevm-receipt branch May 22, 2023 03:14
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