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

accounts + native transfers #1210

Open
wants to merge 55 commits into
base: v0.8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2daf668
start new filter impl
kyscott18 Nov 1, 2024
35d5d00
debug rpc types
kyscott18 Oct 30, 2024
3cfd157
withLog
kyscott18 Oct 30, 2024
f987047
add debug helper functions
kyscott18 Nov 1, 2024
cc5a3f6
syncTrace in sync-historical added with filter matching
khaidarkairbek Nov 2, 2024
1a61820
syncTrace filtering modified, blockwise processing added
khaidarkairbek Nov 3, 2024
d15808d
sync-realtime: added tx/transfer factories
khaidarkairbek Nov 3, 2024
600304d
sync: fragments and encoding for transaction/transfer filters
khaidarkairbek Nov 3, 2024
b318ead
sync-realtime: transaction/trasfer filter added
khaidarkairbek Nov 3, 2024
0ab76da
sync-realtime: handleBlock is modified for new filters
khaidarkairbek Nov 3, 2024
57bfc82
sync-realtime: fetchBlockEventData changed to debug and new filters f…
khaidarkairbek Nov 3, 2024
3f3f82d
update historical sync
kyscott18 Nov 4, 2024
06b9060
build checkpoint for traces
kyscott18 Nov 4, 2024
3d944f0
record failed traces
kyscott18 Nov 4, 2024
479be95
implement insert traces db method
kyscott18 Nov 4, 2024
6681242
.
kyscott18 Nov 5, 2024
41412e6
cleanup realtime
kyscott18 Nov 5, 2024
edbbea0
corrections: minor changes
khaidarkairbek Nov 8, 2024
51e87df
sync-historical: traceCache added
khaidarkairbek Nov 8, 2024
a7052f3
sync-realtime: trace traversal added in fetchBlockEventData and handl…
kyscott18 Nov 10, 2024
e7dcfbb
sync: buildEvents and decodeEvents modfied
khaidarkairbek Nov 9, 2024
5640a6a
fix debug type
kyscott18 Nov 10, 2024
537f795
Merge branch 'v0.8' into accounts
kyscott18 Nov 11, 2024
5293137
new filter types
kyscott18 Nov 11, 2024
abaeae8
Merge branch 'accounts' of https://github.com/0xOlias/ponder into acc…
kyscott18 Nov 11, 2024
735d587
decodeEvents + buildEvents
kyscott18 Nov 11, 2024
e266901
Merge branch 'v0.8' into accounts
kyscott18 Nov 13, 2024
269c1d4
sync-historical: transaction filter
khaidarkairbek Nov 14, 2024
fa48e6a
getEvents
kyscott18 Nov 16, 2024
5e23f17
Merge branch 'accounts' of https://github.com/0xOlias/ponder into acc…
kyscott18 Nov 16, 2024
a9c9d69
account sources
kyscott18 Nov 16, 2024
ad82daa
accounts config
kyscott18 Nov 16, 2024
c600555
sync-realtime: fetchBlockEventData and handleBlock modified to handle…
khaidarkairbek Nov 17, 2024
9a60456
cleanup realtime logs
kyscott18 Nov 18, 2024
f5ba161
minor fix
khaidarkairbek Nov 18, 2024
b4ca245
build accounts
kyscott18 Nov 18, 2024
6f29077
start historical sync tests
kyscott18 Nov 18, 2024
a85ae63
update sync tests
kyscott18 Nov 19, 2024
b12eacc
sync: handle factory address
khaidarkairbek Nov 19, 2024
f0fb96f
cleanup
kyscott18 Nov 19, 2024
c9f4ed9
Merge branch 'accounts' of https://github.com/0xOlias/ponder into acc…
kyscott18 Nov 19, 2024
c9a40aa
fix transport tests
kyscott18 Nov 19, 2024
3b4cd1f
realtime sync tests
kyscott18 Nov 19, 2024
04c934e
fix typecheck
kyscott18 Nov 19, 2024
0ca8af0
account specific test
kyscott18 Nov 20, 2024
0c97911
accounts example
kyscott18 Nov 20, 2024
7c2cfa4
fix virtual types
kyscott18 Nov 20, 2024
587e3de
cleanup sync
kyscott18 Nov 20, 2024
ecb3482
note
kyscott18 Nov 20, 2024
c9f5e1a
transaction includeReverted
kyscott18 Nov 20, 2024
aae6b18
cleanup
kyscott18 Nov 20, 2024
5bef6b0
fix: config
kyscott18 Nov 22, 2024
ec42276
sync: factory filter
khaidarkairbek Nov 22, 2024
017466c
sync: factory filter cont.
khaidarkairbek Nov 22, 2024
597a65f
set
kyscott18 Nov 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/core/src/sync-realtime/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ export const isTraceFilterMatched = ({
return false;
}

if (
filter.includeReverted === false &&
(trace.revertReason !== undefined || trace.error !== undefined)
) {
return false;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not super clear, this function returns true for the case "should this trace be saved in the database" and not "does this trace exactly match the filter such that it will cause an indexing function to run". The reason for the distinction is that we don't want the cache to be completely useless when the filter type slightly changes. For that reason this check should be removed.

In this example, if the user decides that they want to include reverted traces after they have already fully synced their app, every block will need to be resynced.

Maybe we could add some comments acknowledging the properties that are ignored.


return true;
};

Expand Down Expand Up @@ -234,6 +241,10 @@ export const isTransferFilterMatched = ({
return false;
}

if (trace.revertReason !== undefined && trace.error !== undefined) {
return false;
}
khaidarkairbek marked this conversation as resolved.
Show resolved Hide resolved

return true;
};

Expand Down
Loading
Loading