Skip to content

Malicious behavior miner#132

Draft
NathanBSC wants to merge 537 commits intodevelopfrom
malicious_behavior_miner
Draft

Malicious behavior miner#132
NathanBSC wants to merge 537 commits intodevelopfrom
malicious_behavior_miner

Conversation

@NathanBSC
Copy link
Copy Markdown

@NathanBSC NathanBSC commented Aug 2, 2024

Description

Malicious behavior miner

Rationale

just to see the diff between latest tag and this branch

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch from 4513f63 to 760bd68 Compare August 2, 2024 02:09
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch 3 times, most recently from 4e6b257 to 13c253f Compare August 14, 2024 09:37
@NathanBSC NathanBSC changed the base branch from develop to tag-v1.4.13 August 14, 2024 09:37
@OKE66
Copy link
Copy Markdown

OKE66 commented Aug 20, 2024

Description

Malicious behavior miner

Rationale

just to see the diff between latest tag and this branch

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Pla

@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch from 13de488 to c0130a6 Compare September 19, 2024 06:59
@NathanBSC NathanBSC changed the base branch from tag-v1.4.13 to develop November 6, 2024 08:23
@NathanBSC NathanBSC changed the base branch from develop to master November 6, 2024 08:25
@NathanBSC NathanBSC changed the base branch from master to develop November 6, 2024 08:25
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch from c0130a6 to 30981ee Compare November 6, 2024 08:58
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch 2 times, most recently from aaa126b to af69f74 Compare November 29, 2024 08:11
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch 2 times, most recently from 91e6121 to ce27018 Compare December 13, 2024 09:26
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch 3 times, most recently from 29c8284 to 80258ff Compare December 25, 2024 07:35
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch 2 times, most recently from 29ce87e to c7b40a7 Compare January 7, 2025 06:26
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch from c7b40a7 to e6134a4 Compare January 13, 2025 09:19
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch 2 times, most recently from 375817c to b4cfbb1 Compare February 10, 2025 01:47
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch from b4cfbb1 to 7914ade Compare February 21, 2025 02:33
@NathanBSC NathanBSC changed the base branch from develop to master February 21, 2025 02:33
@NathanBSC NathanBSC changed the base branch from master to develop February 21, 2025 02:33
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch from 7914ade to 628bcc3 Compare March 5, 2025 02:53
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch 3 times, most recently from 17d7505 to b6de6db Compare March 17, 2025 03:15
flywukong and others added 29 commits March 10, 2026 16:46
…ops (#33245) (bnb-chain#3586)

The list iterator previously returned true on parse errors without
advancing the input, which could lead to non-advancing infinite loops
for callers that do not check Err() inside the loop; to make iteration
safe while preserving error visibility, Next() now marks the iterator as
finished when readKind fails, returning true for the error step so
existing users that check Err() can handle it, and then false on
subsequent calls, and the function comment was updated to document this
behavior and the need to check Err().

Co-authored-by: radik878 <radikpadik76@gmail.com>
…790) (bnb-chain#3587)

All five `revert*Request` functions (account, bytecode, storage,
trienode heal, bytecode heal) remove the request from the tracked set
but never restore the peer to its corresponding idle pool. When a
request times out and no response arrives, the peer is permanently lost
from the idle pool, preventing new work from being assigned to it.

In normal operation mode (snap-sync full state) this bug is masked by
pivot movement (which resets idle pools via new Sync() cycles every ~15
minutes) and peer churn (reconnections re-add peers via Register()).
However in scenarios like the one I have running my (partial-stateful
node)[ethereum/go-ethereum#33764] with
long-running sync cycles and few peers, all peers can eventually leak
out of the idle pools, stalling sync entirely.

Fix: after deleting from the request map, restore the peer to its idle
pool if it is still registered (guards against the peer-drop path where
Unregister already removed the peer). This mirrors the pattern used in
all five On* response handlers.


This only seems to manifest in peer-thirstly scenarios as where I find
myself when testing snapsync for the partial-statefull node).
Still, thought was at least good to raise this point. Unsure if required
to discuss or not

Co-authored-by: CPerezz <37264926+CPerezz@users.noreply.github.com>
…ain#3584)

* core/vm: align super-instruction maxStack with raw bounds

* core/vm: align super-instruction minStack with raw bounds (bnb-chain#3588)

* core/vm: align super-instruction minStack with raw bounds

* core/vm: fix comments

---------

Co-authored-by: formless <213398294+allformless@users.noreply.github.com>
This adds a new type wrapper that decodes as a list, but does not
actually decode the contents of the list. The type parameter exists as a
marker, and enables decoding the elements lazily. RawList can also be
used for building a list incrementally.
Most uses of the iterator are like this:

    it, _ := rlp.NewListIterator(data)
    for it.Next() {
        do(it.Value())
    }

This doesn't require the iterator to be a pointer and it's better to
have it stack-allocated. AFAIK the compiler cannot prove it is OK to
stack-allocate when it is returned as a pointer because the methods of
`Iterator` use pointer receiver and also mutate the object.

The iterator type was not exported until very recently, so I think it is
still OK to change this API.
This is helpful when building a list from already-encoded elements.
This changes `RawList` to ensure the count of items is always valid.
Lists with invalid structure, i.e. ones where an element exceeds the
size of the container, are now detected during decoding of the `RawList`
and thus cannot exist.

Also remove `RawList.Empty` since it is now fully redundant, and
`Iterator.Count` since it returns incorrect results in the presence of
invalid input. There are no callers of these methods (yet).
I removed `Iterator.Count` in #33840, because it appeared to be unused
and did not provide the documented invariant: the returned count should
always be an upper bound on the number of iterations allowed by `Next`.

In order to make `Count` work, the semantics of `CountValues` has to
change to return the number of items up and including the invalid one. I
have reviewed all callsites of `CountValues` to assess if changing this
is safe. There aren't that many, and the only call that doesn't check
the error and return is in the trie node parser,
`trie.decodeNodeUnsafe`. There, we distinguish the node type based on
the number of items, and it previously returned an error for item count
zero. In order to avoid any potential issue that could result from this
change, I'm adding an error check in that function, though it isn't
necessary.
…#33835)

This changes the p2p protocol handlers to delay message decoding. It's
the first part of a larger change that will delay decoding all the way
through message processing. For responses, we delay the decoding until
it is confirmed that the response matches an active request and does not
exceed its limits.

In order to make this work, all messages have been changed to use
rlp.RawList instead of a slice of the decoded item type. For block
bodies specifically, the decoding has been delayed all the way until
after verification of the response hash.

The role of p2p/tracker.Tracker changes significantly in this PR. The
Tracker's original purpose was to maintain metrics about requests and
responses in the peer-to-peer protocols. Each protocol maintained a
single global Tracker instance. As of this change, the Tracker is now
always active (regardless of metrics collection), and there is a
separate instance of it for each peer. Whenever a response arrives, it
is first verified that a request exists for it in the tracker. The
tracker is also the place where limits are kept.
…#3591)

* consensus/parlia: increment nonce only when tx is included

* consensus/parlia: fix comment

* consensus/parlia: bit improve
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* params: set Osaka/Mendel time in chapel testnet

* changelog: mini adjust
merge: develop to master for v1.7.1
* miner: support blob sidecar validation for bids

* fix: add more blobcheck for bid
The heredoc in oss-fuzz.sh writes `#/bin/sh` instead of `#!/bin/sh`
as the shebang line of generated fuzz test runner scripts. Without
the `!`, the kernel does not recognize the script as having an
interpreter directive, causing execution failures on systems that
don't fall back to the default shell for shebang-less scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: add missing '!' in shebang of generated fuzz scripts
* core: reject future chasing heads for DA checks

* core: review fixes
…g. (#147)

* feat: add malicious behavior simulation for BEP-657 blob chaos testing.

* feat: add malicious behavior simulation for BEP-657 blob chaos testing.
@NathanBSC NathanBSC force-pushed the malicious_behavior_miner branch from b80914e to 48640bd Compare March 24, 2026 06:18
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.