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

[OCC] change incarnation metric type #433

Open
wants to merge 36 commits into
base: occ-main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1923a47
Add occ todos / comments (#317)
udpatil Sep 13, 2023
5ad76e0
Multiversion Item Implementation and Tests (#318)
udpatil Sep 26, 2023
5e5b4ce
[occ] Add incarnation field (#321)
udpatil Sep 29, 2023
cda8c31
[occ] Implement basic multiversion store (#322)
udpatil Oct 6, 2023
703b28a
[occ] Add concurrency worker configuration (#324)
stevenlanders Oct 9, 2023
1e60246
[occ] Occ multiversion store (#326)
udpatil Oct 10, 2023
a3aec8a
[occ] Add batch tx delivery interface (#327)
stevenlanders Oct 10, 2023
0520ced
[occ] MVKV store implementation and tests (#323)
udpatil Oct 10, 2023
0864c32
[occ] Add validation function for transaction state to multiversionst…
udpatil Oct 13, 2023
de92cbc
[occ] Add basic worker task and scheduler shell (#328)
stevenlanders Oct 17, 2023
6406dd9
[occ] Implement iterator for mvkv (#329)
udpatil Oct 17, 2023
f6b0b9f
fix dependency (#334)
udpatil Oct 17, 2023
f3a6cf4
[occ] Iterateset tracking and validation implementation (#337)
udpatil Oct 19, 2023
60b2113
[occ] Add scheduler logic for validation (#336)
stevenlanders Oct 19, 2023
1178e0b
[occ] Fix situation where no stores causes a panic (#338)
stevenlanders Oct 20, 2023
6ec1620
Add occ flag check to context (#340)
stevenlanders Oct 23, 2023
9530aeb
[occ] Add struct field and helpers for estimate prefills (#341)
udpatil Oct 24, 2023
3bdbc96
Fix map access panic (#343)
stevenlanders Oct 30, 2023
954c5a9
Gen estimates writeset (#344)
udpatil Nov 3, 2023
be45bb5
[OCC] Add trace spans to scheduler (#347)
stevenlanders Nov 6, 2023
061ef70
[occ] Fix parent store readset validation (#348)
udpatil Nov 10, 2023
f9541fb
[occ] OCC scheduler and validation fixes (#359)
udpatil Nov 22, 2023
30b7fab
[occ] Add optimizations for multiversion and mvkv (#361)
udpatil Nov 27, 2023
4d12564
[OCC] Add scheduler goroutine pool and optimizations (#362)
stevenlanders Nov 29, 2023
a780a58
update concurrency workers (#380)
udpatil Dec 12, 2023
cb02f7e
[OCC] Fix hang where abort channel blocks iterator (#379)
stevenlanders Dec 13, 2023
fa4b76d
Occ iterator fix (#389)
udpatil Jan 2, 2024
6bf4d72
fix interface
udpatil Jan 2, 2024
6878b96
fix deleteIterateSet and leave some comments (#395)
udpatil Jan 12, 2024
d08b8f0
Occ enabled cfg (#398)
udpatil Jan 18, 2024
75d1151
Remove block gas meter in occ (#407)
udpatil Jan 25, 2024
48dfff5
Relax locking contention (#427)
udpatil Feb 9, 2024
f9805fe
Rebase occ main (#428)
udpatil Feb 9, 2024
6b43421
fix assignment to not cause panic (#429)
udpatil Feb 9, 2024
5a05027
[OCC] add metrics for scheduler (#431)
stevenlanders Feb 13, 2024
00cc70d
change incarnation type
stevenlanders Feb 13, 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
Next Next commit
Add occ todos / comments (#317)
This adds some comments with some useful code pointers for existing
logic and discussing future OCC work

NA
udpatil committed Jan 31, 2024
commit 1923a47bba6f5eef5f3f9ae6b3b07b688a183f8a
2 changes: 2 additions & 0 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
@@ -240,6 +240,8 @@ func (app *BaseApp) CheckTx(ctx context.Context, req *abci.RequestCheckTx) (*abc
// Otherwise, the ResponseDeliverTx will contain releveant error information.
// Regardless of tx execution outcome, the ResponseDeliverTx will contain relevant
// gas execution context.
// TODO: (occ) this is the function called from sei-chain to perform execution of a transaction.
// We'd likely replace this with an execution task that is scheduled by the OCC scheduler
func (app *BaseApp) DeliverTx(ctx sdk.Context, req abci.RequestDeliverTx) (res abci.ResponseDeliverTx) {
defer telemetry.MeasureSince(time.Now(), "abci", "deliver_tx")
defer func() {
4 changes: 4 additions & 0 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
@@ -795,6 +795,7 @@ func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) sdk.Context

// cacheTxContext returns a new context based off of the provided context with
// a branched multi-store.
// TODO: (occ) This is an example of where we wrap the multistore with a cache multistore, and then return a modified context using that multistore
func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context, sdk.CacheMultiStore) {
ms := ctx.MultiStore()
// TODO: https://github.com/cosmos/cosmos-sdk/issues/2824
@@ -948,6 +949,7 @@ func (app *BaseApp) runTx(ctx sdk.Context, mode runTxMode, txBytes []byte) (gInf
storeAccessOpEvents := msCache.GetEvents()
accessOps := ctx.TxMsgAccessOps()[acltypes.ANTE_MSG_INDEX]

// TODO: (occ) This is an example of where we do our current validation. Note that this validation operates on the declared dependencies for a TX / antehandler + the utilized dependencies, whereas the validation
missingAccessOps := ctx.MsgValidator().ValidateAccessOperations(accessOps, storeAccessOpEvents)
if len(missingAccessOps) != 0 {
for op := range missingAccessOps {
@@ -1092,6 +1094,8 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*s
storeAccessOpEvents := msgMsCache.GetEvents()
accessOps := ctx.TxMsgAccessOps()[i]
missingAccessOps := ctx.MsgValidator().ValidateAccessOperations(accessOps, storeAccessOpEvents)
// TODO: (occ) This is where we are currently validating our per message dependencies,
// whereas validation will be done holistically based on the mvkv for OCC approach
if len(missingAccessOps) != 0 {
for op := range missingAccessOps {
ctx.Logger().Info((fmt.Sprintf("eventMsgName=%s Missing Access Operation:%s ", eventMsgName, op.String())))
2 changes: 2 additions & 0 deletions store/cachekv/store.go
Original file line number Diff line number Diff line change
@@ -176,6 +176,8 @@ func (store *Store) iterator(start, end []byte, ascending bool) types.Iterator {
defer store.mtx.Unlock()
// TODO: (occ) Note that for iterators, we'll need to have special handling (discussed in RFC) to ensure proper validation

// TODO: (occ) Note that for iterators, we'll need to have special handling (discussed in RFC) to ensure proper validation

var parent, cache types.Iterator

if ascending {