diff --git a/docusaurus/docusaurus.config.js b/docusaurus/docusaurus.config.js index 6ce92645d..ad43ecda5 100644 --- a/docusaurus/docusaurus.config.js +++ b/docusaurus/docusaurus.config.js @@ -27,16 +27,10 @@ const config = { plugins: [ [require.resolve('docusaurus-lunr-search'), { excludeRoutes: [ - 'docs/0.2.0/**/*', - 'docs/0.3.0/**/*', - 'docs/0.3.1/**/*', - 'docs/0.4.0/**/*', - 'docs/0.5.0/**/*', - 'docs/0.6.0/**/*', - 'docs/0.7.0/**/*', - 'docs/0.8.0/**/*', - 'docs/0.9.0/**/*', - 'docs/0.9.1/**/*', + 'docs/0.*/**/*', + 'docs/1.*/**/*', + 'docs/2.*/**/*', + 'docs/next/**/*' ] }], [ diff --git a/docusaurus/static/llms.txt b/docusaurus/static/llms.txt index 5e2ec2a93..37b47585a 100644 --- a/docusaurus/static/llms.txt +++ b/docusaurus/static/llms.txt @@ -829,6 +829,33 @@ specific to the network or backend. We used `currently_delegated_amount` in the example, it uses `delegated_amount` method from ContractEnv, but it is also possible to query this information from the HostEnv using `delegated_amount` method. +## Implementation details + +To keep the parity of behaviour between Odra VM and Casper VM, +we implemented some not-so-obvious behaviours and parameters that +can influence your code. + +### Minimum delegation amount + +Each validator can define the minimum delegation amount. Delegator +cannot delegate a smaller amount but can increase the delegation +in smaller steps. + +If the delegation amount falls below it, all the delegated +funds will be undelegated. + +By default, the Odra VM and Casper VM are booted up with +5 validators, each with `MINIMUM_DELEGATION_AMOUNT` set to +500 CSPR. + +### Rewards calculation + +As mentioned above, VMs are started with 5 validators, each +is delegating `DEFAULT_BID_AMOUNT`, which is set to `5_000_000_000_000_000_000u64` (5 000 000 000 CSPR). + +At each auction `DEFAULT_REWARD_AMOUNT` (2500 CSPR) is divided equally between +all validators and delegators based on their share in the pool. + --- // File: backends/01-what-is-a-backend @@ -2234,7 +2261,9 @@ the function we are calling inside the contract. - `fn set_caller(&self, address: Address)` - you've seen it in action just now - `fn balance_of(&self, addr: &T) -> U512` - returns the balance of the account associated with the given address -- `fn advance_block_time(&self, time_diff: u64)` - increases the current value of `block_time` +- `fn block_time(&self) -> u64` - returns the current value of `block_time` in milliseconds, alias: `block_time_millis` +- `fn block_time_secs(&self) -> u64` - retuns the current value of `block_time` in seconds +- `fn advance_block_time(&self, time_diff: u64)` - increases the current value of `block_time` by `time_diff` in milliseconds - `fn get_account(&self, n: usize) -> Address` - returns an n-th address that was prepared for you by Odra in advance; by default, you start with the 0-th account - `fn emitted_event(&self, contract_address: &R, event: T) -> bool` - verifies if the event was emitted by the contract