Skip to content

[pull] develop from tronprotocol:develop#151

Merged
pull[bot] merged 12 commits into
All-Blockchains:developfrom
tronprotocol:develop
May 8, 2026
Merged

[pull] develop from tronprotocol:develop#151
pull[bot] merged 12 commits into
All-Blockchains:developfrom
tronprotocol:develop

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 8, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

yanghang8612 and others added 12 commits May 7, 2026 09:21
Pure-Java BC port of EIP-7951; gated by ALLOW_TVM_OSAKA.
Manual @test, not part of regular suite. Run via --tests filter.
* feat(log): bridge JUL to SLF4J and improve shutdown log reliability

### What Changed
- gRPC now appear in the application log instead of going only to standard error.
- Database size stats are no longer printed at info level during startup, which reduces log noise.
- Shutdown now waits longer before stopping the log system, giving pending messages more time to flush.
- Async appender now allows up to 5 seconds to drain its queue on shutdown.
- Interrupted shutdowns now show a clearer log message.
- Test log config is INFO level.

### Impact
`✅ Fewer missed gRPC error logs`
`✅ Cleaner startup output`
`✅ Fewer lost shutdown logs`
`✅ Fewer test logs`

* docs(log): clarify resetJUL vs handler-removal responsibilities

* refactor(log): clean up TronLogShutdownHook constants, timing, and javadoc

* fix(log): fail fast on unreadable --log-config instead of silent fallback

* feat(log): slow signature verifications above 50ms

* feat(log): watchdog-warn when LevelDB open stalls

* test(log): pin TronLogShutdownHook wait-window semantics

* style(log): clarify LogService comment and tighten test local var casing

* refactor(log): drop manifest probe from LevelDB open watchdog

* feat(log): route grpc.* logs to dedicated grpc.log

* fix(log): make grpc logger asynchronous

* chore(log): register framework and plugin logger topics

* chore(log): raise slow signature verification to warn
* feat(proposal): add ALLOW_HARDEN_EXCHANGE_CALCULATION (code 98)

* fix(actuator): skip abstract classes in TransactionRegister

* feat(actuator,consensus): harden exchange transaction calculations (TIP-836)

Add SafeExchangeProcessor that replaces double arithmetic with
BigDecimal in the Bancor-formula calculation:

1. BigDecimal divide throws ArithmeticException on zero divisor
2. ExchangeCapsule.transaction() rejects negative post-trade balances
3. longValueExact() guards against BigDecimal-to-long saturation

Introduce AbstractExchangeActuator that overrides addExact/subtractExact
to route through allowHardenExchangeCalculation() flag, applied to all
four exchange actuators (Create, Inject, Transaction, Withdraw) for
consistent overflow detection.

ExchangeWithdrawActuator.validate() also gains a pure BigDecimal
precision-loss check when the proposal is active (previously used
double comparison).

Pre-activation behavior is byte-for-byte identical to legacy code.
Activation gated by ALLOW_HARDEN_EXCHANGE_CALCULATION (proposal 98).

* test(exchange): add hardened-path coverage for TIP-836

* feat(proposal): make ALLOW_HARDEN_EXCHANGE_CALCULATION togglable

* feat(actuator): wrap ArithmeticException in exchange actuators

* test: stabilize harden exchange proposal validation
…ve (#6698)

* fix(consensus,framework,actuator): use Locale.ROOT for case-insensitive

String.toLowerCase()/toUpperCase() without an explicit Locale uses
Locale.getDefault(), which on Turkish (tr) or Azerbaijani (az) systems
folds 'I' to dotless-ı (U+0131) instead of 'i' (U+0069).
Changes:
- Fix all toLowerCase()/toUpperCase() calls to use Locale.ROOT
- Enable the ErrorProne StringCaseLocaleUsage checker at ERROR level
  to prevent future regressions at compile time
- Add one-time data migration (MigrateTurkishKeyHelper) to normalize
  all Turkish legacy keys (ı → i) at startup.

* refactor: consolidate Turkish key migration loops and use ASTHelpers

* test(toolkit): fix toLowerCase

* fix: use root locale in gradle case folding

* fix: gradle verification-metadata.xml
feat(vm): add P256VERIFY precompile (TIP-7951)
@pull pull Bot locked and limited conversation to collaborators May 8, 2026
@pull pull Bot added the ⤵️ pull label May 8, 2026
@pull pull Bot merged commit 736e0f1 into All-Blockchains:develop May 8, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants