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(core): introduce preflight API for proving system #368

Open
wants to merge 22 commits into
base: taiko
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d226b0c
feat(state): implement PreflightStateDB and TouchedAccounts for enhan…
johntaiko Jan 22, 2025
d404374
feat(taiko): add documentation for ProvingPreflights function
johntaiko Jan 22, 2025
5b421e6
feat(taiko): enhance ProvingPreflights with error handling and accoun…
johntaiko Jan 22, 2025
555af28
feat(taiko): enhance provingPreflights to initialize account proofs a…
johntaiko Jan 22, 2025
74972a1
feat(state): remove PreflightStateDB implementation to streamline sta…
johntaiko Jan 22, 2025
c38e3be
feat(taiko): refactor provingPreflights to enhance account proof retr…
johntaiko Jan 22, 2025
8a6cfa6
feat(taiko): refactor hash handling in provingPreflights for improved…
johntaiko Jan 22, 2025
b4fc8ca
fix(taiko): correct assignment of AncestorHashes in provingPreflights…
johntaiko Jan 22, 2025
8705c3a
refactor(state): simplify key retrieval in TouchedAccounts using maps…
johntaiko Jan 22, 2025
54e5744
docs(taiko): enhance comments in ProvingPreflights and provingPreflig…
johntaiko Jan 22, 2025
72694d2
feat(taiko): implement ApplyTransactionWithTimeout for transaction ex…
johntaiko Jan 22, 2025
8828c03
feat(taiko): integrate hash function wrapper into block context for t…
johntaiko Jan 22, 2025
f976df2
refactor(taiko): rename ApplyTransactionWithTimeout to ApplyTransacti…
johntaiko Jan 22, 2025
61962af
docs(taiko): improve comments in ApplyTransactionWithContext for clar…
johntaiko Jan 22, 2025
2633d05
refactor(taiko): remove ApplyTransactionWithContext and related apply…
johntaiko Jan 22, 2025
fa7801d
Update taiko_api.go
johntaiko Jan 22, 2025
dd4ecbf
refactor(taiko): update TouchedAccounts logic to include self-destruc…
johntaiko Jan 24, 2025
fb33230
refactor(taiko): streamline TestTouchedAccounts by consolidating acco…
johntaiko Jan 24, 2025
160e3dc
refactor(taiko): remove unnecessary blank line in TestTouchedAccounts…
johntaiko Jan 24, 2025
ac059ae
refactor(taiko): update provingPreflightResult to use common.Address …
johntaiko Jan 24, 2025
701116d
refactor(taiko): update Contracts map to use common.Address for impro…
johntaiko Jan 24, 2025
5deb506
refactor(taiko): modify ProvingPreflights to return results directly …
johntaiko Jan 24, 2025
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
25 changes: 25 additions & 0 deletions core/state/taiko_statedb.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package state

import (
"github.com/ethereum/go-ethereum/common"
johntaiko marked this conversation as resolved.
Show resolved Hide resolved
"golang.org/x/exp/maps"
)

// TouchedAccounts represents the storage of an account at a specific point in time.
type TouchedAccounts map[common.Address][]common.Hash

// TouchedAccounts returns a map of all touched accounts and their storage.
// Incudes self-destructed accounts, loaded accounts and new accounts exclude empty account.
func (s *StateDB) TouchedAccounts() TouchedAccounts {
touched := make(TouchedAccounts, len(s.stateObjects))
for addr, obj := range s.stateObjects {
touched[addr] = maps.Keys(obj.originStorage)
}
for addr, obj := range s.stateObjectsDestruct {
// ignore empty account because it won't affect the state
if !obj.empty() {
touched[addr] = maps.Keys(obj.originStorage)
}
}
return touched
}
Loading